mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +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()
|
p.cond.L.Lock()
|
||||||
defer p.cond.L.Unlock()
|
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()
|
p.cond.Wait()
|
||||||
}
|
}
|
||||||
return p.state == playerStatePlaying
|
return p.state == playerStatePlaying
|
||||||
|
Loading…
Reference in New Issue
Block a user