Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Mon, 23 Jun 2008 11:09:41 -0700 (PDT),    group: microsoft.public.win32.programmer.directx.audio        back       


Yet another VU-meter post   
Hello,

I am working on a program in which I would like to have a real-time VU-
meter.

I have got experience with DirectShow programming and it seems that I
need to use the SampleGrabber
filter for this. But that's where my knowledge stops (I know how to
get samples with it though).

I would like to use the Win32 API in combination with DirectShow and
the C++ programming language.

My questions are:

- How can I use DirectShow for getting the audio-data in the proper
format, so that I can display it in a VU-meter? (perhaps convert it to
dB first?)
- Is it in this way possible to have a real-time VU-meter?

Any comments or hints are welcome.

Thanks in advance.
date: Mon, 23 Jun 2008 11:09:41 -0700 (PDT)   author:   unknown

Re: Yet another VU-meter post   
From: "j.ronner@chello.nl"

> - How can I use DirectShow for getting the audio-data in
> the proper format, so that I can display it in a
> VU-meter? (perhaps convert it to dB first?)

To measure the amplitude (which is nothing more than the 
absolute value of the waveform samples), you just need 
uncompressed PCM data. So insert your SampleGrabber after 
the decoder or the live source. You will need to average the 
amplitude over short buffers (0.1-0.5 secs). You can display 
the intensity instead, which is the RMS (square root of the 
average square of the samples), which is a better 
representation of the perceived volume/loudness.

> - Is it in this way possible to have a real-time VU-meter?

Yes.


-- 
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
date: Mon, 23 Jun 2008 14:42:19 -0400   author:   Alessandro Angeli

Re: Yet another VU-meter post   
On Mon, 23 Jun 2008 14:42:19 -0400, Alessandro Angeli wrote:

> To measure the amplitude (which is nothing more than the 
> absolute value of the waveform samples), you just need 
> uncompressed PCM data. So insert your SampleGrabber after 
> the decoder or the live source. You will need to average the 
> amplitude over short buffers (0.1-0.5 secs). You can display 
> the intensity instead, which is the RMS (square root of the 
> average square of the samples), which is a better 
> representation of the perceived volume/loudness.

The peak dB value is more commonly used in the digital world.  This is
mainly because you are trying to achieve maximum dynamic range but without
clipping.  

-- 
http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]
date: Mon, 23 Jun 2008 16:44:56 -0400   author:   Chris P.

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us