• 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: metering mixer output on ios
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: metering mixer output on ios


  • Subject: Re: metering mixer output on ios
  • From: Michael Tyson <email@hidden>
  • Date: Sat, 11 Aug 2012 11:29:26 +0100

Hey Ash,

I've been seeing this on and off too, and I have absolutely no idea why it's happening. Oddly enough, I was running the same code in my app Loopy, and in a little test suite app I built to mess with the audio engine, and Loopy was fine, while the test suite app would crash one in every three or four runs.

That suggests a race condition or buffer overrun somewhere, but adding in various artificial delays between, for example, audio system startup and enabling the mixer, or enabling the mixer and grabbing the first meter values didn't seem to make a big difference.

In the end, I gave up further diagnosis as a waste of effort given the sparsity of documentation and tendency of Core Audio to have bizarre behaviour at times anyway, and wrote my own metering code using Accelerate, placed inside the render notification callback, which had the added benefit of giving more similar-looking results to my own input level metering code.

I'd love to hear if anyone else has any theories, though, because it had me baffled.

Michael


On 10 Aug 2012, at 07:30, Ash Gibson <email@hidden> wrote:

Hi,

I have an AUGraph with a multi channel mixer. I basically want to get a meter reading of the single output from the mixer. So it wouldn't matter if I had 1 or 100 things going into the mixer, i just want to meter the output.

I have the following snippets:

// allow metering on the mixer
UInt32 allowMetering = 1;
CheckError(AudioUnitSetProperty(myMixer,
                                    kAudioUnitProperty_MeteringMode,
                                    kAudioUnitScope_Output,
                                    0,                              // allowing metering on bus 0
                                    &allowMetering,
                                    sizeof(allowMetering)),
               "AudioUnitSetProperty[kAudioUnitProperty_MeteringMode] failed");


and in a timer:

float amps;
CheckError(AudioUnitGetParameter(refObj.mixerAU, kMultiChannelMixerParam_PostAveragePower, kAudioUnitScope_Output, 0, &amps), "Error");

I keep getting the following error in my debugger:

(lldb)

with this item highlighted: 

#0 0x3681f488 in PowerMeter::Process_Int32(long const*, int, int) ()


Can anyone help point me in the right direction.

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
References: 
 >metering mixer output on ios (From: Ash Gibson <email@hidden>)

  • Prev by Date: AUFilePlayer and multiple files
  • Next by Date: Re: How to handle a packet lost with AudioQueue ?
  • Previous by thread: metering mixer output on ios
  • Next by thread: Re: metering mixer output on ios
  • Index(es):
    • Date
    • Thread