Multiple usb audio outputs on Raspberry Pi 2

Hello,
I have an openFrameworks app and two usb audio sound cards to which I send two different sounds to play. It works well on Mac OS X but doesn’t work on the Raspberry Pi 2, and when I set the device to output to the second sound card I have the following error:

[notice ] ofRtAudioSoundStream: device 0 hw:USB PnP Sound Device,0
[notice ] ofRtAudioSoundStream: ----* default ----*
[notice ] ofRtAudioSoundStream: maximum output channels 2
[notice ] ofRtAudioSoundStream: maximum input channels 1
[notice ] ofRtAudioSoundStream: -----------------------------------------
[notice ] ofRtAudioSoundStream: device 1 hw:USB PnP Sound Device,0
[notice ] ofRtAudioSoundStream: maximum output channels 2
[notice ] ofRtAudioSoundStream: maximum input channels 1
[notice ] ofRtAudioSoundStream: -----------------------------------------
[notice ] ofRtAudioSoundStream: device 2 hw:bcm2835 ALSA,0
[notice ] ofRtAudioSoundStream: maximum output channels 2
[notice ] ofRtAudioSoundStream: maximum input channels 0
[notice ] ofRtAudioSoundStream: -----------------------------------------
[notice ] ofRtAudioSoundStream: device 3 hw:bcm2835 ALSA,1
[notice ] ofRtAudioSoundStream: maximum output channels 2
[notice ] ofRtAudioSoundStream: maximum input channels 0
[notice ] ofRtAudioSoundStream: -----------------------------------------
[notice ] ofRtAudioSoundStream: device 4 default
[notice ] ofRtAudioSoundStream: maximum output channels 10000
[notice ] ofRtAudioSoundStream: maximum input channels 10000
[notice ] ofRtAudioSoundStream: -----------------------------------------
Choose a device for output 1: 0
Choose a device for output 2: 1

RtApiAlsa::getDeviceInfo: snd_pcm_open error for device (hw:0,0), Device or resource busy.

ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave

RtApiAlsa::getDeviceInfo: snd_pcm_open error for device (default), Device or resource busy.


RtApiAlsa::probeDeviceOpen: pcm device (hw:0,0) won't open for output.

A weird thing is that it seems to always select the hw:0,0 device. Have you any ideas of what might cause this?
Thanks in advance!

Hey, wondering if you got any further with this. Like you I have been able to get multichannel working on Mac but wondering how practical it is to port to RPi.

Rob

Hey Rob, I didn’t manage to make it work on the RPi2, but it was just an experiment so I didn’t spend a lot of time on it. However it seems to be doable with a little research and some sound server configuration.
Let me know if you find something interesting.
Good luck!

Elie

Also I think it was with oF 0.8.4. Maybe with the new 0.9.0 version things have changed.