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/audio/audio_stream_player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scene/audio') diff --git a/scene/audio/audio_stream_player.cpp b/scene/audio/audio_stream_player.cpp index efb647af29..04debcab05 100644 --- a/scene/audio/audio_stream_player.cpp +++ b/scene/audio/audio_stream_player.cpp @@ -136,7 +136,7 @@ void AudioStreamPlayer::play(float p_from_pos) { if (stream->is_monophonic() && is_playing()) { stop(); } - Ref stream_playback = stream->instance_playback(); + Ref stream_playback = stream->instantiate_playback(); ERR_FAIL_COND_MSG(stream_playback.is_null(), "Failed to instantiate playback."); AudioServer::get_singleton()->start_playback_stream(stream_playback, bus, _get_volume_vector(), p_from_pos, pitch_scale); -- cgit v1.2.3