edwardtoday
edwardtoday

Reputation: 373

AUIOClient_StartIO failed (-66628)

In an app that has both microphone input and audio playback views in 2 tabs. No matter what view I enter first, it works all right. Things are still working when I switch to the second tab.

When I switch back to the first tab, the error occurs.

ERROR:     [0x1995d4310] 1230: AUIOClient_StartIO failed (-66628)
Error: Microphone failed to start fetching audio (-66628)

No exception threw. App crashes...

Upvotes: 5

Views: 4402

Answers (2)

Rich Chu
Rich Chu

Reputation: 11

I get this error also when set 'AVAudioSessionCategoryRecord'. If press 'Home' while recording, the app collapsed. Change to 'AVAudioSessionCategoryPlayAndRecord'

Upvotes: 1

edwardtoday
edwardtoday

Reputation: 373

It was actually a problem with AVAudioSessionCategory.

I change the following code

 [[AVAudioSession sharedInstance]
         setCategory:AVAudioSessionCategoryPlayback
         error:&error];

to

[[AVAudioSession sharedInstance]
        setCategory:AVAudioSessionCategoryPlayAndRecord
        error:&error];

And it works.

Upvotes: 6

Related Questions