Multiple instances using multiple audio devices

I am trying to set up a multi-zone music player and just discovered MOC, but having had a play I discovered that only one instance can run at a time and it only outputs to the default device. Are there any ways to overcome these?

Thanks,
Ed
(Debian 4)

You could specify a different directory for MOC (-M option) to read its configuration from (and to store its socket in).
This way you can run as many server/client instances with different configurations as you want.
The output driver and device can be set via the config file.

Does this do what you want ?

*edit*
And additionally you can always run as many clients as you want to have multiple interfaces to the same server.

OK, the multiple instances part is sorted! How do I go about changing the sound card each one outputs to?

Thank you!
Ed

(Edit: OK, this really should be a reply to the first answer, not the question, but I didn't think of that at the time :-P)

Setting the output device depends on your driver but is a simple process (did you have a look at the config.example file ?):

I'm using ALSA and have three devices: a SBLive, a VIA CT82XX based onboard sound chip and a USB soundcard. The system is set up so that the cards are asigned sound slots on the give order.
In order to select the cards I have following entries in my $HOME/.asoundrc:
<br /> pcm.!default {<br /> type hw<br /> card 0<br /> }</p> <p>ctl.!default {<br /> type hw<br /> card 0<br /> }</p> <p>pcm.live {<br /> type hw<br /> card 0<br /> }</p> <p>ctl.live {<br /> type hw<br /> card 0<br /> }</p> <p>pcm.via {<br /> type hw<br /> card 1<br /> }</p> <p>ctl.via {<br /> type hw<br /> card 1<br /> }</p> <p>pcm.usb {<br /> type hw<br /> card 2<br /> }</p> <p>ctl.usb {<br /> type hw<br /> card 2<br /> }

These entries map choosen names (live, via, usb) to the cards (0,1,2).

In MOCs config file I have:
<br /> # ALSA mixer device<br /> AlsaMixer = PCM </p> <p># Second ALSA mixer device<br /> AlsaMixer2 = Master</p> <p># ALSA output device<br /> AlsaDevice = live

for the SBLive

and

<br /> # ALSA mixer device<br /> AlsaMixer = Speaker </p> <p># Second ALSA mixer device<br /> AlsaMixer2 = Master</p> <p># ALSA output device<br /> AlsaDevice = usb

for the USB audio device.

(Check mixer-names with alsamixer or similar to match your devices)

For other drivers (JACK, OSS) the procedure varies but is not really any more complex.