LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-08-2004, 11:57 AM   #1
DecayingOmega
LQ Newbie
 
Registered: Feb 2004
Distribution: Slackware 9.1
Posts: 4

Rep: Reputation: 0
Question How to get simulanteous sound sources working?


How can one get simultaneous sound sources working? By this I mean having two sound sources playing at the same time, say a song in XMMS and the sounds from a game, say W:ET? I used to have this with SuSE, but I dont rember how. Anyone care to help me, I would greatly appreciate it?
 
Old 02-08-2004, 12:20 PM   #2
LinFreak!
Member
 
Registered: Jul 2003
Location: England
Distribution: slack9.1
Posts: 209

Rep: Reputation: 30
Ok, this is a sticky subject. The short answer: not easily.
The long answer:
1. All sounds being sent to your sound card are sent to /dev/dsp or similar, only one at a time is allowed to access this device.
2. If you want multiple programs to access this device you need to send them through mixing software ("arts" for kde, "esd" for gnome are two standard mixers). To do this you need to run the program with special parameters before the actual comand; read the arts or esd documentation for more info.
3.Here is some info I found a long time ago, it didn't work for me at the time probably because my sound card couldn't do it; try it anyway:

1. Are you using alsa ?
First thing to do is check if you are running alsa at all. Try "lsmod | grep snd" in a terminal as root, if you get some lines of output, you are using alsa, if you dont get anything, you are not.

2. Any sound demons running ?
Now we check if /dev/dsp is being used by any evil sound-demon (like arts or that gnome sound thingy (esd) :] ). For this you need the programme "lsof", if you dont have it installed you can get it from your distribution cd's. Now issue "lsof | grep dsp" (while not running anything that plays sound, like mp3 players, teamspeak, games etc.). This will list all aplications using the sound, idealy you shouldn't get any ouput (go to 4.) else we need to get rid of that demon.

3. Getting rid of the sound demon
If you got output in (2) then you most probably have arts running (if you are using kde) If something else is listed as programme name (first column) you have to get rid of that. (like esd)
a) disabling arts: Go to the KDE control center, hit search and type "artsd" this should find a hit "Sound-System". In the dialogue you deselect start arts at kde startup. Then you restart kde and check if arts is still running (2). It should be gone.
b) disabling other demons: You can always resort to killing the processes ("killall thedemon", but the better way is to find where you can set it to not start it.

4. Finding the process name of your game
For the following steps we need to know what the process is called that runs the game. To find out, you can start your game and switch to a ttySx [press Ctrl+Alt+F2 for example], then type "top", and you should see the name somewhere high up (as your game should use lots of CPU ) ). For quake3 the name is "quake3.x86".

5. Telling alsa your game only needs playback, no recording etc.
Now, to enable your game to play sound you have to tell alsa that your game will not need to record sound or anything - else alsa will refuse to give your game the capability to play sounds, since TeamSpeak already has the rights to record, and no two programme should be able to. Issue these commands as root:
echo "quake3.x86 0 0 direct" > /proc/asound/card0/pcm0p/oss
echo "quake3.x86 0 0 disable" > /proc/asound/card0/pcm0c/oss
(substite "quake3.x86" with the name you found for your specific game in (4)). Now you should be able to play your game with sounds while using TS.

6. Making the changes permanent (over reboot)
Since the /proc filesystem is not permanent [nothing gets saved if you reboot] you have to issue the commands in (5) every time you rebooted and want to game with TS. The sollution is to put those commands in a startup script, which will issue them automagicly at boot-up time. For SuSE its /etc/init.d/boot.local, for gentoo try /etc/conf.d/local.start. Just add those commands somewhere at the bottom of those files.
 
Old 02-08-2004, 12:25 PM   #3
DecayingOmega
LQ Newbie
 
Registered: Feb 2004
Distribution: Slackware 9.1
Posts: 4

Original Poster
Rep: Reputation: 0
holy crap thats alot of effort for something so simple, seemingly. why is this so? windoze and mac can play simultaneous sounds, why does linux have so much trouble? is this anything that you think will be addressed any time soon? do you like cheese? i do. :P
 
Old 02-08-2004, 01:02 PM   #4
LinFreak!
Member
 
Registered: Jul 2003
Location: England
Distribution: slack9.1
Posts: 209

Rep: Reputation: 30
hehe, it's just that windows drivers seem to set themselves up better, they are still doing the same job though.
mmm cheese!
 
  


Reply



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
Re:a working sources.list for breezy MunCH Ubuntu 2 11-12-2005 01:26 AM
sources not working in SuSE 9.1 JROCK1980 Linux - Software 2 07-09-2004 12:52 AM
Getting a working sources.list shodekiagari Debian 2 03-26-2004 03:24 PM
Two sound sources through one sound card? tfdml37 Linux - Hardware 8 02-29-2004 02:48 PM
apt sources update not working GreenerLinux Libranet 3 12-04-2003 03:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:55 PM.

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