Refactored code to activate the audio session in the view controller instead of the app delegate.