[mad-dev] Re: How to know the frequency of a frame

Shiming Dong dong_sm@yahoo.com
Fri, 1 Aug 2003 14:16:26 -0700 (PDT)


But I found the samplerate for all the frames are the
same. And I think for each frame the frequency, which
is the X-axis value of visualized mp3 player for each
tone will be different. (When you use mp3 player to
play a CD, the X-axis displays the frequency and the
Y-axis is the volume I think. I want to know the
X-axis value for each frame. )How do I get this
information?

Thank you!

shiming 
--- armin.gerritsen@philips.com wrote:
> mad-dev-request@lists.mars.org wrote:
> 
> > Message: 1
> > Date: Wed, 30 Jul 2003 16:56:15 -0700 (PDT)
> > From: Shiming Dong <dong_sm@yahoo.com>
> > To: mad-dev@lists.mars.org
> > Subject: [mad-dev] How to know the frequency of a
> frame
> >
> > --0-1603577723-1059609375=:7610
> > Content-Type: text/plain; charset=us-ascii
> >
> > Hi there:
> >
> > I have one question: I was supposed to implement a
> program to detect
> > a specific marker tone. But my problem is how to
> know the frequency
> > of each frame?
> >
> > Thank you!
> >
> > shiming
> 
> I guess you mean the samplerate?
> For instance 44,1kHz.
> In that case it is easy. Once you have decoded a
> frame, at some point you
> will synthesise it to PCM samples.
> 
> 
> struct mad_frame  myFrame ;
> struct mad_synth   mySynth ;
> 
> [...lots of code...]
> 
>  mad_synth_frame( &mySynth, &myFrame ) ;
> 
> After that mySynth.pcm.samplerate will contain the
> samplerate.
> For instance 44100 for 44,1kHz.
> 
> Regards,
> 
> Armin
> 
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com