Clean up latency related functions
This commit is contained in:
parent
e5ed112d69
commit
af9bb0ea15
6 changed files with 29 additions and 27 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue