Update comment on sound.cc volume based(speed ->noise) (#26719)

Update sound.cc
old-commit-hash: fa0bf404c879e41bc212e46df30f522b434ced44
This commit is contained in:
AlexandreSato
2022-12-07 14:57:30 -03:00
committed by GitHub
parent ecf87de6da
commit 6bc328535c
+1 -1
View File
@@ -46,7 +46,7 @@ void Sound::update() {
return;
}
// scale volume with speed
// scale volume using ambient noise level
if (sm.updated("microphone")) {
float volume = util::map_val(sm["microphone"].getMicrophone().getFilteredSoundPressureWeightedDb(), 30.f, 52.f, 0.f, 1.f);
volume = QAudio::convertVolume(volume, QAudio::LogarithmicVolumeScale, QAudio::LinearVolumeScale);