* Fedora: Versions 8/9 include a libflashsupport package which should be removed. That package only supports PulseAudio.

* Fedora: Versions 8/9 include a libflashsupport package which should be removed. That package only supports PulseAudio.

* Gentoo: Add net-www/libflashsupport to /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.

* Gentoo: Add net-www/libflashsupport to /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-oss is a package containing a 32bit libflashsupport. lib32-flashsupport-oss is an AUR package for Arch64. If you need a 64 bit library, follow the instructions.

+

* Arch: libflashsupport should be included in the oss package. If you installed OSS manually or the included libflashsupport fails, read on.

* There is a precompiled 32-bit library for Linux/glibc [http://www.fileupyours.com/view/77985/libflashsupport.so], and a precompiled 64-bit library for Linux/glibc [http://www.fileupyours.com/view/77985/libflashsupport_64.so]. If you decide to use this version, download it and skip to "installing libflashsupport" below.

* There is a precompiled 32-bit library for Linux/glibc [http://www.fileupyours.com/view/77985/libflashsupport.so], and a precompiled 64-bit library for Linux/glibc [http://www.fileupyours.com/view/77985/libflashsupport_64.so]. If you decide to use this version, download it and skip to "installing libflashsupport" below.

* If none of the above applies/works for you should try to follow the instructions below.

* If none of the above applies/works for you should try to follow the instructions below.

Revision as of 01:28, 30 May 2009

Most applications should work with OSSv4 out of the box. However, sometimes distributions separate the OSS output plugins to another package, patch the software to use another sound API or neglect to compile OSS output support. 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. Headings prefixed with a distro name(s) are meant only for the named distro(s), though it may help other cases as well (e.g. most of the Debian advice is applicable to Ubuntu as well).

All the quoted names may be different on other systems due to localization.

In Ubuntu 8.10, the desktop manager (gdm) uses an ALSA-only player (aplay) to play the startup/failed login sound. To fix this, edit /usr/lib/gdmplay and replace "aplay -N" with ossplay. For example:

#!/bin/sh
/usr/bin/ossplay -q $@ 2> /dev/null

Midi sequencer apps

To merely play MIDI files, Software synthesizers (like timidity and fluidsynth) will work fine (They can play MIDI files directory to OSS output.)

Other applications wishing to play MIDI which are not synthesizers themselves (like scummvm or tuxguitar) should be set to use (lib)fluidsynth or timidity.

You may decide to load ALSA's sequencer modules. As long as modules which touch the hardware or modules which emulate oss (snd-mixer-oss, snd-pcm-oss) are not loaded, this is safe. Than you could load timidity or fluidsynth as ALSA midi sequencers, and have the apps use these. This is not needed to make libfluidsynth or timidity's server mode workj though.

libasound.so.2 errors

OSSv4.0 replaces libasound.so.2 with libsalsa, in order to allow some ALSA emulation. This may make some applications refuse to start with an "libasound.so.2: undefined symbol errors" error. (OSSv4.1 doesn't do this by default, and such errors probably have a different cause there). This can be fixed as follows:

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), as the application doesn't depend on libasound anymore.

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").

Note that upgrading or reinstalling oss4 will recreate libsalsa, so if you removed it you may wish to do this again.

Another error which may happen is "ALSA lib pcm_hw.c:1240:(_snd_pcm_hw_open) Invalid value for card". This is emanating from the real libasound, and likely means that the program tried to use ALSA on a system with OSS installed. Naturally, the attempt failed.

Making the app use OSS (per instructions in this page), is always the best fix.

libasound2's pcm-oss plugin or OSS's cuckoo module can be used to emulate ALSA if neccesary.

Enemy Territory - Quake Wars

esd/esound

Adobe Flash

Flash V9 and V10 require libflashsupport to output sound via OSS. Typically a 32-bit version of the library is required.

Flash V10 64-bit Alpha version requires a 64 bit libflashsupport.

OSSv4.1 tries to install a fitting libflashsupport automatically. However, some distros prefer removing libflashsupport from the package, using a separate package for it.

getting libflashsupport

Debian/Ubuntu:

Do not install libflashsupport package from apt-get. That packages only supports Pulseaudio, and should be removed if you have it.

You can Install flashplugin-nonfree-extrasound package and this should work, but that package misses some fixes for OSS [1].

Fedora: Versions 8/9 include a libflashsupport package which should be removed. That package only supports PulseAudio.

Gentoo: Add net-www/libflashsupport to /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 included in the oss package. If you installed OSS manually or the included libflashsupport fails, read on.

There is a precompiled 32-bit library for Linux/glibc [2], and a precompiled 64-bit library for Linux/glibc [3]. If you decide to use this version, download it and skip to "installing libflashsupport" below.

If none of the above applies/works for you should try to follow the instructions below.

installing libflashsupport

sudo install -s /tmp/libflashsupport.so /usr/lib/oss/lib

sudo install -s /tmp/libflashsupport.so /usr/lib

sudo ldconfig

Restart browser

If that above failed, make sure that there aren't any other copies of libflashsupport in the system which happen to be picked up by ldconfig / Flash. 'ldconfig -p | grep libflashsupport' command may prove useful. If you're a 64-bit user, make sure a copy of the file is in your 32-bit library directory (/usr/lib32 on Debian or /usr/lib on Fedora)

Alternatives to Flash

If the above fails, than a Flash alternative can be used. This has the added advantage of these alternatives being free.

recordmydesktop

This software supports either OSS or ALSA (set at compile time). Some distros 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) or 'loopback' should be activated (if available) in ossmix or ossxmix before starting recordmydesktop. If neither of these is possible, you can set recordmydesktop to use a vmix loopback device. See Tips And Tricks#Recording_sound_output_of_a_program.