audio: Change the number of buffers

This commit is contained in:
Hajime Hoshi 2015-01-26 03:53:40 +09:00
parent 205c6f1462
commit 6a0c5dfb03

View File

@ -62,7 +62,9 @@ func initialize() {
emptyBytes := make([]byte, 4*bufferSize)
for _, source := range sources {
const bufferNum = 4
// 3 is the least number?
// http://stackoverflow.com/questions/14932004/play-sound-with-openalstream
const bufferNum = 3
buffers := openal.NewBuffers(bufferNum)
for _, buffer := range buffers {
buffer.SetData(openal.FormatStereo16, emptyBytes, SampleRate)