mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
audio/internal/go2cpp: Better waiting condition
This commit is contained in:
parent
dc8217dfeb
commit
9cc5bd80f9
@ -142,7 +142,7 @@ func (p *Player) waitUntilUnpaused() bool {
|
||||
p.cond.L.Lock()
|
||||
defer p.cond.L.Unlock()
|
||||
|
||||
for p.state == playerStatePaused || !p.v.Call("isWritable").Bool() {
|
||||
for p.state == playerStatePaused || (p.state == playerStatePlaying && !p.v.Call("isWritable").Bool()) {
|
||||
p.cond.Wait()
|
||||
}
|
||||
return p.state == playerStatePlaying
|
||||
|
Loading…
Reference in New Issue
Block a user