mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 11:48:55 +01:00
audio: Bug fix: Compile error on Go 1.13
This commit is contained in:
parent
49a8a491cd
commit
a17fea39a1
@ -23,6 +23,7 @@ import (
|
|||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"github.com/hajimehoshi/ebiten/v2/audio/internal/go2cpp"
|
"github.com/hajimehoshi/ebiten/v2/audio/internal/go2cpp"
|
||||||
|
"github.com/hajimehoshi/ebiten/v2/internal/jsutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
func isReaderContextAvailable() bool {
|
func isReaderContextAvailable() bool {
|
||||||
@ -138,7 +139,7 @@ func (p *readerDriverPlayerImpl) appendBuffer(this js.Value, args []js.Value) in
|
|||||||
// appendBuffer is called as the 'ended' callback of a buffer.
|
// appendBuffer is called as the 'ended' callback of a buffer.
|
||||||
// 'this' is an AudioBufferSourceNode that already finishes its playing.
|
// 'this' is an AudioBufferSourceNode that already finishes its playing.
|
||||||
for i, n := range p.bufferSourceNodes {
|
for i, n := range p.bufferSourceNodes {
|
||||||
if n.Equal(this) {
|
if jsutil.Equal(n, this) {
|
||||||
p.bufferSourceNodes = append(p.bufferSourceNodes[:i], p.bufferSourceNodes[i+1:]...)
|
p.bufferSourceNodes = append(p.bufferSourceNodes[:i], p.bufferSourceNodes[i+1:]...)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user