フィルターのクリア

Error with validateAudioPlugin : "Size mismatch (size [1 x 13] ~= size [1 x 28])"

1 回表示 (過去 30 日間)
DARIO BENVEGNÙ
DARIO BENVEGNÙ 2023 年 11 月 3 日
コメント済み: DARIO BENVEGNÙ 2023 年 11 月 6 日
I am coding a small plugin that emulates the behaviour of Hifi Headphones, and i get the following error :
Generating mex file 'testbench_HeadPhoneSimulator_002_mex.mexmaci64'... ??? Size mismatch (size [1 x 13] ~= size [1 x 28]).
The size to the left is the size of the left-hand side of the assignment.
More information
Error in ==> HeadPhoneSimulator_002 Line: 152 Column: 13
Code generation failed: View Error Report
Error using coder.internal.generateAudioPlugin
Error in validateAudioPlugin
The function that calls the error is the following:
function set.Monitor( plugin , val )
plugin.Monitor = val;
updateMonitor(plugin);
end
All that this should do is change which of the available Monitor Headphones are in use and call the "updateMonitor" function, which is used to change the behaviour of the filter that compensate the frequency response of the user's headphones.
I am using the "enum" mapping like this :
audioPluginParameter('Monitor',...
'DisplayName','Monitor',...
'Mapping',{'enum','None',...
'AKG K240 MKII',...
'BeyerDynamic DT990 (250 ohm)',...
'BeyerDynamic T1',...
'Sennheiser HD600'},...
'Layout',[1,1]),...
and In "updateMonitor" there is a Switch-Case construct that updates frequency response as said above
If needed I can provide the complete code.
  3 件のコメント
DARIO BENVEGNÙ
DARIO BENVEGNÙ 2023 年 11 月 6 日
You can find all the code in the attached zip file.
The command that gives the error is simply " validateAudioPlugin <pluginName> "
jibrahim
jibrahim 2023 年 11 月 6 日
I have seen such errors when a variable-size string is involved.
I am attaching a modified version where I use enums instead of chars. Not pretty, but hopefully it gets you going.

サインインしてコメントする。

採用された回答

jibrahim
jibrahim 2023 年 11 月 6 日
I have seen such errors when a variable-size string is involved.
I am attaching a modified version where I use enums instead of chars. Not pretty, but hopefully it gets you going.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAudio Plugin Creation and Hosting についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by