[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Please commit: kmix support for SunRays
From: Torsten Kasch <tk () Genetik ! Uni-Bielefeld ! DE>
Date: 2002-08-04 6:56:57
[Download RAW message or body]
Hi,
could someone with CVS access please commit the attached diff to
kdemultimedia/mixer_sun.cpp?
The patch modifies kmix' behaviour on Sun systems so that it uses the
contents of the environment variable $AUDIODEV as the audio device rather
than "/dev/audio" and "/dev/audioctl" directly. This is necessary to
make kmix work on SunRay appliances which do not have a physical "/dev/audio"
on the server.
Unfortunately, I got no feedback from users on kde-solaris where I posted
this patch earlier this year, but since we're running the modified kmix
successfully since KDE 2.2.1 on our 100+ SunRay systems and it doesn't
break the volume control on our Sparc workstations, I suspect the patch
should be safe to integrate...
cheers,
Torsten
--
Torsten Kasch tk@Genetik.Uni-Bielefeld.DE
Biologie VI/Zentrum f. Genomforschung
Universität Bielefeld Phone: +49 521 106-4828
D-33594 Bielefeld Fax: +49 521 106-5626
["kdemultimedia-3.0.2.udiff" (text/plain)]
--- 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;
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic