summaryrefslogtreecommitdiffstats
path: root/mixer.c
diff options
context:
space:
mode:
authorarpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-06-08 23:36:58 +0000
committerarpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-06-08 23:36:58 +0000
commite2fac92b095dc46fadbc5a01275d00ca853af6db (patch)
treeed052704477c64876a7e6e4a3984ffd3a5f19357 /mixer.c
parent1a0e50d5f358842ce6d1f3aaee5dc6a86a9951ae (diff)
downloadmpv-e2fac92b095dc46fadbc5a01275d00ca853af6db.tar.bz2
mpv-e2fac92b095dc46fadbc5a01275d00ca853af6db.tar.xz
patch by Jürgen Keil
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1062 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mixer.c')
-rw-r--r--mixer.c40
1 files changed, 32 insertions, 8 deletions
diff --git a/mixer.c b/mixer.c
index 150c3cc2d4..91a9bcccfa 100644
--- a/mixer.c
+++ b/mixer.c
@@ -6,18 +6,17 @@
#include <unistd.h>
#include "config.h"
+#include "mixer.h"
-#ifdef USE_OSS_AUDIO
-#include <sys/soundcard.h>
-#endif
-#ifdef USE_SUN_AUDIO
-#include <sys/audioio.h>
-#endif
+#if defined(USE_OSS_AUDIO)
-#include "mixer.h"
+/*
+ * Mixer interface using OSS style soundcard commands.
+ */
+
+#include <sys/soundcard.h>
-#if defined(USE_OSS_AUDIO)
char * mixer_device=DEV_MIXER;
int mixer_usemaster=0;
@@ -66,8 +65,16 @@ void mixer_setvolume( float l,float r )
close( fd );
}
}
+
#elif defined(USE_SUN_AUDIO)
+/*
+ * Mixer interface using Sun style soundcard commands.
+ */
+
+#include <sys/audioio.h>
+
+
char * mixer_device="/dev/audioctl";
int mixer_usemaster=0;
@@ -101,6 +108,23 @@ void mixer_setvolume( float l,float r )
close( fd );
}
}
+
+#else
+
+/*
+ * No usable Mixer interface selected.
+ * Just some stub routines.
+ */
+
+char * mixer_device=NULL;
+int mixer_usemaster=0;
+
+void mixer_getvolume( float *l,float *r ){
+ *l = *r = 50.0;
+}
+void mixer_setvolume( float l,float r ){
+}
+
#endif