summaryrefslogtreecommitdiffstats
path: root/libao2
diff options
context:
space:
mode:
authorpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-07-25 20:28:47 +0000
committerpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-07-25 20:28:47 +0000
commitdde3c1526688cdca21a249703214056dba71eaa3 (patch)
tree766c8279a80bf6b7cfcfead84c5441e94d41ddf4 /libao2
parentb1be9a6a39d94fc1cbe00eaaa7c7425c081d0721 (diff)
downloadmpv-dde3c1526688cdca21a249703214056dba71eaa3.tar.bz2
mpv-dde3c1526688cdca21a249703214056dba71eaa3.tar.xz
- add some control (ao_oss, pl_extrastereo)
- cosmetic git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6796 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libao2')
-rw-r--r--libao2/ao_oss.c3
-rw-r--r--libao2/audio_out.h6
-rw-r--r--libao2/audio_plugin.h2
-rw-r--r--libao2/pl_extrastereo.c10
4 files changed, 18 insertions, 3 deletions
diff --git a/libao2/ao_oss.c b/libao2/ao_oss.c
index f55143d053..95044ffa53 100644
--- a/libao2/ao_oss.c
+++ b/libao2/ao_oss.c
@@ -46,6 +46,9 @@ static int control(int cmd,int arg){
case AOCONTROL_SET_DEVICE:
dsp=(char*)arg;
return CONTROL_OK;
+ case AOCONTROL_GET_DEVICE:
+ (char*)arg=dsp;
+ return CONTROL_OK;
case AOCONTROL_QUERY_FORMAT:
return CONTROL_TRUE;
case AOCONTROL_GET_VOLUME:
diff --git a/libao2/audio_out.h b/libao2/audio_out.h
index 353b5a4d71..4765a6562d 100644
--- a/libao2/audio_out.h
+++ b/libao2/audio_out.h
@@ -1,3 +1,7 @@
+
+#ifndef __AUDIO_OUT_H
+#define __AUDIO_OUT_H
+
typedef struct ao_info_s
{
/* driver name ("Matrox Millennium G200/G400" */
@@ -68,4 +72,4 @@ typedef struct ao_control_vol_s {
float right;
} ao_control_vol_t;
-
+#endif
diff --git a/libao2/audio_plugin.h b/libao2/audio_plugin.h
index 084be9cc50..cc3e5dfbfc 100644
--- a/libao2/audio_plugin.h
+++ b/libao2/audio_plugin.h
@@ -83,6 +83,8 @@ extern ao_plugin_functions_t audio_plugin_eq;
// Control parameters used by the plugins
#define AOCONTROL_PLUGIN_SET_LEN 1 // All plugins must respond to this parameter
+#define AOCONTROL_PLUGIN_ES_SET 4 // set extra stereo coefficient
+#define AOCONTROL_PLUGIN_ES_GET 5 // get extra stereo coefficient
#endif
diff --git a/libao2/pl_extrastereo.c b/libao2/pl_extrastereo.c
index da15e0ff41..4d6fb10f07 100644
--- a/libao2/pl_extrastereo.c
+++ b/libao2/pl_extrastereo.c
@@ -33,8 +33,8 @@ LIBAO_PLUGIN_EXTERN(extrastereo)
// local data
static struct {
float mul; // intensity
- int inuse; // This plugin is in use TRUE, FALSE
- int format; // sample format
+ int inuse; // This plugin is in use TRUE, FALSE
+ int format; // sample format
} pl_extrastereo = {2.5, 0, 0};
@@ -43,6 +43,12 @@ static int control(int cmd,int arg){
switch(cmd){
case AOCONTROL_PLUGIN_SET_LEN:
return CONTROL_OK;
+ case AOCONTROL_PLUGIN_ES_SET:
+ pl_extrastereo.mul=*((float*)arg);
+ return CONTROL_OK;
+ case AOCONTROL_PLUGIN_ES_GET:
+ *((float*)arg)=pl_extrastereo.mul;
+ return CONTROL_OK;
}
return CONTROL_UNKNOWN;
}