[ccan] CCAN: code upload with name ogg_to_pcm.tar.gz
Rusty Russell
rusty at rustcorp.com.au
Thu Apr 9 10:20:54 EST 2009
On Wednesday 08 April 2009 23:11:17 Stephen Cameron wrote:
>
> That wasn't gamesmanship, that was me trying to figure out how this ccan
> thing works.
Yes, but it was a nice topical point (we'd been discussing this recently
on IRC). And seeing the games people play lets us improve ccanlint :)
> Got any bright ideas how to test whether an ogg gets decoded correctly?
>
> I thought about embedding ogg and corresponding PCM data in static character
> arrays, writting the ogg data out to a file in /tmp, decoding that to memory
> and memcmp vs. the previously stored PCM data ... but if libvorbisfile
> tweaks their algorithm, that will break, so that's not really cool.
I would go for a sloppy comparison. Probably using a generated sound wave
sample; you can just store the ogg in the test dir.
Perfect, no, but I'd expect that the average value to be correct,
and the sample error to be limited (insert some handwave stats here).
This would catch any gross conversion errors, at least.
Cheers,
Rusty.
More information about the ccan
mailing list