mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-01-12 19:33:38 +00:00
Add SSB demodulator, switch between AM and SSB.
This commit is contained in:
parent
1915ff980f
commit
ad4d7a2e8a
@ -39,8 +39,13 @@ void NarrowbandAMAudio::execute(const buffer_c8_t& buffer) {
|
|||||||
feed_channel_stats(channel_out);
|
feed_channel_stats(channel_out);
|
||||||
channel_spectrum.feed(channel_out, channel_filter_pass_f, channel_filter_stop_f);
|
channel_spectrum.feed(channel_out, channel_filter_pass_f, channel_filter_stop_f);
|
||||||
|
|
||||||
auto audio = demod.execute(channel_out, audio_buffer);
|
if( false ) {
|
||||||
audio_output.write(audio);
|
auto audio = demod_am.execute(channel_out, audio_buffer);
|
||||||
|
audio_output.write(audio);
|
||||||
|
} else {
|
||||||
|
auto audio = demod_ssb.execute(channel_out, audio_buffer);
|
||||||
|
audio_output.write(audio);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NarrowbandAMAudio::on_message(const Message* const message) {
|
void NarrowbandAMAudio::on_message(const Message* const message) {
|
||||||
|
@ -61,7 +61,8 @@ private:
|
|||||||
uint32_t channel_filter_pass_f = 0;
|
uint32_t channel_filter_pass_f = 0;
|
||||||
uint32_t channel_filter_stop_f = 0;
|
uint32_t channel_filter_stop_f = 0;
|
||||||
|
|
||||||
dsp::demodulate::AM demod;
|
dsp::demodulate::AM demod_am;
|
||||||
|
dsp::demodulate::SSB demod_ssb;
|
||||||
|
|
||||||
AudioOutput audio_output;
|
AudioOutput audio_output;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user