mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-02 03:26:40 -04:00
Spectrum streaming control, spectrum attributes back in each frame.
TODO: This feels kinda complex, and there's some repeated Processor code that needs to be refactored into a base class.
This commit is contained in:
parent
0647f26707
commit
d821afc60d
10 changed files with 101 additions and 29 deletions
|
@ -53,6 +53,10 @@ void NarrowbandAMAudio::on_message(const Message* const message) {
|
|||
configure(*reinterpret_cast<const AMConfigureMessage*>(message));
|
||||
break;
|
||||
|
||||
case Message::ID::SpectrumStreamingConfig:
|
||||
streaming_config(*reinterpret_cast<const SpectrumStreamingConfigMessage*>(message));
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -82,3 +86,11 @@ void NarrowbandAMAudio::configure(const AMConfigureMessage& message) {
|
|||
|
||||
configured = true;
|
||||
}
|
||||
|
||||
void NarrowbandAMAudio::streaming_config(const SpectrumStreamingConfigMessage& message) {
|
||||
if( message.mode == SpectrumStreamingConfigMessage::Mode::Running ) {
|
||||
channel_spectrum.start();
|
||||
} else {
|
||||
channel_spectrum.stop();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue