summaryrefslogtreecommitdiff
path: root/servers/audio/effects/audio_stream_generator.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-07-23 11:21:14 +0200
committerGitHub <noreply@github.com>2022-07-23 11:21:14 +0200
commita5bc65bbadad814a157283749c1ef8552f1663c4 (patch)
tree02726cac4b18989faf21a50b92998f9031f0ddcd /servers/audio/effects/audio_stream_generator.cpp
parent01c866a5993d78d414b81836eec4051c27444b08 (diff)
parentd1ddee225830b28171de031bd1f1918ced21b38f (diff)
Merge pull request #63265 from reduz/stream-bpm-support
Implement BPM support in AudioStream files.
Diffstat (limited to 'servers/audio/effects/audio_stream_generator.cpp')
-rw-r--r--servers/audio/effects/audio_stream_generator.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/servers/audio/effects/audio_stream_generator.cpp b/servers/audio/effects/audio_stream_generator.cpp
index 46de1692e4..6365dacc80 100644
--- a/servers/audio/effects/audio_stream_generator.cpp
+++ b/servers/audio/effects/audio_stream_generator.cpp
@@ -46,7 +46,7 @@ float AudioStreamGenerator::get_buffer_length() const {
return buffer_len;
}
-Ref<AudioStreamPlayback> AudioStreamGenerator::instance_playback() {
+Ref<AudioStreamPlayback> AudioStreamGenerator::instantiate_playback() {
Ref<AudioStreamGeneratorPlayback> playback;
playback.instantiate();
playback->generator = this;
@@ -196,6 +196,10 @@ void AudioStreamGeneratorPlayback::seek(float p_time) {
//no seek possible
}
+void AudioStreamGeneratorPlayback::tag_used_streams() {
+ generator->tag_used(0);
+}
+
void AudioStreamGeneratorPlayback::_bind_methods() {
ClassDB::bind_method(D_METHOD("push_frame", "frame"), &AudioStreamGeneratorPlayback::push_frame);
ClassDB::bind_method(D_METHOD("can_push_buffer", "amount"), &AudioStreamGeneratorPlayback::can_push_buffer);