浏览代码

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 1周前
父节点
当前提交
3df5a975ee
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. +1
    -0
      src/raudio.c

+ 1
- 0
src/raudio.c 查看文件

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

正在加载...
取消
保存