aboutsummaryrefslogtreecommitdiff
path: root/src/sound.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-04-16 18:03:23 +0200
committerdec05eba <dec05eba@protonmail.com>2024-04-16 18:11:29 +0200
commit8c43a25543a4d956a5aac2375612625de09a7044 (patch)
tree798512948c67f77b307c125b46fbeaa66e3e923c /src/sound.cpp
parent7e239c8aa289bbe71bcbb0bcc5908ca02cee4861 (diff)
Remove audio compenstation
Diffstat (limited to 'src/sound.cpp')
-rw-r--r--src/sound.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sound.cpp b/src/sound.cpp
index 25f1080..53000bd 100644
--- a/src/sound.cpp
+++ b/src/sound.cpp
@@ -199,11 +199,13 @@ static int pa_sound_device_read(pa_handle *p, double timeout_seconds) {
continue;
}
+ pa_operation_unref(pa_stream_update_timing_info(p->stream, NULL, NULL));
+ // TODO: Deal with one pa_stream_peek not being enough. In that case we need to add multiple of these together(?)
if(pa_stream_get_latency(p->stream, &latency, &negative) >= 0) {
- p->latency_seconds = negative ? -(int64_t)latency : latency;
- p->latency_seconds *= 0.0000001;
+ p->latency_seconds = negative ? -(double)latency : latency;
if(p->latency_seconds < 0.0)
p->latency_seconds = 0.0;
+ p->latency_seconds *= 0.0000001;
}
}