]> git.sesse.net Git - mlt/commitdiff
add sox 13.0.0 support
authorddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Sat, 31 Mar 2007 00:29:56 +0000 (00:29 +0000)
committerddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Sat, 31 Mar 2007 00:29:56 +0000 (00:29 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@962 d19143bc-622f-0410-bfdd-b5b2a6649095

ChangeLog
src/modules/sox/filter_sox.c

index cc9bcf8767649e55ce0ba70e3c713ca2b36470ad..569926556eb3c0d9d814ea1fd732fb0bf9f11d74 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 $Id$
 
+2007-03-30 Dan Dennedy <dan@dennedy.org>
+       Add support for sox 13.0.0.
+
 2007-03-30 Jean-Baptiste Mardelle <jb@kdenlive.org>
        Fix boxblur and wave filters license.
 
index d4593602d6abb23f6d28a083ab68227cb3dee204..7c0928bd65a7cd1556c6f026f5745315c4832cf4 100644 (file)
@@ -225,12 +225,18 @@ static int filter_get_audio( mlt_frame frame, int16_t **buffer, mlt_audio_format
                        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 @@ static int filter_get_audio( mlt_frame frame, int16_t **buffer, mlt_audio_format
                        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;
                        }
                }