1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:47:35 +00:00

AudioServer: Reduce hardware audio buffer to 512 samples

This commit is contained in:
kleines Filmröllchen 2022-06-15 22:04:56 +02:00 committed by Linus Groh
parent 1c23a222b2
commit ef1c97e3d8

View file

@ -30,7 +30,7 @@ namespace AudioServer {
// This is to prevent clipping when two streams with low headroom (e.g. normalized & compressed) are playing.
constexpr double SAMPLE_HEADROOM = 0.95;
// The size of the buffer in samples that the hardware receives through write() calls to the audio device.
constexpr size_t HARDWARE_BUFFER_SIZE = 1024;
constexpr size_t HARDWARE_BUFFER_SIZE = 512;
// The hardware buffer size in bytes; there's two channels of 16-bit samples.
constexpr size_t HARDWARE_BUFFER_SIZE_BYTES = HARDWARE_BUFFER_SIZE * 2 * sizeof(i16);