Browse Source

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.
pull/5577/head
David Reid 2 days ago
parent
commit
92bfbfddd6
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      src/raudio.c

+ 1
- 0
src/raudio.c View File

@ -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)

Loading…
Cancel
Save