MATLAB: USB Sound Device Possible

Data Acquisition Toolboxsoundusb

I have the data acquisition toolbox.
I need to be able to have 8 USB speakers (connected by a USB hub) that I can activate to play a sound from only one speaker at a time.
Can MATLAB support USB sound devices? If so, can it support multiple USB sound devices individually?
How would I go about getting the name of the device so that I can call it from an M-file?

Best Answer

MATLAB can support multiple USB sound devices. The audioplayer function allows you to specify the device ID number. In Linux, you can control the ID number a device gets at boot time. I am not sure you can do that in Windows.
Running multiple devices on a single USB hub may not work. The hub may not have the bandwidth to do that.
I would suggest looking at port audio (e.g., pawavplay, paplayrec, or the psychtoolbox) instead of the built in sound commands.
Finally if you only want a single sound at a give time, you should look at a programmable switch (either powered or not) that would let you route a single channel of output from a soundcard to different speakers. This might be much more reliable and easier to calibrate.