Adding unity volume to sound power converter (watts unit)

parent e39ca485
......@@ -64,7 +64,7 @@ public class VAUSoundSource : MonoBehaviour
{
// Set gain control once
_VA.SetSoundSourceMuted(_ID, GetComponent<AudioSource>().mute);
_VA.SetSoundSourceSoundPower( _ID, GetComponent< AudioSource >().volume * 31.69e-3 ); // Now SoundPower: 31.67 mW -> 94 dB SPL @ 1m
_VA.SetSoundSourceSoundPower( _ID, GetComponent< AudioSource >().volume * 31.69e-3 ); // Volume of 1.0 results in default sound power: 31.67 mW -> 94 dB SPL @ 1m
// Create and connect audio signal source
if (GetComponent<AudioSource>().clip)
......@@ -100,7 +100,7 @@ public class VAUSoundSource : MonoBehaviour
if (ContinuousGainObserver)
{
_VA.SetSoundSourceMuted(_ID, GetComponent<AudioSource>().mute);
_VA.SetSoundSourceVolume(_ID, GetComponent<AudioSource>().volume);
_VA.SetSoundSourceSoundPower(_ID, GetComponent<AudioSource>().volume * 31.69e-3 ); // Volume of 1.0 results in default sound power: 31.67 mW -> 94 dB SPL @ 1m
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment