Re: Sound Input Meter (Or, getting amplitude of input stream)
Re: Sound Input Meter (Or, getting amplitude of input stream)
- Subject: Re: Sound Input Meter (Or, getting amplitude of input stream)
- From: "Douglas A. Welton" <email@hidden>
- Date: Thu, 14 Apr 2005 15:53:13 -0400
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@hidden 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
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden