mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
audio: refactoring
This commit is contained in:
parent
445378ab31
commit
aca290caa9
@ -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}
|
||||
}
|
Loading…
Reference in New Issue
Block a user