summaryrefslogtreecommitdiff
path: root/src/xine-engine
diff options
context:
space:
mode:
authorDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2001-10-01 23:04:57 +0000
committerDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2001-10-01 23:04:57 +0000
commitc48149133f36b24fb87924209a950681be0727c7 (patch)
tree18a1126eeaecf6a6310fb9d74e91a531b2c62f40 /src/xine-engine
parent9d7e1140adde62d0959af667474a54470d98968a (diff)
downloadxine-lib-c48149133f36b24fb87924209a950681be0727c7.tar.gz
xine-lib-c48149133f36b24fb87924209a950681be0727c7.tar.bz2
Add simple mixer control in xine-engine/ao plugins. Fixed some missings
in audio_decoder. xine-ui warn at compile time due of a #warning i added, i will remove it pretty soon. CVS patchset: 715 CVS date: 2001/10/01 23:04:57
Diffstat (limited to 'src/xine-engine')
-rw-r--r--src/xine-engine/audio_decoder.c6
-rw-r--r--src/xine-engine/audio_out.c19
-rw-r--r--src/xine-engine/audio_out.h10
-rw-r--r--src/xine-engine/xine.c25
4 files changed, 56 insertions, 4 deletions
diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c
index 2b5320dd6..f6995c439 100644
--- a/src/xine-engine/audio_decoder.c
+++ b/src/xine-engine/audio_decoder.c
@@ -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_decoder.c,v 1.41 2001/09/25 23:27:02 guenter Exp $
+ * $Id: audio_decoder.c,v 1.42 2001/10/01 23:04:57 f1rmb Exp $
*
*
* functions that implement audio decoding
@@ -300,5 +300,9 @@ void audio_decoder_shutdown (xine_t *this) {
pthread_join (this->audio_thread, &p);
}
+
+ if(this->audio_out)
+ this->audio_out->exit (this->audio_out);
+
}
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c
index 20fd26876..27fb336b2 100644
--- a/src/xine-engine/audio_out.c
+++ b/src/xine-engine/audio_out.c
@@ -17,7 +17,7 @@
* along with self program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_out.c,v 1.17 2001/09/12 22:00:51 joachim_koenig Exp $
+ * $Id: audio_out.c,v 1.18 2001/10/01 23:04:57 f1rmb Exp $
*
* 22-8-2001 James imported some useful AC3 sections from the previous alsa driver.
* (c) 2001 Andy Lo A Foe <andy@alsaplayer.org>
@@ -406,12 +406,26 @@ static void ao_close(ao_instance_t *this)
this->driver->close(this->driver);
}
+static void ao_exit(ao_instance_t *this) {
+ this->driver->exit(this->driver);
+}
+
static uint32_t ao_get_capabilities (ao_instance_t *this) {
uint32_t result;
result=this->driver->get_capabilities(this->driver);
return result;
}
+static int ao_get_property (ao_instance_t *this, int property) {
+
+ return(this->driver->get_property(this->driver, property));
+}
+
+static int ao_set_property (ao_instance_t *this, int property, int value) {
+
+ return(this->driver->set_property(this->driver, property, value));
+}
+
ao_instance_t *ao_new_instance (ao_driver_t *driver, metronom_t *metronom,
config_values_t *config) {
@@ -425,7 +439,10 @@ ao_instance_t *ao_new_instance (ao_driver_t *driver, metronom_t *metronom,
this->open = ao_open;
this->write = ao_write;
this->close = ao_close;
+ this->exit = ao_exit;
this->get_capabilities = ao_get_capabilities;
+ this->get_property = ao_get_property;
+ this->set_property = ao_set_property;
this->audio_loop_running = 0;
this->frame_buffer = xmalloc (40000);
this->zero_space = xmalloc (ZERO_BUF_SIZE * 2 * 6);
diff --git a/src/xine-engine/audio_out.h b/src/xine-engine/audio_out.h
index d23db13f5..501eac29a 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.17 2001/09/14 20:44:01 jcdutton Exp $
+ * $Id: audio_out.h,v 1.18 2001/10/01 23:04:57 f1rmb Exp $
*/
#ifndef HAVE_AUDIO_OUT_H
#define HAVE_AUDIO_OUT_H
@@ -126,6 +126,14 @@ typedef struct ao_instance_s ao_instance_t;
struct ao_instance_s {
uint32_t (*get_capabilities) (ao_instance_t *this); /* for constants see below */
+ /*
+ * Get/Set audio property
+ *
+ * See AO_PROP_* bellow
+ */
+ int (*get_property) (ao_instance_t *this, int property);
+ int (*set_property) (ao_instance_t *this, int property, int value);
+
/* open audio driver for audio output
* return value: 0:failure, >0:output sample rate
*/
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index 837a3180d..6d6721be8 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.c
@@ -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: xine.c,v 1.60 2001/09/10 13:36:56 jkeil Exp $
+ * $Id: xine.c,v 1.61 2001/10/01 23:04:57 f1rmb Exp $
*
* top-level xine functions
*
@@ -621,4 +621,27 @@ int xine_get_stream_length (xine_t *this) {
return 0;
}
+int xine_get_audio_capabilities(xine_t *this) {
+
+ if(this->audio_out)
+ return (this->audio_out->get_capabilities(this->audio_out));
+
+ return AO_CAP_NOCAP;
+}
+
+int xine_get_audio_property(xine_t *this, int property) {
+
+ if(this->audio_out)
+ return(this->audio_out->get_property(this->audio_out, property));
+
+ return 0;
+}
+
+int xine_set_audio_property(xine_t *this, int property, int value) {
+
+ if(this->audio_out)
+ return(this->audio_out->set_property(this->audio_out, property, value));
+
+ return ~value;
+}