@@ -36,6 +36,7 @@ static const char usage[] =
36
36
" -h show this help\n"
37
37
" -b frames set buffer size (must be specified before the first input)\n"
38
38
" -R ratio set codec maximum buffer ratio (must be specified before the first input)\n"
39
+ " -i force interactive mode\n"
39
40
" -I disable interactive mode\n"
40
41
" -q disable progress display\n"
41
42
" -s silent mode\n"
@@ -145,7 +146,7 @@ static int parse_codec_params(int argc, char *argv[], int *mode, char **path, ch
145
146
* channels = * fs = -1 ;
146
147
* mode = CODEC_MODE_READ ;
147
148
148
- while ((opt = getopt (argc , argv , "+:hb:R:IqsvdDpVSot :e:BLNr:c:n" )) != -1 ) {
149
+ while ((opt = getopt (argc , argv , "+:hb:R:iIqsvdDpVSot :e:BLNr:c:n" )) != -1 ) {
149
150
switch (opt ) {
150
151
case 'h' :
151
152
print_usage ();
@@ -172,6 +173,9 @@ static int parse_codec_params(int argc, char *argv[], int *mode, char **path, ch
172
173
else
173
174
LOG (LL_ERROR , "dsp: warning: buffer ratio must be specified before the first input\n" );
174
175
break ;
176
+ case 'i' :
177
+ interactive = 1 ;
178
+ break ;
175
179
case 'I' :
176
180
interactive = 0 ;
177
181
break ;
@@ -405,10 +409,12 @@ int main(int argc, char *argv[])
405
409
if (LOGLEVEL (LL_NORMAL ))
406
410
print_io_info (out_codec , "output" );
407
411
408
- if (interactive == -1 && out_codec -> interactive )
409
- interactive = 1 ;
410
- else
411
- interactive = 0 ;
412
+ if (interactive == -1 ) {
413
+ if (out_codec -> interactive )
414
+ interactive = 1 ;
415
+ else
416
+ interactive = 0 ;
417
+ }
412
418
413
419
buf1 = calloc (ceil (dsp_globals .buf_frames * in_codecs .head -> channels * get_effects_chain_max_ratio (& chain )), sizeof (sample_t ));
414
420
buf2 = calloc (ceil (dsp_globals .buf_frames * in_codecs .head -> channels * get_effects_chain_max_ratio (& chain )), sizeof (sample_t ));
0 commit comments