• 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
AVAudioSession -- do I need it?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AVAudioSession -- do I need it?


  • Subject: AVAudioSession -- do I need it?
  • From: Bob Sabiston <email@hidden>
  • Date: Sat, 19 Jan 2013 13:31:07 -0600

Hello,

 I am still trying to track down why my mixer input volumes don't change.  Someone suggested I look at the "iPhoneMultiChannelMixerTest" instead of "MixerHost", which I had been using as a reference.

I notice that both projects use the AVFoundation framework.  But "MixerHost" (and my own code) uses AVAudioSession, whereas "iPhoneMultiChannelMixerTest" does not.   The latter uses code like this to set the category:

        UInt32 audioCategory = kAudioSessionCategory_AmbientSound;
        XThrowIfError(AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(audioCategory), &audioCategory), "couldn't set audio category");


whereas the former uses something like this:

    AVAudioSession *mySession = [AVAudioSession sharedInstance];

    NSError *audioSessionError = nil;

     [mySession setCategory: AVAudioSessionCategoryAmbient
                     error: &audioSessionError];


I am just wondering what is the difference here?  Should I not be using AVAudioSession?  Why would someone choose one set of code over the other?  Is one older?

Thanks
Bob



 _______________________________________________
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

  • Follow-Ups:
    • Re: AVAudioSession -- do I need it?
      • From: Adriano Goncalves <email@hidden>
  • Prev by Date: Re: iTunes sample rate question
  • Next by Date: Re: AVAudioSession -- do I need it?
  • Previous by thread: Re: sandboxing audio applications
  • Next by thread: Re: AVAudioSession -- do I need it?
  • Index(es):
    • Date
    • Thread