diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/opus/audio_stream_opus.cpp | 6 | ||||
-rw-r--r-- | modules/opus/audio_stream_opus.h | 4 | ||||
-rw-r--r-- | modules/stb_vorbis/audio_stream_ogg_vorbis.cpp | 8 | ||||
-rw-r--r-- | modules/stb_vorbis/audio_stream_ogg_vorbis.h | 4 | ||||
-rw-r--r-- | modules/theora/video_stream_theora.cpp | 4 | ||||
-rw-r--r-- | modules/theora/video_stream_theora.h | 4 | ||||
-rw-r--r-- | modules/vorbis/audio_stream_ogg_vorbis.cpp | 6 | ||||
-rw-r--r-- | modules/vorbis/audio_stream_ogg_vorbis.h | 4 | ||||
-rw-r--r-- | modules/webm/video_stream_webm.cpp | 4 | ||||
-rw-r--r-- | modules/webm/video_stream_webm.h | 4 |
10 files changed, 24 insertions, 24 deletions
diff --git a/modules/opus/audio_stream_opus.cpp b/modules/opus/audio_stream_opus.cpp index 995f4ddcc6..c7748b9b21 100644 --- a/modules/opus/audio_stream_opus.cpp +++ b/modules/opus/audio_stream_opus.cpp @@ -247,7 +247,7 @@ void AudioStreamPlaybackOpus::play(float p_from) { frames_mixed = pre_skip; playing = true; if (p_from > 0) { - seek_pos(p_from); + seek(p_from); } } @@ -256,7 +256,7 @@ void AudioStreamPlaybackOpus::stop() { playing = false; } -void AudioStreamPlaybackOpus::seek_pos(float p_time) { +void AudioStreamPlaybackOpus::seek(float p_time) { if (!playing) return; ogg_int64_t pcm_offset = (ogg_int64_t)(p_time * osrate); bool ok = op_pcm_seek(opus_file, pcm_offset) == 0; @@ -340,7 +340,7 @@ float AudioStreamPlaybackOpus::get_length() const { return length; } -float AudioStreamPlaybackOpus::get_position() const { +float AudioStreamPlaybackOpus::get_playback_position() const { int32_t frames = int32_t(frames_mixed); if (frames < 0) diff --git a/modules/opus/audio_stream_opus.h b/modules/opus/audio_stream_opus.h index c7a053acd3..7b7740a804 100644 --- a/modules/opus/audio_stream_opus.h +++ b/modules/opus/audio_stream_opus.h @@ -99,8 +99,8 @@ public: virtual int get_loop_count() const { return repeats; } - virtual float get_position() const; - virtual void seek_pos(float p_time); + virtual float get_playback_position() const; + virtual void seek(float p_time); virtual int get_channels() const { return stream_channels; } virtual int get_mix_rate() const { return osrate; } diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp index a3206187c0..27ea310780 100644 --- a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp +++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp @@ -58,7 +58,7 @@ void AudioStreamPlaybackOGGVorbis::_mix_internal(AudioFrame *p_buffer, int p_fra //end of file! if (vorbis_stream->loop) { //loop - seek_pos(vorbis_stream->loop_offset); + seek(vorbis_stream->loop_offset); loops++; } else { for (int i = mixed; i < p_frames; i++) { @@ -78,7 +78,7 @@ float AudioStreamPlaybackOGGVorbis::get_stream_sampling_rate() { void AudioStreamPlaybackOGGVorbis::start(float p_from_pos) { active = true; - seek_pos(p_from_pos); + seek(p_from_pos); loops = 0; _begin_resample(); } @@ -97,11 +97,11 @@ int AudioStreamPlaybackOGGVorbis::get_loop_count() const { return loops; } -float AudioStreamPlaybackOGGVorbis::get_position() const { +float AudioStreamPlaybackOGGVorbis::get_playback_position() const { return float(frames_mixed) / vorbis_stream->sample_rate; } -void AudioStreamPlaybackOGGVorbis::seek_pos(float p_time) { +void AudioStreamPlaybackOGGVorbis::seek(float p_time) { if (!active) return; diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.h b/modules/stb_vorbis/audio_stream_ogg_vorbis.h index c38402fb3a..f4d381897b 100644 --- a/modules/stb_vorbis/audio_stream_ogg_vorbis.h +++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.h @@ -67,8 +67,8 @@ public: virtual int get_loop_count() const; //times it looped - virtual float get_position() const; - virtual void seek_pos(float p_time); + virtual float get_playback_position() const; + virtual void seek(float p_time); virtual float get_length() const; //if supported, otherwise return 0 diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp index 603c31195d..c75bec31df 100644 --- a/modules/theora/video_stream_theora.cpp +++ b/modules/theora/video_stream_theora.cpp @@ -634,12 +634,12 @@ int VideoStreamPlaybackTheora::get_loop_count() const { return 0; }; -float VideoStreamPlaybackTheora::get_position() const { +float VideoStreamPlaybackTheora::get_playback_position() const { return get_time(); }; -void VideoStreamPlaybackTheora::seek_pos(float p_time){ +void VideoStreamPlaybackTheora::seek(float p_time){ // no }; diff --git a/modules/theora/video_stream_theora.h b/modules/theora/video_stream_theora.h index aeb5fa3511..484a1a7fb9 100644 --- a/modules/theora/video_stream_theora.h +++ b/modules/theora/video_stream_theora.h @@ -140,8 +140,8 @@ public: virtual int get_loop_count() const; - virtual float get_position() const; - virtual void seek_pos(float p_time); + virtual float get_playback_position() const; + virtual void seek(float p_time); void set_file(const String &p_file); diff --git a/modules/vorbis/audio_stream_ogg_vorbis.cpp b/modules/vorbis/audio_stream_ogg_vorbis.cpp index 52aa2c5ee0..0afb889199 100644 --- a/modules/vorbis/audio_stream_ogg_vorbis.cpp +++ b/modules/vorbis/audio_stream_ogg_vorbis.cpp @@ -180,7 +180,7 @@ void AudioStreamPlaybackOGGVorbis::play(float p_from) { frames_mixed = 0; playing = true; if (p_from > 0) { - seek_pos(p_from); + seek(p_from); } } @@ -203,7 +203,7 @@ void AudioStreamPlaybackOGGVorbis::stop() { //_clear(); } -float AudioStreamPlaybackOGGVorbis::get_position() const { +float AudioStreamPlaybackOGGVorbis::get_playback_position() const { int32_t frames = int32_t(frames_mixed); if (frames < 0) @@ -211,7 +211,7 @@ float AudioStreamPlaybackOGGVorbis::get_position() const { return double(frames) / stream_srate; } -void AudioStreamPlaybackOGGVorbis::seek_pos(float p_time) { +void AudioStreamPlaybackOGGVorbis::seek(float p_time) { if (!playing) return; diff --git a/modules/vorbis/audio_stream_ogg_vorbis.h b/modules/vorbis/audio_stream_ogg_vorbis.h index 9f1d78850d..929b2651e9 100644 --- a/modules/vorbis/audio_stream_ogg_vorbis.h +++ b/modules/vorbis/audio_stream_ogg_vorbis.h @@ -96,8 +96,8 @@ public: virtual int get_loop_count() const; - virtual float get_position() const; - virtual void seek_pos(float p_time); + virtual float get_playback_position() const; + virtual void seek(float p_time); virtual int get_channels() const { return stream_channels; } virtual int get_mix_rate() const { return stream_srate; } diff --git a/modules/webm/video_stream_webm.cpp b/modules/webm/video_stream_webm.cpp index 0b33ab6a70..2ec6b27471 100644 --- a/modules/webm/video_stream_webm.cpp +++ b/modules/webm/video_stream_webm.cpp @@ -204,11 +204,11 @@ float VideoStreamPlaybackWebm::get_length() const { return 0.0f; } -float VideoStreamPlaybackWebm::get_position() const { +float VideoStreamPlaybackWebm::get_playback_position() const { return video_pos; } -void VideoStreamPlaybackWebm::seek_pos(float p_time) { +void VideoStreamPlaybackWebm::seek(float p_time) { //Not implemented } diff --git a/modules/webm/video_stream_webm.h b/modules/webm/video_stream_webm.h index 36b0f02c5c..fc0720967a 100644 --- a/modules/webm/video_stream_webm.h +++ b/modules/webm/video_stream_webm.h @@ -81,8 +81,8 @@ public: virtual float get_length() const; - virtual float get_position() const; - virtual void seek_pos(float p_time); + virtual float get_playback_position() const; + virtual void seek(float p_time); virtual void set_audio_track(int p_idx); |