audio: Guarantee that (*Player).Current's returning value is increased monotonically

Closes #1501
This commit is contained in:
Hajime Hoshi 2021-03-31 23:41:24 +09:00
parent 83dc3966e7
commit 0de024229d

View File

@ -398,6 +398,9 @@ func (p *Player) Pause() {
}
// Current returns the current position in time.
//
// As long as the player continues to play, Current's returning value is increased monotonically,
// even though the source stream loops and its position goes back.
func (p *Player) Current() time.Duration {
return p.p.Current()
}