@@ -67,6 +67,9 @@ int main(int argc, char *argv[]) {
6767 int use_squelch , vq_type ;
6868 float squelch = 0 ;
6969 struct freedv * freedv ;
70+ int use_passthroughgain ;
71+ float passthroughgain = 0.0 ;
72+
7073 char f2020 [80 ] = {0 };
7174#ifdef __LPCNET__
7275 sprintf (f2020 ,"|2020|2020A|2020B" );
@@ -93,27 +96,28 @@ int main(int argc, char *argv[]) {
9396 }
9497
9598 use_testframes = verbose = discard = use_complex = use_dpsk = use_squelch = 0 ; use_reliabletext = 0 ;
96- vq_type = -1 ;
99+ vq_type = -1 ; use_passthroughgain = 0 ;
97100
98101 int o = 0 ;
99102 int opt_idx = 0 ;
100103 while ( o != -1 ){
101104 static struct option long_opts [] = {
102- {"discard" , no_argument , 0 , 'i' },
103- {"dpsk" , no_argument , 0 , 'd' },
104- {"help" , no_argument , 0 , 'h' },
105- {"reliabletext" , no_argument , 0 , 'r' },
106- {"squelch" , required_argument , 0 , 's' },
107- {"txtrx" , required_argument , 0 , 'x' },
108- {"testframes" , no_argument , 0 , 't' },
109- {"usecomplex" , no_argument , 0 , 'c' },
110- {"verbose1" , no_argument , 0 , 'v' },
111- {"vv" , no_argument , 0 , 'w' },
112- {"indopt" , required_argument , 0 , 'n' },
105+ {"discard" , no_argument , 0 , 'i' },
106+ {"dpsk" , no_argument , 0 , 'd' },
107+ {"help" , no_argument , 0 , 'h' },
108+ {"reliabletext" , no_argument , 0 , 'r' },
109+ {"squelch" , required_argument , 0 , 's' },
110+ {"txtrx" , required_argument , 0 , 'x' },
111+ {"testframes" , no_argument , 0 , 't' },
112+ {"usecomplex" , no_argument , 0 , 'c' },
113+ {"verbose1" , no_argument , 0 , 'v' },
114+ {"vv" , no_argument , 0 , 'w' },
115+ {"indopt" , required_argument , 0 , 'n' },
116+ {"passthroughgain" , required_argument , 0 , 'p' },
113117 {0 , 0 , 0 , 0 }
114118 };
115119
116- o = getopt_long (argc ,argv ,"idhr:s:x:tcvwn:" ,long_opts ,& opt_idx );
120+ o = getopt_long (argc ,argv ,"idhr:s:x:tcvwn:p: " ,long_opts ,& opt_idx );
117121
118122 switch (o ) {
119123 case 'i' :
@@ -131,7 +135,11 @@ int main(int argc, char *argv[]) {
131135 else
132136 vq_type = 2 ;
133137 break ;
134- case 'r' :
138+ case 'p' :
139+ use_passthroughgain = 1 ;
140+ passthroughgain = atof (optarg );
141+ break ;
142+ case 'r' :
135143 use_reliabletext = 1 ;
136144 break ;
137145 case 's' :
@@ -216,7 +224,8 @@ int main(int argc, char *argv[]) {
216224 freedv_set_squelch_en (freedv , 1 );
217225 }
218226 freedv_set_dpsk (freedv , use_dpsk );
219-
227+ if (use_passthroughgain ) freedv_passthrough_gain (freedv , passthroughgain );
228+
220229 /* install optional handler for recevied txt characters */
221230 if (ftxt_rx != NULL )
222231 {
0 commit comments