diff options
| author | Marcelo Fernandez | 2017-09-21 00:31:36 -0300 |
|---|---|---|
| committer | Rémi Verschelde | 2017-09-23 16:55:00 +0200 |
| commit | 46af050e93ddda77fd6316b0d041b8e9e6f0cd49 (patch) | |
| tree | e155e527741cfc132b82b52014967849d30b812f /modules/opus/audio_stream_opus.cpp | |
| parent | 650e0cf3186df2239cbcb6c178533a09732f3f02 (diff) | |
| download | godot-46af050e93ddda77fd6316b0d041b8e9e6f0cd49.tar.gz godot-46af050e93ddda77fd6316b0d041b8e9e6f0cd49.tar.zst godot-46af050e93ddda77fd6316b0d041b8e9e6f0cd49.zip | |
Diffstat (limited to 'modules/opus/audio_stream_opus.cpp')
| -rw-r--r-- | modules/opus/audio_stream_opus.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/opus/audio_stream_opus.cpp b/modules/opus/audio_stream_opus.cpp index 995f4ddcc..c7748b9b2 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) |
