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

Update sound.cc
This commit is contained in:
AlexandreSato
2022-12-07 14:57:30 -03:00
committed by GitHub
parent cf3ced9d17
commit fa0bf404c8

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);