Difference between revisions of "Configuring Applications for OSSv4"
From Open Sound System
m (Just to be certain...) |
(Formatting changes, and added some more apps) |
||
Line 1: | Line 1: | ||
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. | 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. | ||
− | * | + | == 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. | ||
+ | ** Just move it out of the way. It's rarely needed as the vast majority of apps can use OSS directly. The dynamic linker however may still complain even if the apps don't use ALSA. | ||
+ | ** mv /usr/lib/oss/lib/libsalsa.so.2.0.0 /usr/lib/oss/lib/libsalsa.so.2.0.0.bak | ||
+ | |||
+ | == Specific applications == | ||
+ | === Enemy Territory - Quake Wars === | ||
+ | ** Edit ~/.etqwcl/base/etqwconfig.cfg and change | ||
+ | ::: seta s_driver "alsa" | ||
+ | ::to | ||
+ | ::: seta s_driver "oss" | ||
+ | |||
+ | === Flash version 9 === | ||
** Flash V9 requires libflashsupport to output sound via OSS. Typically a 32-bit version of the library is required. | ** 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. | ** 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. | ** 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. | ** 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 at [http://www.fileupyours.com/view/77985/libflashsupport.so]. But compiling it is preferable. | + | ** There is a precompiled 32-bit .so at [http://www.fileupyours.com/view/77985/libflashsupport.so]. But compiling it is preferable. If fetched skip to "installing libflashsupport" below. |
+ | ==== compiling libflashsupport ==== | ||
*# flashsupport.c is found in /usr/lib/oss/lib | *# flashsupport.c is found in /usr/lib/oss/lib | ||
*# Comment out "#define OPENSSL" by placing a '//' in front of that line | *# Comment out "#define OPENSSL" by placing a '//' in front of that line | ||
Line 15: | Line 29: | ||
*#* Some rare 64 bit configurations may want to compile a 64-bit library instead: cc -shared -O2 -Wall -Werror -fPIC flashsupport.c -o /tmp/libflashsupport.so | *#* Some rare 64 bit configurations may want to compile a 64-bit library instead: cc -shared -O2 -Wall -Werror -fPIC flashsupport.c -o /tmp/libflashsupport.so | ||
*# Once you have a libflashsupport, it should be installed to /usr/lib/oss/lib | *# 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/oss/lib | ||
*# sudo install -s /tmp/libflashsupport.so /usr/lib | *# sudo install -s /tmp/libflashsupport.so /usr/lib | ||
*# Restart browser | *# Restart browser | ||
− | * Gnome Volume Applet | + | === 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 noise. use "-z 1024" (or other values) to fix this. | ||
+ | |||
+ | === Gnome Volume Applet === | ||
** Use gst-plugins-bad 0.10.7 and above: | ** Use gst-plugins-bad 0.10.7 and above: | ||
*** Debian: apt-get install gstreamer0.10-plugins-bad | *** Debian: apt-get install gstreamer0.10-plugins-bad | ||
Line 28: | Line 46: | ||
*** Follow installation instructions in README file. | *** Follow installation instructions in README file. | ||
− | + | === libao, including libao based like mpg321 === | |
** write default_driver=oss to ~/.libao | ** write default_driver=oss to ~/.libao | ||
− | + | === mpg123 === | |
** Debian: install mpg123 instead of mpg123-alsa | ** Debian: install mpg123 instead of mpg123-alsa | ||
− | + | === MPlayer === | |
** write "ao=oss" to ~/.mplayer/config | ** write "ao=oss" to ~/.mplayer/config | ||
− | + | === openal, including openal based like Quake4 === | |
** write the line "(define devices '(native oss))" to ~/.openalrc | ** write the line "(define devices '(native oss))" to ~/.openalrc | ||
− | + | === scummvm - MIDI music === | |
** scummvm 0.11.0 supports midi output via timidity and also via fluidsynth. | ** 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. | ** 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 . | ** 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.2-debian-oss or libsdl1.2-debian-all | ** Debian: install libsdl1.2-debian-oss or libsdl1.2-debian-all | ||
** set SDL_AUDIODRIVER=dsp in the environment | ** set SDL_AUDIODRIVER=dsp in the environment | ||
− | + | === skype === | |
** Arch: install skype-oss | ** Arch: install skype-oss | ||
** install static OSS version from skype [http://www.skype.com/intl/en/download/skype/linux/choose/] (Direct link to latest static OSS version: [http://www.skype.com/go/getskype-linux-oss]) | ** install static OSS version from skype [http://www.skype.com/intl/en/download/skype/linux/choose/] (Direct link to latest static OSS version: [http://www.skype.com/go/getskype-linux-oss]) | ||
− | + | === sox === | |
** Debian: install libsox-fmt-oss | ** Debian: install libsox-fmt-oss | ||
− | + | === wine === | |
** Debian: install libwine-oss | ** Debian: install libwine-oss | ||
** Select OSS driver in winecfg - audio tab. (In some cases winecfg will output ALSA lib errors - they can be ignored). | ** Select OSS driver in winecfg - audio tab. (In some cases winecfg will output ALSA lib errors - they can be ignored). | ||
− | + | === vlc === | |
** Write "aout=oss" to ~/.vlc/vlcrc | ** Write "aout=oss" to ~/.vlc/vlcrc | ||
− | + | === xine === | |
** write "audio.driver:oss" to ~/.xine/config | ** write "audio.driver:oss" to ~/.xine/config |
Revision as of 07:59, 5 May 2008
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 Flash version 9
- 2.3 fluidsynth
- 2.4 Gnome Volume Applet
- 2.5 libao, including libao based like mpg321
- 2.6 mpg123
- 2.7 MPlayer
- 2.8 openal, including openal based like Quake4
- 2.9 scummvm - MIDI music
- 2.10 SDL, including SDL-based like frozenbubble
- 2.11 skype
- 2.12 sox
- 2.13 wine
- 2.14 vlc
- 2.15 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.
- Just move it out of the way. It's rarely needed as the vast majority of apps can use OSS directly. The dynamic linker however may still complain even if the apps don't use ALSA.
- mv /usr/lib/oss/lib/libsalsa.so.2.0.0 /usr/lib/oss/lib/libsalsa.so.2.0.0.bak
Specific applications
Enemy Territory - Quake Wars
- Edit ~/.etqwcl/base/etqwconfig.cfg and change
- seta s_driver "alsa"
- to
- seta s_driver "oss"
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 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
- Some rare 64 bit configurations may want to compile a 64-bit library instead: cc -shared -O2 -Wall -Werror -fPIC 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
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 noise. use "-z 1024" (or other values) to fix this.
Gnome Volume Applet
libao, including libao based like mpg321
- write default_driver=oss to ~/.libao
mpg123
- Debian: install mpg123 instead of mpg123-alsa
MPlayer
- write "ao=oss" to ~/.mplayer/config
openal, including openal based like Quake4
- write the line "(define devices '(native oss))" to ~/.openalrc
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.2-debian-oss or libsdl1.2-debian-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 "aout=oss" to ~/.vlc/vlcrc
xine
- write "audio.driver:oss" to ~/.xine/config