• 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: iPhone microphone level metering using kAudioUnitType_Mixer?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iPhone microphone level metering using kAudioUnitType_Mixer?


  • Subject: Re: iPhone microphone level metering using kAudioUnitType_Mixer?
  • From: Shaun Guth <email@hidden>
  • Date: Mon, 10 Jan 2011 19:21:05 -0800

I'm going to rest on this today and pick it up tomorrow, but conceptually what I'm trying to achieve is:
1) Data from microphone is provided to a callback function somewhere (so I can analyze it)
2) At the same time, I am able to update a label with the current meter level

The audio likely won't "go" anywhere (though maybe eventually I'd like to write it to a file or something).

Right now, I have a 2-node graph (IO unit, mixer unit) -- I have an input callback attached to my IO unit which is getting called, and I can see data in that callback.

The IO unit bus 1 output is connected to the mixer unit bus 0 input, and that's all.

 I just tried connecting the output of the mixer to the output bus on the IO node (to speaker), and this did not seem to improve things -- but, I also did not hear my mic input on the speaker, as I was expecting.

I _was_ able to make this work with Audio Queues -- however, I have a desire to use the VoiceProcessing IO Unit, so I'm trying to do this using Audio Units.

-- Shaun


On Mon, Jan 10, 2011 at 6:45 PM, Aran Mulholland <email@hidden> wrote:
Are you getting audio data through? Does your graph have an output at the other end, is there anything "pulling" the data?


On Tue, Jan 11, 2011 at 12:07 PM, Shaun Guth <email@hidden> wrote:
I would have loved that to be a *facepalm* moment for me, but alas:

    osStatus = AudioUnitSetProperty(mMixerUnit, kAudioUnitProperty_MeteringMode, kAudioUnitScope_Input, 0, &trueValue, sizeof(UInt32));


-- Shaun

On Mon, Jan 10, 2011 at 5:02 PM, Aran Mulholland <email@hidden> wrote:
have you turned on the metering?

http://lists.apple.com/archives/coreaudio-api/2009/Mar/msg00387.html


On Tue, Jan 11, 2011 at 11:44 AM, Shaun Guth <email@hidden> wrote:
I might just be really tired...

Is it possible to use the Mixer Audio Unit to meter the input level from the iPhone microphone?  I have an AUGraph that initializes properly:

AudioUnitGraph 0x7626000:

  Member Nodes:

node 1: 'auou' 'vpio' 'appl', instance 0x5604040 O  

node 2: 'aumx' 'mcmx' 'appl', instance 0x5606450 O  

  Connections:

node   1 bus   1 => node   2 bus   0  [ 1 ch,   8000 Hz, 'lpcm' (0x0000000C) 16-bit little-endian signed integer]


I'm trying to meter the input level from the microphone by connecting my I/O unit to the mixer unit and then querying kMultiChannelMixerParam_PreAveragePower

As it's running though, I'm only getting values of -120.0 -- this is on the iPhone simulator.  I do have a mic hooked up, and I see that it's receiving input in the system preferences.

-- Shaun

 _______________________________________________
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: 
 >iPhone microphone level metering using kAudioUnitType_Mixer? (From: Shaun Guth <email@hidden>)
 >Re: iPhone microphone level metering using kAudioUnitType_Mixer? (From: Aran Mulholland <email@hidden>)
 >Re: iPhone microphone level metering using kAudioUnitType_Mixer? (From: Shaun Guth <email@hidden>)
 >Re: iPhone microphone level metering using kAudioUnitType_Mixer? (From: Aran Mulholland <email@hidden>)

  • Prev by Date: Re: iPhone microphone level metering using kAudioUnitType_Mixer?
  • Next by Date: Soundtrack Pro appears to send spurious SetParameter calls to Audio Unit plug-ins
  • Previous by thread: Re: iPhone microphone level metering using kAudioUnitType_Mixer?
  • Next by thread: Soundtrack Pro appears to send spurious SetParameter calls to Audio Unit plug-ins
  • Index(es):
    • Date
    • Thread