[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ALSA strangeness



On Mon, 2004-05-24 at 13:26, Alex Malinovich wrote:
> 
> I had thought that all ALSA drivers had support for multiple audio
> streams. Is this not the case? 

Yes and no. On hardware with built-in multi-stream playback (like in 
your home PC), nothing special needs to be done.

For hardware without built-in multi-stream playback, ALSA provides a
software emulation (sort of), but it requires you to configure
/etc/asoundrc.

Here's what mine looks like (see below). The "pcm.!default" directive
should cause ALSA-aware applications to use the dmixer plugin that 
provides the software mixing.  Applications which supports only OSS
can participate also through the "aoss" application. "aoss <app>" 
should redirect the OSS-output BUT only if the application uses the 
standard "open()" calls instead of "fopen()".  For example, bzflag
version 1.10.4 does not work with aoss.

Hope that helps.

------------------ my /etc/asoundrc ----------------------

pcm.!default {
    type plug
    slave.pcm "dmixer"
}
 
pcm.dsp {
    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
        #periods 128
        #rate 44100
        rate 48000
    }
    bindings {
        0 0
        1 1
    }
}
 
ctl.mixer0 {
    type hw
    card 0
}


-- 
Steven Yap <syap@shaw.ca>



Reply to: