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

Re: AVAudioSession -- do I need it?


  • Subject: Re: AVAudioSession -- do I need it?
  • From: Kevin Dixon <email@hidden>
  • Date: Mon, 21 Jan 2013 11:15:45 -0800

AVAudioSession is an Objective-C wrapper around the AudioSession* C
API. You definitely need to do things like set your app's category,
but the API does not matter.

If you are using the C API, then you must call
AudioSessionInitialize(...) before doing anything else. If you are
using AVAudioSession, retreiving the sharedInstance property does this
for you.

-Kevin

On Sat, Jan 19, 2013 at 1:52 PM, Adriano Goncalves
<email@hidden> wrote:
> Hi.
>
> I'm not an expert in CoreAudio as I'm working currently on my first iOS
> project using it. But my mixer input volumes work as expected and I'm
> setting AVAudioSession. In fact, I'm using the code provided by Apple in the
> MixerHost sample project. And in this MixerHost project, the input volume
> works as expected as well. So maybe it doesn't have to do with how you set
> the audio session.
>
> Your volume doesn't change but your can ear the sound from your input buses,
> is that right?
>
> Maybe you could post the code you are using to change the volume or how you
> configure the AUGraph. Then it could be easier to help you.
>
> Adriano
>
>
>
> On 19/01/2013, at 19:31, Bob Sabiston <email@hidden> wrote:
>
> 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
>
>
>
>  _______________________________________________
> 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
>
 _______________________________________________
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: 
 >AVAudioSession -- do I need it? (From: Bob Sabiston <email@hidden>)
 >Re: AVAudioSession -- do I need it? (From: Adriano Goncalves <email@hidden>)

  • Prev by Date: I'm trying to add iTunes Video Description...
  • Next by Date: Re: afconvert and friends
  • Previous by thread: Re: AVAudioSession -- do I need it?
  • Next by thread: afconvert and friends
  • Index(es):
    • Date
    • Thread