Fix Some Absolute Directory Path Issues(WIP); #261

This commit is contained in:
lwvmobile
2024-05-19 16:32:27 -04:00
parent 2c55a9caab
commit 5d3b2ec56f
2 changed files with 13 additions and 13 deletions

View File

@@ -718,8 +718,8 @@ void ncursesMenu (dsd_opts * opts, dsd_state * state)
}
opts->dmr_stereo_wav = 1;
//catch all in case of no file name set, won't crash or something
sprintf (opts->wav_out_file, "./%s/DSD-FME-X1.wav", opts->wav_out_dir); //
sprintf (opts->wav_out_fileR, "./%s/DSD-FME-X2.wav", opts->wav_out_dir); //
sprintf (opts->wav_out_file, "%s/DSD-FME-X1.wav", opts->wav_out_dir); //
sprintf (opts->wav_out_fileR, "%s/DSD-FME-X2.wav", opts->wav_out_dir); //
openWavOutFileL (opts, state);
openWavOutFileR (opts, state);
@@ -2150,7 +2150,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
{
//close old first, assign name based on time and radio, open wav file
closeWavOutFileL (opts, state);
sprintf (opts->wav_out_file, "./%s/%s %s NXDN - RAN %d - TGT %d - SRC %d.wav", opts->wav_out_dir, datestr, timestr, rn, tgn, src);
sprintf (opts->wav_out_file, "%s/%s %s NXDN - RAN %d - TGT %d - SRC %d.wav", opts->wav_out_dir, datestr, timestr, rn, tgn, src);
openWavOutFileL (opts, state); //testing for now, will want to move to per call later
}
@@ -2195,7 +2195,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
{
//close old first, assign name based on time and radio, open wav file
closeWavOutFileL (opts, state);
sprintf (opts->wav_out_file, "./%s/%s %s MS - CC %d - TG %d - RD %d.wav", opts->wav_out_dir, datestr, timestr, dcc, tg, rd);
sprintf (opts->wav_out_file, "%s/%s %s MS - CC %d - TG %d - RD %d.wav", opts->wav_out_dir, datestr, timestr, dcc, tg, rd);
openWavOutFileL (opts, state); //testing for now, will want to move to per call later
}
@@ -2238,7 +2238,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
//close old first, assign name based on time and radio, open wav file
closeWavOutFileL (opts, state);
sprintf (opts->wav_out_file, "./%s/%s %s CC %d - TG %d - RD %d.wav", opts->wav_out_dir, datestr, timestr, dcc, tg, rd);
sprintf (opts->wav_out_file, "%s/%s %s CC %d - TG %d - RD %d.wav", opts->wav_out_dir, datestr, timestr, dcc, tg, rd);
openWavOutFileL (opts, state); //testing for now, will want to move to per call later
}
@@ -2280,7 +2280,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
{
//close old first, assign name based on time and radio, open wav file
closeWavOutFileR (opts, state);
sprintf (opts->wav_out_fileR, "./%s/%s %s CC %d - TG %d - RD %d.wav", opts->wav_out_dir, datestr, timestr, dcc, tgR, rdR);
sprintf (opts->wav_out_fileR, "%s/%s %s CC %d - TG %d - RD %d.wav", opts->wav_out_dir, datestr, timestr, dcc, tgR, rdR);
openWavOutFileR (opts, state); //testing for now, will want to move to per call later
}
@@ -2321,7 +2321,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
{
//close old first, assign name based on time and radio, open wav file
closeWavOutFileL (opts, state);
sprintf (opts->wav_out_file, "./%s/%s %s P1 - NAC %X - TGT %d - SRC %d.wav", opts->wav_out_dir, datestr, timestr, nc, tg, rd);
sprintf (opts->wav_out_file, "%s/%s %s P1 - NAC %X - TGT %d - SRC %d.wav", opts->wav_out_dir, datestr, timestr, nc, tg, rd);
openWavOutFileL (opts, state); //testing for now, will want to move to per call later
}
@@ -4344,7 +4344,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
if (c == 80) //'P' key - start per call wav files
{
char wav_file_directory[1024];
sprintf (wav_file_directory, "./%s", opts->wav_out_dir);
sprintf (wav_file_directory, "%s", opts->wav_out_dir);
wav_file_directory[1023] = '\0';
if (stat(wav_file_directory, &st_wav) == -1)
{
@@ -4354,8 +4354,8 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
}
opts->dmr_stereo_wav = 1;
//catch all in case of no file name set, won't crash or something
sprintf (opts->wav_out_file, "./%s/DSD-FME-T1.wav", opts->wav_out_dir);
sprintf (opts->wav_out_fileR, "./%s/DSD-FME-T2.wav", opts->wav_out_dir);
sprintf (opts->wav_out_file, "%s/DSD-FME-T1.wav", opts->wav_out_dir);
sprintf (opts->wav_out_fileR, "%s/DSD-FME-T2.wav", opts->wav_out_dir);
openWavOutFileL (opts, state);
openWavOutFileR (opts, state);
}