Use BasebandProcessor::mute_audio(), remove I2S #include dependencies.

This commit is contained in:
Jared Boone 2016-01-04 09:07:07 -08:00
parent ef6ae8ed94
commit 222b878629
5 changed files with 9 additions and 23 deletions

View file

@ -48,14 +48,12 @@ void NarrowbandFMAudio::execute(const buffer_c8_t& buffer) {
static uint64_t audio_present_history = 0;
audio_present_history = (audio_present_history << 1) | (audio_present_now ? 1 : 0);
const bool audio_present = (audio_present_history != 0);
if( !audio_present ) {
// Zero audio buffer.
for(size_t i=0; i<audio.count; i++) {
audio.p[i] = 0;
}
if( audio_present ) {
fill_audio_buffer(audio);
} else {
mute_audio();
}
fill_audio_buffer(audio);
}
void NarrowbandFMAudio::on_message(const Message* const message) {