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.
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, &s), "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
|