Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Calculate Sample Array to Volume  (Read 2611 times)

0 Members and 1 Guest are viewing this topic.

Felix91

  • Newbie
  • *
  • Posts: 2
    • View Profile
Calculate Sample Array to Volume
« on: July 10, 2017, 11:18:42 pm »
Sorry for my bad english.
I'm writing a little Voice Chat program and i'm nearly done. I already found out that the highest value of a short Sample Array describes how loud the sound is. But i want to know how i can convert this in volume. Does anyone know that?

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Calculate Sample Array to Volume
« Reply #1 on: July 11, 2017, 12:18:40 am »
It would depend on what you mean by volume (doesn't it technically depend on the listener's amplification?) and which scale (linear ratio of maximum, RMS, decibels, for examples) you wish to use to describe it.

You've already stated that the highest value (peak) of a short section can give an indication of how "loud" it is. You might want to compare its distance to the average value to offset any off-centre waves.

There is easy-to-find information on the internet about calculating RMS and DB reduction.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*