]> git.sesse.net Git - vlc/blobdiff - include/audio_output.h
* ALL: More hooks for audio volume management.
[vlc] / include / audio_output.h
index 2878d46694d561f9cb32302b4dcd8c1a905e8dc8..bb1df6a2f9da8a93d548c375b5317286f24a4fbe 100644 (file)
@@ -2,7 +2,7 @@
  * audio_output.h : audio output interface
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: audio_output.h,v 1.60 2002/08/19 21:31:11 massiot Exp $
+ * $Id: audio_output.h,v 1.64 2002/09/18 21:21:23 massiot Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -107,6 +107,35 @@ typedef s32 vlc_fixed_t;
 #define FIXED32_ONE ((vlc_fixed_t) 0x10000000)
 
 
+/* Dual mono. Two independant mono channels */
+#define AOUT_CHAN_CHANNEL   0x0000000B
+#define AOUT_CHAN_MONO      0x00000001
+#define AOUT_CHAN_STEREO    0x00000002
+/* 3 front channels (left, center, right) */
+#define AOUT_CHAN_3F        0x00000003
+/* 2 front, 1 rear surround channels (L, R, S) */
+#define AOUT_CHAN_2F1R      0x00000004
+/* 3 front, 1 rear surround channels (L, C, R, S) */
+#define AOUT_CHAN_3F1R      0x00000005
+/* 2 front, 2 rear surround channels (L, R, LS, RS) */
+#define AOUT_CHAN_2F2R      0x00000006
+/* 3 front, 2 rear surround channels (L, C, R, LS, RS) */
+#define AOUT_CHAN_3F2R      0x00000007
+/* First of two mono channels */
+#define AOUT_CHAN_CHANNEL1  0x00000008
+/* Second of two mono channels */
+#define AOUT_CHAN_CHANNEL2  0x00000009
+/* Dolby surround compatible stereo */
+#define AOUT_CHAN_DOLBY     0x0000000A
+
+#define AOUT_CHAN_MASK      0x0000000F
+
+/* Low frequency effects channel. Normally used to connect a subwoofer.
+ * Can be combined with any of the above channels. For example :
+ * AOUT_CHAN_3F2R | AOUT_CHAN_LFE -> 3 front, 2 rear, 1 LFE (5.1) */
+#define AOUT_CHAN_LFE       0x00000010
+
+
 /*****************************************************************************
  * aout_buffer_t : audio output buffer
  *****************************************************************************/
@@ -126,6 +155,16 @@ struct aout_buffer_t
 /* Size of a frame for S/PDIF output. */
 #define AOUT_SPDIF_SIZE 6144
 
+/*****************************************************************************
+ * audio_date_t : date incrementation without long-term rounding errors
+ *****************************************************************************/
+struct audio_date_t
+{
+    mtime_t date;
+    u32     i_divider;
+    u32     i_remainder;
+};
+
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
@@ -136,10 +175,21 @@ VLC_EXPORT( void,              aout_DeleteInstance, ( aout_instance_t * ) );
 VLC_EXPORT( aout_buffer_t *, aout_BufferNew, ( aout_instance_t *, aout_input_t *, size_t ) );
 VLC_EXPORT( void, aout_BufferDelete, ( aout_instance_t *, aout_input_t *, aout_buffer_t * ) );
 VLC_EXPORT( void, aout_BufferPlay, ( aout_instance_t *, aout_input_t *, aout_buffer_t * ) );
-VLC_EXPORT( void, aout_FormatPrepare, ( audio_sample_format_t * p_format ) );
+VLC_EXPORT( void, aout_DateInit, ( audio_date_t *, u32 ) );
+VLC_EXPORT( void, aout_DateSet, ( audio_date_t *, mtime_t ) );
+VLC_EXPORT( void, aout_DateMove, ( audio_date_t *, mtime_t ) );
+VLC_EXPORT( mtime_t, aout_DateGet, ( const audio_date_t * ) );
+VLC_EXPORT( mtime_t, aout_DateIncrement, ( audio_date_t *, u32 ) );
 
 /* From input.c : */
 #define aout_InputNew(a,b,c) __aout_InputNew(VLC_OBJECT(a),b,c)
 VLC_EXPORT( aout_input_t *, __aout_InputNew, ( vlc_object_t *, aout_instance_t **, audio_sample_format_t * ) );
 VLC_EXPORT( void, aout_InputDelete, ( aout_instance_t *, aout_input_t * ) );
 
+/* From intf.c : */
+VLC_EXPORT( int, aout_VolumeGet, ( aout_instance_t *, audio_volume_t * ) );
+VLC_EXPORT( int, aout_VolumeSet, ( aout_instance_t *, audio_volume_t ) );
+VLC_EXPORT( int, aout_VolumeInfos, ( aout_instance_t *, audio_volume_t *, audio_volume_t * ) );
+VLC_EXPORT( int, aout_VolumeUp, ( aout_instance_t *, int, audio_volume_t * ) );
+VLC_EXPORT( int, aout_VolumeDown, ( aout_instance_t *, int, audio_volume_t * ) );
+