This fixes an issue where specifying an audio device type before calling
initialise could cause a different device to become active, even if the
requested device type had usable devices.
With this change in place, a new device type will only be selected if
the current device type has no devices.
This commit removes the various compiler-specific JUCE_DEPRECATED macros and replaces them with C++14's deprecated attribute. It also removes the JUCE_CATCH_DEPRECATED_CODE_MISUSE flag as we can rely on the override specifier catching usage of these old virtual methods, and tidies up the DOXYGEN preprocessor checks as they were inconsistent across the codebase.
By defining JUCE_IOS_AUDIO_EXPLICIT_SAMPLERATES, the iOS audio device
will always use the requested samplerates instead of querying the
current audio device for the samplerates it supports. This is useful
because certain hardware (such as the Focusrite iTrack Dock) takes a
long time to set new samplerates, which can end up freezing the main
thread for significant lengths of time.
This approach is inspired by the AUM app for iOS, which appears to
provide a fixed list of "allowed" samplerates, rather than querying the
device for its allowed samplerates.
When AudioDeviceStop() is called from a thread other than the IO thread there are no guarantees about the IOProc being called before the thread actually terminates. Moving this call to the audioCallback() method ensures that the device will be stopped immediately and we can remove a check that was taking a few seconds to close devices.