Hello,
I am new to JUCE and audio programming in general.
I followed this tutorial to build a very simple EQ (i just used the first hour to do that) Learn Modern C++ by Building an Audio Plugin (w/ JUCE Framework) - Full Course - YouTube
When i first build the project, I just set the sliders and visuals stuff, it worked and i could open it in Ableton
Then I added the DSP module and writed prepare to play and process block functions exactly like in the video, with no error.
The project is building without any problem, but when i open it in PluginHost or Ableton i get this message :
Do you know where it can come from ? I also tried to build the project in standalone but the window is immediately closed when i open it.
Thank you a lot
Marcus
Are you running the standalone version with a debugger attached? I’d expect it to hit and assertion or throw an exception if something had gone wrong, not just silently close the window!
Have a look at the call stack - an exaction has been thrown while trying to read a value from a std::atomic, it looks like you’re doing something wrong in your prepareToPlay that’s causing a std::atomic in the APVTS to be read incorrectly.
Thanks for the tip,
This error has gone but there are others. I will try to see if i made other mistakes like this one, and implement what you said daniel
It seems that its linked to the line 180 of my processBlock(sorry i cant put 2media in the same post) where I wrote :
juce::dsp::AudioBlock block(buffer);
auto leftBlock = block.getSingleChannelBlock(0);
juce::dsp::ProcessContextReplacing leftContext(leftBlock);
That assertion is checking if the channel index you’ve provided is less than the number of channels there are… otherwise the index would be out of range and you’d get a crash when you try to read it.
Looks like you’re passing in 0 for the channel index, which implies your audio buffer is completely empty with 0 channels… have you set up your IO properly?