A-Netz: Don't allow emphasis, since it is not used with A-Netz
This commit is contained in:
parent
e724823c5b
commit
16e1e842b9
|
@ -117,6 +117,9 @@ int main(int argc, char *argv[])
|
||||||
const char *station_id = "";
|
const char *station_id = "";
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
/* a-netz does not use emphasis, so disable it */
|
||||||
|
uses_emphasis = 0;
|
||||||
|
|
||||||
/* init common tones */
|
/* init common tones */
|
||||||
init_freiton();
|
init_freiton();
|
||||||
init_besetzton();
|
init_besetzton();
|
||||||
|
|
|
@ -8,6 +8,7 @@ extern int samplerate;
|
||||||
extern int interval;
|
extern int interval;
|
||||||
extern int latency;
|
extern int latency;
|
||||||
extern int cross_channels;
|
extern int cross_channels;
|
||||||
|
extern int uses_emphasis;
|
||||||
extern int do_pre_emphasis;
|
extern int do_pre_emphasis;
|
||||||
extern int do_de_emphasis;
|
extern int do_de_emphasis;
|
||||||
extern double rx_gain;
|
extern double rx_gain;
|
||||||
|
|
|
@ -43,6 +43,7 @@ int samplerate = 48000;
|
||||||
int interval = 1;
|
int interval = 1;
|
||||||
int latency = 50;
|
int latency = 50;
|
||||||
int cross_channels = 0;
|
int cross_channels = 0;
|
||||||
|
int uses_emphasis = 1;
|
||||||
int do_pre_emphasis = 0;
|
int do_pre_emphasis = 0;
|
||||||
int do_de_emphasis = 0;
|
int do_de_emphasis = 0;
|
||||||
double rx_gain = 1.0;
|
double rx_gain = 1.0;
|
||||||
|
@ -83,12 +84,14 @@ void print_help_common(const char *arg0, const char *ext_usage)
|
||||||
printf(" -x --cross\n");
|
printf(" -x --cross\n");
|
||||||
printf(" Cross channels on sound card. 1st channel (right) is swapped with\n");
|
printf(" Cross channels on sound card. 1st channel (right) is swapped with\n");
|
||||||
printf(" second channel (left)\n");
|
printf(" second channel (left)\n");
|
||||||
|
if (uses_emphasis) {
|
||||||
printf(" -p --pre-emphasis\n");
|
printf(" -p --pre-emphasis\n");
|
||||||
printf(" Enable pre-emphasis, if you directly connect to the oscillator of the\n");
|
printf(" Enable pre-emphasis, if you directly connect to the oscillator of the\n");
|
||||||
printf(" transmitter. (No pre-emphasis done by the transmitter.)\n");
|
printf(" transmitter. (No pre-emphasis done by the transmitter.)\n");
|
||||||
printf(" -d --de-emphasis\n");
|
printf(" -d --de-emphasis\n");
|
||||||
printf(" Enable de-emphasis, if you directly connect to the discriminator of\n");
|
printf(" Enable de-emphasis, if you directly connect to the discriminator of\n");
|
||||||
printf(" the receiver. (No de-emphasis done by the receiver.)\n");
|
printf(" the receiver. (No de-emphasis done by the receiver.)\n");
|
||||||
|
}
|
||||||
printf(" -g --rx-gain <dB>\n");
|
printf(" -g --rx-gain <dB>\n");
|
||||||
printf(" Raise receiver RX level by given gain in dB. This is useful if input\n");
|
printf(" Raise receiver RX level by given gain in dB. This is useful if input\n");
|
||||||
printf(" level of the sound device is too low, even after setting maximum level\n");
|
printf(" level of the sound device is too low, even after setting maximum level\n");
|
||||||
|
@ -234,10 +237,17 @@ void opt_switch_common(int c, char *arg0, int *skip_args)
|
||||||
*skip_args += 1;
|
*skip_args += 1;
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
|
if (!uses_emphasis) {
|
||||||
|
no_emph:
|
||||||
|
fprintf(stderr, "A-Netz does not use emphasis, please do not enable pre- or de-emphasis! Disable emphasis on transceiver, if possible.\n");
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
do_pre_emphasis = 1;
|
do_pre_emphasis = 1;
|
||||||
*skip_args += 1;
|
*skip_args += 1;
|
||||||
break;
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
|
if (!uses_emphasis)
|
||||||
|
goto no_emph;
|
||||||
do_de_emphasis = 1;
|
do_de_emphasis = 1;
|
||||||
*skip_args += 1;
|
*skip_args += 1;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue