common: Add pre and de emphasis, if the radio does not support it
Connect to the oscillator of the transmitter - good girl! You need to enable pre emphasis in this case. Connect to the discriminator of the receiver - good boy! You need to enable de emphasis in this case.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "samplerate.h"
|
||||
#include "jitter.h"
|
||||
#include "loss.h"
|
||||
#include "emphasis.h"
|
||||
|
||||
/* common structure of each transmitter */
|
||||
typedef struct sender {
|
||||
@@ -18,6 +19,9 @@ typedef struct sender {
|
||||
void *sound;
|
||||
int samplerate;
|
||||
samplerate_t srstate; /* sample rate conversion state */
|
||||
int pre_emphasis; /* use pre_emhasis, done by sender */
|
||||
int de_emphasis; /* use de_emhasis, done by sender */
|
||||
emphasis_t estate; /* pre and de emphasis */
|
||||
|
||||
/* loopback test */
|
||||
int loopback; /* 0 = off, 1 = internal, 2 = external */
|
||||
@@ -47,7 +51,7 @@ typedef struct sender {
|
||||
/* list of all senders */
|
||||
extern sender_t *sender_head;
|
||||
|
||||
int sender_create(sender_t *sender, const char *sounddev, int samplerate, const char *write_wave, const char *read_wave, int kanal, int loopback, double loss_volume, int use_pilot_signal);
|
||||
int sender_create(sender_t *sender, const char *sounddev, int samplerate, int pre_emphasis, int de_emphasis, const char *write_wave, const char *read_wave, int kanal, int loopback, double loss_volume, int use_pilot_signal);
|
||||
void sender_destroy(sender_t *sender);
|
||||
void sender_send(sender_t *sender, int16_t *samples, int count);
|
||||
void sender_receive(sender_t *sender, int16_t *samples, int count);
|
||||
|
Reference in New Issue
Block a user