summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2019-04-27 12:22:47 -0300
committerJuan Linietsky <reduzio@gmail.com>2019-04-27 12:23:05 -0300
commitaf9bb0ea15dfd3dfe8950fcfcce364485dadd92a (patch)
tree2005fc12ae91fa16fca6f14276a1c31b08c8786d /modules
parente5ed112d69fb0a4118b8b40de4d3851cac845445 (diff)
Clean up latency related functions
Diffstat (limited to 'modules')
-rw-r--r--modules/theora/video_stream_theora.cpp2
-rw-r--r--modules/webm/video_stream_webm.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp
index 14c5ddd7f2..8db0799b47 100644
--- a/modules/theora/video_stream_theora.cpp
+++ b/modules/theora/video_stream_theora.cpp
@@ -365,7 +365,7 @@ void VideoStreamPlaybackTheora::set_file(const String &p_file) {
float VideoStreamPlaybackTheora::get_time() const {
- return time - AudioServer::get_singleton()->get_output_delay() - delay_compensation; //-((get_total())/(float)vi.rate);
+ return time - AudioServer::get_singleton()->get_output_latency() - delay_compensation; //-((get_total())/(float)vi.rate);
};
Ref<Texture> VideoStreamPlaybackTheora::get_texture() {
diff --git a/modules/webm/video_stream_webm.cpp b/modules/webm/video_stream_webm.cpp
index 06f9e39dc7..f2497eeec1 100644
--- a/modules/webm/video_stream_webm.cpp
+++ b/modules/webm/video_stream_webm.cpp
@@ -375,7 +375,7 @@ int VideoStreamPlaybackWebm::get_mix_rate() const {
inline bool VideoStreamPlaybackWebm::has_enough_video_frames() const {
if (video_frames_pos > 0) {
- const double audio_delay = AudioServer::get_singleton()->get_output_delay();
+ const double audio_delay = AudioServer::get_singleton()->get_output_latency();
const double video_time = video_frames[video_frames_pos - 1]->time;
return video_time >= time + audio_delay + delay_compensation;
}
@@ -383,7 +383,7 @@ inline bool VideoStreamPlaybackWebm::has_enough_video_frames() const {
}
bool VideoStreamPlaybackWebm::should_process(WebMFrame &video_frame) {
- const double audio_delay = AudioServer::get_singleton()->get_output_delay();
+ const double audio_delay = AudioServer::get_singleton()->get_output_latency();
return video_frame.time >= time + audio_delay + delay_compensation;
}