• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Error switching kAudioSessionProperty_AudioCategory after iOS 6 update
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error switching kAudioSessionProperty_AudioCategory after iOS 6 update


  • Subject: Re: Error switching kAudioSessionProperty_AudioCategory after iOS 6 update
  • From: Paul Slocum <email@hidden>
  • Date: Tue, 09 Oct 2012 19:52:49 -0400

I got my code working in both iOS 5 and 6, but I'm still getting an error in the console in iOS 6 when I switch audio categories, so if anybody can help me with what this error means I'd feel more comfortable knowing :)

19:02:22.757 <CAListenerProxy> shm_open failed: "AppleAURemoteIO.i.2542b" (23) flags=0x2 errno=2
19:02:22.758 <CAListenerProxy> AURemoteIO::ChangeHardwareFormats: error 3

To get things working in iOS 6, I had to uninitialize my remoteIO audio unit before changing the AudioSessionCategory.  Oddly, in iOS 5 if I do the same thing then some of my recording code doesn't work, so I'm checking the iOS version number in code and deciding whether to un/re-initialize my audio unit based on the OS version.

Regarding the keyboard click sound, I found that the click sounds are muted when you have the category set to kAudioSessionCategory_PlayAndRecord *and* you initialize a remoteIO unit.  It appears that even if the mic input is disabled on the audio unit, the keyboard sound is still muted.  I was hoping to find some way to enable the keyboard click sounds without having to change the audio session category, but I need my remoteIO unit running all the time so it doesn't appear possible.

-paul

On Thu, Oct 4, 2012 at 5:34 PM, Paul Slocum <email@hidden> wrote:
-or- is there some way to get the iOS keyboard to make the typewriter sound when in kAudioSessionCategory_PlayAndRecord mode?  I'm switching modes because I want the keyboard sounds to work when my app isn't recording.

-paul

On Thu, Oct 4, 2012 at 4:51 PM, Paul Slocum <email@hidden> wrote:
I have a recorder app that needs to switch between kAudioSessionCategory_AmbientSound and kAudioSessionCategory_PlayAndRecord. Before upgrading to iOS 6 this worked great, but since the upgrade I'm getting a couple of errors on the console when I try to enable recording:

code:
UInt32 audioCategory = kAudioSessionCategory_PlayAndRecord;
OSStatus audioCategoryStatus = AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(audioCategory), &audioCategory);

console errors:
2012-10-04 11:18:56.388 TestApp[1062:526b] 11:18:56.389 shm_open failed: "AppleAURemoteIO.i.241f5" (23) flags=0x2 errno=2
2012-10-04 11:18:56.390 TestApp[1062:526b] 11:18:56.390 AURemoteIO::ChangeHardwareFormats: error 3

The call to AudioSessionSetProperty does not return any error. Any ideas about what I need to do to fix this?

thanks,
-paul


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Error switching kAudioSessionProperty_AudioCategory after iOS 6 update (From: Paul Slocum <email@hidden>)
 >Re: Error switching kAudioSessionProperty_AudioCategory after iOS 6 update (From: Paul Slocum <email@hidden>)

  • Prev by Date: Re: Please help MIDI on IOS is driving me insane!
  • Next by Date: Multiroute Audio Problem
  • Previous by thread: Re: Error switching kAudioSessionProperty_AudioCategory after iOS 6 update
  • Next by thread: Please help MIDI on IOS is driving me insane!
  • Index(es):
    • Date
    • Thread