--- kmix/mixer_sun.cpp 2001/06/01 04:02:38 1.1 +++ kmix/mixer_sun.cpp 2002/07/18 08:39:49 @@ -150,6 +150,8 @@ //====================================================================== int Mixer_SUN::openMixer() { + char *audiodev; + // // We don't support multiple cards or devices // @@ -164,9 +166,23 @@ release(); // + // honor $AUDIODEV (if set) + // this makes the mixer work on SunRay appliances + // + if ( (audiodev = getenv( "AUDIODEV" )) != NULL ) + { + audiodev = strdup ( audiodev ); + } + else + { + audiodev = strdup ( "/dev/audio" ); + } + strcat ( audiodev, "ctl" ); + + // // Open the mixer hardware driver // - if ( ( fd = open( "/dev/audioctl", O_RDWR ) ) < 0 ) + if ( ( fd = open( audiodev, O_RDWR ) ) < 0 ) { if ( errno == EACCES ) return Mixer::ERR_PERM;