Error in a testbench generated file using validateAudioPlugin
古いコメントを表示
While validating an audio plugin, I get the following error
Generating mex file 'testbench_HeadPhoneSimulator_ver2_mex.mexmaci64'... Cannot allocate this handle object. For code generation, a handle object
allocated inside a loop cannot be referenced outside of the loop.
More information
Error in ==> testbench_HeadPhoneSimulator_ver2 Line: 58 Column: 9
Warning: Failed to save report information.
Code generation failed: View Error Report
Error using coder.internal.generateAudioPlugin
Error in validateAudioPlugin
the thing that I don't understand is the fact that the error is in a file that's not written by me, but in a file made by the testbench itself.
I think that the function that provokes the error is the following:
function updateFilters(plugin,n,flag)
if ~flag
plugin.Filter_L = dsp.FrequencyDomainFIRFilter('Numerator', plugin.IR_bank(:,1,n).', ...
'PartitionForReducedLatency', true, 'PartitionLength', 1024);
plugin.Filter_R = dsp.FrequencyDomainFIRFilter('Numerator', plugin.IR_bank(:,2,n).', ...
'PartitionForReducedLatency', true, 'PartitionLength', 1024);
else
num = zeros(1,1024);
num(1) = 1;
plugin.Filter_L = dsp.FrequencyDomainFIRFilter('Numerator', num, ...
'PartitionForReducedLatency', true, 'PartitionLength', 1024);
plugin.Filter_R = dsp.FrequencyDomainFIRFilter('Numerator', num, ...
PartitionForReducedLatency', true, 'PartitionLength', 1024);
end
end
if needed I will provide the complete code
6 件のコメント
jibrahim
2024 年 2 月 8 日
Hi Dario,
Can you please attach your audio plugin class?
DARIO BENVEGNÙ
2024 年 2 月 8 日
jibrahim
2024 年 2 月 8 日
Can you please also attach the enum classes, or strip them off so that the code works without them?
DARIO BENVEGNÙ
2024 年 2 月 8 日
jibrahim
2024 年 2 月 8 日
Yes, please also attach ImpulseResponseLoader or equivalent code
DARIO BENVEGNÙ
2024 年 2 月 8 日
編集済み: DARIO BENVEGNÙ
2024 年 2 月 8 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Audio Plugin Creation and Hosting についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!