audio: Add TODOs

This commit is contained in:
Hajime Hoshi 2016-03-29 03:34:46 +09:00
parent 4d7045c161
commit 56f4968e70
2 changed files with 4 additions and 0 deletions

View File

@ -27,6 +27,8 @@ import (
"github.com/hajimehoshi/go-vorbis"
)
// TODO: src should be ReadCloser?
func Decode(context *audio.Context, src io.Reader) (*Stream, error) {
decoded, channels, sampleRate, err := vorbis.Decode(src)
if err != nil {

View File

@ -50,6 +50,8 @@ func (s *Stream) Size() int64 {
return s.buf.Size()
}
// TODO: src should be ReadCloser?
func Decode(context *audio.Context, src io.Reader) (*Stream, error) {
buf := make([]byte, headerSize)
n, err := io.ReadFull(src, buf)