Script crashes after multiple sounds - 'Error using sound (line 76) boost::thr​ead_resour​ce_error'

1 回表示 (過去 30 日間)
I am running a script for an experiment that sends triggers through a parallel port, followed by playing a sound, and so on. This happens 60 times but it is crashing on the 48th-50th run every time.
for i=1:cfg.ncycles
disp([num2str(i) ' on']);
putvalue(dio,2);
wait(0.01);
putvalue(dio,0);
sound(y2,Fs2);
wait(cfg.ontime);
disp('off');
putvalue(dio,4);
wait(0.01);
putvalue(dio,0);
sound(y3,Fs3);
wait(cfg.offtime);
end;
The error I get is:
Error using sound (line 76)
Unexpected exception in plug-in:
'boost::thread_resource_error'
Error in brushscs (line 68)
sound(y3,Fs3);
The version of MATLAB is 2014a on a 32bit computer. I do not get the same error on 2017a on a 64bit PC but need to run it on the 32bit version for practical reasons.
Has anyone encountered this error in the same or a similar situation?

回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by