tags:

views:

358

answers:

1

Hi,

I got the below code from some example code. What could possibly cause it to throw a CAXException?

I've loaded the AudioToolbox framework, am I missing anything?

Thanks, Tee

UInt32 category = kAudioSessionCategory_RecordAudio; XThrowIfError(AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(category), &category), "couldn't set audio category123!");

+1  A: 

Figured it out, need to call AudioSessionInitialize first.

Thanks, Tee

teepusink