mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-24 08:23:52 +08:00
Update comment on sound.cc volume based(speed ->noise) (#26719)
Update sound.cc
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