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@xiph.org >>http://lists.xiph.org/mailman/listinfo/speex-dev >> >> > > > > >
Le mercredi 17 novembre 2004 ? 13:02 -0200, Flavio Pimentel Duarte a ?crit :> 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.Euk! Wish they asked for my opinion before... Problem is that 1.1.4 is experimental and there's no reliable way to detect the version of Speex (at least not in 1.1.4) installed. Also, the symbols are the same, just with a different type. Unless you do some very ugly hacks, your best choice may be to require 1.0.x or 1.1.6 (or later). Jean-Marc> 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@xiph.org > >>http://lists.xiph.org/mailman/listinfo/speex-dev > >> > >> > > > > > > > > > > > > _______________________________________________ > Speex-dev mailing list > Speex-dev@xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev
Jean-Marc Valin wrote:>Le mercredi 17 novembre 2004 ? 13:02 -0200, Flavio Pimentel Duarte a >?crit : > > >>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. >> >> > >Euk! Wish they asked for my opinion before... Problem is that 1.1.4 is >experimental and there's no reliable way to detect the version of Speex >(at least not in 1.1.4) installed. Also, the symbols are the same, just >with a different type. Unless you do some very ugly hacks, your best >choice may be to require 1.0.x or 1.1.6 (or later). > > Jean-Marc > > >Thanks! I think I wil impose speex 1.1.6 or newer as a requirement to my app. Fl?vio>>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@xiph.org >>>>http://lists.xiph.org/mailman/listinfo/speex-dev >>>> >>>> >>>> >>>> >>> >>> >>> >>> >>> >>_______________________________________________ >>Speex-dev mailing list >>Speex-dev@xiph.org >>http://lists.xiph.org/mailman/listinfo/speex-dev >> >> > > > > >