I’m currently working on a command line app. The app is producing audio via the deviceManager.
My question is, how can I run a dispatch loop equivalent to the START_JUCE_APPLICATION() in a command line app ?

JuceApplication belongs to the gui_basics module, is there any equivalent for command line types of project?
Doing a while(1) in the main function looks dirty doesn’t it?

I wouldn’t recommend running the dispatch loop directly in a command-line app… It’s possible by calling MessageManager::runDispatchLoop(), but there are probably lots of subtle gotchas if you try to do it yourself. Better to write it as a normal GUI app and avoid doing it yourself.