• 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: also: unable to change volumes of mixer inputs? (iOS)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: also: unable to change volumes of mixer inputs? (iOS)


  • Subject: Re: also: unable to change volumes of mixer inputs? (iOS)
  • From: Andy Davidson <email@hidden>
  • Date: Sat, 29 Dec 2012 12:00:37 -0800
  • Thread-topic: also: unable to change volumes of mixer inputs? (iOS)

Hi Bob

I call the following to change the vol. This maybe called because either the user pressed the hardware vol button or moved a UISlider

 status = AudioUnitSetParameter(multiChannelMixerAU, kMultiChannelMixerParam_Volume,

                                       kAudioUnitScope_Output, 0, value, 0);



Here is how I set up the audio session/hardware path

  status = AudioSessionAddPropertyListener(kAudioSessionProperty_CurrentHardwareOutputVolume, 

                                             audioSessionHardwareVolumeCallback, (__bridge void *)(self));


///////////////////////////////////////////////////////////////////////////////

void audioSessionHardwareVolumeCallback(void *inClientData, AudioSessionPropertyID inID, 

                                        UInt32 inDataSize, 

                                        const void *inData) {

    

    // __bridge , we want to make sure the object we are holding onto does not go out of scope in our function

    SCIAudioSessionController *audioSessionController = (__bridge SCIAudioSessionController *)inClientData;    

    AudioUnitParameterValue volume; // Float32

    UInt32 dataSize = sizeof(AudioUnitParameterValue);

    AudioSessionGetProperty (

                             kAudioSessionProperty_CurrentHardwareOutputVolume,

                             &dataSize,

                             &volume

                             );

    //SCILog(@"volume = %f", volume);

    [audioSessionController.delegate changeVolume:volume];

}


I hope this helps


Andy


From: Bob Sabiston <email@hidden>
Date: Saturday, December 29, 2012 11:20 AM
To: "email@hidden Apple" <email@hidden>
Subject: also: unable to change volumes of mixer inputs? (iOS)

I forgot to add that Core Audio seems to have the correct values.  That is, after setting the input value I want, I can call

            OSStatus result = AudioUnitGetParameter (
                                                     mixerUnit,
                                                     kMultiChannelMixerParam_Volume,
                                                     kAudioUnitScope_Input,
                                                     i,
                                                     &V
                                                     );

 

and receive the correct value.  It's just that the actual sound coming out of the speakers is always full-strength.


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

  • Follow-Ups:
    • Re: also: unable to change volumes of mixer inputs? (iOS)
      • From: Bob Sabiston <email@hidden>
References: 
 >also: unable to change volumes of mixer inputs? (iOS) (From: Bob Sabiston <email@hidden>)

  • Prev by Date: also: unable to change volumes of mixer inputs? (iOS)
  • Next by Date: Re: also: unable to change volumes of mixer inputs? (iOS)
  • Previous by thread: also: unable to change volumes of mixer inputs? (iOS)
  • Next by thread: Re: also: unable to change volumes of mixer inputs? (iOS)
  • Index(es):
    • Date
    • Thread