Giter Club home page Giter Club logo

flac's People

Contributors

buddhamagnet avatar eaburns avatar pmezard avatar rhalff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

flac's Issues

Better documentation.

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.

Memory limitation

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.

flac.Decode: makeslice: len out of range

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

Add a Decode function

Decode(io.Reader) ([]byte, error) should decode an entire FLAC file, check it's MD5, and return the bytes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.