Mangler doesn't do you much good if you can't run it with sound along side a game. The various sound systems, servers, APIs, layers, and even the politics of sound in Linux is a complete mess. Along with the technical issues, there is a whole host of emotion regarding sound. People love their favorite sound system of choice and many a flamewar has been the result.
In this thread, I don't want to hear about why ALSA is better, why OSS is better, or why PulseAudio sucks. This thread is to help people get Mangler working with sound at the same time as a game. If you're not posting in that regard, your post is going to get deleted.
If you want to write an ALSA, OSS, or some other API backend for Mangler, by all means write it and submit a patch. I prefer that it works on/with everything, but I don't have the time to implement all of it myself. If you want to help in that regard, please contact me.
That said, Mangler requires PulseAudio at present. This means that you will need to run your game (or wine) in such a way that it will coexist with PulseAudio.
WINE
Gaming in Wine will require you to run a patched version of Wine that includes the the patch from Art Taylor at http://art.ified.ca/?page_id=40. This patch adds PulseAudio support to Wine. Without this, Wine will take control of your soundcard and prevent other apps from playing sound.
This patch is not (and probably never will be) in any official distribution of Wine. However, some distributions (Fedora I believe) include this as an additional package. The reason for this seems to be a religious difference (considering linux sound as a religion, that is) between Art Taylor and the Wine developers. If you want to read the flamewar, go to this bug on WineHQ: http://bugs.winehq.org/show_bu…..i?id=10495
After compiling with that patch, Mangler, Wine, and everything else on your system (i.e. RhythmBox, Skype, etc.) can co-exist nicely. I can't help you with compiling Wine or with Art's patch, but he is actively maintaining it.
Note: For debian based distributions, there is a Ubuntu PPA available that includes wine with the pulseaudio patch applied: https://launchpad.net/~nh2/+archive/ppa
Games That Access /dev/dsp (OSS) or ALSA directly
Next up is native Linux games that depend on OSS or ALSA. You are going to have problem with games that talk directly to the audio subsystem if you're using a microphone plugged into your soundcard, because the game is going to hog the soundcard and prevent other access *unless* it is using the PulseAudio emulation libraries/plugins. Different games will access the soundcard using different methods that may or may not take control of your soundcard. The only solution I can offer to you is that you can purchase a USB headset. A USB headset acts as its own soundcard, which means that even if the game has taken control of your primary sound card, PulseAudio can still use your USB headset.
The caveat is that you will have to be able to run the game while PulseAudio is running. You can do this by suspending your soundcard sink. I do this same thing in order to receive an incoming VOIP call since there isn't a good Pulse enabled softphone. A sample script that disables/enables a soundcard is:
#!/bin/bash
if [ "$1" == "suspend" ] ; then
val=1
elif [ "$1" == "release" ] ; then
val=0
elif [ "$1" == "resume" ] ; then
val=0
else
echo "usage: [suspend|release]"
exit 1
fi
/usr/bin/pactl suspend-sink alsa_output.pci-0000_00_1b.0.analog-stereo $val
To get a list of PulseAudio Sink names, run:
pactl list
Find your sound card sink in that list, get the name, and replace "alsa_output.pci-0000_00_1b.0.analog-stereo" in the above script. Running that script with either "suspend" or "resume" as a parameter will suspend (or resume) that device in PulseAudio, thereby allowing the game to take control of it.
I currently run unpatched Wine on my Gentoo system, and it coexists well with Amarok, Skype, mplayer, and half-a-dozen other sound sources, without PulseAudio. dmix works just fine.
I have never gotten PulseAudio to work on my system, nor have I gotten any apps to coexist peacefully with it. When I install PulseAudio, sound in Wine breaks, Skype segfaults on startup, and mplayer, Amarok, Xine, and everything else can no longer output sound, with or without the PulseAudio daemon.
I would [i]seriously[/i] appreciate a version of Mangler that doesn't require PulseAudio.
The headset is actually two audio sources: Input/Output. I can choose speakers as output and the headset as input. That works, but I hear Wow sounds and Mangler conversations through the speakers while the mic works for speaking. What I want is Wow sounds from the speakers and mangler through the headset kind of like this:
Mangler = Analog USB Input
Mangler = Analog USB Output
Wow = Internal Analog Output
Thinking about it, I don't think it can be done unless Wine is compiled with Pulse audio support because Alsa doesn't support per application setup. The only other solution I could see would be to have Wow using a completely different sound system than Mangler.
This is the exact configuration I use, and I don't have any problems. Mangler Audio Output goes to the USB headset speaker, input is from the headset mic, and WINE goes to the normal speakers.
That said, if you're using PulseAudio, you should *REALLY* be using the winepulse patch.