Skip to content

Archives

kgst output to ALSA/Artsd/ESD instead of just OSS

Linux: Here’s a patch that adds support for ALSA/Artsd/ESD output from kgst, the KDE gstreamer middleware used by JuK.

Background: JuK is a great music player app for KDE. However, it hogs
the sound device while running, which means that nothing else gets access to play sound until the app is shut down. This is suboptimal.

The reason it does this is because it plays sound via this chain of components: juk -> kgst -> gstreamer -> sink. Unfortunately, the
kgst component doesn’t allow control over what output sink to use, instead hard-coding the string 'osssink' — the OSS drivers, for traditional Linux /dev/dsp sound. My laptop doesn’t support mixing in the sound hardware, which means I need to use a software mixer. 'osssink' doesn’t support software mixing, instead giving the caller exclusive access to the sound card, and other apps will just have to wait for it to finish.

(As to why JuK doesn’t just play mp3s by running ‘mpg321 name-of-file.mp3’, and let us specify the ‘-o’ switch to use, I wish I knew. (ObOldbieGripe: component-based architectures are full of this kind of needless over-complexity ;)

Anyway, the patch in the bug above lets the user provide an environment variable for a string for kgst to use instead of 'osssink'.