changing to output mode using mic was never initializing the mic due to evaluating the current mode instead of the new mode. Switched variables and now we can record audio.
Merge pull request #2 from davidortinau/master

changing to output mode using mic was never initializing the mic due to ...