audio power on AudioQueue
Posted
by Tomoyuki
on Stack Overflow
See other posts from Stack Overflow
or by Tomoyuki
Published on 2009-12-03T11:09:01Z
Indexed on
2010/05/14
6:04 UTC
Read the original article
Hit count: 248
cocoa
|core-audio
Hi everyone.
I'm now creating an Application using speech recognition.To check the Audio Power coming in through the microphone, I wrote a method as follows.
-(void)checkPower(AudioqueRef)queue{
UInt32 expectedSize= sizeof(AudioQueueLevelMeterState);
AudioQueueGetProperty(queue,
kAudioQueueProperty_CurrentLevelMeter,
audioLevels,
expectedSize);
NSLog(@"average:%f peak:%f",audioLevels.mAveragePower,audioLevels.mPeakPower);
}
I found that sometimes mAveragePower was larger than mPeakPower, and when mAveragePower was 1.0, in other words, averagePower is regarded as max, mPeakPower was lower than 1.0.
I think that generally this result is inpossible. please Let me know if you have any information about sound power on CoreAudio.
thanks.
© Stack Overflow or respective owner