mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
audio: Remove redundant code in JS
This commit is contained in:
parent
5d5f27bcbf
commit
9a7e5683a1
@ -88,8 +88,6 @@ func (p *Player) Proceed(data []byte) error {
|
|||||||
p.bufferSource.Set("buffer", buf)
|
p.bufferSource.Set("buffer", buf)
|
||||||
p.bufferSource.Call("connect", p.context.Get("destination"))
|
p.bufferSource.Call("connect", p.context.Get("destination"))
|
||||||
p.bufferSource.Call("start", float64(p.positionInSamples)/float64(p.sampleRate))
|
p.bufferSource.Call("start", float64(p.positionInSamples)/float64(p.sampleRate))
|
||||||
// Call 'stop' or we'll get noisy sound especially on Chrome.
|
|
||||||
//p.bufferSource.Call("stop", float64(p.positionInSamples+int64(len(il)))/float64(p.sampleRate))
|
|
||||||
p.positionInSamples += int64(len(il))
|
p.positionInSamples += int64(len(il))
|
||||||
p.bufferedData = p.bufferedData[dataSize:]
|
p.bufferedData = p.bufferedData[dataSize:]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user