mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
audio/internal/readerdriver: Refactoring
This commit is contained in:
parent
66999989e1
commit
58f6eb0dea
@ -674,14 +674,10 @@ func (p *playerImpl) loop() {
|
||||
|
||||
p.cond.L.Lock()
|
||||
p.buf = append(p.buf, buf[:n]...)
|
||||
l := len(p.buf)
|
||||
p.cond.L.Unlock()
|
||||
|
||||
if err == io.EOF && l == 0 {
|
||||
p.cond.L.Lock()
|
||||
if err == io.EOF && len(p.buf) == 0 {
|
||||
p.eof = true
|
||||
p.cond.L.Unlock()
|
||||
}
|
||||
p.cond.L.Unlock()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user