eaburns / flac Goto Github PK
View Code? Open in Web Editor NEWA Free Lossless Audio Codec decoder in Go
License: MIT License
A Free Lossless Audio Codec decoder in Go
License: MIT License
The godoc comment for MetaData is out of control. Also, the fields of StreamInfo need some comments. What are the units on StreamInfo.MinBlock and friends? I haven't looked at the FLAC spec in a while, and I have no idea what the answer is.
This needs to be profiled.
Hello, let say we have not enough memory to decode all flac data, your implementation returns
all data (located in memory) in one time. Maybe it is better to return some kind of frame reader which allows us to get decoded frame by frame? It can be implemented via go bufio package.
Thanks for decoder.
When given a corrupt FLAC flac.Decode often panics as so:
panic: runtime error: makeslice: len out of range
goroutine 1 [running]:
github.com/eaburns/flac.riceDecode(0xc00009a360, 0xfffffffffffffffa, 0x8, 0x0, 0x0, 0x9, 0x1, 0xc0000a6100)
/home/ben/pkg/mod/github.com/eaburns/[email protected]/decode.go:835 +0x45
github.com/eaburns/flac.decodeResiduals(0xc00009a360, 0x1000, 0x8, 0xc0000a6100, 0x8, 0x8, 0x0, 0x0)
/home/ben/pkg/mod/github.com/eaburns/[email protected]/decode.go:818 +0x1e5
github.com/eaburns/flac.decodeLPCSubFrame(0xc00009a360, 0x18, 0x1000, 0x8, 0x0, 0x4, 0x4, 0x3, 0xc0000a2da8)
/home/ben/pkg/mod/github.com/eaburns/[email protected]/decode.go:747 +0x1c5
github.com/eaburns/flac.readSubFrame(0xc00009a360, 0xc0000c4100, 0x0, 0xc00009a390, 0x0, 0x0, 0x10100000040ceb8, 0x0)
/home/ben/pkg/mod/github.com/eaburns/[email protected]/decode.go:346 +0x38f
github.com/eaburns/flac.(*Decoder).Next(0xc00009a180, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/ben/pkg/mod/github.com/eaburns/[email protected]/decode.go:289 +0x245
github.com/eaburns/flac.Decode(0x4d1820, 0xc0000ae018, 0x0, 0xc000000000, 0xc0000ae018, 0x0, 0x0, 0x499d80, 0xc000094058)
/home/ben/pkg/mod/github.com/eaburns/[email protected]/decode.go:29 +0x145
Attached are two invalid FLACs which cause this panic, and one valid (surf.44101hz.flac.zip).
qlevel--16-not-supported.flac.zip
crc-mismatch.flac.zip
surf.44101hz.flac.zip
Decode(io.Reader) ([]byte, error)
should decode an entire FLAC file, check it's MD5, and return the bytes.
It's the MIT one.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.