summaryrefslogtreecommitdiff
path: root/servers/audio
diff options
context:
space:
mode:
authorEoin O'Neill <eoinoneill1991@gmail.com>2022-02-10 21:01:04 -0800
committerEoin O'Neill <eoinoneill1991@gmail.com>2022-02-22 18:11:40 -0800
commitded9dc1e825f1b050c95afa6be786723420e1a2b (patch)
tree25c41c018b65fd3eaa89aec1031b757693ac1ef5 /servers/audio
parent002ab1060862431731cd528a0887ad8362ab404c (diff)
Add missing binding to AudioStream class
This allows for the extension of AudioStream where you can call `instance_plackback` on child AudioStream instances within gdscript, much like the implementation of some child classes in C++. See `AudioStreamRandomPitch` for an example of how this can be used.
Diffstat (limited to 'servers/audio')
-rw-r--r--servers/audio/audio_stream.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/servers/audio/audio_stream.cpp b/servers/audio/audio_stream.cpp
index 39060286a4..a710658bff 100644
--- a/servers/audio/audio_stream.cpp
+++ b/servers/audio/audio_stream.cpp
@@ -200,6 +200,7 @@ bool AudioStream::is_monophonic() const {
void AudioStream::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_length"), &AudioStream::get_length);
ClassDB::bind_method(D_METHOD("is_monophonic"), &AudioStream::is_monophonic);
+ ClassDB::bind_method(D_METHOD("instance_playback"), &AudioStream::instance_playback);
GDVIRTUAL_BIND(_instance_playback);
GDVIRTUAL_BIND(_get_stream_name);
GDVIRTUAL_BIND(_get_length);