mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-11 04:12:07 +08:00
Update comment on sound.cc volume based(speed ->noise) (#26719)
Update sound.cc old-commit-hash: fa0bf404c879e41bc212e46df30f522b434ced44
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user