audio: Bug fix: compilation error on JavaScript

This commit is contained in:
Hajime Hoshi 2016-04-04 02:53:07 +09:00
parent ab793d9c8b
commit 0b040e92e8

View File

@ -47,12 +47,12 @@ func startPlaying(src io.Reader, sampleRate int) error {
return errors.New("audio: audio couldn't be initialized") return errors.New("audio: audio couldn't be initialized")
} }
p := &player{ p := &player{
src: src, src: src,
sampleRate: sampleRate, sampleRate: sampleRate,
bufferSource: nil, bufferSource: nil,
context: class.New(), context: class.New(),
positionInSamples: int64(p.context.Get("currentTime").Float() * float64(p.sampleRate)),
} }
p.positionInSamples = int64(p.context.Get("currentTime").Float() * float64(p.sampleRate))
go func() { go func() {
defer p.close() defer p.close()
for { for {