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

@ -23,9 +23,6 @@
#include "portapack_shared_memory.hpp"
#include "i2s.hpp"
using namespace lpc43xx;
#include "dsp_fir_taps.hpp"
AISProcessor::AISProcessor() {
@ -56,7 +53,7 @@ void AISProcessor::execute(const buffer_c8_t& buffer) {
}
}
i2s::i2s0::tx_mute();
mute_audio();
}
void AISProcessor::consume_symbol(

View File

@ -23,9 +23,6 @@
#include "portapack_shared_memory.hpp"
#include "i2s.hpp"
using namespace lpc43xx;
float ERTProcessor::abs(const complex8_t& v) {
// const int16_t r = v.real() - offset_i;
// const int16_t i = v.imag() - offset_q;
@ -83,7 +80,7 @@ void ERTProcessor::execute(const buffer_c8_t& buffer) {
clock_recovery(data);
}
i2s::i2s0::tx_mute();
mute_audio();
}
void ERTProcessor::consume_symbol(

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) {

View File

@ -23,9 +23,6 @@
#include "portapack_shared_memory.hpp"
#include "i2s.hpp"
using namespace lpc43xx;
#include "dsp_fir_taps.hpp"
// IFIR image-reject filter: fs=2457600, pass=100000, stop=407200, decim=4, fout=614400
@ -77,7 +74,7 @@ void TPMSProcessor::execute(const buffer_c8_t& buffer) {
}
}
i2s::i2s0::tx_mute();
mute_audio();
}
void TPMSProcessor::consume_symbol(

View File

@ -23,9 +23,6 @@
#include "event_m4.hpp"
#include "i2s.hpp"
using namespace lpc43xx;
#include "dsp_fft.hpp"
#include <cstdint>
@ -65,7 +62,7 @@ void WidebandSpectrum::execute(const buffer_c8_t& buffer) {
phase++;
}
i2s::i2s0::tx_mute();
mute_audio();
}
void WidebandSpectrum::on_message(const Message* const message) {