mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 02:42:02 +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 {
|
func (p *playerImpl) Position() time.Duration {
|
||||||
p.m.Lock()
|
p.m.Lock()
|
||||||
defer p.m.Unlock()
|
defer p.m.Unlock()
|
||||||
if err := p.ensurePlayer(); err != nil {
|
|
||||||
p.context.setError(err)
|
if p.player == nil {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user