Skip navigation.
 
mlRe: Sound Input Meter (Or, getting amplitude of input stream)
FROM : Douglas A. Welton
DATE : Thu Apr 14 21:53:13 2005

Olivier,

Are you using the QuickTime sequence grabber to record or are you using Core
Audio?  With QuickTime, getting the input volume is as simple as calling
SGGetChannelVolume().

regards,

douglas

PS:  Did you take a look at the sndEqualizer sample code?  I think it also
does what you want to do.


on 4/14/05 3:08 PM, Olivier Lanctôt at <email_removed> wrote:

> Hello list...
>
> First, I want to say that it's really a major pain to record sound in
> Cocoa. Really. Anyway, I can sucessfully record from the sound input
> to AIFF... which is an important part of my app.
>
> But when recording, I think the user should have a visual feedback of
> the input's amplitude (e.g. sound meters...)
> So I look in sound kit and ... what a bad luck, the method is "not yet
> implemented" (will it ever be implemented? I think not.... the email I
> sent the author has bounced.)
>
> /*!
>  @method  getPeakLeft:right:
>  @abstract  Get the most recent peak values for the stereo stream
>  @discussion Not implemented yet - not convinced this should be
> here - maybe inside an SndAudioProcessor?
>  @param      leftPeak Left peak value
>  @param      rightPeak Righ peak value
>  @result    Returns self.
> */
> - getPeakLeft: (float *) leftPeak right: (float *) rightPeak;
>
> So without that, I can't get the amplitude of a sound... So I looked
> at QT code.. but all I've seen is old SoundManager code (sigh). I've
> carefully inspected MTCoreAudio too -- found nothing that could have
> helped me.
>
> So where do I look next?
>
> Thanks!
>
> -- Jean-Olivier Lanctôt-D.
> Programmer
> Cliché Software
> http://www.clichesw.com

Related mailsAuthorDate
mlSound Input Meter (Or, getting amplitude of input stream) Olivier Lanctôt Apr 14, 21:08
mlRe: Sound Input Meter (Or, getting amplitude of input stream) Douglas A. Welton Apr 14, 21:53
mlRe: Sound Input Meter (Or, getting amplitude of input stream) Dirk van Oosterbos… Apr 14, 23:59