mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 19:28:57 +01:00
audio: Refactoring: remove the unused returning value
This commit is contained in:
parent
af4f44d421
commit
ed855d6c6c
@ -88,13 +88,9 @@ func NewContext(sampleRate int) (*Context, error) {
|
|||||||
|
|
||||||
ch := make(chan struct{})
|
ch := make(chan struct{})
|
||||||
|
|
||||||
context, err := newContext(sampleRate, ch)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
c := &Context{
|
c := &Context{
|
||||||
sampleRate: sampleRate,
|
sampleRate: sampleRate,
|
||||||
c: context,
|
c: newContext(sampleRate, ch),
|
||||||
initCh: ch,
|
initCh: ch,
|
||||||
}
|
}
|
||||||
theContext = c
|
theContext = c
|
||||||
|
@ -91,12 +91,12 @@ func (p *otoPlayer) ensurePlayer() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func newContext(sampleRate int, initCh <-chan struct{}) (context, error) {
|
func newContext(sampleRate int, initCh <-chan struct{}) context {
|
||||||
if contextForTesting != nil {
|
if contextForTesting != nil {
|
||||||
return contextForTesting, nil
|
return contextForTesting
|
||||||
}
|
}
|
||||||
return &otoContext{
|
return &otoContext{
|
||||||
sampleRate: sampleRate,
|
sampleRate: sampleRate,
|
||||||
initCh: initCh,
|
initCh: initCh,
|
||||||
}, nil
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user