0
1
mirror of https://github.com/radio95-rnt/fm95.git synced 2026-02-26 19:23:51 +01:00

test of ssb

This commit is contained in:
2026-02-15 12:49:09 +01:00
parent 64e3f36e34
commit bffde6cb68
3 changed files with 70 additions and 0 deletions

View File

@@ -1,7 +1,19 @@
#pragma once
#define STEREO_SSB
#include <stdint.h>
#include "../dsp/oscillator.h"
#ifdef STEREO_SSB
#include <liquid/liquid.h>
#include <complex.h>
typedef struct delay_line_t {
float *buffer;
uint32_t delay;
uint32_t idx;
} delay_line_t;
#endif
typedef struct
{
@@ -9,8 +21,15 @@ typedef struct
Oscillator* osc;
float audio_volume;
float pilot_volume;
#ifdef STEREO_SSB
struct delay_line_t delay;
#endif
} StereoEncoder;
void init_stereo_encoder(StereoEncoder *st, uint8_t multiplier, Oscillator *osc, float audio_volume, float pilot_volume);
#ifdef STEREO_SSB
float stereo_encode(StereoEncoder* st, uint8_t enabled, float left, float right, firhilbf hilbert);
#else
float stereo_encode(StereoEncoder* st, uint8_t enabled, float left, float right);
#endif