mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 19:58:54 +01:00
audio/internal/readerdriver: Refactoring: EOF doesn't matter to determine when to stop the waiting
This commit is contained in:
parent
7f8648f133
commit
81015a3c19
@ -651,7 +651,7 @@ func (p *playerImpl) shouldWait() bool {
|
|||||||
case playerPaused:
|
case playerPaused:
|
||||||
return true
|
return true
|
||||||
case playerPlay:
|
case playerPlay:
|
||||||
return len(p.buf) >= p.context.maxBufferSize() || p.eof
|
return len(p.buf) >= p.context.maxBufferSize()
|
||||||
case playerClosed:
|
case playerClosed:
|
||||||
return false
|
return false
|
||||||
default:
|
default:
|
||||||
|
@ -341,7 +341,7 @@ func (p *player) shouldWait() bool {
|
|||||||
// WebAudio doesn't have a notion of pause.
|
// WebAudio doesn't have a notion of pause.
|
||||||
return false
|
return false
|
||||||
case playerPlay:
|
case playerPlay:
|
||||||
return len(p.buf) >= p.context.maxBufferSize() || p.eof
|
return len(p.buf) >= p.context.maxBufferSize()
|
||||||
case playerClosed:
|
case playerClosed:
|
||||||
return false
|
return false
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user