From 92bfbfddd653b232c2765caa96cc385c329a3d98 Mon Sep 17 00:00:00 2001 From: David Reid Date: Sat, 21 Feb 2026 10:26:10 +1000 Subject: [PATCH] Audio: Stop pre-silencing the miniaudio output buffer. raylib already manually silences the output buffer prior to mixing so there is no reason to have miniaudio also do it. It can therefore be disabled via the device config to make data processing slightly more efficient. --- src/raudio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/raudio.c b/src/raudio.c index cf6f1fa59..e1ed70688 100644 --- a/src/raudio.c +++ b/src/raudio.c @@ -480,6 +480,7 @@ void InitAudioDevice(void) config.sampleRate = AUDIO_DEVICE_SAMPLE_RATE; config.dataCallback = OnSendAudioDataToDevice; config.pUserData = NULL; + config.noPreSilencedOutputBuffer = true; // raylib pre-silences the output buffer manually result = ma_device_init(&AUDIO.System.context, &config, &AUDIO.System.device); if (result != MA_SUCCESS)