"PortAudio Error: Unanticipated host error".Audio output device has become unresponsive: 1024 sample(s) remain after timeout.
Show older comments
Hi all,
I Have a problem with the reproduction of a sound using startBackground.
After I run the script below, just SOMETIMES, the following error messages appear:
"Audio output device has become unresponsive: 1024 sample(s) remain after timeout."
"PortAudio Error: Unanticipated host error".
Do you know why sometimes the script works and sometimes doesn't?
Thanks a lot.
sound = audioread('sound_s2.wav');
s2 = daq.createSession('directSound'); %create session
d = daq.getDevices; %check and find devices
ID2 =d(1,4).ID; %this is the ID of the external sound card that I want to use
addAudioOutputChannel(s2,ID2,1:5) %open 5 channels
queueOutputData(s2,sound);
%s2.IsContinuous = true;
WaitSecs(5); %wait to let queue data
startBackground(s2)
WaitSecs(15); %play for 15 seconds
stop(s2);
1 Comment
Andreas Georgiou
on 19 Jul 2022
I get a similar error when I use "sound(....)". I used sound in a loop and only got the error in the 3rd iteration of the loop. The actual error says...
Error using sound (line 79)
Device Error: Unanticipated host error
I can only think that the computer goes in standby and the device is not responding.
Answers (0)
Categories
Find more on Audio and Video Data 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!