[osx/ae/ca] - fix ResetAudioDevices

thx to @tru for this fix - original message from him:

----snip----
I noticed that at times the audio device would be stuck in Encoded mode, turns out that ResetAudioDevices was not really working, so I spent some time debugging that and rewrote it to not duplicate tons of code.
----snip----

@davilla i think it can't get worse when it was already broken before ... any comment on that though?