Audio initialisation reacts differently in console and window apps


I've just started to using JUCE as an audio framework.

My goal is to use only its audio subsystem to have a consistent easy and efficient access to whatever audio hardware or driver technology is used.

So I've generated a dummy console app with the introjucer, and filled in audio initialisation code.

With DirectSound, the behaviour is what is expected, but with Windows Audio and ASIO it does not work.

After a day of headaches, I've generated a windowed app with the introjucer, and **copy pasted** my code into the close button callback. Now it works for all three kinds of drivers.

I deduce that the behaviour of the audio system is not the same in console and window apps...


Well some types of audio will rely on timers or other event-based stuff. That's why the juce_audio_devices module is dependant on the juce_events module. If you build an app that doesn't allow the events module to run an event loop, then all bets are off!