• 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 Audio Woes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iPhone Audio Woes


  • Subject: Re: iPhone Audio Woes
  • From: Andrew Nalband <email@hidden>
  • Date: Wed, 22 Apr 2009 19:07:12 -0400

Hi Tim,	
Did you ever have any luck sorting this out?  Did you stick with the Audio Queues for metering?
-Andrew

Hey Tim, I sent this email a minute ago, but it doesn't seem to have gone through. Apologies if you are getting it twice. I think your solution B is going to be the way to go. I'd be interested in seeing the code you are using to implement it. Why are you reading the microphone power from an audio queue object? Isn't the whole point of doing it in audio units to maintain low latency? Doesn't reading the power from an audio queue negate this benefit? You can enable metering on the multichannel mixer with: kAudioUnitProperty_MeteringMode A UInt32 value of 1 will turn metering on, for whatever scope you specify You can then read the power with: kMultiChannelMixerParam_PreAveragePower which is declared as follows in the header: enum { kMultiChannelMixerParam_Volume = 0, kMultiChannelMixerParam_Enable = 1, kMultiChannelMixerParam_PreAveragePower = 1000, kMultiChannelMixerParam_PrePeakHoldLevel = 2000, kMultiChannelMixerParam_PostAveragePower = 3000, kMultiChannelMixerParam_PostPeakHoldLevel = 4000 }; I believe this is the only way on the iPhone to get the power for an audio unit and maintain low latency. Although it isn't specific to the iPhone, you may find this discussion useful: http://lists.apple.com/archives/coreaudio-api/2006/Jun/msg00203.html It details using metering on a mixer audio unit connected to the Remote IO audio unit. In terms of your format conversion, you may be interested in the following: iPhone OS input and output is Linear PCM with 16-bit integer samples iPhone OS audio units and other audio processing are Noninterleaved linear PCM with 8.24-bit fixed-point samples Also: Multichannel mixer unit—Allows any number of mono or stereo inputs, each of which can be 16-bit linear or 8.24-bit fixed-point PCM. Provides one stereo output in 8.24-bit fixed-point PCM. Your application can mute and unmute each input channel as well as control its volume. Programmatically, this is the kAudioUnitSubType_MultiChannelMixer unit. -Andrew Nalband > I would be happy to share code. Perhaps you can be more specific about > your interest. > > I am adjusting the kHALOutputParam_Volume on the audio unit that gets > returned for the subtype kAudioUnitSubType_RemoteIO. Specifically, I use > > AudioUnitSetParameter(rioUnit, kHALOutputParam_Volume, > kAudioUnitScope_Global, 0, level, 0) > > Using the output scope, which I have also tried, has the same > (non)result. > > I did not enable metering on the multi-channel mixer. I'm reading > microphone power from an audio queue object that is set up to do > recording. > > -- > Timothy Larkin > Abstract Tools > Caroline, NY
 _______________________________________________
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: iPhone RemoteIO playback
  • Next by Date: Re: Audio Unit level metering oniPhone
  • Previous by thread: Re: MIDI channels in music device AUs
  • Next by thread: GrahicEQ AU trouble
  • Index(es):
    • Date
    • Thread