mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
audio: don't create an underlying player at Position
This is simply unnecessary.
This commit is contained in:
parent
b9f0db955c
commit
d1ec00e2ba
@ -245,8 +245,8 @@ func (p *playerImpl) Close() error {
|
||||
func (p *playerImpl) Position() time.Duration {
|
||||
p.m.Lock()
|
||||
defer p.m.Unlock()
|
||||
if err := p.ensurePlayer(); err != nil {
|
||||
p.context.setError(err)
|
||||
|
||||
if p.player == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user