aboutsummaryrefslogtreecommitdiffstats
path: root/src/cnetz
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-02-12 08:53:41 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2017-02-18 21:02:54 +0100
commit17b61241224631142ffb5e560ae527b853996bba (patch)
treecaecec714baece6f0f153ad6b144d9e44d3c5554 /src/cnetz
parent58ebc152922055581c3f19c4ddd68c324059dbab (diff)
C-Netz: Remove useless -V option
Diffstat (limited to 'src/cnetz')
-rw-r--r--src/cnetz/dsp.c10
-rw-r--r--src/cnetz/main.c9
2 files changed, 1 insertions, 18 deletions
diff --git a/src/cnetz/dsp.c b/src/cnetz/dsp.c
index 8e7f291..9b453bb 100644
--- a/src/cnetz/dsp.c
+++ b/src/cnetz/dsp.c
@@ -34,8 +34,6 @@
#include "telegramm.h"
#include "dsp.h"
-extern int voice_deviation;
-
/* test function to mirror received audio from ratio back to radio */
//#define TEST_SCRAMBLE
/* test the audio quality after cascading two scramblers (TEST_SCRAMBLE must be defined) */
@@ -721,12 +719,6 @@ again:
/* pre-emphasis is only used when scrambler is off, see FTZ 171 TR 60 Clause 4 */
if (cnetz->pre_emphasis && !cnetz->scrambler)
pre_emphasis(&cnetz->estate, speech_buffer, speech_length);
- /* change level */
- if (voice_deviation != 1) {
- int j;
- for (j = 0; j < speech_length; j++)
- speech_buffer[j] *= (double)voice_deviation;
- }
speech_pos = 0;
}
/* copy speech as long as we have something left in buffer */
@@ -796,7 +788,7 @@ void unshrink_speech(cnetz_t *cnetz, sample_t *speech_buffer, int count)
factor = cnetz->offset_factor;
for (i = 0; i < count; i++) {
/* change level */
- x = speech_buffer[i] / (double)voice_deviation;
+ x = speech_buffer[i];
/* high-pass to remove low level frequencies, caused by level jump between audio chunks */
y = factor * (y_last + x - x_last);
x_last = x;
diff --git a/src/cnetz/main.c b/src/cnetz/main.c
index 31fc878..8eaa414 100644
--- a/src/cnetz/main.c
+++ b/src/cnetz/main.c
@@ -47,7 +47,6 @@ int set_clock_speed = 0;
const char *flip_polarity = "auto";
int ms_power = 0; /* 0..3 */
int auth = 0;
-int voice_deviation = 1;
void print_help(const char *arg0)
{
@@ -76,9 +75,6 @@ void print_help(const char *arg0)
printf(" Enable authentication on the base station. Since we cannot\n");
printf(" authenticate, because we don't know the secret key and the algorithm,\n");
printf(" we just accept any card. With this we get the vendor IDs of the phone.\n");
- printf(" -V --voice-deviation\n");
- printf(" For some unknown reason, Siemens C5 use double deviation for voice.\n");
- printf(" This option raises audio level on TX and lowers on RX.\n");
printf("\nstation-id: Give 7 digit station-id, you don't need to enter it for every\n");
printf(" start of this program.\n");
print_hotkeys_common();
@@ -98,7 +94,6 @@ static int handle_options(int argc, char **argv)
{"flip-polarity", 1, 0, 'F'},
{"ms-power", 1, 0, 'P'},
{"authentication", 0, 0, 'A'},
- {"voice-deviation", 0, 0, 'V'},
{0, 0, 0, 0}
};
@@ -166,10 +161,6 @@ static int handle_options(int argc, char **argv)
auth = 1;
skip_args += 1;
break;
- case 'V':
- voice_deviation = 2;
- skip_args += 1;
- break;
default:
opt_switch_common(c, argv[0], &skip_args);
}