summaryrefslogtreecommitdiff
path: root/modules/stb_vorbis
diff options
context:
space:
mode:
authorMarcelo Fernandez <marcelofg55@gmail.com>2017-09-21 00:31:36 -0300
committerRĂ©mi Verschelde <rverschelde@gmail.com>2017-09-23 16:55:00 +0200
commit46af050e93ddda77fd6316b0d041b8e9e6f0cd49 (patch)
treee155e527741cfc132b82b52014967849d30b812f /modules/stb_vorbis
parent650e0cf3186df2239cbcb6c178533a09732f3f02 (diff)
Rename get_position => get_playback_position and seek_pos => seek on audio classes
Diffstat (limited to 'modules/stb_vorbis')
-rw-r--r--modules/stb_vorbis/audio_stream_ogg_vorbis.cpp8
-rw-r--r--modules/stb_vorbis/audio_stream_ogg_vorbis.h4
2 files changed, 6 insertions, 6 deletions
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