Methods of payment Abuse

How to set up sound in wine via oss?

12.03.2024, 00:20

Wine (Wine Is Not an Emulator) is free software that allows applications developed for the Windows operating system to run on computers running Linux, macOS, and other UNIX-like systems. Wine is a compatibility environment that allows Windows executable (.exe) files to be executed on alternative operating systems without having to install Windows itself. Often, the problem of no sound in wine can be seen in computer games.

What is Wine?

Wine is not an emulator because it does not emulate the Windows processor or hardware, but rather provides an implementation of the Windows API and libraries that allow applications to interact with the operating system. This makes it possible to run many Windows applications and games on alternative platforms.

Sound in Wine is a feature of Wine software that allows sound applications and games developed for Windows operating systems to run on Linux computers. Wine uses various methods for sound processing, including ALSA (Advanced Linux Sound Architecture) and PulseAudio, to ensure compatibility with a variety of audio devices and sound formats.

Audio customization in Wine

There are several options to solve the problem if there is no wine sound by using OSS emulation in linux:

  • install an older sound card and an older version of the system;
  • aoss - intercept calls through alsa-oss;
  • padsp - pulseaudio interception/

It is not a good idea to install an old sound card, but it is possible to emulate sound. Below we will tell you how to do it. First you need to find out if Pulse Audio is installed:

$ ps aux | grep pulseaudio

If PulseAudio is used, you will see the following output in the terminal:

If you get an error, you have ALSA. Next you need to go to the folder, for example, with the game:

$ cd /knights

For PulseAudio the command will be like this:

$ sudo padsp ./knights

And for Alsa:

$ sudo aoss ./knights

Everything is ready, Wine sound configuration is complete, now you can play and enjoy the sound. If you have x64 bit and errors occur, then do the following (Pulse audio only):

$ sudo dpkg --add-architecture i386

$ sudo apt-get update

$ sudo apt-get install libpulse0:i386 libpulsedsp:i386

Copy the executable file (e.g. padsp32):

$ sudo cp /usr/bin/padsp /usr/bin/padsp32

Run a text editor as root. I will use Nano as everyone has it:

$ sudo nano /usr/bin/padsp32

Replace 2 lines in the file padsp32:

/usr/lib/x86_64-linux-gnu/pulseaudio/libpulsedsp.so

by:

/usr/lib/i386-linux-gnu/pulseaudio/libpulsedsp.so

Now to run the game you need to use this command:

$ padsp32 ./knight

Instead of ./ the path to the file, and instead of knights the name of your file.

This is how the problem is solved, but you should take into account that this emulation works stably only if the game is designed for your architecture.