El Foro

Disable sound in Script

Disable sound in wine-install of the game in the install-script

Autor Respuestas
ertaiNL Monday 19 October 2015 at 22:17
ertaiNLAnonymous

I am looking at creating a script for installing Civilization II. However due to a bug if the sound is enabled in this game on wine then the game crashes. I have found how to disable the sound manually:

- go to regedt

- add "HKEY_CURRENT_USER/Software/Wine/Drivers/Audio" with an empty string-value.

But now I want to disable the sound in the installer. But when I try:

Set_SoundDriver ""
 
Then that doesn't work. How can I do this?
petch Monday 19 October 2015 at 23:04
petch

Hi,

Interestingly, Set_SoundDriver checks that its parameter is not an empty string, so this doesn't work:

        if [ -n "$1" ]; then
...

Since the behavior of Wine when the driver is set to an empty string is documented, it looks like a bug. I wonder if this test has been added as a hardening attempt, or it prevents some specific problem.

Anyway, even if the test is removed, it doesn't help you for the time being, lots of PlayOnLinux clients with this test in place will be used for years. The next best thing you can use for the moment is the rest of Set_SoundDriver code:

[ "$POL_OS" = "Linux" ] && POL_Wine_UpdateRegistryWinePair 'Drivers' 'Audio' ''

 

 

 

petch Monday 19 October 2015 at 23:11
petch

ertaiNL Tuesday 20 October 2015 at 0:06
ertaiNLAnonymous

Thnx, this works