av/stream/flac: finished cleaning up decode

This commit is contained in:
saxon 2019-01-22 10:40:40 +10:30
parent 3ee56bff1a
commit da5e13bb5d
1 changed files with 3 additions and 1 deletions

View File

@ -114,7 +114,9 @@ func Decode(buf []byte) ([]byte, error) {
return decodeFrames(stream, intBuf, enc, ws) return decodeFrames(stream, intBuf, enc, ws)
} }
// // decodeFrames parses frames from the stream and encodes them into WAV until
// the end of the stream is reached. The bytes from writeSeeker buffer are then
// returned. If any errors occur during encodeing, nil bytes and the error is returned.
func decodeFrames(s *flac.Stream, intBuf *audio.IntBuffer, e *wav.Encoder, ws *writeSeeker) ([]byte, error) { func decodeFrames(s *flac.Stream, intBuf *audio.IntBuffer, e *wav.Encoder, ws *writeSeeker) ([]byte, error) {
var data []int var data []int
for { for {