mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-28 03:32:45 +01:00
audio: Bug fix: runtime error on OpenAL
This commit is contained in:
parent
dc54867401
commit
e13e153cb4
@ -148,8 +148,8 @@ func loadChannelBuffer(channel int, bufferSize int) (l, r []int16) {
|
|||||||
|
|
||||||
ch := channels[channel]
|
ch := channels[channel]
|
||||||
length := min(len(ch.l), bufferSize)
|
length := min(len(ch.l), bufferSize)
|
||||||
inputL := make([]int16, length)
|
inputL := make([]int16, bufferSize)
|
||||||
inputR := make([]int16, length)
|
inputR := make([]int16, bufferSize)
|
||||||
copy(inputL, ch.l[:length])
|
copy(inputL, ch.l[:length])
|
||||||
copy(inputR, ch.r[:length])
|
copy(inputR, ch.r[:length])
|
||||||
ch.l = ch.l[length:]
|
ch.l = ch.l[length:]
|
||||||
|
Loading…
Reference in New Issue
Block a user