diff options
author | Dave Palais <active.hat0408@fastmail.com> | 2022-09-22 08:54:15 -0500 |
---|---|---|
committer | Genei Shouko <date.aa2@gmail.com> | 2022-09-26 13:52:54 -0500 |
commit | 0c46068af0e9f077d3d68fe1dc647f99a55d7824 (patch) | |
tree | fce4c5b0e3ed2770386baa9468e714b71722468b /servers/audio/effects | |
parent | 8e14f9ba21725a9445f3979742f2fc87c8a7b463 (diff) |
Change time parameters and variables to double type
Addresses #65313
Diffstat (limited to 'servers/audio/effects')
-rw-r--r-- | servers/audio/effects/audio_stream_generator.cpp | 8 | ||||
-rw-r--r-- | servers/audio/effects/audio_stream_generator.h | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/servers/audio/effects/audio_stream_generator.cpp b/servers/audio/effects/audio_stream_generator.cpp index 6365dacc80..b5f772408d 100644 --- a/servers/audio/effects/audio_stream_generator.cpp +++ b/servers/audio/effects/audio_stream_generator.cpp @@ -60,7 +60,7 @@ String AudioStreamGenerator::get_stream_name() const { return "UserFeed"; } -float AudioStreamGenerator::get_length() const { +double AudioStreamGenerator::get_length() const { return 0; } @@ -167,7 +167,7 @@ float AudioStreamGeneratorPlayback::get_stream_sampling_rate() { return generator->get_mix_rate(); } -void AudioStreamGeneratorPlayback::start(float p_from_pos) { +void AudioStreamGeneratorPlayback::start(double p_from_pos) { if (mixed == 0.0) { begin_resample(); } @@ -188,11 +188,11 @@ int AudioStreamGeneratorPlayback::get_loop_count() const { return 0; } -float AudioStreamGeneratorPlayback::get_playback_position() const { +double AudioStreamGeneratorPlayback::get_playback_position() const { return mixed; } -void AudioStreamGeneratorPlayback::seek(float p_time) { +void AudioStreamGeneratorPlayback::seek(double p_time) { //no seek possible } diff --git a/servers/audio/effects/audio_stream_generator.h b/servers/audio/effects/audio_stream_generator.h index a0bed0fda5..21cb3954d3 100644 --- a/servers/audio/effects/audio_stream_generator.h +++ b/servers/audio/effects/audio_stream_generator.h @@ -53,7 +53,7 @@ public: virtual Ref<AudioStreamPlayback> instantiate_playback() override; virtual String get_stream_name() const override; - virtual float get_length() const override; + virtual double get_length() const override; virtual bool is_monophonic() const override; AudioStreamGenerator(); }; @@ -74,14 +74,14 @@ protected: static void _bind_methods(); 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; bool push_frame(const Vector2 &p_frame); bool can_push_buffer(int p_frames) const; |