audio/internal/readerdriver: Refactoring: EOF doesn't matter to determine when to stop the waiting

This commit is contained in:
Hajime Hoshi 2021-05-15 22:39:54 +09:00
parent 7f8648f133
commit 81015a3c19
2 changed files with 2 additions and 2 deletions

View File

@ -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:

View File

@ -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: