mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-12-04 02:42:04 +00: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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user