You are not logged in.

#1 2005-02-27 10:05:14

Father
Member
From: Australia
Registered: 2004-06-01
Posts: 209

Only one app can play sound at a time

Since an upgrade a few months ago, only one application at a time has been able to play sound

eg, if im playing music in XMMS and i start a video in mplayer, mplayer will look like its crashed (non-responsive) until i STOP (not just pause) the song in XMMS, mplayer will then resume

this happens with everything
games, flash animations, sound events, etc

i am a member of the audio group before anyone asks


im pretty sure none of the following will help, but ill include them anyway..
i use the snd_intel8x0 module for sound

my devices

ls -l /dev/sound/
total 0
crw-rw----  1 root audio 14, 4 2005-02-11 21:12 audio
crw-rw----  1 root audio 14, 3 2005-02-11 21:12 dsp
crw-rw----  1 root audio 14, 0 2005-02-11 21:12 mixer

my sound modules

lsmod
....
snd_intel8x0           34344  4 
snd_ac97_codec         72912  1 snd_intel8x0
snd_pcm_oss            55464  1 
snd_mixer_oss          20480  1 snd_pcm_oss
snd_pcm               100168  2 snd_intel8x0,snd_pcm_oss
snd_timer              26436  1 snd_pcm
snd_page_alloc          9928  2 snd_intel8x0,snd_pcm
snd_mpu401_uart         7872  1 snd_intel8x0
snd_rawmidi            25444  1 snd_mpu401_uart
snd_seq_device          8008  1 snd_rawmidi
snd                    55588  15 snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_mpu401_uart,snd_rawmidi,snd_seq_device
soundcore               9952  2 snd
....

any ideas whats wrong?

Offline

#2 2005-02-27 11:13:54

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,431
Website

Re: Only one app can play sound at a time

have you set up a dmix plugin?  I'm sure there is stuff about it on the forums?  I use the same drivers as you and i have to use dmix

Offline

#3 2005-02-27 11:24:45

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Only one app can play sound at a time

#/etc/asound.conf start:
pcm.!default {
  type plug
  slave.pcm "dmixer"
  }
pcm.dsp0 {
  type plug
  slave.pcm "dmixer"
  }
pcm.dmixer {
  type dmix
  ipc_key 1024
 slave {
  pcm "hw:0,0"
  period_time 0
  period_size 1024
 buffer_size 8192
  rate 44100
  }
 bindings {
  0 0
  1 1
  }
  }

ctl.dmixer {
  type hw
  card 0
  }
#end.

chuck that in /etc/asound.conf

then make sure XMMS is using alsa output.

to make mplayer use alsa output, put this line in ~/.mplayer/config. If the file doesnt exist, make it.

ao=alsa

and finally, plenty of programs use libao for output. chuck this line into /etc/libao.conf, again creating if it doesnt exist. if the line exists, make sure its the same.

default_driver=alsa09

Offline

#4 2005-02-27 12:22:37

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,431
Website

Re: Only one app can play sound at a time

iph - is that in the wiki?  If not maybe you should put it in!

Offline

#5 2005-02-27 13:00:07

Father
Member
From: Australia
Registered: 2004-06-01
Posts: 209

Re: Only one app can play sound at a time

ahh.. call me ignorant, but what is dmixer?

theres no mention of it in pacman?

is there anyway i can get the effects of those scripts without restarting linux?

thanks

Offline

#6 2005-02-27 14:13:24

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,431
Website

Re: Only one app can play sound at a time

iph just supplied you with the necessary info to create the dmix plugin - you may still have restart tho - dunno!

Offline

#7 2005-02-28 02:26:33

Father
Member
From: Australia
Registered: 2004-06-01
Posts: 209

Re: Only one app can play sound at a time

thanks guys.. im not entirely sure how that did what it did..

but since ive come back and unlocked my computer this morning.. its worked.. thanks alot.. its been bugging me for ages..


from the newsletter http://www.archlinux.org/~jason/newslet … eb-27.html

Father couldn't play sound from multiple sources. This is a common problem with lower end sound cards that don't have a hardware mixer. You must set up a software mixer (like DMix). Instructions were posted by iphitus inside the thread.

no hardware mixer in my sound card eh... hmm.. i didnt think nforce 3 sound cards would be _that_ bad... damnit

i guess it wasnt an arch update that did it.. but when i updated my computer.. heh..

strange that alsa doesnt handle this internally / transparently..

thanks again

Offline

#8 2005-02-28 04:55:20

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,363
Website

Re: Only one app can play sound at a time

i was confused, read this
http://alsa.opensrc.org/index.php?page=DmixPlugin
and still am confused

what i want is running mpd in background and still being able to run timidity++ or arts in parallel - this is possible with dmix? i thought that in linux only one app can access /dev/dsp0 at a time

EDIT:
http://alsa.opensrc.org/index.php?page= … irty+HOWTO
this explains some things

EDIT2:
lol  8) - nice!


The impossible missions are the only ones which succeed.

Offline

#9 2005-02-28 09:36:41

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Only one app can play sound at a time

with dmix, you just  chuck that file in place, and next time a program tries to play sound, the new config is loaded up, so no reboots required.

most of the other things just made the programs use alsa, because alsa is required for dmix to work -- if they use OSS, we get locked up again.

Yep ill go post this all on the wiki.... now.

iphitus

Offline

#10 2005-02-28 09:51:04

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Only one app can play sound at a time

Offline

#11 2005-02-28 10:38:14

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,431
Website

Re: Only one app can play sound at a time

nice one, mate - amazed it wasn't already in there!

Offline

#12 2005-03-01 10:01:29

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,431
Website

Re: Only one app can play sound at a time

... i thought it was too amazing - and i must have found it somewhere!

http://wiki2.archlinux.org/index.php/Al … and%20GAIM

Offline

#13 2005-03-01 14:26:54

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,363
Website

Re: Only one app can play sound at a time

dibblethewrecker wrote:

... i thought it was too amazing - and i must have found it somewhere!

http://wiki2.archlinux.org/index.php/Al … and%20GAIM

what a strange title for this entry  roll


The impossible missions are the only ones which succeed.

Offline

#14 2005-03-02 21:15:05

T-Dawg
Forum Fellow
From: Wilmington, NC
Registered: 2005-01-29
Posts: 2,734

Re: Only one app can play sound at a time

doesn't the enlightened sound daemon handle multiple sound apps being played at the same time?

Offline

#15 2005-03-04 05:39:20

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,431
Website

Re: Only one app can play sound at a time

yes, so does arts - but they are both daemons - this is a way of not using a daemon - which helps if your apps aren't esd or arts compatible

You know, i think i might have written that wiki entry - doing that with gaim and xmms was my main goal at the time...

Offline

Board footer

Powered by FluxBB