[Speex-dev] version 1.0.1 X 1.1.4

Jean-Marc Valin jean-marc.valin at usherbrooke.ca
Tue Nov 16 16:05:05 PST 2004


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