mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
audio: More sleeping (#183)
This commit is contained in:
parent
681b8ef933
commit
d397842ada
@ -22,7 +22,6 @@ import (
|
|||||||
"runtime"
|
"runtime"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/hajimehoshi/ebiten"
|
|
||||||
"golang.org/x/mobile/exp/audio/al"
|
"golang.org/x/mobile/exp/audio/al"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -100,7 +99,7 @@ func (p *player) proceed() error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if n == 0 {
|
if n == 0 {
|
||||||
time.Sleep(1)
|
time.Sleep(1 * time.Millisecond)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,7 +146,8 @@ func (p *player) start() error {
|
|||||||
// TODO: Record the last error
|
// TODO: Record the last error
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
time.Sleep(1 * time.Second / ebiten.FPS / 2)
|
//time.Sleep(1 * time.Second / ebiten.FPS / 2)
|
||||||
|
time.Sleep(1 * time.Millisecond)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user