mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-19 20:27:26 -05:00
WAV: Add custom tag option for per-call wav files; #352
This commit is contained in:
@@ -636,6 +636,7 @@
|
||||
opts->wav_out_file[0] = 0;
|
||||
opts->wav_out_fileR[0] = 0;
|
||||
opts->wav_out_file_raw[0] = 0;
|
||||
opts->wav_custom_tag[0] = 0;
|
||||
opts->symbol_out_file[0] = 0;
|
||||
opts->lrrp_out_file[0] = 0;
|
||||
opts->event_out_file[0] = 0;
|
||||
@@ -1436,6 +1437,8 @@
|
||||
printf (" -w <file> Output synthesized speech to a single static .wav file. (Do not use with -P Per Call Switch)\n");
|
||||
printf (" -P Enable Per Call WAV file saving. (Do not use with -w filename.wav single wav file switch)\n");
|
||||
printf (" (Per Call works with everything now and doesn't require ncurses terminal!)\n");
|
||||
printf (" -j <string> Custom Tag(s), colon delimted, to append to Per Call decoded .wav files.\n");
|
||||
printf (" -j TGT_LAPD:TAG_FIRE:FREQ_851987500 (Total 3 Tags, Maximum Letter Length = 100)\n");
|
||||
printf (" -a Enable Call Alert Beep\n");
|
||||
printf (" (Warning! Might be annoying.)\n");
|
||||
printf (" -J <file> Specify Filename for Event Log Output.\n");
|
||||
@@ -1776,10 +1779,10 @@
|
||||
if (opts->static_wav_file == 0)
|
||||
{
|
||||
if (opts->wav_out_f != NULL)
|
||||
opts->wav_out_f = close_and_rename_wav_file(opts->wav_out_f, opts->wav_out_file, opts->wav_out_dir, &state->event_history_s[0]);
|
||||
opts->wav_out_f = close_and_rename_wav_file(opts->wav_out_f, opts->wav_out_file, opts->wav_out_dir, opts->wav_custom_tag, &state->event_history_s[0]);
|
||||
|
||||
if (opts->wav_out_fR != NULL)
|
||||
opts->wav_out_fR = close_and_rename_wav_file(opts->wav_out_fR, opts->wav_out_fileR, opts->wav_out_dir, &state->event_history_s[1]);
|
||||
opts->wav_out_fR = close_and_rename_wav_file(opts->wav_out_fR, opts->wav_out_fileR, opts->wav_out_dir, opts->wav_custom_tag, &state->event_history_s[1]);
|
||||
}
|
||||
|
||||
else if (opts->static_wav_file == 1)
|
||||
@@ -1895,7 +1898,7 @@
|
||||
|
||||
exitflag = 0;
|
||||
|
||||
while ((c = getopt (argc, argv, "~yhaepPqs:t:v:z:i:o:d:c:g:n:w:B:C:R:f:m:u:x:A:S:G:D:L:V:U:YK:b:H:X:M:NQ:WrlZTF@:!:01:2:345:6:^:7:8_:9:Ek:I:J:O+:")) != -1)
|
||||
while ((c = getopt (argc, argv, "~yhaepPqs:t:v:z:i:o:d:c:g:n:w:B:C:R:f:m:u:x:A:S:G:D:L:V:U:YK:b:H:X:M:NQ:WrlZTF@:!:01:2:345:6:^:7:8_:9:Ek:I:J:O+:j:")) != -1)
|
||||
{
|
||||
|
||||
switch (c)
|
||||
@@ -1909,7 +1912,7 @@
|
||||
opts.call_alert = 1;
|
||||
break;
|
||||
|
||||
//Free'd up switches include: j, M,
|
||||
|
||||
//NOTE: Don't use -*, found it exhibits unusual behavior, was setting
|
||||
//itself to -3 for some reason, may be reading contents of directory
|
||||
|
||||
@@ -1918,6 +1921,11 @@
|
||||
|
||||
//NOTE: The 'K' option for single BP key has been swapped to 'b'
|
||||
//'K' is now used for hexidecimal key.csv imports
|
||||
|
||||
case 'j': //custom wav tags appended to per-call wav files
|
||||
strncpy(opts.wav_custom_tag, optarg, 99);
|
||||
opts.wav_custom_tag[99] = '\0';
|
||||
break;
|
||||
|
||||
//this is a debug option hidden from users, but use it to replay .bin files on loop
|
||||
case '~':
|
||||
|
||||
Reference in New Issue
Block a user