瀏覽代碼

Merge pull request #5123 from JeffM2501/clean_sound_alias

[raudio] Initialize sound alias properties as if it was a new sound
pull/5127/head
Ray 1 月之前
committed by GitHub
父節點
當前提交
d9392b94c4
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: B5690EEEBB952194
共有 1 個檔案被更改,包括 5 行新增1 行删除
  1. +5
    -1
      src/raudio.c

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

@ -982,9 +982,13 @@ Sound LoadSoundAlias(Sound source)
}
audioBuffer->sizeInFrames = source.stream.buffer->sizeInFrames;
audioBuffer->volume = source.stream.buffer->volume;
audioBuffer->data = source.stream.buffer->data;
// initalize the buffer as if it was new
audioBuffer->volume = 1.0f;
audioBuffer->pitch = 1.0f;
audioBuffer->pan = 0.5f;
sound.frameCount = source.frameCount;
sound.stream.sampleRate = AUDIO.System.device.sampleRate;
sound.stream.sampleSize = 32;

Loading…
取消
儲存