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

Author Topic: What unit does OnProcessSamples give me?  (Read 3329 times)

0 Members and 1 Guest are viewing this topic.

LoopStan

  • Newbie
  • *
  • Posts: 5
    • MSN Messenger - loopstan@hotmail.com
    • View Profile
    • http://north-see.com/eyrion
What unit does OnProcessSamples give me?
« on: February 10, 2011, 12:59:34 am »
protected override bool OnProcessSamples(short[] Samples);

This function gives me Samples. I am trying to figure out what the unit of measurement really is.

A loud clap is around 10,000 and background noise varies from around 0-500. I'm trying to use this for a physics project, but it's hard to use it if I don't know what the units are.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
What unit does OnProcessSamples give me?
« Reply #1 on: February 10, 2011, 07:52:37 am »
There's no unit, values are defined in the range corresponding to the sample type (int16).
Laurent Gomila - SFML developer

l0calh05t

  • Full Member
  • ***
  • Posts: 200
    • View Profile
What unit does OnProcessSamples give me?
« Reply #2 on: February 10, 2011, 10:09:33 am »
It is soundcard dependent. So If you really need to know, you would have to calibrate it (I.e. measure what voltage amplitude creates which digital amplitude, or if you care about sound pressure, you'll have to calibrate the whole system of microphone, preamp and soundcard with a sound source of known volume like a pistonphone)

LoopStan

  • Newbie
  • *
  • Posts: 5
    • MSN Messenger - loopstan@hotmail.com
    • View Profile
    • http://north-see.com/eyrion
What unit does OnProcessSamples give me?
« Reply #3 on: February 20, 2011, 02:56:30 am »
Oh ok, thanks for the info everyone. Thats a bumber that I'll most likely have to recalibrate for each computer, but maybe thats a good thing for the type of application I have. Thank you very much for your help.