Add support for AM to libmobile and libsdr

This commit is contained in:
Andreas Eversberg
2019-12-05 17:24:30 +01:00
parent c2f14834e5
commit 150a77b69d
26 changed files with 121 additions and 52 deletions

View File

@@ -33,16 +33,18 @@ typedef struct sender {
double empfangsfrequenz; /* receiver frequency */
double ruffrequenz; /* special paging frequency used for B-Netz */
/* fm levels */
double max_deviation; /* max frequency deviation */
/* FM/AM levels */
int am; /* use AM instead of FM */
double max_deviation; /* max frequency deviation / level */
double max_modulation; /* max frequency modulated */
double speech_deviation; /* deviation of 1000 Hz reference tone at speech level */
double speech_deviation; /* deviation / level of 1000 Hz reference tone at speech level */
double modulation_index; /* AM modulation index */
double max_display; /* level of displaying wave form */
/* audio */
void *audio;
char audiodev[64]; /* audio device name (alsa or sdr) */
void *(*audio_open)(const char *, double *, double *, int, double, int, int, double, double);
void *(*audio_open)(const char *, double *, double *, int *, int, double, int, int, double, double, double);
int (*audio_start)(void *);
void (*audio_close)(void *);
int (*audio_write)(void *, sample_t **, uint8_t **, int, enum paging_signal *, int *, int);
@@ -93,6 +95,7 @@ extern int cant_recover;
int sender_create(sender_t *sender, const char *kanal, double sendefrequenz, double empfangsfrequenz, const char *audiodev, int use_sdr, int samplerate, double rx_gain, int pre_emphasis, int de_emphasis, const char *write_rx_wave, const char *write_tx_wave, const char *read_rx_wave, const char *read_tx_wave, int loopback, enum paging_signal paging_signal);
void sender_destroy(sender_t *sender);
void sender_set_fm(sender_t *sender, double max_deviation, double max_modulation, double speech_deviation, double max_display);
void sender_set_am(sender_t *sender, double max_modulation, double speech_deviation, double max_display, double modulation_index);
int sender_open_audio(int latspl);
int sender_start_audio(void);
void process_sender_audio(sender_t *sender, int *quit, int latspl);