You are not logged in.

#1 2012-06-03 19:22:33

hesse
Member
Registered: 2011-12-08
Posts: 88

[SOLVED] ALSA multiple audio source playback

I noticed that by default alsa doesn't allow for playing from two or more sources simultaneously. For instance playing a youtube video while already playing music from mpd will result in having only sound from mpd. How can I enable playback of multiple audio sources in alsa? Thanks

Last edited by hesse (2012-07-13 22:24:29)

Offline

#2 2012-06-03 20:09:25

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: [SOLVED] ALSA multiple audio source playback

Either use dmix or pulseaudio.

Offline

#3 2012-06-03 20:29:54

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED] ALSA multiple audio source playback

Set up mpd - you probably have it set up to hog the soundcard.

Offline

#4 2012-06-04 23:03:34

hesse
Member
Registered: 2011-12-08
Posts: 88

Re: [SOLVED] ALSA multiple audio source playback

Thanks guys, but I already have configured MPD: http://pastebin.com/GJb5jHnv At least I think it's not the problem.

Offline

#5 2012-06-04 23:10:29

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED] ALSA multiple audio source playback

hesse wrote:

I already have configured MPD

Badly. It needs to output to *dmix*. "hw:whatever" bypasses dmix, and so won't share with flash.

Offline

#6 2012-07-13 22:24:15

hesse
Member
Registered: 2011-12-08
Posts: 88

Re: [SOLVED] ALSA multiple audio source playback

I put this in /etc/asound.conf

pcm.dsp {
    type plug
    slave.pcm "dmix"
}

and left the settings in mpd.conf like this:

audio_output {
	type		"alsa"
	name		"ALSA Device"
}

The mixing now works with multiple audio sources! Thank you.

Offline

Board footer

Powered by FluxBB