audioDeviceReader: error when choosing ASIO driver for input mic

16 views (last 30 days)
Dear community,
I have an error when I want to choose the Device for the audio device reader interactively. Altough the String input is exactly the same, there is an error I cannot understand.
% get available audio device (using audiodevinfo() can deliver wrong strings)
% release and clear to avoid interactions with further code
release(tmp); clear tmp;
[indx,tf] = listdlg('PromptString',{'Select a input device.'},...
'SelectionMode','single','ListString',devs,'ListSize',[400 80]);
% return if canceled
if ~tf
audioReader = audioDeviceReader('Driver','ASIO','NumChannels',1,'SampleRate',fs,'SamplesPerFrame',frameSize,'Device',devs{indx});
checking also directly in command line gives
>> audioDeviceReader('Device','External Mic (Realtek(R) Audio)')
ans =
audioDeviceReader with properties:
Driver: 'DirectSound'
Device: 'External Mic (Realtek(R) Audio)'
NumChannels: 1
SamplesPerFrame: 1024
SampleRate: 44100
Show all properties
ans =
'External Mic (Realtek(R) Audio)'
The error is this:
Error using matlab.system.StringSet/findMatch
"External Mic (Realtek(R) Audio)" is not a valid value for the Device property. Valid values are: "Default" | "ASIO4ALL v2".
Error in audiointerface.audioDeviceReader
Error in audioDeviceReader
Error in streamingOnly (line 24)
audioReader = audioDeviceReader('Driver','ASIO','NumChannels',1,'SampleRate',fs,'SamplesPerFrame',frameSize,'Device',devs{indx});
the part with ASIO4ALL v2 sounds like there is a problem with the driver, but I dont know how to resolve. The line
also works without throwing an error, but
throws the same error. Am I not allowed to choose the ASIO Driver here? I had no problems with this line before switching from Win 10 to Win 11

Answers (0)


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!