Came across a typo in the JUCE documentation in the AudioDeviceManager class for the function restartLastAudioDevice(). It says:
" void AudioDeviceManager::restartLastAudioDevice ( )
Tries to reload the last audio device that was running.
Note that this only reloads the last device that was running before closeAudioDevice() was called - it doesn’t reload any kind of saved-state, and can only be called after a device has been opened with SetAudioDevice().
If a device is already open, this call will do nothing. "
but I believe it should say “setAudioDeviceSetup()” instead of “SetAudioDevice()”. Thanks to @eyalamir for setting me straight was a bit confused at first.