Possible to get sample peak / sample range ?

View: New views
1 Messages — Rating Filter:   Alert me  

Possible to get sample peak / sample range ?

by aconstantin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I'm interested if there's a way to get the sample peak / sample range of a loaded sample, since I'm trying to build graphical support for my audio app (a VU-Meter, Spectrum Analyzer or a Vertical Bar Equalizer)

But all these are linked to the instantaneous level of the audio signal... i need those decibels, thus I would need the above mentioned properties, since, to my knowledge, the dB conversion for 16-bit audio is:
 
     dbVal = 20 * log10((double) samplePeak / sampleRange);


Any pointers ?

Alex.
---using---
- VC# 2005
- Tao Framework 2.1.0
LightInTheBox - Buy quality products at wholesale price