MrMorden Posted March 31, 2005 Report Share Posted March 31, 2005 Hey, everyone: My computer won't play multiple sounds at the same time. I have diaganosed this problem by attempting to open different programs that access the sound at the same time, namely AlsaPlayer and Kaffeine. If AlsaPlayer is open when I try to open Kaffeine, Kaffeine will say that "all audio drivers failed to initialize" and crash. If I attempt to open an instance of AlsaPlayer while Kaffeine is open, AlsaPlayer will not load until I stop the media clip. In addition, when attempting to run Vegastrike (http://vegastrike.sourceforge.net) I can consistently get music but no sound (by loading esd) or sound but no music (by not loading esd.) The devs at the vegastrike message board say that both sound and music should be working properly if esd is running. In my attempts to solve the problem, I have googled the following: multiple sounds at once NForce2 "multiple sounds" at once NForce2 multiple sounds NForce2 As well as search the Vegastrike message boards and these boards. I did find someone with the same problem, but he solved it by putting in a dedicated sound card. Here is my system info: Mandrake 10.1 Offiical kernel 2.6.8.1-12mdkcustom Giga-byte 7NNXP (NForce2 chipset) with dirver intel8x0 Athalon XP 3200+ Thank you, MrMorden Quote Link to comment Share on other sites More sharing options...
devries Posted March 31, 2005 Report Share Posted March 31, 2005 Your soundcard (in this case onboard sound) doesn't do hardware mixing. That means only one application at the time can use the card. Solution: use a software mixer like esd (the gnome soundmixer) (or arts (kde soundmixer) or dmix (alsamixer)). The easiest solution is if the app you want to use has different audio output options. Just changing the audio out to esd will solve the problem. If not you have to run the app trough a soundwrapper. Start it from a console by typing: soundwrapper <name of app> (or esddsp, artsdsp <name of app>) The dmix way is more difficult. If the other solutions don't work try it. Quote Link to comment Share on other sites More sharing options...
MrMorden Posted March 31, 2005 Author Report Share Posted March 31, 2005 Well, I tried using esddsp, and as soon as I did something that called for a sound effect (sc, fireing my ship's guns) the performance immediately went to crap. The sound became choppy and my framerate took a dive from ~150 fps to ~10 fps. Does this mean I need to use dmix, or is there some other trick for making the sound wrapper work properly? If I do need to use dmix, where/how do I get the plug-in, or tell if I already have it? Digging around the wiki (http://wiki.arslinux.com/Dmix) isn't helpful. Quote Link to comment Share on other sites More sharing options...
devries Posted March 31, 2005 Report Share Posted March 31, 2005 Yes esd is crap :) Ok for dmix: open your favorite text editor and create a file called .asoundrc (don't forget the '.') in your home directory. Copy and paste this: pcm.nforce-hw { type hw card 0 } pcm.!default { type plug slave.pcm "nforce" } pcm.nforce { type dmix ipc_key 1234 slave { pcm "hw:0,2" period_time 0 period_size 1024 buffer_size 4096 rate 44100 } } ctl.nforce-hw { type hw card 0 } and save the file. Disclaimer: I got this from google (i don't have nforce2) http://www.mythtv.info/moin.cgi/DigitalSoundHowTo so I don't know this will work for sure. This is a howto: http://alsa.opensrc.org/index.php?page=DmixPlugin Good luck Quote Link to comment Share on other sites More sharing options...
MrMorden Posted March 31, 2005 Author Report Share Posted March 31, 2005 Hrm...it didn't work. Is it a better idea to just throw $40 at a sound card than try to figure out how dmix is supposed to work? All the stuff I've been able to dig up on it seems pretty damn arcane. Quote Link to comment Share on other sites More sharing options...
devries Posted March 31, 2005 Report Share Posted March 31, 2005 What modules (drivers) are you using? (open a console, log in as root and type: lsmod. Post the output here. Yes a card that does hardware mixing is a good investment (chaintech av710 is a good one I think) Quote Link to comment Share on other sites More sharing options...
MrMorden Posted March 31, 2005 Author Report Share Posted March 31, 2005 Output of lsmod: snd-seq-oss 32704 0 snd-seq-midi-event 6464 1 snd-seq-oss snd-seq 50576 4 snd-seq-oss,snd-seq-midi-event snd-pcm-oss 50856 0 snd-mixer-oss 18112 1 snd-pcm-oss snd-intel8x0 29772 0 snd-ac97-codec 68496 1 snd-intel8x0 snd-pcm 84552 2 snd-pcm-oss,snd-intel8x0 snd-timer 22148 2 snd-seq,snd-pcm snd-page-alloc 7496 2 snd-intel8x0,snd-pcm gameport 3456 1 snd-intel8x0 snd-mpu401-uart 6208 1 snd-intel8x0 snd-rawmidi 20836 1 snd-mpu401-uart snd-seq-device 6472 3 snd-seq-oss,snd-seq,snd-rawmidi snd 45412 11 snd-seq-oss, snd-seq, snd-pcm-oss, snd-mixer-oss, snd-intel8x0, snd-ac97-codec, snd-pcm, snd-timer, snd-mpu401-uart, snd-rawmidi, snd-seq-device floppy 54096 0 md5 3648 1 ipv6 244612 8 ipt_TOS 1920 12 ipt_REJECT 5568 4 ipt_pkttype 1344 4 ipt_LOG 5824 8 ipt_state 1472 9 ipt_multiport 1664 0 ipt_conntrack 2112 0 iptable_mangle 2176 1 ip_nat_irc 3568 0 ip_nat_tftp 2928 0 ip_nat_ftp 4272 0 iptable_nat 22124 3 ip_nat_irc,ip_nat_tftp,ip_nat_ftp ip_conntrack_irc 70512 1 ip_nat_irc ip_conntrack_tftp 2992 0 ip_conntrack_ftp 71344 1 ip_nat_ftp ip_conntrack 29736 9 ipt_state, ipt_conntrack, ip_nat_irc, ip_nat_tftp, ip_nat_ftp, iptable_nat, ip_conntrack_irc, ip_conntrack_tftp,ip_conntrack_ftp iptable_filter 2176 1 ip_tables 16064 10 ipt_TOS, ipt_REJECT, ipt_pkttype, ipt_LOG, ipt_state, ipt_multiport, ipt_conntrack, iptable_mangle,iptable_nat,iptable_filter nls_iso8859-1 3776 1 af_packet 17352 4 nvidia 3468316 12 nvnet 69348 0 genrtc 8244 0 Quote Link to comment Share on other sites More sharing options...
MrMorden Posted March 31, 2005 Author Report Share Posted March 31, 2005 Here's some additional weirdness; it may somehow be related. I can get alsaplayer to play .wav files, but not .mp3's. Quote Link to comment Share on other sites More sharing options...
devries Posted March 31, 2005 Report Share Posted March 31, 2005 try this one: # Set default sound card # Useful so that all settings can be changed to a different card here. pcm.snd_card { type hw card 0 } # Allow mixing of multiple output streams to this device pcm.dmix { type dmix ipc_key 1024 slave.pcm "snd_card" slave { # This stuff provides some fixes for latency issues. # buffer_size should be set for your audio chipset. period_time 0 period_size 1024 buffer_size 8192 } bindings { 0 0 1 1 } } # Allow reading from the default device. # Also known as record or capture. pcm.dsnoop { type dsnoop ipc_key 2048 slave.pcm "snd_card" ## Possible artsd full duplex fix: # slave { # period_time 0 # period_size 1024 # buffer_size 8192 # } bindings { 0 0 1 1 } } # This is what we want as our default device # a fully duplex (read/write) audio device. pcm.duplex { type asym playback.pcm "dmix" capture.pcm "dsnoop" } ################### # CONVERSION PLUG # ################### # Setting the default pcm device allows the conversion # rate to be selected on the fly. # duplex mode allows any alsa enabled app to read/write # to the dmix plug (Fixes a problem with wine). pcm.!default { type plug slave.pcm "duplex" } # Apparently this is wrong (breaks mplayer for me opening the device) #ctl.!default { # type plug # slave.pcm "snd_card" #} ######## # AOSS # ######## # OSS dsp0 device (OSS needs only output support, duplex will break some stuff) pcm.dsp0 { type plug slave.pcm "dmix" } # OSS control for dsp0 (needed?...this might not be useful) ctl.dsp0 { type plug slave.pcm "snd_card" } # OSS control for dsp0 (default old OSS is mixer0) ctl.mixer0 { type plug slave.pcm "snd_card" } Quote Link to comment Share on other sites More sharing options...
MrMorden Posted March 31, 2005 Author Report Share Posted March 31, 2005 All right, that one worked! Can you tell me how you got that file? I'd like to see an example of your probelm-solving in action. However, the combined sound and music for Vegastrike STILL isn't working...I think I'll try talking to the vegastrike devs some more... Thanks for your help! Quote Link to comment Share on other sites More sharing options...
devries Posted March 31, 2005 Report Share Posted March 31, 2005 I'd like to see an example of your probelm-solving in action. My secret is spending a lot of time on forums like this and vaguely remembering things. :D Quote Link to comment Share on other sites More sharing options...
adamw Posted March 31, 2005 Report Share Posted March 31, 2005 vegastrike probably doesn't do ALSA output. Getting apps that only do OSS output to work with dmix is even more of a pain. BTW, 10.2 / 2005 uses dmix by default for all ALSA drivers. Neat, yes? :) Quote Link to comment Share on other sites More sharing options...
MrMorden Posted March 31, 2005 Author Report Share Posted March 31, 2005 vegastrike probably doesn't do ALSA output. Getting apps that only do OSS output to work with dmix is even more of a pain. BTW, 10.2 / 2005 uses dmix by default for all ALSA drivers. Neat, yes? :) <{POST_SNAPBACK}> So...would buying a sound card that does hardware mixing fix the problem? Quote Link to comment Share on other sites More sharing options...
adamw Posted March 31, 2005 Report Share Posted March 31, 2005 mrmorden: theoretically, I think so. I've never had such a card myself, though, so I'm not actually sure. Quote Link to comment Share on other sites More sharing options...
MrMorden Posted March 31, 2005 Author Report Share Posted March 31, 2005 mrmorden: theoretically, I think so. I've never had such a card myself, though, so I'm not actually sure. <{POST_SNAPBACK}> Well, like I said in the OP, I found someone who fixed the problem by throwing in a dedicated sound card...but I'm kinda loath to spend $80 for an Audigy2 when I'm not even sure it will help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.