Instead of creating the stream in `SoundManager`, it is now created in another thread called 'audio watchdog'. This thread restarts the stream when the audio device is disconnected. All information about the stream (such as the speed or volume of the music) is stored in `AudioContext` structure, which is inside `SoundManager`.
So even if the watchdog thread is destroyed for some reason, the sound manager will restart it and playback will continue. But this hasn't been tested, so maybe the application will just crash:)