mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-23 15:02:06 +08:00
soundd: max volume at 20m/s
This commit is contained in:
@@ -47,7 +47,7 @@ void Sound::update() {
|
||||
|
||||
// scale volume with speed
|
||||
if (sm.updated("carState")) {
|
||||
float volume = util::map_val(sm["carState"].getCarState().getVEgo(), 11.f, 29.f, 0.f, 1.0f);
|
||||
float volume = util::map_val(sm["carState"].getCarState().getVEgo(), 11.f, 20.f, 0.f, 1.0f);
|
||||
volume = QAudio::convertVolume(volume, QAudio::LogarithmicVolumeScale, QAudio::LinearVolumeScale);
|
||||
volume = util::map_val(volume, 0.f, 1.f, Hardware::MIN_VOLUME, Hardware::MAX_VOLUME);
|
||||
for (auto &[s, loops] : sounds) {
|
||||
|
||||
Reference in New Issue
Block a user