mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +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
|
p.adjustedPosition = 0
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if !p.context.IsReady() {
|
||||||
|
p.adjustedPosition = 0
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
samples := (p.stream.position() - int64(p.player.BufferedSize())) / bytesPerSampleInt16
|
samples := (p.stream.position() - int64(p.player.BufferedSize())) / bytesPerSampleInt16
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user