How do I make use of all four channels of my four channel sound card using the Data Acquisition Toolbox?

I am trying to acquire 4 channels simultaneously from a 4 channel soundcard using the Data Acquisition Toolbox. However, the 4 channels are presented as 2 Windows devices, so that in Windows --> Control Panel --> Multimedia, I am able to select channels 1 and 2 or channels 3 and 4. The MATLAB 'winsound' device only contains 2 channels, either 1 and 2 or 3 and 4.

 Accepted Answer

This enhancement has been incorporated in Release 2012a (R2012a). For previous product releases, read below for any possible workarounds:
To see if MATLAB sees your soundcard as two analoginput objects, execute the following command:
daqhwinfo('winsound')
ans.InstalledBoardIds
If MATLAB sees more than one InstalledBoardIds, then MATLAB recognizes two separate analoginput objects for your soundcard (probably ID's 0 and 1).
If this is the case, than you can access all four channels by creating two analoginput objects like this:
ai1 = analoginput('winsound',0)
ai2 = analoginput('winsound',1)

More Answers (0)

Categories

Find more on Audio I/O and Waveform Generation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!