mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-13 08:55:39 -04:00
Mute and unmute audio
This commit is contained in:
parent
2d765f8120
commit
3c304b9fe3
3 changed files with 29 additions and 0 deletions
|
@ -26,6 +26,7 @@
|
|||
using portapack::clock_manager;
|
||||
|
||||
#include "portapack_hal.hpp"
|
||||
#include "portapack_persistent_memory.hpp"
|
||||
|
||||
#include "i2s.hpp"
|
||||
using namespace lpc43xx;
|
||||
|
@ -153,6 +154,16 @@ void unmute() {
|
|||
audio_codec->headphone_enable();
|
||||
}
|
||||
|
||||
void speaker_mute() {
|
||||
i2s::i2s0::tx_mute();
|
||||
audio_codec->speaker_disable();
|
||||
}
|
||||
|
||||
void speaker_unmute() {
|
||||
i2s::i2s0::tx_unmute();
|
||||
audio_codec->speaker_enable();
|
||||
}
|
||||
|
||||
} /* namespace output */
|
||||
|
||||
namespace input {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue