mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-04-30 14:10:50 +00:00
Use BasebandProcessor::mute_audio(), remove I2S #include dependencies.
This commit is contained in:
parent
ef6ae8ed94
commit
222b878629
@ -23,9 +23,6 @@
|
|||||||
|
|
||||||
#include "portapack_shared_memory.hpp"
|
#include "portapack_shared_memory.hpp"
|
||||||
|
|
||||||
#include "i2s.hpp"
|
|
||||||
using namespace lpc43xx;
|
|
||||||
|
|
||||||
#include "dsp_fir_taps.hpp"
|
#include "dsp_fir_taps.hpp"
|
||||||
|
|
||||||
AISProcessor::AISProcessor() {
|
AISProcessor::AISProcessor() {
|
||||||
@ -56,7 +53,7 @@ void AISProcessor::execute(const buffer_c8_t& buffer) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
i2s::i2s0::tx_mute();
|
mute_audio();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AISProcessor::consume_symbol(
|
void AISProcessor::consume_symbol(
|
||||||
|
@ -23,9 +23,6 @@
|
|||||||
|
|
||||||
#include "portapack_shared_memory.hpp"
|
#include "portapack_shared_memory.hpp"
|
||||||
|
|
||||||
#include "i2s.hpp"
|
|
||||||
using namespace lpc43xx;
|
|
||||||
|
|
||||||
float ERTProcessor::abs(const complex8_t& v) {
|
float ERTProcessor::abs(const complex8_t& v) {
|
||||||
// const int16_t r = v.real() - offset_i;
|
// const int16_t r = v.real() - offset_i;
|
||||||
// const int16_t i = v.imag() - offset_q;
|
// const int16_t i = v.imag() - offset_q;
|
||||||
@ -83,7 +80,7 @@ void ERTProcessor::execute(const buffer_c8_t& buffer) {
|
|||||||
clock_recovery(data);
|
clock_recovery(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
i2s::i2s0::tx_mute();
|
mute_audio();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ERTProcessor::consume_symbol(
|
void ERTProcessor::consume_symbol(
|
||||||
|
@ -48,14 +48,12 @@ void NarrowbandFMAudio::execute(const buffer_c8_t& buffer) {
|
|||||||
static uint64_t audio_present_history = 0;
|
static uint64_t audio_present_history = 0;
|
||||||
audio_present_history = (audio_present_history << 1) | (audio_present_now ? 1 : 0);
|
audio_present_history = (audio_present_history << 1) | (audio_present_now ? 1 : 0);
|
||||||
const bool audio_present = (audio_present_history != 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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fill_audio_buffer(audio);
|
if( audio_present ) {
|
||||||
|
fill_audio_buffer(audio);
|
||||||
|
} else {
|
||||||
|
mute_audio();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NarrowbandFMAudio::on_message(const Message* const message) {
|
void NarrowbandFMAudio::on_message(const Message* const message) {
|
||||||
|
@ -23,9 +23,6 @@
|
|||||||
|
|
||||||
#include "portapack_shared_memory.hpp"
|
#include "portapack_shared_memory.hpp"
|
||||||
|
|
||||||
#include "i2s.hpp"
|
|
||||||
using namespace lpc43xx;
|
|
||||||
|
|
||||||
#include "dsp_fir_taps.hpp"
|
#include "dsp_fir_taps.hpp"
|
||||||
|
|
||||||
// IFIR image-reject filter: fs=2457600, pass=100000, stop=407200, decim=4, fout=614400
|
// 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(
|
void TPMSProcessor::consume_symbol(
|
||||||
|
@ -23,9 +23,6 @@
|
|||||||
|
|
||||||
#include "event_m4.hpp"
|
#include "event_m4.hpp"
|
||||||
|
|
||||||
#include "i2s.hpp"
|
|
||||||
using namespace lpc43xx;
|
|
||||||
|
|
||||||
#include "dsp_fft.hpp"
|
#include "dsp_fft.hpp"
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
@ -65,7 +62,7 @@ void WidebandSpectrum::execute(const buffer_c8_t& buffer) {
|
|||||||
phase++;
|
phase++;
|
||||||
}
|
}
|
||||||
|
|
||||||
i2s::i2s0::tx_mute();
|
mute_audio();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WidebandSpectrum::on_message(const Message* const message) {
|
void WidebandSpectrum::on_message(const Message* const message) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user