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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user