diff --git a/audio/player_cbackend.go b/audio/context_cbackend.go similarity index 100% rename from audio/player_cbackend.go rename to audio/context_cbackend.go diff --git a/audio/oto.go b/audio/context_oto.go similarity index 91% rename from audio/oto.go rename to audio/context_oto.go index 8549b2873..f4e4d3b87 100644 --- a/audio/oto.go +++ b/audio/context_oto.go @@ -25,7 +25,7 @@ import ( func newContext(sampleRate, channelCount, bitDepthInBytes int) (context, chan struct{}, error) { ctx, ready, err := oto.NewContext(sampleRate, channelCount, bitDepthInBytes) - return otoContextToContext(ctx), ready, err + return &contextProxy{ctx}, ready, err } // otoContext is an interface for *oto.Context. @@ -45,7 +45,3 @@ type contextProxy struct { func (c *contextProxy) NewPlayer(r io.Reader) player { return c.otoContext.NewPlayer(r).(player) } - -func otoContextToContext(ctx otoContext) context { - return &contextProxy{ctx} -}