Configuring Applications for OSSv4

From Open Sound System
Revision as of 11:13, 26 July 2012 by RobertColeman88 (Talk | contribs) (minor updates)

Jump to: navigation, search

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

General issues

Getting system sounds

  • KDE 3.x: Open the "Control 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. In OSS 4.2 and above, ossplay supports Ogg/Vorbis files if libvorbis is installed in the system).
  • KDE 4.x: See instructions for Phonon below.
    Alternatively, you can set an external player program (Select "Notification" panel in system settings and then select "Player settings"). Same conditions as in KDE 3.x apply.
  • Gnome: This depends on version.
    • Older Gnome <= 2.22 outputs system sounds via esd, so install esound (e.g. apt-get install libesd0 esound on Ubuntu), and restart Gnome. Running esd under vmix is known to be buggy (esd is known to be buggy).
    • Newer Gnome >= 2.23 uses libcanberra. See: libcanberra
    • 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
  • All the quoted names may be different on other systems due to localization.
  • XFCE : xfce4-mixer and applet are based on gstreamer. See above Gstreamer.

Midi applications

  • 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 work 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").
      • mv /usr/lib/oss/lib/libsalsa.so.2.0.0 /usr/lib/oss/lib/libsalsa.so.2.0.0.bak
      • ldconfig
      • Note that installing OSSv4.0 will recreate libsalsa, so if you removed it you may wish to do this again. This only applies to the v4.0 versions.

ALSA Emulation

  • 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. Unsurprisingly, the attempt failed.
  • Making the application use OSS (per instructions in this page) is always the best fix. However, there are ways to emulate ALSA if there's no other choice, see Tips_And_Tricks#ALSA_Emulation.

Multimedia Keys

General OSS problems

Specific applications

Gajim

  • Gajim use "aplay -q" by default. Go to preferences -> advanced -> open the configuration editor, and edit the key "soundplayer" : replace "aplay -q" by "ossplay -q".


cmus

  • Cmus' oss output plugin doesn't work with OSSv4, change to libao.
In cmus, type ":" to activate commandline, and "set output_plugin=ao"
Edit ~/libao or /etc/libao.conf to "default_driver=oss"
  • Optional: Enable cmus' software volume control:
Type ":" then "set softvol=true". Use + and - on the keyboard to change volume.

Ekiga

  • Debian: install libpt OSS plugin (e.g. libpt2.6.1-plugins-oss).
  • If Ekiga doesn't display the OSS device in the listing, you can add it manually using gconf-editor. The following keys should be changed:
apps/ekiga/devices/audio/input_device
apps/ekiga/devices/audio/output_device
apps/ekiga/general/sound_events
to a value of the form
'/dev/dsp (PTLIB/OSS)'
/dev/dsp can be replaced by other output nodes.
The following terminal commands can be used to set up Ekiga:
$ gconftool-2 --set /apps/ekiga/devices/audio/input_device --type string "/dev/dsp (PTLIB/OSS)"
$ gconftool-2 --set /apps/ekiga/devices/audio/output_device --type string "/dev/dsp (PTLIB/OSS)"
$ gconftool-2 --set /apps/ekiga/general/sound_events/output_device --type string "/dev/dsp (PTLIB/OSS)"

Enemy Territory - Quake Wars

  • ETQW: Edit ~/.etqwcl/base/etqwconfig.cfg and change
seta s_driver "alsa"
to
seta s_driver "oss"
  • Also, Command line parameter "+set s_driver oss" will make Quake engines use OSS driver, overriding setting in config files.

esd/esound

  • Debian: install libesd0 instead of libesd0-alsa.

Adobe Flash

  • Flash V7 uses OSS natively, so no special setup is needed.
  • Flash V9 and V10 require libflashsupport to output sound via OSS. Typically a 32-bit version of the library is required.
  • Flash V10 has a 64-bit version which 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 ... \n

Learning from the Wisdom of the Body

"Its amazing that our interpretation of experiences can generate intense visceral responses. The fact that we get goosebumps when we are inspired or afraid is one of many everyday indicators of just how deeply and intricately connected our minds and bodies are. In fact, the mind and body are an intertwined whole -- and there is great wisdom in the totality of our mind-body experience.

[Learning from the Wisdom of the Body]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]

Man Climbs Worlds 14 Tallest Peaks

Hirotaka Takeuchi has gotten official certification for his feat of climbing the worlds 14 tallest mountains. Hes the 30th person ever and the first Japanese person to accomplish the feat.

[Man Climbs Worlds 14 Tallest Peaks]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]

15 Things You Should Give Up To Be Happy

Here is a list of 15 things which, if you give up on them, will make your life a lot easier and much, much happier. We hold on to so many things that cause us a great deal of pain, stress and suffering and instead of letting them all go, instead of allowing ourselves to be stress free and happy we cling on to them. Not anymore. Starting today we will give up on all those things that no longer serve us, and we will embrace change. Ready? Here we go:

[15 Things You Should Give Up To Be Happy]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]

Microbial Oasis Discovered Beneath the Atacama Desert

Two metres below the surface of the Atacama Desert there is an oasis of microorganisms. Researchers from the Center of Astrobiology (Spain) and the Catholic University of the North in Chile have found it in hypersaline substrates thanks to SOLID, a detector for signs of life which could be used in environments similar to subsoil on Mars.

[Microbial Oasis Discovered Beneath the Atacama Desert]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]

6 Steps Towards Living a Life Free of Fear and Full of Hope

There are two basic motivating forces: fear and love. When we are afraid, we pull back from life. When we are in love, we open to all that life has to offer with passion, excitement, and acceptance. We need to learn to love ourselves first, in all our glory and our imperfections. If we cannot love ourselves, we cannot fully open our ability to love others or our potential to create. Evolution and all hopes for a better world rest in the fearlessness and open-hearted vision of people who embrace life. ~ John Lennon

[6 Steps Towards Living a Life Free of Fear and Full of Hope]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]