changeset 3492:24b0fad7fccc

Use $AUDIODEV environment variable as the default audio device on solaris, if available.
author jkeil
date Fri, 14 Dec 2001 20:13:17 +0000
parents c9aca79b7527
children a4721884eaf5
files libao2/ao_sun.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_sun.c	Fri Dec 14 18:14:27 2001 +0000
+++ b/libao2/ao_sun.c	Fri Dec 14 20:13:17 2001 +0000
@@ -42,7 +42,7 @@
 #endif
 
 
-static char *audio_dev = "/dev/audio";
+static char *audio_dev = NULL;
 static int queued_bursts = 0;
 static int queued_samples = 0;
 static int bytes_per_sample = 0;
@@ -225,6 +225,11 @@
     audio_info_t info;
     int ok;
 
+    if (audio_dev == NULL) {
+	if ((audio_dev = getenv("AUDIODEV")) == NULL)
+	    audio_dev = "/dev/audio";
+    }
+
     if (ao_subdevice) audio_dev = ao_subdevice;
 
     if (enable_sample_timing == RTSC_UNKNOWN