mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +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{})
|
||||
|
||||
context, err := newContext(sampleRate, ch)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
c := &Context{
|
||||
sampleRate: sampleRate,
|
||||
c: context,
|
||||
c: newContext(sampleRate, ch),
|
||||
initCh: ch,
|
||||
}
|
||||
theContext = c
|
||||
|
@ -91,12 +91,12 @@ func (p *otoPlayer) ensurePlayer() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func newContext(sampleRate int, initCh <-chan struct{}) (context, error) {
|
||||
func newContext(sampleRate int, initCh <-chan struct{}) context {
|
||||
if contextForTesting != nil {
|
||||
return contextForTesting, nil
|
||||
return contextForTesting
|
||||
}
|
||||
return &otoContext{
|
||||
sampleRate: sampleRate,
|
||||
initCh: initCh,
|
||||
}, nil
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user