Hi all,
I'm attempting to encode raw audio data using libFLAC++. My audio data
is 16 bit, mono, 16000Hz. I set all the appropriate parameters on the
encoder and then call init(). Everything appears to be ok.
I don't know how to properly convert from char *data to the FLAC__int32
*[] requested by the process function. I think this is where my problem
is.
If I call process() like this:
FLAC__int32 *samplesArray[1] = { (FLAC__int32 *)data };
// data size if 4096 bytes
if (!process(samplesArray, 1024))
die("return false");
it appears to encode ok, but when I play the flac file, it plays at
twice the normal speed. I can cheat and tell the encoder that the sample
rate is really 8000 Hz when in reality its 16KHz and it plays ok.
So my question is how to convert from char *data to FLAC__int32* data?
I've been looking at encode.c but I'm confused by it (my c skills aren't
fantastic)
Thanks in advance. I can supply more code if necessary.
Cheers!
matt
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
Flac-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/flac-dev