Procházet zdrojové kódy

Audio: Stop forcing fixed sized processing callbacks.

There is no requirement for raylib to have guaranteed fixed sized
audio processing. By disabling it, audio processing can be made more
efficient by not having to run the data through an internal intermediary
buffer.
pull/5577/head
David Reid před 2 dny
rodič
revize
3df5a975ee
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  1. +1
    -0
      src/raudio.c

+ 1
- 0
src/raudio.c Zobrazit soubor

@ -481,6 +481,7 @@ void InitAudioDevice(void)
config.dataCallback = OnSendAudioDataToDevice;
config.pUserData = NULL;
config.noPreSilencedOutputBuffer = true; // raylib pre-silences the output buffer manually
config.noFixedSizedCallback = true; // raylib does not require fixed sized callback guarantees. This bypasses an internal intermediary buffer
result = ma_device_init(&AUDIO.System.context, &config, &AUDIO.System.device);
if (result != MA_SUCCESS)

Načítá se…
Zrušit
Uložit