summaryrefslogtreecommitdiff
path: root/modules/ogg
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 /modules/ogg
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 'modules/ogg')
-rw-r--r--modules/ogg/ogg_packet_sequence.cpp2
-rw-r--r--modules/ogg/ogg_packet_sequence.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/ogg/ogg_packet_sequence.cpp b/modules/ogg/ogg_packet_sequence.cpp
index da52ecfdd5..e18fa9e590 100644
--- a/modules/ogg/ogg_packet_sequence.cpp
+++ b/modules/ogg/ogg_packet_sequence.cpp
@@ -106,7 +106,7 @@ float OGGPacketSequence::get_length() const {
return granule_pos / sampling_rate;
}
-Ref<OGGPacketSequencePlayback> OGGPacketSequence::instance_playback() {
+Ref<OGGPacketSequencePlayback> OGGPacketSequence::instantiate_playback() {
Ref<OGGPacketSequencePlayback> playback;
playback.instantiate();
playback->ogg_packet_sequence = Ref<OGGPacketSequence>(this);
diff --git a/modules/ogg/ogg_packet_sequence.h b/modules/ogg/ogg_packet_sequence.h
index 73e3cb4fff..76b673c6ac 100644
--- a/modules/ogg/ogg_packet_sequence.h
+++ b/modules/ogg/ogg_packet_sequence.h
@@ -86,7 +86,7 @@ public:
// Returns the granule position of the last page in this sequence.
int64_t get_final_granule_pos() const;
- Ref<OGGPacketSequencePlayback> instance_playback();
+ Ref<OGGPacketSequencePlayback> instantiate_playback();
OGGPacketSequence() {}
virtual ~OGGPacketSequence() {}