I am using the data acquisition toolbox (v. 2.11) with
R2007b+ and the winsound adaptor. I need 24 bits per
sample, but when I set 'BitsPerSample' on my
analogoutput/input objects to anything over 16, I get the
following error on the "start" command:
>> start(ao)
??? Windows Multimedia: The specified format is not
supported or cannot be
translated. Use the Capabilities function to determine the
supported formats.
This error goes away if I manually set the 'BitsPerSample'
back to 16 or 8. I haven't been able to learn what
the "Capabilities function" is.
I confirmed with the daqhwinfo(ao) command that 'bits' had
changed to 32 and the 'NativeDataType' had changed from
int16 to int32, so the "set" command seems to have been
successful, but the object won't run. Any help or
explanation would be helpful.
Thanks, Sherryl. I read the winsound info, but my issue
seems to be independent of the sampling rate. I took your
advice and opened a tech support case, and if the answer
turns out to be broadly relevant, I'll update this thread
when it's resolved.
As nearly as I can tell, this is a restriction based on the 'winsound' adaptor. I have attempted unsuccessfully to determine if the limitation is due directly to the legacy Windows API(s?) that it supports - perhaps someone more knowledgeable can comment. But the bottom line is that, even if the soundcard supports 24 bits or higher, you can only use up to 16 bits per sample with the winsound adaptor.
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Disclaimer prior to use.