On 10/25/07, Clemens Ladisch <[EMAIL PROTECTED]> wrote:
>
> Allen Kennedy wrote:
> >   I'm trying to get an asound.conf file set up that will allow me
> > to play 5 different wav files over separate channels
> > simultaneously, with a command like this:
> >
> > #aplay -D channel1 1.wav & aplay -D channel2 2.wav &
> >   aplay -D channel3 3.wav & aplay -D channel4 4.wav &
> >   aplay -D channel5 5.wav
>
> Try this:
>
> pcm.channel {
>         @args [ CHANNEL ]
>         @args.CHANNEL {
>                 type integer
>         }
>         type plug
>         slave.pcm {
>                 type dshare
>                 ipc_key 220057      # some random but unique number
>                 slave.pcm "hw:0"    # the output device
>                 slave.channels 6
>                 bindings {
>                         0 $CHANNEL
>                 }
>         }
> }
>
>
> Then you can use devices "channel:0" through "channel:5".
>
>
> HTH
> Clemens
>

  I had just gotten it to work using a "dmix" when your e-mail came in.
I like your way better, much cleaner and more elegant. Thanks

  One issue though, it appears as though your solution would only
route a single channel of the input wave file.  adding in more bindings
still only caused it to route 1 channel of the input audio.

  I guess I still need a "route" to get all the channels of the .wav to
funnel together into the output channel.

instead of writing 5 sepereate routes, I tried to use the args,
but couldn't get the syntax correct, any ideas?
  It's unfortunate that the alsa documentation doesn't explain well
the syntax for the config files..


pcm.ch {
        @args [ CHANNEL ]
        @args.CHANNEL {
                type string
        }
        type route
        slave.pcm  "channel:" +$CHANNEL  # can't figure out how to concat

        ttable.0.0 1
        ttable.1.0 1
        ttable.2.0 1
        ttable.3.0 1
        ttable.4.0 1
        ttable.5.0 1
}

I keep getting an error from aplay about the config syntax.
I tried reading through the code to see how the parse works,
but I gave up after 20 minutes.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to