diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-07-23 11:21:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-23 11:21:14 +0200 |
commit | a5bc65bbadad814a157283749c1ef8552f1663c4 (patch) | |
tree | 02726cac4b18989faf21a50b92998f9031f0ddcd /scene/resources/audio_stream_sample.cpp | |
parent | 01c866a5993d78d414b81836eec4051c27444b08 (diff) | |
parent | d1ddee225830b28171de031bd1f1918ced21b38f (diff) |
Merge pull request #63265 from reduz/stream-bpm-support
Implement BPM support in AudioStream files.
Diffstat (limited to 'scene/resources/audio_stream_sample.cpp')
-rw-r--r-- | scene/resources/audio_stream_sample.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scene/resources/audio_stream_sample.cpp b/scene/resources/audio_stream_sample.cpp index 30c222bdff..dcd36284d4 100644 --- a/scene/resources/audio_stream_sample.cpp +++ b/scene/resources/audio_stream_sample.cpp @@ -406,6 +406,10 @@ int AudioStreamPlaybackSample::mix(AudioFrame *p_buffer, float p_rate_scale, int return p_frames; } +void AudioStreamPlaybackSample::tag_used_streams() { + base->tag_used(get_playback_position()); +} + AudioStreamPlaybackSample::AudioStreamPlaybackSample() {} ///////////////////// @@ -599,7 +603,7 @@ Error AudioStreamSample::save_to_wav(const String &p_path) { return OK; } -Ref<AudioStreamPlayback> AudioStreamSample::instance_playback() { +Ref<AudioStreamPlayback> AudioStreamSample::instantiate_playback() { Ref<AudioStreamPlaybackSample> sample; sample.instantiate(); sample->base = Ref<AudioStreamSample>(this); |