mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:07:34 +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
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