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.