From 6a0c5dfb03af30e13f265eb7f9b494aab4a1e469 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 26 Jan 2015 03:53:40 +0900 Subject: [PATCH] audio: Change the number of buffers --- internal/audio/audio_openal.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/audio/audio_openal.go b/internal/audio/audio_openal.go index 5c2b3fd01..b293eb37c 100644 --- a/internal/audio/audio_openal.go +++ b/internal/audio/audio_openal.go @@ -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)