mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 01:29:17 +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:
parent
96155009dd
commit
c8ced9f11d
Notes:
sideshowbarker
2024-07-18 10:22:01 +09:00
Author: https://github.com/kleinesfilmroellchen
Commit: c8ced9f11d
Pull-request: https://github.com/SerenityOS/serenity/pull/8456
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue