mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-07 22:22:21 -04:00
Adding_WFM_AM_mode_to_Audio_App (#2644)
* Adding_WFM_AM_mode_to_Audio_App * more precise values for cos and sin theta, fix sen_theta to sin_theta * fix sen_theta to sin_theta
This commit is contained in:
parent
bd781ce37b
commit
4342f5c0ee
18 changed files with 448 additions and 49 deletions
|
@ -46,6 +46,7 @@ class AudioOutput {
|
|||
const float squelch_threshold = 0.0f);
|
||||
|
||||
void write_unprocessed(const buffer_s16_t& audio);
|
||||
void apt_write(const buffer_s16_t& audio);
|
||||
void write(const buffer_s16_t& audio);
|
||||
void write(const buffer_f32_t& audio);
|
||||
|
||||
|
@ -58,6 +59,10 @@ class AudioOutput {
|
|||
private:
|
||||
static constexpr float k = 32768.0f;
|
||||
static constexpr float ki = 1.0f / k;
|
||||
static constexpr float cos_theta = 0.30901699437494742410f;
|
||||
static constexpr float sin_theta = 0.95105651629515357212f;
|
||||
|
||||
float cur = 0.0f, cur2 = 0.0f, prev = 0.0f, prev2 = 0.0f, mag_am = 0.0f;
|
||||
|
||||
BlockDecimator<int16_t, 32> block_buffer_s16{1};
|
||||
BlockDecimator<float, 32> block_buffer{1};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue