mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 02:42:02 +01:00
audio: refactoring
This commit is contained in:
parent
5f1d1ec412
commit
335dab9175
@ -224,12 +224,11 @@ func (c *Context) IsReady() bool {
|
|||||||
c.m.Lock()
|
c.m.Lock()
|
||||||
defer c.m.Unlock()
|
defer c.m.Unlock()
|
||||||
|
|
||||||
r := c.ready
|
if c.ready {
|
||||||
if r {
|
return true
|
||||||
return r
|
|
||||||
}
|
}
|
||||||
if len(c.players) != 0 {
|
if len(c.players) != 0 {
|
||||||
return r
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
c.readyOnce.Do(func() {
|
c.readyOnce.Do(func() {
|
||||||
@ -245,7 +244,7 @@ func (c *Context) IsReady() bool {
|
|||||||
}()
|
}()
|
||||||
})
|
})
|
||||||
|
|
||||||
return r
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// SampleRate returns the sample rate.
|
// SampleRate returns the sample rate.
|
||||||
|
Loading…
Reference in New Issue
Block a user