[Flac-dev] Re: FLAC on Pocket PC

Miroslav Lichvar lichvarm at phoenix.inf.upol.cz
Thu May 29 10:27:02 PDT 2003


On Thu, May 29, 2003 at 09:10:04AM -0700, Jehan wrote:
> Jehan wrote:
> >Here is my test project then.
> >To keep the zip small, I didn't put the flac files. Just copy the 
> >flac-1.1.0 directory into flactest (so that the path flac-1.1.0\include 
> >and flac-1.1.0\src exists in flactest). The project should then compile 
> >as is.
> >
> >All the code is in flactest.cpp. It's pretty basic. You'll have to 
> >create a file test_16k8.wav in the pocket pc's temp directory (16KHz, 
> >8bits).
> 
> Has anybody had a chance to look at it? Can someone confirm that it's a 
> bug in FLAC?

It isn't a bug in flac.

flactest.cpp:
	...
	short in[BUFFER_SIZE];
	FLAC__int32 input[BUFFER_SIZE];
	...
	if (fread(in, sizeof(short), BUFFER_SIZE, fin) != BUFFER_SIZE) {
	...
	input[i]=in[i];

"in" contains 16bit values instead of 8bit, you have to change "in" to
unsigned char, or cast it to unsigned char and change the loop.

-- 
Miroslav Lichvar




More information about the Flac-dev mailing list