mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
BasebandProcessor: Streamline construction of some messages.
This commit is contained in:
parent
77aceaaf56
commit
3ed77af0c1
@ -63,8 +63,7 @@ void BasebandProcessor::feed_channel_stats(const buffer_c16_t& channel) {
|
|||||||
channel_stats.feed(
|
channel_stats.feed(
|
||||||
channel,
|
channel,
|
||||||
[](const ChannelStatistics& statistics) {
|
[](const ChannelStatistics& statistics) {
|
||||||
ChannelStatisticsMessage channel_stats_message;
|
ChannelStatisticsMessage channel_stats_message { statistics };
|
||||||
channel_stats_message.statistics = statistics;
|
|
||||||
shared_memory.application_queue.push(channel_stats_message);
|
shared_memory.application_queue.push(channel_stats_message);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -108,8 +107,7 @@ void BasebandProcessor::feed_audio_stats(const buffer_s16_t& audio) {
|
|||||||
audio_stats.feed(
|
audio_stats.feed(
|
||||||
audio,
|
audio,
|
||||||
[this](const AudioStatistics& statistics) {
|
[this](const AudioStatistics& statistics) {
|
||||||
AudioStatisticsMessage audio_stats_message;
|
AudioStatisticsMessage audio_stats_message { statistics };
|
||||||
audio_stats_message.statistics = statistics;
|
|
||||||
shared_memory.application_queue.push(audio_stats_message);
|
shared_memory.application_queue.push(audio_stats_message);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -117,7 +117,9 @@ struct ChannelStatistics {
|
|||||||
class ChannelStatisticsMessage : public Message {
|
class ChannelStatisticsMessage : public Message {
|
||||||
public:
|
public:
|
||||||
constexpr ChannelStatisticsMessage(
|
constexpr ChannelStatisticsMessage(
|
||||||
) : Message { ID::ChannelStatistics }
|
const ChannelStatistics& statistics
|
||||||
|
) : Message { ID::ChannelStatistics },
|
||||||
|
statistics { statistics }
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,8 +152,9 @@ struct AudioStatistics {
|
|||||||
class AudioStatisticsMessage : public Message {
|
class AudioStatisticsMessage : public Message {
|
||||||
public:
|
public:
|
||||||
constexpr AudioStatisticsMessage(
|
constexpr AudioStatisticsMessage(
|
||||||
|
const AudioStatistics& statistics
|
||||||
) : Message { ID::AudioStatistics },
|
) : Message { ID::AudioStatistics },
|
||||||
statistics { }
|
statistics { statistics }
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user