From ad578eb0bd15dfa828c8c43518991ee8ce81e261 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Sat, 23 Jul 2022 18:18:45 +0300 Subject: Suppress application volume when alt-tabbed (#730) * Suppress application volume when alt-tabbed Add a "suppress_audio" slider setting, 50% by default, which decides how much audio remains when the client is not in focus Add a "muted" setting for blip, music, and sfx players Add update_audio_volume func * change "suppress" to "how much audio is suppressed" instead of "how much audio remains" * Fix last commit just flipping the behavior and being ultra wacky * Fix evidence present sound ignoring audio suppression settings Co-authored-by: stonedDiscord Co-authored-by: Salanto <62221668+Salanto@users.noreply.github.com> --- src/text_file_functions.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/text_file_functions.cpp') diff --git a/src/text_file_functions.cpp b/src/text_file_functions.cpp index be162b22..dc95dc34 100644 --- a/src/text_file_functions.cpp +++ b/src/text_file_functions.cpp @@ -40,6 +40,12 @@ int AOApplication::get_default_blip() return result; } +int AOApplication::get_default_suppress_audio() +{ + int result = configini->value("suppress_audio", 50).toInt(); + return result; +} + int AOApplication::get_max_log_size() { int result = configini->value("log_maximum", 200).toInt(); -- cgit