Add SSB demodulator, switch between AM and SSB.

This commit is contained in:
Jared Boone 2016-01-30 17:30:03 -08:00
parent 1915ff980f
commit ad4d7a2e8a
2 changed files with 9 additions and 3 deletions

View File

@ -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 ) {
auto audio = demod_am.execute(channel_out, audio_buffer);
audio_output.write(audio); 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) {

View File

@ -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;