mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 19:28:57 +01:00
audio: bug fix: position adjustment should not start before ready
Updates #2901
This commit is contained in:
parent
9cc017412f
commit
9cd525a04e
@ -356,6 +356,10 @@ func (p *playerImpl) updatePosition() {
|
||||
p.adjustedPosition = 0
|
||||
return
|
||||
}
|
||||
if !p.context.IsReady() {
|
||||
p.adjustedPosition = 0
|
||||
return
|
||||
}
|
||||
|
||||
samples := (p.stream.position() - int64(p.player.BufferedSize())) / bytesPerSampleInt16
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user