[Mlt-devel] mlt/src/modules/sox filter_sox.c,1.8,1.9
Brought to you by:
ddennedy,
lilo_booter
From: Dan D. <dde...@us...> - 2007-03-31 00:30:57
|
Update of /cvsroot/mlt/mlt/src/modules/sox In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23048/src/modules/sox Modified Files: filter_sox.c Log Message: add sox 13.0.0 support Index: filter_sox.c =================================================================== RCS file: /cvsroot/mlt/mlt/src/modules/sox/filter_sox.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- filter_sox.c 30 Mar 2007 06:55:54 -0000 1.8 +++ filter_sox.c 31 Mar 2007 00:29:56 -0000 1.9 @@ -225,12 +225,18 @@ int j; char *normalise = mlt_properties_get( filter_properties, "normalise" ); double normalised_gain = 1.0; +#if (ST_LIB_VERSION_CODE >= ST_LIB_VERSION(13,0,0)) + st_sample_t dummy_clipped_count = 0; +#endif // Convert to sox encoding while( p != end ) { +#if (ST_LIB_VERSION_CODE >= ST_LIB_VERSION(13,0,0)) + *p = ST_SIGNED_WORD_TO_SAMPLE( *q, dummy_clipped_count ); +#else *p = ST_SIGNED_WORD_TO_SAMPLE( *q ); - +#endif // Compute rms amplitude while we are accessing each sample rms += ( double )*p * ( double )*p; @@ -320,7 +326,11 @@ end = p + *samples; while ( p != end ) { +#if (ST_LIB_VERSION_CODE >= ST_LIB_VERSION(13,0,0)) + *q = ST_SAMPLE_TO_SIGNED_WORD( *p ++, dummy_clipped_count ); +#else *q = ST_SAMPLE_TO_SIGNED_WORD( *p ++ ); +#endif q += *channels; } } |