gpt4 book ai didi

JUCE Message Thread (1): EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0) when trying to build plugin(JUCE消息线程(1):尝试构建插件时EXC_BREAKPOINT(CODE=EXC_I386_BPT,SUBCODE=0x0))

转载 作者:bug小助手 更新时间:2023-10-24 17:54:21 31 4
gpt4 key购买 nike



I'm trying to create a VST plug-in using JUCE framework by video tutorial but I've been having this error: JUCE Message Thread (1): EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0). I have no clue why it happens, here is the code that causes it.

我试图通过视频教程使用JUCE框架创建一个VST插件,但我遇到了这个错误:Juce Message Thread(1):exc_Breakpoint(code=exc_I386_bpt,subcode=0x0)。我不知道为什么会这样,以下是导致这种情况的代码。


juce::AudioProcessorValueTreeState::ParameterLayout SimpleEQAudioProcessor::createParameterLayout(){
juce::AudioProcessorValueTreeState::ParameterLayout layout;

layout.add(std::make_unique<juce::AudioParameterFloat>("LowCut Freq", "LowCut Freq", juce::NormalisableRange<float>(20.f, 20000.f, 1.f, 1.f), 20.f));

layout.add(std::make_unique<juce::AudioParameterFloat>("HighCut Freq", "HighCut Freq", juce::NormalisableRange<float>(20.f, 20000.f, 1.f, 1.f), 20000.f));

layout.add(std::make_unique<juce::AudioParameterFloat>("Peak Freq", "Peak Freq", juce::NormalisableRange<float>(20.f, 20000.f, 1.f, 1.f), 750.f));

layout.add(std::make_unique<juce::AudioParameterFloat>("Peak Gain", "Peak Gain", juce::NormalisableRange<float>(-24.f, 24.f, 0.5f, 1.f), 0.f));

layout.add(std::make_unique<juce::AudioParameterFloat>("Peak Quality", "Peak Quality", juce::NormalisableRange<float>(0.1f, 10.f, 0.05f, 1.f), 1.f));

juce::StringArray stringArray;
for( int i = 0; i<4; ++i){
juce::String str;
str << (12 + i*12);
str << " db/Oct";
stringArray.add(str);
}

layout.add(std::make_unique<juce::AudioParameterChoice>("LowCut Slope", "LowCut Slope", stringArray, 0));

layout.add(std::make_unique<juce::AudioParameterChoice>("HighCut Slope", "HighCut Slope", stringArray, 0));

return layout;
}


The layout manipulations seem to cause the error. The console also displays pointer to current AudioProcessorEditor.

布局操作似乎是导致错误的原因。控制台还显示指向当前AudioProcessorEditor的指针。


更多回答

Have the same problem from the same tutorial...

在同一教程中有相同的问题...

It actually happens on every project

事实上,每个项目都会发生这种情况

优秀答案推荐

The error occurs because version hint is 0. We can fix it by setting version number when adding parameter:

出现该错误是因为版本提示为0。我们可以在添加参数时设置版本号来修复:


layout.add(std::make_unique<juce::AudioParameterFloat>(ParameterID { "LowCutFreq",  1 }, // here
"LowCut Freq",
juce::NormalisableRange<float>(20.f, 20000.f, 1.f, 0.25f),
20.f));

Reference:
https://forum.juce.com/t/how-to-set-a-parameter-version-hint/52011

参考文献:https://forum.juce.com/t/how-to-set-a-parameter-version-hint/52011


更多回答

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com