Neu structure for the paging process (B-Netz)
Paging tones are not created within sound_alsa.c The audio API is now responsible to switch to paging channel. In case of SDR, the sdr.c will switch frequency offset.
This commit is contained in:
@@ -11,13 +11,13 @@
|
||||
|
||||
#define MAX_SENDER 16
|
||||
|
||||
/* how to send a 'pilot' signal (trigger transmitter) */
|
||||
enum pilot_signal {
|
||||
PILOT_SIGNAL_NONE = 0,
|
||||
PILOT_SIGNAL_TONE,
|
||||
PILOT_SIGNAL_NOTONE,
|
||||
PILOT_SIGNAL_POSITIVE,
|
||||
PILOT_SIGNAL_NEGATIVE,
|
||||
/* how to send a 'paging' signal (trigger transmitter) */
|
||||
enum paging_signal {
|
||||
PAGING_SIGNAL_NONE = 0,
|
||||
PAGING_SIGNAL_TONE,
|
||||
PAGING_SIGNAL_NOTONE,
|
||||
PAGING_SIGNAL_POSITIVE,
|
||||
PAGING_SIGNAL_NEGATIVE,
|
||||
};
|
||||
|
||||
/* common structure of each transmitter */
|
||||
@@ -30,15 +30,16 @@ typedef struct sender {
|
||||
int kanal; /* channel number */
|
||||
double sendefrequenz; /* transmitter frequency */
|
||||
double empfangsfrequenz; /* receiver frequency */
|
||||
double ruffrequenz; /* special paging frequency used for B-Netz */
|
||||
double bandwidth; /* max NF frequency to be transmitted unaffected by filtering */
|
||||
double sample_deviation; /* frequency deviation of one sample step (after pre-emphasis) */
|
||||
|
||||
/* audio */
|
||||
void *audio;
|
||||
char audiodev[64]; /* audio device name (alsa or sdr) */
|
||||
void *(*audio_open)(const char *, double *, double *, int, int, double, double);
|
||||
void *(*audio_open)(const char *, double *, double *, int, double, int, double, double);
|
||||
void (*audio_close)(void *);
|
||||
int (*audio_write)(void *, int16_t **, int, int);
|
||||
int (*audio_write)(void *, int16_t **, int, enum paging_signal *, int *, int);
|
||||
int (*audio_read)(void *, int16_t **, int, int);
|
||||
int (*audio_get_inbuffer)(void *);
|
||||
int samplerate;
|
||||
@@ -67,11 +68,9 @@ typedef struct sender {
|
||||
double loss_volume;
|
||||
loss_t loss;
|
||||
|
||||
/* pilot tone */
|
||||
enum pilot_signal pilot_signal; /* if pilot signal is used and how it is performed */
|
||||
int pilot_on; /* 1 or 0 for on or off */
|
||||
double pilotton_phaseshift; /* phase to shift every sample */
|
||||
double pilotton_phase; /* current phase */
|
||||
/* paging tone */
|
||||
enum paging_signal paging_signal; /* if paging signal is used and how it is performed */
|
||||
int paging_on; /* 1 or 0 for on or off */
|
||||
|
||||
/* display wave */
|
||||
dispwav_t dispwav; /* display wave form */
|
||||
@@ -81,11 +80,11 @@ typedef struct sender {
|
||||
extern sender_t *sender_head;
|
||||
extern int cant_recover;
|
||||
|
||||
int sender_create(sender_t *sender, int kanal, double sendefrequenz, double empfangsfrequenz, const char *audiodev, 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, int loopback, double loss_volume, enum pilot_signal pilot_signal);
|
||||
int sender_create(sender_t *sender, int kanal, double sendefrequenz, double empfangsfrequenz, const char *audiodev, 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, int loopback, double loss_volume, enum paging_signal paging_signal);
|
||||
void sender_destroy(sender_t *sender);
|
||||
int sender_open_audio(void);
|
||||
void process_sender_audio(sender_t *sender, int *quit, int latspl);
|
||||
void sender_send(sender_t *sender, int16_t *samples, int count);
|
||||
void sender_receive(sender_t *sender, int16_t *samples, int count);
|
||||
void sender_pilot(sender_t *sender, int on);
|
||||
void sender_paging(sender_t *sender, int on);
|
||||
|
||||
|
Reference in New Issue
Block a user