plugging and unplugging devices meant to be hot plugged and unplugged is not a "classic" use. funny.

how in this case to reinitialize uos ?
upd:
OK. let uos not be able to switch the stream to the sound input / output channel that has changed by default, but how should this fact be handled, and not throw an exception?
in extreme cases, simply stop input / output, turn off the player.
how to handle the exception that occurs in this case?