audio: Refactoring: remove the unused returning value

This commit is contained in:
Hajime Hoshi 2019-03-02 04:42:19 +09:00
parent af4f44d421
commit ed855d6c6c
2 changed files with 4 additions and 8 deletions

View File

@ -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

View File

@ -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
}
}