av/stream/flac: finished cleaning up decode

This commit is contained in:
saxon 2019-01-22 10:40:40 +10:30
parent 7628efdbc2
commit 6f1767d152
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)
}
//
// 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) {
var data []int
for {