[nSLUG] Making sound universally available
peter at cordes.ca
Tue Aug 3 14:25:37 ADT 2004
On Tue, Aug 03, 2004 at 07:47:14AM -0300, Donald Teed wrote:
> I've run into problems before with this, and I wonder how other
> people deal with it.
> Yesterday I checked Starcraft running within Wine and discovered
> it could not read the CDROM. Backing off to an earlier
> version of Wine fixed that, but now sound wasn't working
> unless I used the Arts sound driver of Wine configuration
> (OSS and Alsa drivers also tried). However, the real player
> application would not run unless Arts sound server was off.
> It didn't matter what version of real player (version 10 is out
> now) was used.
> I've run into stuff before (xmms maybe?) that was disabled
> by use of Arts sound system within KDE.
> How do other people deal with this - do you just toggle Arts on/off
> within KDE depending on the application in use? I'm in Gentoo
> with the Wine/RealPlayer issue, but I've also seen something
> like this happen in Slackware.
The crux of the matter is that only one process at a time can have the
audio device open. (You may have noticed that if you're running xmms, and
your run another process that tries to open the audio device, the second
process will block until xmms closes the audio dev (which happens when you
click the stop button).) ALSA drivers make multiple opens block, OSS
drivers just return an error. Anyway, that's why there's a problem.
> The hardware is nForce2 AC97 Audio (integrated in Asus A7N8X mobo)
> if that matters.
If you had an SB Live (emu10k chipset), the driver would use the hardware
mixer to support up to 32 processes having the PCM output device open at
once. This is like having aRts's multiplexing in hardware, but processes
don't have to know about aRts to take advantage of it. It's very nice :)
My SB Live is in a windoze PC now, though.
I personally get around it by keeping things simple and not using KDE, so I
don't run aRts. I don't play a lot of games on my GNU/Linux machine, so I
don't often run into the problem of wanting a game and an audio player to
both be playing sound. (I usually just turn on the radio and listen to CKDU
I think I've heard of ways to trick software into going through aRts or
NAS, or similar, instead of directly using /dev/dsp. I think the idea was
to use some shared-library voodoo, rather than actually making /dev/dsp pass
open()s to a daemon instead of the kernel driver. (which I don't think is
possible without kernel support, since it has to support ioctl()s.) This
wouldn't work for statically linked binaries, though.
Does the windoze version of realplayer work under Wine? Then it could go
#define X(x,y) x##y
Peter Cordes ; e-mail: X(peter at cor , des.ca)
"The gods confound the man who first found out how to distinguish the hours!
Confound him, too, who in this place set up a sundial, to cut and hack
my day so wretchedly into small pieces!" -- Plautus, 200 BC
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 351 bytes
Desc: Digital signature
More information about the nSLUG