audio/internal/readerdriver: Remove Context's Close

This commit is contained in:
Hajime Hoshi 2021-05-07 16:50:15 +09:00
parent 8ddcb48236
commit 7487222740
5 changed files with 0 additions and 23 deletions

View File

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

View File

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

View File

@ -22,7 +22,6 @@ type Context interface {
NewPlayer(io.Reader) Player
Suspend() error
Resume() error
io.Closer
}
type Player interface {

View File

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

View File

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