]> git.sesse.net Git - mlt/commitdiff
Add mlt_audio_s32le and mlt_audio_f32le audio formats.
authorDan Dennedy <dan@dennedy.org>
Sat, 7 May 2011 03:53:50 +0000 (20:53 -0700)
committerDan Dennedy <dan@dennedy.org>
Sat, 7 May 2011 03:53:50 +0000 (20:53 -0700)
src/framework/mlt_frame.c
src/framework/mlt_types.h

index b67da15450b6737ceb240a7b03471287f473c3b9..42d23f95a3d12c23d7a9d1dbf00395104f14ef86 100644 (file)
@@ -605,7 +605,9 @@ const char * mlt_audio_format_name( mlt_audio_format format )
                case mlt_audio_none:   return "none";
                case mlt_audio_s16:    return "s16";
                case mlt_audio_s32:    return "s32";
+               case mlt_audio_s32le:  return "s32le";
                case mlt_audio_float:  return "float";
+               case mlt_audio_f32le:  return "f32le";
        }
        return "invalid";
 }
@@ -625,7 +627,9 @@ int mlt_audio_format_size( mlt_audio_format format, int samples, int channels )
        {
                case mlt_audio_none:   return 0;
                case mlt_audio_s16:    return samples * channels * sizeof( int16_t );
+               case mlt_audio_s32le:
                case mlt_audio_s32:    return samples * channels * sizeof( int32_t );
+               case mlt_audio_f32le:
                case mlt_audio_float:  return samples * channels * sizeof( float );
        }
        return 0;
@@ -705,6 +709,8 @@ int mlt_frame_get_audio( mlt_frame self, void **buffer, mlt_audio_format *format
                        case mlt_audio_float:
                                size = *samples * *channels * sizeof( float );
                                break;
+                       default:
+                               break;
                }
                if ( size )
                        *buffer = mlt_pool_alloc( size );
index c0ac07c0bea28cde80bf9dfc19340a6da37b315f..50c60e01cec747e77bca7df00df6cb1ca2c032bd 100644 (file)
@@ -52,7 +52,9 @@ typedef enum
        mlt_audio_pcm = 1, /**< \deprecated signed 16-bit interleaved PCM */
        mlt_audio_s16 = 1, /**< signed 16-bit interleaved PCM */
        mlt_audio_s32,     /**< signed 32-bit non-interleaved PCM */
-       mlt_audio_float    /**< 32-bit non-interleaved floating point */
+       mlt_audio_float,   /**< 32-bit non-interleaved floating point */
+       mlt_audio_s32le,   /**< signed 32-bit interleaved PCM, may only used by producers */
+       mlt_audio_f32le    /**< 32-bit interleaved floating point, may only be used by producers */
 }
 mlt_audio_format;