I know, NOT a good idea, but hear me out. I’m using an external library for my signal processing and the flip side is I can only update/access certain parts of the library when it’s safe to do so. For example, if I want to update a wavetable in my table viewer component, I need to wait till it’s safe to call the libraries getTable() method. The only time it’s absolutely safe to do this is between processing blocks. This works fine, of course there is no need to update after every processing block, just so long as I update between processing blocks. And to the problem…
As soon as I try to delete my filter I get a hang. I’m using a simple routine borrowed from the Standalone code:
if (filter != nullptr && getContentComponent() != nullptr)
filter->editorBeingDeleted (dynamic_cast <AudioProcessorEditor*> (getContentComponent()));
filter = nullptr;
If I step through this code I first enter AudioProcessorPlayer::setProcessor() and get as far as this line(58):
const ScopedLock sl (lock);
Then my program hangs and I can no long step anywhere, but I get no errors, in fact I get no information at all about what’s happening? I guess something is preventing the processing thread from being destroyed? I can understand why, if the processing thread is not freed there will be problems, but I can’t understand why calling one of my editors functions every half second from my processing block would cause this problem? The function only gets called if there is an active editor. Any ideas?