mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
audio: Add TODOs
This commit is contained in:
parent
4d7045c161
commit
56f4968e70
@ -27,6 +27,8 @@ import (
|
|||||||
"github.com/hajimehoshi/go-vorbis"
|
"github.com/hajimehoshi/go-vorbis"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// TODO: src should be ReadCloser?
|
||||||
|
|
||||||
func Decode(context *audio.Context, src io.Reader) (*Stream, error) {
|
func Decode(context *audio.Context, src io.Reader) (*Stream, error) {
|
||||||
decoded, channels, sampleRate, err := vorbis.Decode(src)
|
decoded, channels, sampleRate, err := vorbis.Decode(src)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -50,6 +50,8 @@ func (s *Stream) Size() int64 {
|
|||||||
return s.buf.Size()
|
return s.buf.Size()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: src should be ReadCloser?
|
||||||
|
|
||||||
func Decode(context *audio.Context, src io.Reader) (*Stream, error) {
|
func Decode(context *audio.Context, src io.Reader) (*Stream, error) {
|
||||||
buf := make([]byte, headerSize)
|
buf := make([]byte, headerSize)
|
||||||
n, err := io.ReadFull(src, buf)
|
n, err := io.ReadFull(src, buf)
|
||||||
|
Loading…
Reference in New Issue
Block a user