mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-30 10:09:25 -04:00
Move I2S management to application side.
This commit is contained in:
parent
cefab197da
commit
9430c94dec
9 changed files with 32 additions and 30 deletions
|
@ -77,10 +77,7 @@ void AudioOutput::on_block(
|
|||
audio_present_history = (audio_present_history << 1) | (audio_present_now ? 1 : 0);
|
||||
const bool audio_present = (audio_present_history != 0);
|
||||
|
||||
if( audio_present ) {
|
||||
i2s::i2s0::tx_unmute();
|
||||
} else {
|
||||
i2s::i2s0::tx_mute();
|
||||
if( !audio_present ) {
|
||||
for(size_t i=0; i<audio.count; i++) {
|
||||
audio.p[i] = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue