mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibAudio: Improve latency on audio queue failures
We don't know what is a good time to wait after an audio buffer fails to be processed by AudioServer. However, it seems like decreasing the wait time to 10ms after such a failure should improve latency and has not caused issues in my testing. After all, 10ms is quite some time in audio sample magnitudes.
This commit is contained in:
committed by
Andreas Kling
parent
96155009dd
commit
c8ced9f11d
@@ -20,7 +20,9 @@ void ClientConnection::enqueue(const Buffer& buffer)
|
||||
auto success = enqueue_buffer(buffer.anonymous_buffer(), buffer.id(), buffer.sample_count());
|
||||
if (success)
|
||||
break;
|
||||
usleep(100000);
|
||||
// FIXME: We don't know what is a good value for this.
|
||||
// For now, decrease it to enable better real-time audio.
|
||||
usleep(10000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user