summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
Diffstat (limited to 'servers')
-rw-r--r--servers/audio/audio_server_sw.cpp2
-rw-r--r--servers/audio/audio_server_sw.h2
-rw-r--r--servers/audio_server.cpp1
3 files changed, 4 insertions, 1 deletions
diff --git a/servers/audio/audio_server_sw.cpp b/servers/audio/audio_server_sw.cpp
index 141c940615..417a582da6 100644
--- a/servers/audio/audio_server_sw.cpp
+++ b/servers/audio/audio_server_sw.cpp
@@ -920,7 +920,7 @@ float AudioServerSW::get_event_voice_global_volume_scale() const {
double AudioServerSW::get_output_delay() const {
- return _output_delay;
+ return _output_delay+AudioDriverSW::get_singleton()->get_latency();
}
double AudioServerSW::get_mix_time() const {
diff --git a/servers/audio/audio_server_sw.h b/servers/audio/audio_server_sw.h
index 250855a43e..c566e129c1 100644
--- a/servers/audio/audio_server_sw.h
+++ b/servers/audio/audio_server_sw.h
@@ -256,6 +256,8 @@ public:
virtual void unlock()=0;
virtual void finish()=0;
+ virtual float get_latency() { return 0; }
+
diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp
index 7c4f8b185a..c155f5204a 100644
--- a/servers/audio_server.cpp
+++ b/servers/audio_server.cpp
@@ -164,6 +164,7 @@ void AudioServer::_bind_methods() {
BIND_CONSTANT( REVERB_HALL );
GLOBAL_DEF("audio/stream_buffering_ms",500);
+ GLOBAL_DEF("audio/video_delay_compensation_ms",300);
}