mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
audio/internal/readerdriver: Remove Context's Close
This commit is contained in:
parent
8ddcb48236
commit
7487222740
@ -76,10 +76,6 @@ func (c *dummyReaderContext) Resume() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *dummyReaderContext) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *dummyReaderPlayer) Pause() {
|
||||
p.m.Lock()
|
||||
p.playing = false
|
||||
|
@ -59,10 +59,6 @@ func (c *Context) NewPlayer(r io.Reader) *Player {
|
||||
return p
|
||||
}
|
||||
|
||||
func (c *Context) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Context) oneBufferSize() int {
|
||||
// TODO: This must be audio.oneBufferSize(p.context.sampleRate). Avoid the duplication.
|
||||
return c.sampleRate * c.channelNum * c.bitDepthInBytes / 4
|
||||
|
@ -22,7 +22,6 @@ type Context interface {
|
||||
NewPlayer(io.Reader) Player
|
||||
Suspend() error
|
||||
Resume() error
|
||||
io.Closer
|
||||
}
|
||||
|
||||
type Player interface {
|
||||
|
@ -64,11 +64,6 @@ func (c *context) Resume() error {
|
||||
return oboe.Resume()
|
||||
}
|
||||
|
||||
func (c *context) Close() error {
|
||||
// TODO: Implement this
|
||||
return nil
|
||||
}
|
||||
|
||||
type player struct {
|
||||
context *context
|
||||
p *oboe.Player
|
||||
|
@ -116,11 +116,6 @@ func (c *context) NewPlayer(src io.Reader) Player {
|
||||
return p
|
||||
}
|
||||
|
||||
func (c *context) Close() error {
|
||||
// TODO: Implement this
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *context) Suspend() error {
|
||||
c.audioContext.Call("suspend")
|
||||
return nil
|
||||
@ -307,10 +302,6 @@ func (w *go2cppDriverWrapper) Resume() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (w *go2cppDriverWrapper) Close() error {
|
||||
return w.c.Close()
|
||||
}
|
||||
|
||||
func toLR(data []byte) ([]float32, []float32) {
|
||||
const max = 1 << 15
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user