You must be logged in to post Login Register


Lost Your Password?

Search Forums:


 






Wildcard Usage:
*    matches any number of characters
%    matches exactly one character

Using Mangler and Wine (or other games) at the same time

UserPost

7:49 pm
November 4, 2009


econnell

Admin

posts 319

Post edited 3:36 am – March 9, 2010 by ekilfoil


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.

5:09 pm
December 7, 2009


leech

Member

posts 4

I run unpatched wine, on Opensuse 11.2 + PulseAudio.

This can be done by setting wine to use OSS in winecfg. Then launch wine through the padsp wrapper.
Example: padsp wine wow.exe

I have tested this with wine, mangler, hon, wow, kaffeine, mplayer, firefox+flash, amarok, and all share audio just fine.

Ventrilo on wine will not work this way as it does not see a mixer through padsp, but since we have mangler now that does not matter.

8:43 pm
February 1, 2010


greyfade

New Member

posts 1

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.

8:49 pm
February 1, 2010


Haxar

Moderator

posts 58

[quote]I would [i]seriously[/i] appreciate a version of Mangler that doesn't require PulseAudio.[/quote]

The trunk and the latest development snapshot has this ability with ALSA.

7:29 pm
March 20, 2010


mooreted

Member

posts 7

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.

7:34 pm
March 20, 2010


econnell

Admin

posts 319

mooreted said:

Mangler = Analog USB Input

Mangler = Analog USB Output

Wow = Internal Analog Output


 

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.

3:45 pm
May 19, 2010


leech

Member

posts 4

For anyone who needs wine+winepulse on OpenSuSE 11.2 32 or 64….

I keep a very current build of wine with winpulse and very common hacks in the obs.

http://download.opensuse.org/r…..11.2/i586/

 


About the Mangler forum

Forum Timezone: America/New_York

Most Users Ever Online: 30

Currently Online:
9 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 1
Forums: 4
Topics: 244
Posts: 1124

Membership:

There are 726 Members

There is 1 Admin
There are 2 Moderators

Top Posters:

clearscreen – 48
dardack – 18
Krovikan – 16
FWishbringer – 14
faldiin – 12
vpro – 11

Recent New Members: metap0d, cajinboy, HeartofDixie, Gridge, morusec, Redsolardragon

Administrators: econnell (319 Posts)

Moderators: Haxar (58 Posts), bobshaffer (2 Posts)