]> git.sesse.net Git - vlc/blobdiff - include/audio_output.h
* ./include/modules_inner.h: replaced _X with __VLC_SYMBOL because _X was
[vlc] / include / audio_output.h
index 996114e2575a3ae1c9c81a39dd29dd3ca53a0046..acc0b0b7e96a7511860c3443e34ef8eabecf4867 100644 (file)
@@ -2,9 +2,10 @@
  * audio_output.h : audio output thread interface
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: audio_output.h,v 1.34 2001/05/06 04:32:02 sam Exp $
+ * $Id: audio_output.h,v 1.40 2002/01/09 00:33:37 asmax Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
+ *          Cyril Deguet <asmax@via.ecp.fr>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -26,7 +27,7 @@
  *****************************************************************************
  * This global variable is accessed by any function using the audio output.
  *****************************************************************************/
-typedef struct
+typedef struct aout_bank_s
 {
     /* Array to all the audio outputs */
     struct aout_thread_s *pp_aout[ AOUT_MAX_THREADS ];
@@ -36,7 +37,11 @@ typedef struct
 
 } aout_bank_t;
 
+#ifndef PLUGIN
 extern aout_bank_t *p_aout_bank;
+#else
+#   define p_aout_bank (p_symbols->p_aout_bank)
+#endif
 
 /*****************************************************************************
  * aout_increment_t
@@ -171,6 +176,7 @@ typedef struct aout_thread_s
     /* Rate and gain of the audio output sound (in Hz) */
     long                l_rate;
     long                l_gain;
+    int                 i_latency;
 
     /* there might be some useful private structure, such as audio_buf_info
      * for the OSS output */
@@ -188,23 +194,34 @@ typedef struct aout_thread_s
 #define AOUT_FMT_U16_BE      0x00000100                    /* Big endian U16 */
 #define AOUT_FMT_AC3         0x00000400                 /* Dolby Digital AC3 */
 
-
 #ifdef WORDS_BIGENDIAN
 #define AOUT_FMT_S16_NE      AOUT_FMT_S16_BE
 #else
 #define AOUT_FMT_S16_NE      AOUT_FMT_S16_LE
 #endif
 
+/* Number of samples in an AC3 frame */
+#define AC3_FRAME_SIZE      1536
+
+/* Size of a frame for spdif output */
+#define SPDIF_FRAME_SIZE    6144
+
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
+#ifndef PLUGIN
 void            aout_InitBank           ( void );
 void            aout_EndBank            ( void );
 
-aout_thread_t * aout_CreateThread       ( int *pi_status );
+aout_thread_t * aout_CreateThread       ( int *pi_status, int i_channels, 
+    long l_rate );
 void            aout_DestroyThread      ( aout_thread_t *, int * );
 
 aout_fifo_t *   aout_CreateFifo         ( int, int, long, long, long, void * );
 void            aout_DestroyFifo        ( aout_fifo_t *p_fifo );
 void            aout_FreeFifo           ( aout_fifo_t *p_fifo );
+#else
+#   define aout_CreateFifo p_symbols->aout_CreateFifo
+#   define aout_DestroyFifo p_symbols->aout_DestroyFifo
+#endif