<div class="gmail_extra">Hello, in fact :<br>this error(FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DAT) occurs when the sample size is bigger than the exepected size in the encoder.<br><br>Now, can someone tell me how to model the signal, for example :</div>
<div class="gmail_extra"><b>using a Fixed linear predictor for the input signal ? </b><br><br><br></div><div class="gmail_extra"><div class="gmail_quote">2012/4/13 Brian Willoughby <span dir="ltr"><<a href="mailto:brianw@sounds.wa.com" target="_blank">brianw@sounds.wa.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On Apr 12, 2012, at 07:12, Rafael Velasquez wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm using flac for an application.<br>
The fact is that i'm trying to encode a file that is not necessary a wav file.<br>
<br>
So, at first, i would like to know if it's possible to encode a file different from the wav file with the flac encoder ?<br>
</blockquote>
<br>
<br></div>
First of all, the FLAC API does not work with WAV format data - you must provide raw audio samples. If you have a WAV file, then you should use other code (your own?) to extract the raw audio samples from the file, leaving out the chunk headers and other, non-audio information. You should also make sure that the FLAC object is initialized to accept the same size samples and channel count as you have in your data, and it would probably be a good idea to match the sample rate as well for proper decoding later. Beware that the format you have may not exactly match what the FLAC library wants, so you may have to alter the data slightly before sending it to the API.<br>
<br>
So, it doesn't matter whether you have WAV, AIFF, SDII, or some other file, because your code must first extract the raw audio samples from the file before calling the FLAC library.<br>
<br>
Note that you can encode a WAV file as FLAC, and then later decode the FLAC file as AIFF. FLAC does not usually care what the uncompressed foreign file format was (unless you use "preserve foreign metadata"). These operations are supported by the command-line program, but the WAV and AIFF format code is not part of the FLAC library.<div class="im">
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
When i put my data into : ok = FLAC__stream_encoder_process_<u></u>interleaved(encoder, pcm, need);<br>
<br>
after some rounds in my boucl i get :<br>
encoding: FAILED<br>
state: FLAC__STREAM_ENCODER_VERIFY_<u></u>MISMATCH_IN_AUDIO_DATA (<=== what does it really mean ? and what are the reasons to be in this case ? )<br>
<br>
I'm not english spoker, so sorry if i'm not very clear.<br>
</blockquote>
<br></div>
There is documentation for the FLAC API. I do not see anything describing error messages, but you could look into the source code. My guess is that "mismatch" refers to the checksum. I do not have an answer for you here, but perhaps you can continue to work on your code and find the problem.<span class="HOEnZb"><font color="#888888"><br>
<br>
Brian Willoughby<br>
Sound Consulting<br>
<br>
</font></span></blockquote></div><br></div>