• 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
mixer level metering
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mixer level metering


  • Subject: mixer level metering
  • From: Ash Gibson <email@hidden>
  • Date: Fri, 08 Jun 2012 12:53:41 +1000

Hi everyone,

I am having some wins with core audio and have successfully setup a
graph which contains a remoteIO input and aufileplayer into a mixer,
then mixer to remoteIO output. I am saving the mic input to an audio
file using a render callback on the input scope of the remoteIO unit.

I am basically building an app where someone can record to file while
listening to something through headphones (metronome) but not have the
headphones content end up in the recorded file.




I have enabled level metering on the mixer input using the following code

Uint32 allowMetering = 1;

AudioUnitSetProperty(
player.mixerAU,
kAudioUnitProperty_MeteringMode,
kAudioUnitScope_Input,
1,                                      // <---- I take it that this
is the bus that I am allowing metering on? bus 1 is the bus that the
mic has been assigned too.
&allowMetering,
sizeof(UInt32))

I then have an NSTimer runner to get the level meter

float amps;

AudioUnitGetParameter(
player.mixerAU,
kMultiChannelMixerParam_PreAveragePower,
kAudioUnitScope_Input,
1,                                      // <---- I take it that this
is the bus that I am getting metering from? bus 1 is the bus that the
mic has been assigned too.
&amps)

NSLog(@"%f",amps);

My question is firstly, can anyone tell me if I am correct in my
assumptions above about the bus number property - the docs just say
"inElement"? Secondly, I have mucked around using both
kMultiChannelMixerParam_PreAveragePower and
kMultiChannelMixerParam_PostAveragePower, is there a correct parameter
I should be using as they both seem to give me a similar value back.



Cheers,

Ash
 _______________________________________________
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

  • Prev by Date: Re: Converting multichannel file to stereo with down-mix.
  • Next by Date: ScheduledAudioFileRegion mCompletionProc
  • Previous by thread: Re: Converting multichannel file to stereo with down-mix.
  • Next by thread: ScheduledAudioFileRegion mCompletionProc
  • Index(es):
    • Date
    • Thread