Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-06-2007, 03:32 PM   #1
LQ Newbie
Registered: Oct 2005
Distribution: Ubuntu 8.04
Posts: 15

Rep: Reputation: 0
Linux more than 1 multimedia application sharing sound

In Linux, does anyone know how to enable multiple applications like realplayer and other mp3 player to play sound at the same time?
Current I think when I started realplayer, it totally grabs the sound card. And I started xmms(another multimedia player) afterwards, it has no sound produced at all...(unless I closed realplayer application first, then start it)
Is this a common problem in Linux?
Sorry that I don't know how to explain this problem in a precisely technical way. Thanks in advance.
Old 12-06-2007, 03:45 PM   #2
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Realplayer uses the OSS sound driver, and on sound cards with only one channel this can grab the whole card until the application releases it (or usually, terminates).

You can call realplayer using a program called aoss (which in Ubuntu is part of the alsa-oss package). This channels the OSS driver calls though ALSA, which knows how to share the sound card with other ALSA apps. Most apps are ALSA these days, with a few OSS apps still remaining, and being a pain in the butt. Some programs allow you to choose which one to use - ALSA or OSS (e.g. Skype).

What I did was to create a wrapper script called realplay which I put in my PATH before the existing realplay launcher. This script contains the following:

pgrep realplay > /dev/null
if [ $? -eq 0 ]; then
        aoss /opt/real/realplay -r "$@"
        aoss /opt/real/realplay "$@"
As you an see I installed realplayer to /opt/real, and this is called from my wrapper script. My wrapper script has another function - if an instance of realplayer is already running it opens the requested media in that instance of the program rather than opening a second window.

I put this in a directory called bin in my HOME directory, which I added to the PATH in my .bashrc file by adding a line to the end of the file:
export PATH="$PATH:$HOME/bin"
To make this effective for all apps I had to log out and back in again.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
multimedia center application khairil Programming 3 12-26-2006 03:41 AM
Video Multimedia Application of the Year jeremy 2005 Members Choice Awards 83 05-03-2006 10:28 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:27 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration