Android的 - 计算分贝的音量 [英] Android - Calculate deciBel from sound volume
问题描述
是否有可能从音量级计算分贝值?结果
假设一个播放声音时,(它可以是任何轨道,但我使用生成的声音具有AudioTrack)。而播放声音时,声音的音量从0(静音)增加至99(最大)。
现在我要检索的分贝值,当音量为50,例如。结果
这可能吗?
Is it possible to calculate the decibel value from the sound volume level?
Suppose a sound is playing, (it could be any track, but I'm using a generated sound with AudioTrack). While the sound is playing, the volume of the sound is increased from 0 (mute) to 99 (maximum).
Now I want to retrieve the decibel value, when the volume level is 50, for example.
Is it possible?
我发现如何在这个线程计算分贝值:<一个href=\"http://stackoverflow.com/questions/6571894/calculate-decibel-from-amplitude-android-media-recorder\">Calculate从振幅分贝 - Android电子媒体记录
I found how to calculate decibel value in this thread: Calculate Decibel from amplitude - Android media recorder
power_db = 20 * log10(amp / amp_ref);
,但在这里使用的幅度,而不是声音的音量。
but here it uses the amplitude, not sound volume.
推荐答案
有关你的计算,你可能认为更多的振幅=更多的数量。
For your calculations, you can probably assume that more amplitude = more volume.
他们非常密切的关系: http://en.wikipedia.org/wiki/Volume_ (音)
They're very closely related: http://en.wikipedia.org/wiki/Volume_(sound)
这篇关于Android的 - 计算分贝的音量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!