From d1ddee225830b28171de031bd1f1918ced21b38f Mon Sep 17 00:00:00 2001 From: reduz Date: Thu, 21 Jul 2022 01:00:58 +0200 Subject: Implement BPM support Based on #62896, only implements the BPM support part. * Implements BPM support in the AudioStreamOGG/MP3 importers. * Can select BPM/Bar Size and total beats in a song file, as well as edit looping points. * Looping is now BPM aware * Added a special importer UI for configuring this. * Added a special preview showing the audio waveform as well as the playback position in the resource picker. * Renamed `AudioStream::instance` to `instantiate` for correctness. --- scene/resources/audio_stream_sample.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scene/resources/audio_stream_sample.h') diff --git a/scene/resources/audio_stream_sample.h b/scene/resources/audio_stream_sample.h index 357febc27a..2e694cffe2 100644 --- a/scene/resources/audio_stream_sample.h +++ b/scene/resources/audio_stream_sample.h @@ -75,6 +75,8 @@ public: virtual int mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) override; + virtual void tag_used_streams() override; + AudioStreamPlaybackSample(); }; @@ -144,7 +146,7 @@ public: Error save_to_wav(const String &p_path); - virtual Ref instance_playback() override; + virtual Ref instantiate_playback() override; virtual String get_stream_name() const override; AudioStreamSample(); -- cgit v1.2.3