From 3acb3e08ce23b114fb0e0493801fbba1192e791d Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 20 Mar 2016 04:12:02 +0900 Subject: [PATCH] audio/vorbis: Bug fix: Set sample rate in JavaScript --- exp/audio/vorbis/vorbis_js.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exp/audio/vorbis/vorbis_js.go b/exp/audio/vorbis/vorbis_js.go index d76bc3596..6a230c140 100644 --- a/exp/audio/vorbis/vorbis_js.go +++ b/exp/audio/vorbis/vorbis_js.go @@ -33,7 +33,9 @@ func Decode(context *audio.Context, src io.Reader) (Stream, error) { if err != nil { return nil, err } - s := &stream{} + s := &stream{ + sampleRate: context.SampleRate(), + } ch := make(chan struct{}) // TODO: 1 is a correct second argument?