summaryrefslogtreecommitdiff
path: root/modules/minimp3
diff options
context:
space:
mode:
Diffstat (limited to 'modules/minimp3')
-rw-r--r--modules/minimp3/audio_stream_mp3.cpp14
-rw-r--r--modules/minimp3/audio_stream_mp3.h12
2 files changed, 13 insertions, 13 deletions
diff --git a/modules/minimp3/audio_stream_mp3.cpp b/modules/minimp3/audio_stream_mp3.cpp
index 98bcdea8f4..acb92b25e1 100644
--- a/modules/minimp3/audio_stream_mp3.cpp
+++ b/modules/minimp3/audio_stream_mp3.cpp
@@ -104,7 +104,7 @@ float AudioStreamPlaybackMP3::get_stream_sampling_rate() {
return mp3_stream->sample_rate;
}
-void AudioStreamPlaybackMP3::start(float p_from_pos) {
+void AudioStreamPlaybackMP3::start(double p_from_pos) {
active = true;
seek(p_from_pos);
loops = 0;
@@ -123,11 +123,11 @@ int AudioStreamPlaybackMP3::get_loop_count() const {
return loops;
}
-float AudioStreamPlaybackMP3::get_playback_position() const {
- return float(frames_mixed) / mp3_stream->sample_rate;
+double AudioStreamPlaybackMP3::get_playback_position() const {
+ return double(frames_mixed) / mp3_stream->sample_rate;
}
-void AudioStreamPlaybackMP3::seek(float p_time) {
+void AudioStreamPlaybackMP3::seek(double p_time) {
if (!active) {
return;
}
@@ -217,15 +217,15 @@ bool AudioStreamMP3::has_loop() const {
return loop;
}
-void AudioStreamMP3::set_loop_offset(float p_seconds) {
+void AudioStreamMP3::set_loop_offset(double p_seconds) {
loop_offset = p_seconds;
}
-float AudioStreamMP3::get_loop_offset() const {
+double AudioStreamMP3::get_loop_offset() const {
return loop_offset;
}
-float AudioStreamMP3::get_length() const {
+double AudioStreamMP3::get_length() const {
return length;
}
diff --git a/modules/minimp3/audio_stream_mp3.h b/modules/minimp3/audio_stream_mp3.h
index 428ac1240e..c34c1dc5fa 100644
--- a/modules/minimp3/audio_stream_mp3.h
+++ b/modules/minimp3/audio_stream_mp3.h
@@ -61,14 +61,14 @@ protected:
virtual float get_stream_sampling_rate() override;
public:
- virtual void start(float p_from_pos = 0.0) override;
+ virtual void start(double p_from_pos = 0.0) override;
virtual void stop() override;
virtual bool is_playing() const override;
virtual int get_loop_count() const override; //times it looped
- virtual float get_playback_position() const override;
- virtual void seek(float p_time) override;
+ virtual double get_playback_position() const override;
+ virtual void seek(double p_time) override;
virtual void tag_used_streams() override;
@@ -104,8 +104,8 @@ public:
void set_loop(bool p_enable);
virtual bool has_loop() const override;
- void set_loop_offset(float p_seconds);
- float get_loop_offset() const;
+ void set_loop_offset(double p_seconds);
+ double get_loop_offset() const;
void set_bpm(double p_bpm);
virtual double get_bpm() const override;
@@ -122,7 +122,7 @@ public:
void set_data(const Vector<uint8_t> &p_data);
Vector<uint8_t> get_data() const;
- virtual float get_length() const override;
+ virtual double get_length() const override;
virtual bool is_monophonic() const override;