Benjamin
Benjamin

Reputation: 628

How to calculate dBr from the volume on IOS

I am working on a "test your hearing application".

I know that half the amplitude is -6db.

I would like to know that when 1.0 is maximum volume using the AVAudioPlayer class, will setting the volume to 0.5 means that it plays at 50%, meaning a drop in relative db to -6db, if we used an ideal earphone?

Upvotes: 2

Views: 1947

Answers (1)

Nick Haddad
Nick Haddad

Reputation: 8937

That is an excellent question.

I wouldn't be surprised if the range in AVAudioPlayer more closely matches that of the "standard leveling scale" for popular music.

enter image description here

Notice here that 0dB is pretty far up linearly in the range. This is based on the history of the VU meter as described in Level Practices (Part 2) and seen in this picture:

enter image description here

So, I don't know for sure, but my guess would be that AVAudioPlayer more closely matches these ranges. You could always plug headphone jack of our iOS device into an application like Audacity, Logic, or Pro Tools and actually measure the signal coming out of your app as you sweep through the volume range in AVAudioPlayer.

Upvotes: 1

Related Questions