flac icon indicating copy to clipboard operation
flac copied to clipboard

Better documentation.

Open eaburns opened this issue 10 years ago • 3 comments

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.

eaburns avatar Aug 01 '14 23:08 eaburns

What are the units on StreamInfo.MinBlock and friends?

// The minimum block size (in samples) used in the stream.
BlockSizeMin uint16
// The maximum block size (in samples) used in the stream.
// (BlockSizeMin == BlockSizeMax) implies a fixed-blocksize stream.
BlockSizeMax uint16

The rest is described at http://godoc.org/github.com/mewkiz/flac/meta#StreamInfo

If you find any comments that are useful, copy them or use them as a reference point to write something for your library. We've learned a lot by reading the code of your library and it has helped us figure out some of the hairy decoding details.

Btw, what is the intended license of your flac library? I didn't find any LICENSE or copyright notice. All code (and comments) in mewkiz/flac is released into the public domain, so feel free to copy any of the documentation in part or full. Some sections are based on code from your flac library, so it would be nice to know what license covers those portions.

Thanks a lot for uploading your flac decoder. It's been a pleasure to read its source, and I've learned a lot while doing so :)

Cheers /u

mewmew avatar Aug 02 '14 22:08 mewmew

Thanks! I'm glad that you like it. I think that I will eventually borrow info from your comments. That would be very useful; simpler than opening up the flac spec again.

By the way, the license is MIT. I added license info to make this clear. Sorry that it was missing.

eaburns avatar Aug 02 '14 23:08 eaburns

Thank you for clearing up the license information.

Btw, we've spent quite some time during the last few days improving the API of mewkiz/flac/meta. As part of this work, we've rewritten a lot of the documentation, which is why I thought you might be interested. The work is present in the api branch, located at: https://github.com/mewkiz/flac/tree/api/meta

As before, all code and comments are public domain so just use anything however you want :)

mewmew avatar Aug 06 '14 14:08 mewmew