Can not choose MFI speakers to play while recording?

Hi friends,

I met this problem while my app was recording to get the Sound level trough iPhone's mic: I can only choose the speaker of iPhone, without the airplay-able speakers in my network.


It happens when i start the audio session like following:

VAudioSession * audioSession = [AVAudioSession sharedInstance];

[audioSession setCategory:AVAudioSessionCategoryPlayAndRecord error:&error];


I use MPMoviePlayerController to play an audio file. And i need play this audio on a specail airplay device.


Do any body can help me? Thanks very much.

Can not choose MFI speakers to play while recording?
 
 
Q