Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ALSA: Sound from more than one app at the same time?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Normie
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jul 2002
Posts: 83

PostPosted: Sat Nov 30, 2002 7:03 pm    Post subject: ALSA: Sound from more than one app at the same time? Reply with quote

Basically, I want to play a game on zsnes with music coming from xmms, but neither can run if the other is running, sound disabled or otherwise. Any ideas?
_________________
Achaea. Play it. Love it. Live it.
Back to top
View user's profile Send private message
Malakin
Veteran
Veteran


Joined: 14 Apr 2002
Posts: 1692
Location: Victoria BC Canada

PostPosted: Sat Nov 30, 2002 11:59 pm    Post subject: Reply with quote

There should definitely be an faq for the whole sound issue.

Alsa only supports hardware mixing with certain cards. You can look at the list here (http://www.alsa-project.org/alsa-doc/) and the ones with a (4) beside them support this.

2.4 kernel sound support doesn't support sound mixing at all.

If your sound card doesn't support hardware mixing then you need a software mixer like arts or esound.

If you need software mixer support then set the audio output on all your programs to use arts (or whatever mixer you choose).

If your program doesn't support arts then you can start it like this instead "artsdsp program" with program being the name of the program, this forces sound output to go through arts.
Back to top
View user's profile Send private message
Herodot
Guru
Guru


Joined: 29 Jul 2002
Posts: 429
Location: Professor Xavier's school for gifted youngsters

PostPosted: Sun Dec 01, 2002 4:24 am    Post subject: Reply with quote

Hi,

Quote:
here should definitely be an faq for the whole sound issue.
Well, there's a HOWTO. But it's very simple, and I really agree with you.

Quote:
2.4 kernel sound support doesn't support sound mixing at all.
Please explain. This is only with compiled OSS stuff, right?

Quote:
If your program doesn't support arts then you can start it like this instead "artsdsp program" with program being the name of the program, this forces sound output to go through arts.
I just asked about this in another thread - where were you? It's a great little trick, but unfortunately it doesn't work when I try to do
Code:
artsdsp java playwav something.wav
I get one of those "mcop warning: user defined signal handler found for SIG_PIPE, overriding"

Still, thank you for a couple of insightful comments.
Herodot
Back to top
View user's profile Send private message
void
n00b
n00b


Joined: 24 Jun 2002
Posts: 42
Location: Sweden

PostPosted: Sun Dec 01, 2002 9:05 am    Post subject: Reply with quote

Newer versions of alsa suports multiple outputs with cs46xx (common chip). Compiling the cvs version or (at least I think) the newest release will fix this.

Oh, you have to add mmap=1 to your module-options for your soundcard (it was a thread about this).
Back to top
View user's profile Send private message
Malakin
Veteran
Veteran


Joined: 14 Apr 2002
Posts: 1692
Location: Victoria BC Canada

PostPosted: Sun Dec 01, 2002 11:53 pm    Post subject: Reply with quote

Quote:
Please explain. This is only with compiled OSS stuff, right?

Yes, no mixing with OSS. What I meant was 2.5x+ kernel sound is now Alsa by default.

Quote:
I get one of those "mcop warning: user defined signal handler found for SIG_PIPE, overriding"
artsdsp doesn't work for everything, you can try void's suggestion.
Back to top
View user's profile Send private message
Normie
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jul 2002
Posts: 83

PostPosted: Mon Dec 02, 2002 6:58 pm    Post subject: Reply with quote

I use the via686 module, since that's the only one that works with my computer in alsa. The kernel support works, but the tone of the sounds in a large number of programs is a few notes too high, oddly enough, so I have to use alsa.
I can't find an mmap option of any sort anywhere, which, needless to say, is bad for my sound-mixing needs (not to mention my quake3 needs).
Any advice?
_________________
Achaea. Play it. Love it. Live it.
Back to top
View user's profile Send private message
Malakin
Veteran
Veteran


Joined: 14 Apr 2002
Posts: 1692
Location: Victoria BC Canada

PostPosted: Mon Dec 02, 2002 10:34 pm    Post subject: Reply with quote

Quote:
I can't find an mmap option of any sort anywhere

artsdsp --mmap
(Or just artsdsp -m)

When you load the Alsa modules you should be loading all these:
snd-via686
snd-pcm-oss
snd-mixer-oss
Back to top
View user's profile Send private message
Lin_Matt
Guru
Guru


Joined: 23 Jun 2002
Posts: 581
Location: TechWasteland (Mississippi)

PostPosted: Mon Dec 02, 2002 10:39 pm    Post subject: Reply with quote

Along the same lines...

Does anyone know of a way to route a particular app's sound thru one of the mixer controls so it could be mixed with sound from another app? I would really love to be able to control xine's volume via the video mixer control...
Back to top
View user's profile Send private message
Bar
n00b
n00b


Joined: 21 Jun 2003
Posts: 73

PostPosted: Fri Jul 04, 2003 3:43 am    Post subject: Reply with quote

cant speak for xine, but xmms's volume control changes the psd value in alsamixer, so if there is a psd value in your mixer thats probably it
Back to top
View user's profile Send private message
RoVeRken
Tux's lil' helper
Tux's lil' helper


Joined: 22 May 2003
Posts: 93
Location: Belgium (Leuven)

PostPosted: Fri Jul 04, 2003 3:54 pm    Post subject: Reply with quote

AH, i have this problem too ;p gonne try it out today ... thx
_________________
Powered by Gentoo.
Back to top
View user's profile Send private message
Woody
Guru
Guru


Joined: 30 Nov 2002
Posts: 592
Location: Milwaukee

PostPosted: Sat Jul 05, 2003 8:10 am    Post subject: Reply with quote

Malakin wrote:

Alsa only supports hardware mixing with certain cards. You can look at the list here (http://www.alsa-project.org/alsa-doc/) and the ones with a (4) beside them support this.


Well the (4) means the card supports hardware mixing. The real question is
can alsa do software mixing? the answer is supposed to be yes (via the dmix
plugin) but I've yet to see (hear?) it work without massive xruns.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum