Configuring Applications for OSSv4
From Open Sound System
Most applications should work with OSSv4 out of the box. However, some distributions separate the OSS output plugins, or patch the software to use another sound API. This page will show how to tell some common applications to use the OSS API. There's no need to use any of these tips unless there's a problem.
Contents
- 1 General issues
- 2 Specific applications
- 2.1 Enemy Territory - Quake Wars
- 2.2 esd/esound
- 2.3 Flash version 9
- 2.4 fluidsynth
- 2.5 Gnome Volume Applet
- 2.6 libao, including libao based like mpg321
- 2.7 mpg123
- 2.8 MPlayer
- 2.9 openal, including openal based like Quake4
- 2.10 recordmydesktop
- 2.11 scummvm - MIDI music
- 2.12 SDL, including SDL-based like frozenbubble
- 2.13 skype
- 2.14 sox
- 2.15 wine
- 2.16 vlc
- 2.17 xine
General issues
libasound.so.2 errors
- Some apps refuse to start with libasound.so.2: undefined symbol errors. This is because OSS's ALSA emulation method (libsalsa) is based on a version of libasound which is too different from the (likely newer) version the apps were compiled with.
- Often, applications link to libasound.so.2 via a sound plugin. Thus, installing the respective OSS compatible plugin for the app may fix this (e.g. libesd0 instead of libesd-alsa0 on Debian/Ubuntu).
- If the method above doesn't help, you could just move libsalsa out of the way. It's rarely needed as the vast majority of apps can use OSS directly. This may require root permissions ("su" or "sudo").
- mv /usr/lib/oss/lib/libsalsa.so.2.0.0 /usr/lib/oss/lib/libsalsa.so.2.0.0.bak
- ldconfig
- Note that upgrading or reinstalling oss4 will recreate libsalsa, so if you removed it you may wish to do this again.
Getting system sounds
- KDE 3.x: Open the "Contol Center". Select "Sound & MultiMedia", "Sound System" and set up arts to use "Open Sound System".
- Alternatively, Open the "Contol Center". Select "Sound & MultiMedia", "System Notifications" and "Player Settings". Check "Use an external player", and select an OSS supporting player which support ogg files (ogg123 for example).
- Gnome: Select "OSS - Open Sound System" in "Sound Preferences" (under "Devices" tab). Some distros compile gnome without support for OSS. In that case, install esound (e.g. apt-get install libesd0 esound on Ubuntu), and restart Gnome. Select "ESD - Enlightened sound daemon" in sound menu.
- All the quoted names may be different on other systems due to localization.
Specific applications
Enemy Territory - Quake Wars
- Edit ~/.etqwcl/base/etqwconfig.cfg and change
- seta s_driver "alsa"
- to
- seta s_driver "oss"
esd/esound
- Debian: install libesd0 instead of libesd0-alsa.
Flash version 9
- Flash V9 requires libflashsupport to output sound via OSS. Typically a 32-bit version of the library is required.
getting libflashsupport
- Ubuntu: do not install libflashsupport from apt-get. That version only supports Pulseaudio. Remove this package if you have it. You still have to follow the other instructions.
- Gentoo: you just need to add net-www/libflashsupport in /etc/portage/package.keywords file and emerge using: USE="oss ssl" emerge libflashsupport . Restart browser and now it should work. You can ignore the other instructions.
- Arch: libflashsupport should be already included in the oss-linux-free package on the i686 platform. Otherwise, follow the instructions.
- There is a precompiled 32-bit .so for Linux/glibc at [1]. But compiling it is preferable. If fetched skip to "installing libflashsupport" below.
compiling libflashsupport
- flashsupport.c is found in /usr/lib/oss/lib
- Comment out "#define OPENSSL" by placing a '//' in front of that line
- 64 bit users will require gcc multilib support.
- In Debian/Ubuntu - sudo apt-get install gcc-multilib
- To compile: cc -shared -m32 -O2 -Wall -Werror flashsupport.c -o /tmp/libflashsupport.so
- Once you have a libflashsupport, it should be installed to /usr/lib/oss/lib
installing libflashsupport
- sudo install -s /tmp/libflashsupport.so /usr/lib/oss/lib
- sudo install -s /tmp/libflashsupport.so /usr/lib
- Restart browser
- Sometimes getting flash to work requires getting rid of libsalsa. see [2] for how to do this.
Alternatives to Flash
- If the above fails, than a Flash alternative can be used. This has the added advantage of these alternatives being free.
- gnash works for many flash videos.
- Debian: apt-get install apt-get install mozilla-plugin-gnash or apt-get install konqueror-plugin-gnash
- swfdec is another option.
- Debian: apt-get install swfdec-mozilla
fluidsynth
- Use "-a oss" option.
- fluidsynth may use a fragment size which is too low for the soundcard (256 bytes in one case), which leads to a background crackling when playing. use "-z 1024" (or an other value) to fix this.
Gnome Volume Applet
- OSS already supplies a native GTK mixer - ossxmix.
- Install a newer version ( >= 0.10.7 ) of gst-plugins-bad:
- Debian: apt-get install gstreamer0.10-plugins-bad
- Or use precompiled patched gstreamer oss module:
libao, including libao based like mpg321
- Add the following line to ~/.libao
- default_driver=oss
- Add the following line to ~/.libao
mpg123
- Debian: install mpg123 instead of mpg123-alsa
MPlayer
- write the following line to ~/.mplayer/config
- ao = oss
- write the following line to ~/.mplayer/config
openal, including openal based like Quake4
- write the following line to ~/.openalrc
- (define devices '(native oss))
- write the following line to ~/.openalrc
recordmydesktop
- This software supports either OSS or ALSA (set at compile time). Some packages set ALSA at compile time.
- Debian:
- Get the source of the package (apt-get source recordmydesktop) and the build dependencies (apt-get build-dep recordmydesktop).
- Edit debian/rules to provide --enable-oss=yes to configure.
- Build package with dpkg-buildpackage and (re)install it.
- You may wish to prevent upgrades from overwriting the package with the ALSA version: echo recordmydesktop hold | dpkg --set-selections (as root).
- Note that the used recording source should be set to 'vol' (if available). See Tips And Tricks#Recording_sound_output_of_a_program.
scummvm - MIDI music
- scummvm 0.11.0 supports midi output via timidity and also via fluidsynth.
- Start timidity -Od -ir 7777 and then run scummvm. Select "TiMidity" as a music driver.
- Alternately, if fluidsynth is compiled, you can select it as music driver. You need to add a soundfont entry to ~/.scummvmrc .
SDL, including SDL-based like frozenbubble
- Debian: install libsdl1.2debian-oss or libsdl1.2debian-all
- set SDL_AUDIODRIVER=dsp in the environment
skype
sox
- Debian: install libsox-fmt-oss
wine
- Debian: install libwine-oss
- Select OSS driver in winecfg - audio tab. (In some cases winecfg will output ALSA lib errors - they can be ignored).
vlc
- Write the following line to ~/.vlc/vlcrc
- aout=oss
- Write the following line to ~/.vlc/vlcrc
xine
- Write the following line to ~/.xine/config
- audio.driver:oss
- Write the following line to ~/.xine/config