audio: time.Sleep for Windows

This commit is contained in:
Hajime Hoshi 2016-03-14 01:13:11 +09:00
parent d397842ada
commit 1bb8a8b4bf

View File

@ -27,7 +27,7 @@ import "C"
import (
"fmt"
"io"
"runtime"
"time"
"unsafe"
)
@ -119,7 +119,7 @@ func startPlaying(src io.Reader, sampleRate int) (*player, error) {
// TODO: Propagate this error?
panic(err)
}
runtime.Gosched()
time.Sleep(1 * time.Millisecond)
}
// TODO: Finalize the wave handler
}()