浏览代码

Fix `UpdateSound` parameter name (#3405)

pull/3409/head
Daniil Kisel 1年前
committed by GitHub
父节点
当前提交
5a0d9c8d43
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      src/raudio.c

+ 2
- 2
src/raudio.c 查看文件

@ -981,14 +981,14 @@ void UnloadSoundAlias(Sound alias)
}
// Update sound buffer with new data
void UpdateSound(Sound sound, const void *data, int sampleCount)
void UpdateSound(Sound sound, const void *data, int frameCount)
{
if (sound.stream.buffer != NULL)
{
StopAudioBuffer(sound.stream.buffer);
// TODO: May want to lock/unlock this since this data buffer is read at mixing time
memcpy(sound.stream.buffer->data, data, sampleCount*ma_get_bytes_per_frame(sound.stream.buffer->converter.formatIn, sound.stream.buffer->converter.channelsIn));
memcpy(sound.stream.buffer->data, data, frameCount*ma_get_bytes_per_frame(sound.stream.buffer->converter.formatIn, sound.stream.buffer->converter.channelsIn));
}
}

正在加载...
取消
保存