Captured audio is bad after micro reconnect

My Juce application displays and plays back the audio captured by the microphone. Everything is fine until I disconnect and reconnect the microphone. After the reconnect, captured audio consists of periodic, high amplitude clicks. In short, Juce audio does not fall back on its feet after a micro disconnect/reconnect.

My application runs on Windows7 and the underlying Juce sound provider is DirectSound.

Has anyone encountered a similar situation ? Is there a way to solve this problem without restarting the whole Juce application (which by the way makes the problem go away) ?