audio: Bug fix: runtime error on OpenAL

This commit is contained in:
Hajime Hoshi 2015-02-14 20:01:35 +09:00
parent dc54867401
commit e13e153cb4

View File

@ -148,8 +148,8 @@ func loadChannelBuffer(channel int, bufferSize int) (l, r []int16) {
ch := channels[channel]
length := min(len(ch.l), bufferSize)
inputL := make([]int16, length)
inputR := make([]int16, length)
inputL := make([]int16, bufferSize)
inputR := make([]int16, bufferSize)
copy(inputL, ch.l[:length])
copy(inputR, ch.r[:length])
ch.l = ch.l[length:]