mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-16 02:10:53 -04:00
Persistent audio mute support revisions (#1169)
* Don't disable DAC when other audio output is using it * Persistent audio mute revisions * Moved persistent audio mute code to audio.cpp * Make "Disable AK speaker amp" take effect immediately
This commit is contained in:
parent
f83027d451
commit
fa06df1400
7 changed files with 25 additions and 38 deletions
|
@ -166,15 +166,6 @@ void unmute() {
|
|||
}
|
||||
}
|
||||
|
||||
void speaker_disable() {
|
||||
cfg_speaker_disable = true;
|
||||
audio_codec->speaker_disable();
|
||||
}
|
||||
|
||||
void speaker_enable() {
|
||||
cfg_speaker_disable = false;
|
||||
}
|
||||
|
||||
// The following functions are used by the navigation-bar Speaker Mute only,
|
||||
// and override all other audio mute/unmute requests from apps
|
||||
void speaker_mute() {
|
||||
|
@ -191,6 +182,15 @@ void speaker_unmute() {
|
|||
}
|
||||
}
|
||||
|
||||
void update_audio_mute() {
|
||||
cfg_speaker_disable = portapack::persistent_memory::config_speaker_disable();
|
||||
|
||||
if (portapack::persistent_memory::config_audio_mute())
|
||||
speaker_mute();
|
||||
else
|
||||
speaker_unmute();
|
||||
}
|
||||
|
||||
} /* namespace output */
|
||||
|
||||
namespace input {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue