[Speex-dev] version 1.0.1 X 1.1.4
Flavio Pimentel Duarte
flaviop72 at bol.com.br
Wed Nov 17 07:02:45 PST 2004
I need to compile with version 1.1.4 because this is the one distributed
with Mandrake 10 and it is my desire to let my application compile in
this distribution and be compatible with other ones.
Flávio
Jean-Marc Valin wrote:
>Why do you want your app to with with 1.1.4 in the first place. It's a
>old unstable version and its API has been changed since then.
>
> Jean-Marc
>
>Le lundi 15 novembre 2004 à 12:06 -0500, Flavio P. Duarte a écrit :
>
>
>>Hi,
>> I am writing a program that should be able to compile using speex
>>version 1.0.1 and speex version 1.1.4, but a I am getting some trouble
>>to encode with one version e decode using the other. The program is
>>taking care of the change in both speex_encode and speex_decode. The
>>sample being coded or decoded has changed from float to short. To test
>>it, I have modified the sampleenc.c that came with the documentation. I
>>simply removed the for statement that did the conversion from short to
>>float. The file encoded with version 1.0.1 differs from the file encoded
>>using version 1.1.4. I can encode and decode using the same version, but
>>I can not exchange versions. Can someone show me what I am doing wrong ?
>>
>>encoder 1.0.1:
>>while( 1 )
>>{
>> /* Read a 16 bits/sample audio frame */
>> fread( in, sizeof( short ), FRAME_SIZE, fin );
>> if( feof( in ) )
>> break;
>>
>> /* Copy the 16 bits values to float so Speex can work on them */
>> for( i = 0; i < FRAME_SIZE; i++ )
>> input[ i ] = in[ i ];
>>
>> /* Flush al the bits in the struct so we can encode a new frame */
>> speex_bits_reset( &bits );
>>
>> /* Encode the frame */
>> speex_encode( state, input, &bits );
>>...
>>
>>
>>encoder 1.1.4:while( 1 )
>>{
>> /* Read a 16 bits/sample audio frame */
>> fread( in, sizeof( short ), FRAME_SIZE, fin );
>> if( feof( in ) )
>> break;
>>
>> /* Flush al the bits in the struct so we can encode a new frame */
>> speex_bits_reset( &bits );
>>
>> /* Encode the frame */
>> speex_encode( state, in, &bits );
>>...
>>
>>
>>Flávio
>>_______________________________________________
>>Speex-dev mailing list
>>Speex-dev at xiph.org
>>http://lists.xiph.org/mailman/listinfo/speex-dev
>>
>>
>
>
>
>
>
More information about the Speex-dev
mailing list