changeset 6795:776b686069af

- add some control (ao_oss, pl_extrastereo) - cosmetic
author pontscho
date Thu, 25 Jul 2002 20:28:47 +0000
parents 77980ab4e296
children 9c828335b2d0
files libao2/ao_oss.c libao2/audio_out.h libao2/audio_plugin.h libao2/pl_extrastereo.c
diffstat 4 files changed, 18 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_oss.c	Thu Jul 25 20:26:38 2002 +0000
+++ b/libao2/ao_oss.c	Thu Jul 25 20:28:47 2002 +0000
@@ -46,6 +46,9 @@
 	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:
--- a/libao2/audio_out.h	Thu Jul 25 20:26:38 2002 +0000
+++ b/libao2/audio_out.h	Thu Jul 25 20:28:47 2002 +0000
@@ -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 @@
 	float right;
 } ao_control_vol_t;
 
-
+#endif
--- a/libao2/audio_plugin.h	Thu Jul 25 20:26:38 2002 +0000
+++ b/libao2/audio_plugin.h	Thu Jul 25 20:28:47 2002 +0000
@@ -83,6 +83,8 @@
 
 // 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
 
--- a/libao2/pl_extrastereo.c	Thu Jul 25 20:26:38 2002 +0000
+++ b/libao2/pl_extrastereo.c	Thu Jul 25 20:28:47 2002 +0000
@@ -33,8 +33,8 @@
 // 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 @@
   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;
 }