]> git.sesse.net Git - vlc/blobdiff - include/aout_internal.h
* ./Makefile.am: added a "update-vlc.dsp" rule to create the MSVC project
[vlc] / include / aout_internal.h
index b758cfa861b062afa14121bf946e0723d6ad5437..e94b3cbdc1786184ce29e14fbc1e772b67796e36 100644 (file)
@@ -2,7 +2,7 @@
  * aout_internal.h : internal defines for audio output
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: aout_internal.h,v 1.24 2002/10/21 20:00:09 massiot Exp $
+ * $Id: aout_internal.h,v 1.28 2002/11/09 16:34:52 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -34,6 +34,17 @@ typedef struct aout_alloc_t
 #define AOUT_ALLOC_STACK    1
 #define AOUT_ALLOC_HEAP     2
 
+#ifdef HAVE_ALLOCA
+#   define ALLOCA_TEST \
+        if ( (p_alloc)->i_alloc_type == AOUT_ALLOC_STACK )                  \
+        {                                                                   \
+            (p_new_buffer) = alloca( i_alloc_size + sizeof(aout_buffer_t) );\
+        }                                                                   \
+        else
+#else
+#   define ALLOCA_TEST
+#endif
+
 #define aout_BufferAlloc( p_alloc, i_nb_usec, p_previous_buffer,            \
                           p_new_buffer )                                    \
     if ( (p_alloc)->i_alloc_type == AOUT_ALLOC_NONE )                       \
@@ -45,11 +56,7 @@ typedef struct aout_alloc_t
         int i_alloc_size;                                                   \
         i_alloc_size = (u64)(p_alloc)->i_bytes_per_sec                      \
                                             * (i_nb_usec) / 1000000 + 1;    \
-        if ( (p_alloc)->i_alloc_type == AOUT_ALLOC_STACK )                  \
-        {                                                                   \
-            (p_new_buffer) = alloca( i_alloc_size + sizeof(aout_buffer_t) );\
-        }                                                                   \
-        else                                                                \
+        ALLOCA_TEST                                                         \
         {                                                                   \
             (p_new_buffer) = malloc( i_alloc_size + sizeof(aout_buffer_t) );\
         }                                                                   \
@@ -262,9 +269,9 @@ VLC_EXPORT( aout_buffer_t *, aout_OutputNextBuffer, ( aout_instance_t *, mtime_t
 
 /* From common.c : */
 VLC_EXPORT( int, aout_FormatNbChannels, ( audio_sample_format_t * p_format ) );
-void aout_FormatPrepare( audio_sample_format_t * p_format );
-VLC_EXPORT( void, aout_FormatPrint, ( aout_instance_t * p_aout, const char * psz_text, audio_sample_format_t * p_format ) );
-VLC_EXPORT( void, aout_FormatsPrint, ( aout_instance_t * p_aout, const char * psz_text, audio_sample_format_t * p_format1, audio_sample_format_t * p_format2 ) );
+VLC_EXPORT( void, aout_FormatPrepare, ( audio_sample_format_t * p_format ) );
+VLC_EXPORT( void, aout_FormatPrint, ( aout_instance_t * p_aout, const char * psz_text, const audio_sample_format_t * p_format ) );
+VLC_EXPORT( void, aout_FormatsPrint, ( aout_instance_t * p_aout, const char * psz_text, const audio_sample_format_t * p_format1, const audio_sample_format_t * p_format2 ) );
 void aout_FifoInit( aout_instance_t *, aout_fifo_t *, u32 );
 mtime_t aout_FifoNextStart( aout_instance_t *, aout_fifo_t * );
 void aout_FifoPush( aout_instance_t *, aout_fifo_t *, aout_buffer_t * );
@@ -272,6 +279,7 @@ void aout_FifoSet( aout_instance_t *, aout_fifo_t *, mtime_t );
 void aout_FifoMoveDates( aout_instance_t *, aout_fifo_t *, mtime_t );
 VLC_EXPORT( aout_buffer_t *, aout_FifoPop, ( aout_instance_t * p_aout, aout_fifo_t * p_fifo ) );
 void aout_FifoDestroy( aout_instance_t * p_aout, aout_fifo_t * p_fifo );
+VLC_EXPORT( mtime_t, aout_FifoFirstDate, ( aout_instance_t *, aout_fifo_t * ) );
 
 /* From intf.c :*/
 VLC_EXPORT( void, aout_VolumeSoftInit, ( aout_instance_t * ) );