summaryrefslogtreecommitdiff
path: root/scene/audio
diff options
context:
space:
mode:
authorreduz <reduzio@gmail.com>2022-07-21 01:00:58 +0200
committerJuan Linietsky <reduzio@gmail.com>2022-07-23 07:31:17 +0200
commitd1ddee225830b28171de031bd1f1918ced21b38f (patch)
tree59fbad7454e47cfc0f746842108d3d6e10b83a40 /scene/audio
parent976cb7ea9f59813f99e06c4c345c19ff68c2c591 (diff)
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.
Diffstat (limited to 'scene/audio')
-rw-r--r--scene/audio/audio_stream_player.cpp2
1 files changed, 1 insertions, 1 deletions
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<AudioStreamPlayback> stream_playback = stream->instance_playback();
+ Ref<AudioStreamPlayback> 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);