mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 20:18:59 +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.cond.L.Lock()
|
||||||
p.buf = append(p.buf, buf[:n]...)
|
p.buf = append(p.buf, buf[:n]...)
|
||||||
l := len(p.buf)
|
if err == io.EOF && len(p.buf) == 0 {
|
||||||
p.cond.L.Unlock()
|
|
||||||
|
|
||||||
if err == io.EOF && l == 0 {
|
|
||||||
p.cond.L.Lock()
|
|
||||||
p.eof = true
|
p.eof = true
|
||||||
p.cond.L.Unlock()
|
|
||||||
}
|
}
|
||||||
|
p.cond.L.Unlock()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user