Sound works randomly on Linux

General area for talk about ZSNES. The best place to ask for related questions as well as troubleshooting.

Moderator: ZSNES Mods

Post Reply
Herbchef
New Member
Posts: 5
Joined: Wed May 03, 2006 12:14 am

Sound works randomly on Linux

Post by Herbchef »

So I'm enjoying the ZSNES goodness on Linux. However, sound seems to work randomly. I start ZSNES from a terminal, and sometimes I get the error message, "Sound init failed!" and then sound does not work.

Sometimes running "sudo zsnes" works. Sometimes running "sudo zsnes" does not work but running just "zsnes" does. Sometimes sound doesn't work either way and I have to reboot to got sound working...

It just seems random! Does anyone know how I can start to troubleshoot this problem?
paulguy
Zealot
Posts: 1076
Joined: Sat Jul 02, 2005 2:01 am
Contact:

Post by paulguy »

some specifications and what linux you're using would help.
adventure_of_link
Locksmith of Hyrule
Posts: 3634
Joined: Sun Aug 08, 2004 7:49 am
Location: 255.255.255.255
Contact:

Post by adventure_of_link »

Check to make sure other applications weren't using the sound before you opened ZSNES.

This is one (of few) areas where windows wins. D:< But, however, iirc you can run a sound server, and these types of things shouldn't happen.
<Nach> so why don't the two of you get your own room and leave us alone with this stupidity of yours?
NSRT here.
paulguy
Zealot
Posts: 1076
Joined: Sat Jul 02, 2005 2:01 am
Contact:

Post by paulguy »

for me, linux sound seems to work better. In windows i usually cant get more than 1 thing to acess the sound. in linux i can.
Agozer
16-bit Corpse | Nyoron~
Posts: 3534
Joined: Sun Aug 01, 2004 7:14 pm
Location: Nokia Land

Post by Agozer »

paulguy wrote:In windows i usually cant get more than 1 thing to acess the sound.
With DirectSound you can.
whicker: franpa is grammatically correct, and he still gets ripped on?
sweener2001: Grammatically correct this one time? sure. every other time? no. does that give him a right? not really.
Image
kevman
Redneck Gamer-Mod
Posts: 433
Joined: Wed Aug 04, 2004 2:15 am
Location: Pittsburgh

Post by kevman »

That depends.

Under Linux ALSA (and I think, OSS) can only handle as many simultanious sounds as your soundcard can. If you have a half-decent sound card, then this number is likely too high to practically hit.

If you have a cheap-ass shitty onboard sound card, then it can't hardware miz any sounds together, and ALSA will only take sound from one app at a time. If one app allocates the sound card, no others can make sound.

This is bypassed by using a sound server such as aRts, which will use the CPU to mix all the inputs into one output and send only one stream to ALSA. However, it consumes RAM and CPU time to do it, so I keep it disabled (my Audigy supports some hundred simultanious sounds).

I think the same is true for Windows. Using the kernel driver limits you to however many sounds your card has, but Directsound will take of you. It depends, in both cases, on what the app wants to use. If you have aRts under Linuesand an app "steals" the single sound stream, you are still screwed.
SHREIK!!!!!!! DDdddnnnnnnaaaa! GESTAHLLLLLLLLLL!!!!!!!!

Steelers now officially own your ass.
Post Reply