diff options
Diffstat (limited to 'modules/vorbis')
-rw-r--r-- | modules/vorbis/SCsub | 4 | ||||
-rw-r--r-- | modules/vorbis/audio_stream_ogg_vorbis.cpp | 10 | ||||
-rw-r--r-- | modules/vorbis/audio_stream_ogg_vorbis.h | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/modules/vorbis/SCsub b/modules/vorbis/SCsub index d3e4f7e15a..9d2d0feb92 100644 --- a/modules/vorbis/SCsub +++ b/modules/vorbis/SCsub @@ -6,7 +6,7 @@ Import('env_modules') env_vorbis = env_modules.Clone() # Thirdparty source files -if (env['builtin_libvorbis'] != 'no'): +if env['builtin_libvorbis']: thirdparty_dir = "#thirdparty/libvorbis/" thirdparty_sources = [ #"analysis.c", @@ -42,7 +42,7 @@ if (env['builtin_libvorbis'] != 'no'): env_vorbis.Append(CPPPATH=[thirdparty_dir]) # also requires libogg - if (env['builtin_libogg'] != 'no'): + if env['builtin_libogg']: env_vorbis.Append(CPPPATH=["#thirdparty/libogg"]) # Godot source files diff --git a/modules/vorbis/audio_stream_ogg_vorbis.cpp b/modules/vorbis/audio_stream_ogg_vorbis.cpp index 6389c286c2..0afb889199 100644 --- a/modules/vorbis/audio_stream_ogg_vorbis.cpp +++ b/modules/vorbis/audio_stream_ogg_vorbis.cpp @@ -58,7 +58,7 @@ int AudioStreamPlaybackOGGVorbis::_ov_seek_func(void *_f, ogg_int64_t offs, int fa->seek(offs); } else if (whence == SEEK_CUR) { - fa->seek(fa->get_pos() + offs); + fa->seek(fa->get_position() + offs); } else if (whence == SEEK_END) { fa->seek_end(offs); @@ -89,7 +89,7 @@ long AudioStreamPlaybackOGGVorbis::_ov_tell_func(void *_f) { //printf("close %p\n",_f); FileAccess *fa = (FileAccess *)_f; - return fa->get_pos(); + return fa->get_position(); } int AudioStreamPlaybackOGGVorbis::mix(int16_t *p_bufer, int p_frames) { @@ -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_pos() const { +float AudioStreamPlaybackOGGVorbis::get_playback_position() const { int32_t frames = int32_t(frames_mixed); if (frames < 0) @@ -211,7 +211,7 @@ float AudioStreamPlaybackOGGVorbis::get_pos() 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 03b3726b52..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_pos() 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; } |