WineHQ
Comments
 

The following comments are owned by whoever posted them. WineHQ is not responsible for what they say.

RE: Outdated information?
by Dmitry Golubev on Tuesday December 6th 2011, 20:26
If you are using a system with pulse audio daemon, it blocks sound sometimes (if not pulseaudio, then look for any other sound daemons which interfere)

I use the following trick (if you can make it better, please do - right now it is a somehow dirty hack):

1. Make copy /etc/client.conf file to your ~/.pulse directory and rename it as client.conf.nostart. Disable autospawn by ensuring that is is not enabled anywhere in this file and putting the following line there:
---
autospawn = no
---

2. Start starcraft with the following script (assuming "~/sc2/StarCraft II" is where you have installed the game, so you probably need to change this one):
---
#!/bin/bash

# killing pulseaudio and making sure it won't start again
mv ~/.pulse/client.conf.nostart ~/.pulse/client.conf
pulseaudio -k
# starting the game
wine ~/sc2/StarCraft\ II/StarCraft\ II.exe
sleep 20
# after it starts fully, change the process affinity to run
# on 1 CPU only, as suggested somewhere to give higher performance
# (although I haven't really noticed, so YMMV)
taskset -p 1 `pidof SC2.exe`
# Draw a dialog window and wait for the game to end. Once you have
# finished the game (and not during the game!!!), press OK there
# and the pulseaudio daemon will be restarted as it was.
zenity --info --text "Pulseaudio daemon has been stopped during the game.\nWaiting to restart Pulseaudio daemon..."
mv ~/.pulse/client.conf ~/.pulse/client.conf.nostart
pulseaudio --start
---

Hope, this helps,
Dmitry

[post new] [reply to this]

Page loaded in 0.00379 seconds.