Package flac provides access to FLAC streams. Fork of https://github.com/mewkiz/flac
3e3f4b5fcf
* flac: encode frame header * flac: calculate CRC-8 when encoding frame headers * flac: fix encoding of frame header * flac: add preliminary subframe encoder * flac: fix UTF-8 encoding of frame number * frame: add sanity check for sample count in decodeLPC Updates #31. * flac: update flac encoding API, depricate flac.Encode Encode has been removed in favour of using NewEncoder. The Encode function was temporarily added to support re-encoding FLAC streams to update the metadata, but it had no support for encoding audio samples. The added flac.Encoder has support for encoding both metadata and audio samples. It also does not require that you first decode a FLAC file to later re-encode it by calling Encode (as was the previous behaviour). * flac: add MD5 running hash of unencoded audio samples to StreamInfo * flac: remove unused encodePadding Reported by golangci * flac: fix golangci lint issues frame/utf8.go:57:6: `decodeUTF8Int` is unused (deadcode) func decodeUTF8Int(r io.Reader) (n uint64, err error) { ^ internal/utf8/encode.go:32:16: unnecessary conversion (unconvert) bits = uint64(t2 | (x>>6)&mask2) ^ internal/utf8/encode.go:37:16: unnecessary conversion (unconvert) bits = uint64(t3 | (x>>(6*2))&mask3) ^ internal/utf8/encode.go:42:16: unnecessary conversion (unconvert) bits = uint64(t4 | (x>>(6*3))&mask4) ^ * flac: fix golangci lint issues encode_frame.go:89:1: cyclomatic complexity 52 of func `(*Encoder).encodeFrameHeader` is high (> 30) (gocyclo) func (enc *Encoder) encodeFrameHeader(w io.Writer, hdr frame.Header) error { ^ internal/utf8/encode.go:66:17: unnecessary conversion (unconvert) bits := uint64(tx | (x>>uint(6*i))&maskx) ^ encode_subframe.go:105:46: unnecessary conversion (unconvert) if err := bw.WriteBits(uint64(sample), byte(hdr.BitsPerSample)); err != nil { ^ * flac: clarify that frame.Header.Num is calculated by the encoder * flac: minor re-phrasing |
||
---|---|---|
cmd | ||
frame | ||
internal | ||
meta | ||
testdata | ||
.gitignore | ||
.travis.yml | ||
enc_test.go | ||
encode.go | ||
encode_frame.go | ||
encode_meta.go | ||
encode_subframe.go | ||
example_test.go | ||
flac.go | ||
flac_test.go | ||
go.mod | ||
LICENSE | ||
README.md |
flac
This package provides access to FLAC (Free Lossless Audio Codec) streams.
Documentation
Documentation provided by GoDoc.
- flac: provides access to FLAC (Free Lossless Audio Codec) streams.
Changes
-
Version 1.0.5 (2016-05-06)
- Simplify import paths. Drop use of gopkg.in, and rely on vendoring instead (see azul3d/engine#1).
- Add FLAC decoding benchmark (see d675e0a)
-
Version 1.0.4 (2016-02-11)
-
Version 1.0.3 (2016-02-02)
- Implement decoding of FLAC files with wasted bits-per-sample (see #12).
- Stress test the library using go-fuzz (see #10). Thanks to Patrick Mézard.
-
Version 1.0.2 (2015-06-05)
- Fix decoding of blocking strategy (see #9). Thanks to Sergey Didyk.
-
Version 1.0.1 (2015-02-25)
- Fix two subframe decoding bugs (see #7). Thanks to Jonathan MacMillan.
- Add frame decoding test cases.
-
Version 1.0.0 (2014-09-30)
- Initial release.
- Implement decoding of FLAC files.