mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-31 18:49:15 -04:00
Formatted code (#1007)
* Updated style * Updated files * fixed new line * Updated spacing * File fix WIP * Updated to clang 13 * updated comment style * Removed old comment code
This commit is contained in:
parent
7aca7ce74d
commit
033c4e9a5b
599 changed files with 70746 additions and 66896 deletions
|
@ -36,46 +36,45 @@
|
|||
#include <memory>
|
||||
|
||||
class AudioOutput {
|
||||
public:
|
||||
void configure(const bool do_proc);
|
||||
|
||||
void configure(
|
||||
const iir_biquad_config_t& hpf_config,
|
||||
const iir_biquad_config_t& deemph_config = iir_config_passthrough,
|
||||
const float squelch_threshold = 0.0f
|
||||
);
|
||||
public:
|
||||
void configure(const bool do_proc);
|
||||
|
||||
void write(const buffer_s16_t& audio);
|
||||
void write(const buffer_f32_t& audio);
|
||||
void configure(
|
||||
const iir_biquad_config_t& hpf_config,
|
||||
const iir_biquad_config_t& deemph_config = iir_config_passthrough,
|
||||
const float squelch_threshold = 0.0f);
|
||||
|
||||
void set_stream(std::unique_ptr<StreamInput> new_stream) {
|
||||
stream = std::move(new_stream);
|
||||
}
|
||||
|
||||
bool is_squelched();
|
||||
void write(const buffer_s16_t& audio);
|
||||
void write(const buffer_f32_t& audio);
|
||||
|
||||
private:
|
||||
static constexpr float k = 32768.0f;
|
||||
static constexpr float ki = 1.0f / k;
|
||||
void set_stream(std::unique_ptr<StreamInput> new_stream) {
|
||||
stream = std::move(new_stream);
|
||||
}
|
||||
|
||||
BlockDecimator<float, 32> block_buffer { 1 };
|
||||
bool is_squelched();
|
||||
|
||||
IIRBiquadFilter hpf { };
|
||||
IIRBiquadFilter deemph { };
|
||||
FMSquelch squelch { };
|
||||
private:
|
||||
static constexpr float k = 32768.0f;
|
||||
static constexpr float ki = 1.0f / k;
|
||||
|
||||
std::unique_ptr<StreamInput> stream { };
|
||||
BlockDecimator<float, 32> block_buffer{1};
|
||||
|
||||
AudioStatsCollector audio_stats { };
|
||||
IIRBiquadFilter hpf{};
|
||||
IIRBiquadFilter deemph{};
|
||||
FMSquelch squelch{};
|
||||
|
||||
uint64_t audio_present_history = 0;
|
||||
|
||||
bool audio_present = false;
|
||||
bool do_processing = true;
|
||||
std::unique_ptr<StreamInput> stream{};
|
||||
|
||||
void on_block(const buffer_f32_t& audio);
|
||||
void fill_audio_buffer(const buffer_f32_t& audio, const bool send_to_fifo);
|
||||
void feed_audio_stats(const buffer_f32_t& audio);
|
||||
AudioStatsCollector audio_stats{};
|
||||
|
||||
uint64_t audio_present_history = 0;
|
||||
|
||||
bool audio_present = false;
|
||||
bool do_processing = true;
|
||||
|
||||
void on_block(const buffer_f32_t& audio);
|
||||
void fill_audio_buffer(const buffer_f32_t& audio, const bool send_to_fifo);
|
||||
void feed_audio_stats(const buffer_f32_t& audio);
|
||||
};
|
||||
|
||||
#endif/*__AUDIO_OUTPUT_H__*/
|
||||
#endif /*__AUDIO_OUTPUT_H__*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue