summaryrefslogtreecommitdiff
path: root/src/xine-engine/audio_out.h
diff options
context:
space:
mode:
authorDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2001-05-07 03:40:34 +0000
committerDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2001-05-07 03:40:34 +0000
commit7a901686f18c37b2cd885bd324916d47b34e7c5a (patch)
tree471f3f5e6919d82dc3c848fe1ab50db2625285b6 /src/xine-engine/audio_out.h
parent2866aa5a2be3ef68979648fe550a208bd65416ae (diff)
downloadxine-lib-7a901686f18c37b2cd885bd324916d47b34e7c5a.tar.gz
xine-lib-7a901686f18c37b2cd885bd324916d47b34e7c5a.tar.bz2
Fixed the way to detect libtool version. Add get_capabilities(),get_property()
and set_property() to audio out. get_supported_modes removed, use get_cap() instead. Change the way of capabilities, match like video_out AO_CAP_* and AO_PROP_*. Fixed a small typo in demux_mpeg.c. Fixed libmpg123 audio output callings arguments. Change the AO_MODE to AO_CAP_MODE in all required locations. CVS patchset: 69 CVS date: 2001/05/07 03:40:34
Diffstat (limited to 'src/xine-engine/audio_out.h')
-rw-r--r--src/xine-engine/audio_out.h63
1 files changed, 45 insertions, 18 deletions
diff --git a/src/xine-engine/audio_out.h b/src/xine-engine/audio_out.h
index 98bbc4683..7836d3578 100644
--- a/src/xine-engine/audio_out.h
+++ b/src/xine-engine/audio_out.h
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_out.h,v 1.3 2001/04/28 19:47:42 guenter Exp $
+ * $Id: audio_out.h,v 1.4 2001/05/07 03:40:35 f1rmb Exp $
*/
#ifndef HAVE_AUDIO_OUT_H
#define HAVE_AUDIO_OUT_H
@@ -33,17 +33,6 @@
#define AUDIO_OUT_IFACE_VERSION 1
/*
- * audio output modes Used as Bitfield in AC3 decoder
- */
-
-#define AO_MODE_AC3 1
-#define AO_MODE_AC5 2
-#define AO_MODE_MONO 4 /* 1 sample == 2 bytes */
-#define AO_MODE_STEREO 8 /* 1 sample == 4 bytes */
-#define AO_MODE_4CHANNEL 16 /* 1 sample == 8 bytes */
-#define AO_MODE_5CHANNEL 32 /* 1 sample == 10 bytes */
-
-/*
* ao_functions_s contains the functions every audio output
* driver plugin has to implement.
*/
@@ -52,12 +41,14 @@ typedef struct ao_functions_s ao_functions_t;
struct ao_functions_s {
- /*
- * find out what output modes are supported by this plugin
- * (constants for the bit vector to return see above)
+ /*
+ *
+ * find out what output modes + capatilities are supported by
+ * this plugin (constants for the bit vector to return see above)
+ *
+ * See AO_CAP_* bellow.
*/
-
- uint32_t (*get_supported_modes) (ao_functions_t *this);
+ uint32_t (*get_capabilities) (ao_functions_t *this);
/*
* connect this driver to the xine engine
@@ -96,7 +87,19 @@ struct ao_functions_s {
void (*exit) (ao_functions_t *this);
-} ;
+ /*
+ * Get, Set a property of audio driver.
+ *
+ * get_property() return 1 in success, 0 on failure.
+ * set_property() return value on success, ~value on failure.
+ *
+ * See AC_PROP_* bellow for available properties.
+ */
+ int (*get_property) (ao_functions_t *this, int property);
+
+ int (*set_property) (ao_functions_t *this, int property, int value);
+
+};
/*
@@ -114,6 +117,30 @@ struct ao_functions_s {
*
*/
+/*
+ * audio output modes + capabilities
+ */
+
+#define AO_CAP_NOCAP 0x00000000 /* Driver have no capabilities */
+#define AO_CAP_MODE_AC3 0x00000001 /* Driver support AC3 output */
+#define AO_CAP_MODE_AC5 0x00000002 /* Driver support AC5 output */
+/* 1 sample == 2 bytes */
+#define AO_CAP_MODE_MONO 0x00000004 /* Driver support mono output */
+ /* 1 sample == 4 bytes */
+#define AO_CAP_MODE_STEREO 0x00000008 /* Driver support stereo output */
+ /* 1 sample == 8 bytes */
+#define AO_CAP_MODE_4CHANNEL 0x00000010 /* Driver support 4 channels */
+/* 1 sample == 10 bytes */
+#define AO_CAP_MODE_5CHANNEL 0x00000020 /* Driver support 5 channels */
+#define AO_CAP_MIXER_VOL 0x00000040 /* Driver support mixer control */
+#define AO_CAP_PCM_VOL 0x00000080 /* Driver support pcm control */
+#define AO_CAP_MUTE_VOL 0x00000100 /* Driver can mute volume */
+
+/* properties supported by get/set_property() */
+#define AO_PROP_MIXER_VOL 0
+#define AO_PROP_PCM_VOL 1
+#define AO_PROP_MUTE_VOL 2
+
typedef struct ao_info_s {
int interface_version;