I have a situation where I would like to do the following:
I am using:
FileChooser::launchAsync(…)
And the lambda function it takes as a parameter needs to call the following method:
void AudioAppComponent::shutdownAudio();
What is the easiest way to ensure that shutdownAudio() gets called in a thread where it is allowed to be called? Currently on some computers that method is called from some incompatible thread which hangs up the software.
I assume shutdownAudio() should be called from:
class MainWindow : public juce::DocumentWindow
which owns the MainComponent which handles audio devices etc.?
Can I just send a message and the ActionListener then calls the shutdownAudio() directly?