MATLAB: Do I see an error when I use multichannel sound cards in Data Acquisition Toolbox 2.14 (R2009a)

2acquisitionchannels;dataData Acquisition Toolboxtoolboxwinsound

I receive the following error when trying to add more than 2 channels to my code:
??? Error using ==> daqdevice.addchannel
Unable to set HwChannel above maximum value of 2.

Best Answer

Support for multichannel sound support has been incorporated in Release R2012a. For previous product releases, read below for any possible workarounds:
The ability to add more than 2 channels with the 'winsound' adapter is not available in Data Acquisition Toolbox. There are three options to work around this issue:
1. Create a custom MEX-file that interacts with your hardware.
Using a MEX-file, you can call your own C or Fortran subroutines from MATLAB as if they were built-in
functions. By writing your own MEX-file, MATLAB can interact with your hardware using C or Fortran code.
You can find more information about creating MEX files at the link below:
<http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/f7667.html>
2. Use MATLAB's Interface to Generic DLLs
If your vendor has supplied a shared library with functions for accessing their hardware, you can use MATLAB's interface to generic DLLs to communicate with your hardware. The MATLAB interface to generic DLLs enables you to interact with the functions in shared libraries directly from MATLAB, provided that the functions have a C interface.
For more information on MATLAB's Interface to Generic DLLs, follow the web link below:
<http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/f23224dfi7.html>
3. Create your own adaptor using the adaptor kit that is part of Data Acquisition Toolbox. For instructions and examples on creating see:
<http://www.mathworks.com/access/helpdesk/help/pdf_doc/daq/adaptorkit.pdf>