summaryrefslogtreecommitdiff
path: root/src/xine-engine/audio_out.h
diff options
context:
space:
mode:
authorJuergen Keil <jkeil@users.sourceforge.net>2002-03-11 19:58:00 +0000
committerJuergen Keil <jkeil@users.sourceforge.net>2002-03-11 19:58:00 +0000
commita1bc7578243bd93e106fc426374363da16652797 (patch)
tree616d2ae6848b68cc9cc0e152184c916e12d14fcf /src/xine-engine/audio_out.h
parent619e78fc07c1b8622eb4f8f43d979fab476c24a2 (diff)
downloadxine-lib-a1bc7578243bd93e106fc426374363da16652797.tar.gz
xine-lib-a1bc7578243bd93e106fc426374363da16652797.tar.bz2
Add a "control" method to the audio drivers, to allow pause/resume of the
playback stream and to flush buffered samples from from the audio driver. (Currently implemented in the 'Sun' audio driver, + some untested code in the alsa 0.9 driver). The pause/resume method can be used by the engine to immediatelly stop playing buffered audio samples when the video is paused. Flushing buffered samples is useful when a video is stopped. And it'll be useful for better seeking support, too. CVS patchset: 1556 CVS date: 2002/03/11 19:58:00
Diffstat (limited to 'src/xine-engine/audio_out.h')
-rw-r--r--src/xine-engine/audio_out.h30
1 files changed, 26 insertions, 4 deletions
diff --git a/src/xine-engine/audio_out.h b/src/xine-engine/audio_out.h
index dd820a6f4..471c21a2e 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.25 2002/03/11 12:31:26 guenter Exp $
+ * $Id: audio_out.h,v 1.26 2002/03/11 19:58:01 jkeil Exp $
*/
#ifndef HAVE_AUDIO_OUT_H
#define HAVE_AUDIO_OUT_H
@@ -37,7 +37,7 @@ extern "C" {
#endif
-#define AUDIO_OUT_IFACE_VERSION 3
+#define AUDIO_OUT_IFACE_VERSION 4
/*
* ao_driver_s contains the driver every audio output
@@ -113,12 +113,19 @@ struct ao_driver_s {
* 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.
+ * See AO_PROP_* below for available properties.
*/
int (*get_property) (ao_driver_t *this, int property);
- int (*set_property) (ao_driver_t *this, int property, int value);
+ int (*set_property) (ao_driver_t *this, int property, int value);
+
+ /*
+ * misc control operations on the audio device.
+ *
+ * See AO_CTRL_* below.
+ */
+ int (*control) (ao_driver_t *this, int cmd, /* arg */ ...);
};
/*
@@ -179,6 +186,14 @@ struct ao_instance_s {
/* called on xine exit */
void (*exit) (ao_instance_t *this);
+ /*
+ * misc control operations on the audio device.
+ *
+ * See AO_CTRL_* below.
+ */
+ int (*control) (ao_driver_t *this, int cmd, /* arg */ ...);
+
+
/* private stuff */
ao_driver_t *driver;
@@ -252,6 +267,13 @@ ao_instance_t *ao_new_instance (ao_driver_t *driver, xine_t *xine) ;
#define AO_PROP_PCM_VOL 1
#define AO_PROP_MUTE_VOL 2
+
+/* audio device control ops */
+#define AO_CTRL_PLAY_PAUSE 0
+#define AO_CTRL_PLAY_RESUME 1
+#define AO_CTRL_FLUSH_BUFFERS 2
+
+
typedef struct ao_info_s {
int interface_version;