wav
wav copied to clipboard
Alternate design for encode/decode
trafficstars
I noticed this: https://github.com/go-audio/wav/blob/master/decoder.go#L343
While developing my quick-hack audio decoder for WAV I ended up, IMHO, a neat design for decoding the buffer:
- https://github.com/loov/audio/blob/master/codec/wav/reader.go#L82
- https://github.com/loov/audio/blob/master/codec/wav/wavdata/format.go#L166
Maybe you can get new ideas from it -- or find better approaches based on it.
I really like the suggested approach