audio/vorbis: Copy Go file from go-vorbis

This commit is contained in:
Hajime Hoshi 2016-03-31 02:59:08 +09:00
parent 38d10e31db
commit ba2df59c3a
2 changed files with 5664 additions and 2 deletions

View File

@ -23,13 +23,12 @@ import (
"io/ioutil" "io/ioutil"
"github.com/hajimehoshi/ebiten/exp/audio" "github.com/hajimehoshi/ebiten/exp/audio"
"github.com/hajimehoshi/go-vorbis"
) )
// TODO: src should be ReadCloser? // TODO: src should be ReadCloser?
func Decode(context *audio.Context, src audio.ReadSeekCloser) (*Stream, error) { func Decode(context *audio.Context, src audio.ReadSeekCloser) (*Stream, error) {
decoded, channels, sampleRate, err := vorbis.Decode(src) decoded, channels, sampleRate, err := decode(src)
if err != nil { if err != nil {
return nil, err return nil, err
} }

5663
exp/audio/vorbis/vorbis.go Normal file

File diff suppressed because it is too large Load Diff