リビジョン | f6976f6393b4a45201961da873fcb70f76a258ad (tree) |
---|---|
日時 | 2019-04-09 04:03:10 |
作者 | Starg <starg@user...> |
コミッター | Starg |
Merge dev41
@@ -273,7 +273,7 @@ int32 SetValue(int32 value, int32 min, int32 max) | ||
273 | 273 | return v; |
274 | 274 | } |
275 | 275 | |
276 | -int w32gSecondTiMidity(int opt, int argc, char **argv); | |
276 | +int w32gSecondTiMidity(int opt, int argc, char **argv, int nfiles, char **files); | |
277 | 277 | int w32gSecondTiMidityExit(void); |
278 | 278 | int SecondMode = 1; |
279 | 279 |
@@ -526,6 +526,7 @@ static int w32g_shuffle_playlist_delete(int n) | ||
526 | 526 | for ( i = 0; i < playlist_shuffle.max; i++ ) { |
527 | 527 | if ( playlist_shuffle.list[i] == n ) { |
528 | 528 | delete_flag = 1; |
529 | + i++; | |
529 | 530 | break; |
530 | 531 | } |
531 | 532 | } |
@@ -949,7 +949,7 @@ int PauseOldTiMidity(void) | ||
949 | 949 | // opt==5 : 2重に起動する |
950 | 950 | // 自分が終了するべきときは FALSE を返す |
951 | 951 | // 自分が終了するべきでないときは TRUE を返す |
952 | -int w32gSecondTiMidity(int opt, int argc, char **argv) | |
952 | +int w32gSecondTiMidity(int opt, int argc, char **argv, int nfiles, char **files) | |
953 | 953 | { |
954 | 954 | int i; |
955 | 955 | switch (opt) { |
@@ -961,7 +961,7 @@ int w32gSecondTiMidity(int opt, int argc, char **argv) | ||
961 | 961 | return FALSE; |
962 | 962 | if (opt==0) |
963 | 963 | ClearPlaylistOldTiMidity(); |
964 | - SendFilesToOldTiMidity(argc > 0 ? argc-1 : 0, argv+1); | |
964 | + SendFilesToOldTiMidity(nfiles, files); | |
965 | 965 | return FALSE; |
966 | 966 | } else { |
967 | 967 | if (TryUniqTiMidity(20)==TRUE) { |
@@ -206,9 +206,6 @@ ControlMode *ctl_list[]={ | ||
206 | 206 | #ifdef IA_W32GUI |
207 | 207 | &w32gui_control_mode, |
208 | 208 | #endif /* IA_W32GUI */ |
209 | -#ifdef IA_W32G_SYN | |
210 | - &winsyn_control_mode, | |
211 | -#endif /* IA_W32GUI */ | |
212 | 209 | #if !defined(__MACOS__) && !defined(IA_W32GUI) && !defined(IA_W32G_SYN) && !defined(IA_WINSYN) && !(defined(__W32__) && defined(CFG_FOR_SF)) |
213 | 210 | &dumb_control_mode, |
214 | 211 | #endif |
@@ -119,8 +119,6 @@ void OverrideSFSettingLoad() | ||
119 | 119 | memcpy(sfini_path, fn, FILEPATH_MAX); |
120 | 120 | |
121 | 121 | #include "loadsndfontini.h" |
122 | - | |
123 | - printf("\n**********************************\nsoundfont.ini load ... ok\n"); | |
124 | 122 | } |
125 | 123 | |
126 | 124 | #endif |
@@ -6259,64 +6259,64 @@ static int parse_opt_h(const char *arg) | ||
6259 | 6259 | fprintf(fp, "%s", h); |
6260 | 6260 | } else |
6261 | 6261 | fputs(h, fp); |
6262 | - fputs(NLS, fp); | |
6263 | - } | |
6264 | - fputs(NLS, fp); | |
6265 | - fputs("Effect options (-EF, --ext=F option):" NLS | |
6266 | -" -EFdelay=d Disable delay effect (default)" NLS | |
6267 | -" -EFdelay=D Enable delay effect" NLS | |
6268 | -" -EFchorus=d Disable MIDI chorus effect control" NLS | |
6269 | -" -EFchorus=n Enable Normal MIDI chorus effect control" NLS | |
6270 | -" [,level] `level' is optional to specify chorus level [0..127]" NLS | |
6271 | -" (default)" NLS | |
6272 | -" -EFchorus=s Surround sound, chorus detuned to a lesser degree" NLS | |
6273 | -" [,level] `level' is optional to specify chorus level [0..127]" NLS | |
6274 | -" -EFreverb=d Disable MIDI reverb effect control" NLS | |
6262 | + fputs("\n", fp); | |
6263 | + } | |
6264 | + fputs("\n", fp); | |
6265 | + fputs("Effect options (-EF, --ext=F option):" "\n" | |
6266 | +" -EFdelay=d Disable delay effect (default)" "\n" | |
6267 | +" -EFdelay=D Enable delay effect" "\n" | |
6268 | +" -EFchorus=d Disable MIDI chorus effect control" "\n" | |
6269 | +" -EFchorus=n Enable Normal MIDI chorus effect control" "\n" | |
6270 | +" [,level] `level' is optional to specify chorus level [0..127]" "\n" | |
6271 | +" (default)" "\n" | |
6272 | +" -EFchorus=s Surround sound, chorus detuned to a lesser degree" "\n" | |
6273 | +" [,level] `level' is optional to specify chorus level [0..127]" "\n" | |
6274 | +" -EFreverb=d Disable MIDI reverb effect control" "\n" | |
6275 | 6275 | #if !defined(REVERB_CONTROL_ALLOW) && !defined(FREEVERB_CONTROL_ALLOW) |
6276 | -" (default)" NLS | |
6276 | +" (default)" "\n" | |
6277 | 6277 | #endif |
6278 | -" -EFreverb=n Enable Normal MIDI reverb effect control" NLS | |
6279 | -" [,level] `level' is optional to specify reverb level [1..127]" NLS | |
6278 | +" -EFreverb=n Enable Normal MIDI reverb effect control" "\n" | |
6279 | +" [,level] `level' is optional to specify reverb level [1..127]" "\n" | |
6280 | 6280 | #if defined(REVERB_CONTROL_ALLOW) |
6281 | -" (default)" NLS | |
6281 | +" (default)" "\n" | |
6282 | 6282 | #endif |
6283 | -" -EFreverb=g Global reverb effect" NLS | |
6284 | -" [,level] `level' is optional to specify reverb level [1..127]" NLS | |
6285 | -" -EFreverb=f Enable Freeverb MIDI reverb effect control" NLS | |
6286 | -" [,level] `level' is optional to specify reverb level [1..127]" NLS | |
6283 | +" -EFreverb=g Global reverb effect" "\n" | |
6284 | +" [,level] `level' is optional to specify reverb level [1..127]" "\n" | |
6285 | +" -EFreverb=f Enable Freeverb MIDI reverb effect control" "\n" | |
6286 | +" [,level] `level' is optional to specify reverb level [1..127]" "\n" | |
6287 | 6287 | #if !defined(REVERB_CONTROL_ALLOW) && defined(FREEVERB_CONTROL_ALLOW) |
6288 | -" (default)" NLS | |
6288 | +" (default)" "\n" | |
6289 | 6289 | #endif |
6290 | -" -EFreverb=G Global Freeverb effect" NLS | |
6291 | -" [,level] `level' is optional to specify reverb level [1..127]" NLS | |
6292 | -" -EFvlpf=d Disable voice LPF" NLS | |
6290 | +" -EFreverb=G Global Freeverb effect" "\n" | |
6291 | +" [,level] `level' is optional to specify reverb level [1..127]" "\n" | |
6292 | +" -EFvlpf=d Disable voice LPF" "\n" | |
6293 | 6293 | #if !defined(VOICE_MOOG_LPF_ALLOW) && !defined(VOICE_CHAMBERLIN_LPF_ALLOW) |
6294 | -" (default)" NLS | |
6294 | +" (default)" "\n" | |
6295 | 6295 | #endif |
6296 | -" -EFvlpf=c Enable Chamberlin resonant LPF (12dB/oct)" NLS | |
6296 | +" -EFvlpf=c Enable Chamberlin resonant LPF (12dB/oct)" "\n" | |
6297 | 6297 | #if defined(VOICE_CHAMBERLIN_LPF_ALLOW) |
6298 | -" (default)" NLS | |
6298 | +" (default)" "\n" | |
6299 | 6299 | #endif |
6300 | -" -EFvlpf=m Enable Moog resonant lowpass VCF (24dB/oct)" NLS | |
6300 | +" -EFvlpf=m Enable Moog resonant lowpass VCF (24dB/oct)" "\n" | |
6301 | 6301 | #if defined(VOICE_MOOG_LPF_ALLOW) && !defined(VOICE_CHAMBERLIN_LPF_ALLOW) |
6302 | -" (default)" NLS | |
6303 | -#endif | |
6304 | -" -EFvlpf=b Enable ButterworthFilter resonant lowpass (butterworth)" NLS | |
6305 | -" -EFvlpf=i Enable Resonant IIR lowpass VCF (12dB/oct)-2" NLS | |
6306 | -" -EFvlpf=a Enable amSynth resonant lowpass VCF (24dB/oct)-2" NLS | |
6307 | -" -EFvlpf=o Enable 1 pole 6db/oct resonant lowpass VCF (6dB/oct)" NLS | |
6308 | -" -EFvlpf=e Enable resonant 3 pole lowpass VCF (18dB/oct)" NLS | |
6309 | -" -EFvlpf=t Enable two first order lowpass VCF " NLS | |
6310 | -" -EFvlpf=h Enable HPF ButterworthFilter VCF (butterworth)" NLS | |
6311 | -" -EFvlpf=B Enable BPF ButterworthFilter VCF (butterworth)" NLS | |
6312 | -" -EFns=n Enable the n'th degree (type) noise shaping filter" NLS | |
6313 | -" n:[0..4] (for 8-bit linear encoding, default is 4)" NLS | |
6314 | -" n:[0..4] (for 16-bit linear encoding, default is 4)" NLS | |
6315 | -" n:[0] (for 24-bit linear encoding, default is 0)" NLS | |
6316 | -" n:[0] (for 32-bit linear encoding, default is 0)" NLS | |
6317 | -" n:[0] (for 64-bit linear encoding, default is 0)" NLS | |
6318 | -" n:[0] (for float 32-bit linear encoding, default is 0)" NLS | |
6319 | -" n:[0] (for float 64-bit linear encoding, default is 0)" NLS, fp); | |
6302 | +" (default)" "\n" | |
6303 | +#endif | |
6304 | +" -EFvlpf=b Enable ButterworthFilter resonant lowpass (butterworth)" "\n" | |
6305 | +" -EFvlpf=i Enable Resonant IIR lowpass VCF (12dB/oct)-2" "\n" | |
6306 | +" -EFvlpf=a Enable amSynth resonant lowpass VCF (24dB/oct)-2" "\n" | |
6307 | +" -EFvlpf=o Enable 1 pole 6db/oct resonant lowpass VCF (6dB/oct)" "\n" | |
6308 | +" -EFvlpf=e Enable resonant 3 pole lowpass VCF (18dB/oct)" "\n" | |
6309 | +" -EFvlpf=t Enable two first order lowpass VCF " "\n" | |
6310 | +" -EFvlpf=h Enable HPF ButterworthFilter VCF (butterworth)" "\n" | |
6311 | +" -EFvlpf=B Enable BPF ButterworthFilter VCF (butterworth)" "\n" | |
6312 | +" -EFns=n Enable the n'th degree (type) noise shaping filter" "\n" | |
6313 | +" n:[0..4] (for 8-bit linear encoding, default is 4)" "\n" | |
6314 | +" n:[0..4] (for 16-bit linear encoding, default is 4)" "\n" | |
6315 | +" n:[0] (for 24-bit linear encoding, default is 0)" "\n" | |
6316 | +" n:[0] (for 32-bit linear encoding, default is 0)" "\n" | |
6317 | +" n:[0] (for 64-bit linear encoding, default is 0)" "\n" | |
6318 | +" n:[0] (for float 32-bit linear encoding, default is 0)" "\n" | |
6319 | +" n:[0] (for float 64-bit linear encoding, default is 0)" "\n", fp); | |
6320 | 6320 | #ifndef FIXED_RESAMPLATION |
6321 | 6321 | #ifdef HAVE_STRINGIZE |
6322 | 6322 | #define tim_str_internal(x) #x |
@@ -6327,147 +6327,147 @@ static int parse_opt_h(const char *arg) | ||
6327 | 6327 | fputs(" -EFresamp=d Disable resamplation", fp); |
6328 | 6328 | if (! strcmp(tim_str(DEFAULT_RESAMPLATION), "resample_none")) |
6329 | 6329 | fputs(" (default)", fp); |
6330 | - fputs(NLS, fp); | |
6330 | + fputs("\n", fp); | |
6331 | 6331 | fputs(" -EFresamp=l Enable Linear resample algorithm", fp); |
6332 | 6332 | if (! strcmp(tim_str(DEFAULT_RESAMPLATION), "resample_linear")) |
6333 | 6333 | fputs(" (default)", fp); |
6334 | - fputs(NLS, fp); | |
6334 | + fputs("\n", fp); | |
6335 | 6335 | fputs(" -EFresamp=c Enable C-spline resample algorithm", fp); |
6336 | 6336 | if (! strcmp(tim_str(DEFAULT_RESAMPLATION), "resample_cspline")) |
6337 | 6337 | fputs(" (default)", fp); |
6338 | - fputs(NLS, fp); | |
6338 | + fputs("\n", fp); | |
6339 | 6339 | fputs(" -EFresamp=L Enable Lagrange resample algorithm", fp); |
6340 | 6340 | if (! strcmp(tim_str(DEFAULT_RESAMPLATION), "resample_lagrange")) |
6341 | 6341 | fputs(" (default)", fp); |
6342 | - fputs(NLS, fp); | |
6342 | + fputs("\n", fp); | |
6343 | 6343 | fputs(" -EFresamp=n Enable Newton resample algorithm", fp); |
6344 | 6344 | if (! strcmp(tim_str(DEFAULT_RESAMPLATION), "resample_newton")) |
6345 | 6345 | fputs(" (default)", fp); |
6346 | - fputs(NLS, fp); | |
6346 | + fputs("\n", fp); | |
6347 | 6347 | fputs(" -EFresamp=g Enable Gauss-like resample algorithm", fp); |
6348 | 6348 | if (! strcmp(tim_str(DEFAULT_RESAMPLATION), "resample_gauss")) |
6349 | 6349 | fputs(" (default)", fp); |
6350 | 6350 | ///r |
6351 | - fputs(NLS, fp); | |
6351 | + fputs("\n", fp); | |
6352 | 6352 | fputs(" -EFresamp=s Enable Sharp resample algorithm", fp); |
6353 | 6353 | if (! strcmp(tim_str(DEFAULT_RESAMPLATION), "resample_sharp")) |
6354 | 6354 | fputs(" (default)", fp); |
6355 | - fputs(NLS, fp); | |
6355 | + fputs("\n", fp); | |
6356 | 6356 | fputs(" -EFresamp=p Enable LinearP resample algorithm", fp); |
6357 | 6357 | if (! strcmp(tim_str(DEFAULT_RESAMPLATION), "resample_linear_p")) |
6358 | 6358 | fputs(" (default)", fp); |
6359 | - fputs(NLS | |
6360 | -" -EFresamp affects the behavior of -N option" NLS, fp); | |
6361 | -#endif | |
6362 | - fputs(NLS, fp); | |
6363 | - fputs("Alternative TiMidity sequencer extensional mode long options:" NLS | |
6364 | -" --[no-]mod-wheel" NLS | |
6365 | -" --[no-]portamento" NLS | |
6366 | -" --[no-]vibrato" NLS | |
6367 | -" --[no-]ch-pressure" NLS | |
6368 | -" --[no-]mod-envelope" NLS | |
6369 | -" --[no-]trace-text-meta" NLS | |
6370 | -" --[no-]overlap-voice" NLS | |
6359 | + fputs("\n" | |
6360 | +" -EFresamp affects the behavior of -N option" "\n", fp); | |
6361 | +#endif | |
6362 | + fputs("\n", fp); | |
6363 | + fputs("Alternative TiMidity sequencer extensional mode long options:" "\n" | |
6364 | +" --[no-]mod-wheel" "\n" | |
6365 | +" --[no-]portamento" "\n" | |
6366 | +" --[no-]vibrato" "\n" | |
6367 | +" --[no-]ch-pressure" "\n" | |
6368 | +" --[no-]mod-envelope" "\n" | |
6369 | +" --[no-]trace-text-meta" "\n" | |
6370 | +" --[no-]overlap-voice" "\n" | |
6371 | 6371 | ///r |
6372 | -" --overlap-voice-count=n" NLS | |
6373 | -" --[no-]temper-control" NLS | |
6374 | -" --default-mid=<HH>" NLS | |
6375 | -" --system-mid=<HH>" NLS | |
6376 | -" --default-bank=n" NLS | |
6377 | -" --force-bank=n" NLS | |
6378 | -" --default-program=n/m" NLS | |
6379 | -" --force-program=n/m" NLS | |
6380 | -" --delay=(d|D)" NLS | |
6381 | -" --chorus=(d|n|s|w|W|b|B|t|T|h|H|e|E)[,level]" NLS | |
6382 | -" --reverb=(d|n|g|f|G)[,level]" NLS | |
6383 | -" --reverb=(f|G)[,level[,scaleroom[,offsetroom[,predelay]]]]" NLS | |
6384 | -" --voice-lpf=(d|c|m|b|i|a|o|e|t|h|B)" NLS | |
6385 | -" --noise-shaping=n" NLS, fp); | |
6372 | +" --overlap-voice-count=n" "\n" | |
6373 | +" --[no-]temper-control" "\n" | |
6374 | +" --default-mid=<HH>" "\n" | |
6375 | +" --system-mid=<HH>" "\n" | |
6376 | +" --default-bank=n" "\n" | |
6377 | +" --force-bank=n" "\n" | |
6378 | +" --default-program=n/m" "\n" | |
6379 | +" --force-program=n/m" "\n" | |
6380 | +" --delay=(d|D)" "\n" | |
6381 | +" --chorus=(d|n|s|w|W|b|B|t|T|h|H|e|E)[,level]" "\n" | |
6382 | +" --reverb=(d|n|g|f|G)[,level]" "\n" | |
6383 | +" --reverb=(f|G)[,level[,scaleroom[,offsetroom[,predelay]]]]" "\n" | |
6384 | +" --voice-lpf=(d|c|m|b|i|a|o|e|t|h|B)" "\n" | |
6385 | +" --noise-shaping=n" "\n", fp); | |
6386 | 6386 | #ifndef FIXED_RESAMPLATION |
6387 | - fputs(" --resample=(d|l|c|L|n|g|s|p)" NLS, fp); | |
6387 | + fputs(" --resample=(d|l|c|L|n|g|s|p)" "\n", fp); | |
6388 | 6388 | #endif |
6389 | - fputs(NLS, fp); | |
6390 | - fputs("Available interfaces (-i, --interface option):" NLS, fp); | |
6389 | + fputs("\n", fp); | |
6390 | + fputs("Available interfaces (-i, --interface option):" "\n", fp); | |
6391 | 6391 | for (cmpp = ctl_list; (cmp = *cmpp) != NULL; cmpp++) |
6392 | - fprintf(fp, " -i%c %s" NLS, | |
6392 | + fprintf(fp, " -i%c %s" "\n", | |
6393 | 6393 | cmp->id_character, cmp->id_name); |
6394 | 6394 | #ifdef IA_DYNAMIC |
6395 | - fprintf(fp, "Supported dynamic load interfaces (%s):" NLS, | |
6395 | + fprintf(fp, "Supported dynamic load interfaces (%s):" "\n", | |
6396 | 6396 | dynamic_lib_root); |
6397 | 6397 | memset(mark, 0, sizeof(mark)); |
6398 | 6398 | for (cmpp = ctl_list; (cmp = *cmpp) != NULL; cmpp++) |
6399 | 6399 | mark[(int) cmp->id_character] = 1; |
6400 | 6400 | list_dyna_interface(fp, dynamic_lib_root, mark); |
6401 | 6401 | #endif /* IA_DYNAMIC */ |
6402 | - fputs(NLS, fp); | |
6403 | - fputs("Interface options (append to -i? option):" NLS | |
6404 | -" `v' more verbose (cumulative)" NLS | |
6405 | -" `q' quieter (cumulative)" NLS | |
6406 | -" `t' trace playing" NLS | |
6407 | -" `l' loop playing (some interface ignore this option)" NLS | |
6408 | -" `r' randomize file list arguments before playing" NLS | |
6409 | -" `s' sorting file list arguments before playing" NLS, fp); | |
6402 | + fputs("\n", fp); | |
6403 | + fputs("Interface options (append to -i? option):" "\n" | |
6404 | +" `v' more verbose (cumulative)" "\n" | |
6405 | +" `q' quieter (cumulative)" "\n" | |
6406 | +" `t' trace playing" "\n" | |
6407 | +" `l' loop playing (some interface ignore this option)" "\n" | |
6408 | +" `r' randomize file list arguments before playing" "\n" | |
6409 | +" `s' sorting file list arguments before playing" "\n", fp); | |
6410 | 6410 | #ifdef IA_ALSASEQ |
6411 | 6411 | fputs(" `D' daemonize TiMidity++ in background " |
6412 | - "(for alsaseq only)" NLS, fp); | |
6413 | -#endif | |
6414 | - fputs(NLS, fp); | |
6415 | - fputs("Alternative interface long options:" NLS | |
6416 | -" --verbose=n" NLS | |
6417 | -" --quiet=n" NLS | |
6418 | -" --[no-]trace" NLS | |
6419 | -" --[no-]loop" NLS | |
6420 | -" --[no-]random" NLS | |
6421 | -" --[no-]sort" NLS, fp); | |
6412 | + "(for alsaseq only)" "\n", fp); | |
6413 | +#endif | |
6414 | + fputs("\n", fp); | |
6415 | + fputs("Alternative interface long options:" "\n" | |
6416 | +" --verbose=n" "\n" | |
6417 | +" --quiet=n" "\n" | |
6418 | +" --[no-]trace" "\n" | |
6419 | +" --[no-]loop" "\n" | |
6420 | +" --[no-]random" "\n" | |
6421 | +" --[no-]sort" "\n", fp); | |
6422 | 6422 | #ifdef IA_ALSASEQ |
6423 | - fputs(" --[no-]background" NLS, fp); | |
6423 | + fputs(" --[no-]background" "\n", fp); | |
6424 | 6424 | #endif |
6425 | - fputs(NLS, fp); | |
6426 | - fputs("Available output modes (-O, --output-mode option):" NLS, fp); | |
6425 | + fputs("\n", fp); | |
6426 | + fputs("Available output modes (-O, --output-mode option):" "\n", fp); | |
6427 | 6427 | for (pmpp = play_mode_list; (pmp = *pmpp) != NULL; pmpp++) |
6428 | - fprintf(fp, " -O%c %s" NLS, | |
6428 | + fprintf(fp, " -O%c %s" "\n", | |
6429 | 6429 | pmp->id_character, pmp->id_name); |
6430 | - fputs(NLS, fp); | |
6431 | - fputs("Output format options (append to -O? option):" NLS | |
6432 | -" `S' stereo" NLS | |
6433 | -" `M' monophonic" NLS | |
6434 | -" `s' signed output" NLS | |
6435 | -" `u' unsigned output" NLS | |
6436 | -" `1' 16-bit sample width" NLS | |
6437 | -" `2' 24-bit sample width" NLS | |
6438 | -" `3' 32-bit sample width" NLS | |
6439 | -" `6' 64-bit sample width" NLS | |
6440 | -" `8' 8-bit sample width" NLS | |
6441 | -" `f' float 32-bit sample width" NLS | |
6442 | -" `D' float 64-bit sample width" NLS | |
6443 | -" `l' linear encoding" NLS | |
6444 | -" `U' U-Law encoding" NLS | |
6445 | -" `A' A-Law encoding" NLS | |
6446 | -" `x' byte-swapped output" NLS, fp); | |
6447 | - fputs(NLS, fp); | |
6448 | - fputs("Alternative output format long options:" NLS | |
6449 | -" --output-stereo" NLS | |
6450 | -" --output-mono" NLS | |
6451 | -" --output-signed" NLS | |
6452 | -" --output-unsigned" NLS | |
6453 | -" --output-16bit" NLS | |
6454 | -" --output-24bit" NLS | |
6455 | -" --output-32bit" NLS | |
6456 | -" --output-64bit" NLS | |
6457 | -" --output-8bit" NLS | |
6458 | -" --output-f32bit" NLS | |
6459 | -" --output-float32bit" NLS | |
6460 | -" --output-f64bit" NLS | |
6461 | -" --output-float64bit" NLS | |
6462 | -" --output-linear" NLS | |
6463 | -" --output-ulaw" NLS | |
6464 | -" --output-alaw" NLS | |
6465 | -" --[no-]output-swab" NLS, fp); | |
6466 | - fputs(NLS, fp); | |
6467 | - fputs("Available WRD interfaces (-W, --wrd option):" NLS, fp); | |
6430 | + fputs("\n", fp); | |
6431 | + fputs("Output format options (append to -O? option):" "\n" | |
6432 | +" `S' stereo" "\n" | |
6433 | +" `M' monophonic" "\n" | |
6434 | +" `s' signed output" "\n" | |
6435 | +" `u' unsigned output" "\n" | |
6436 | +" `1' 16-bit sample width" "\n" | |
6437 | +" `2' 24-bit sample width" "\n" | |
6438 | +" `3' 32-bit sample width" "\n" | |
6439 | +" `6' 64-bit sample width" "\n" | |
6440 | +" `8' 8-bit sample width" "\n" | |
6441 | +" `f' float 32-bit sample width" "\n" | |
6442 | +" `D' float 64-bit sample width" "\n" | |
6443 | +" `l' linear encoding" "\n" | |
6444 | +" `U' U-Law encoding" "\n" | |
6445 | +" `A' A-Law encoding" "\n" | |
6446 | +" `x' byte-swapped output" "\n", fp); | |
6447 | + fputs("\n", fp); | |
6448 | + fputs("Alternative output format long options:" "\n" | |
6449 | +" --output-stereo" "\n" | |
6450 | +" --output-mono" "\n" | |
6451 | +" --output-signed" "\n" | |
6452 | +" --output-unsigned" "\n" | |
6453 | +" --output-16bit" "\n" | |
6454 | +" --output-24bit" "\n" | |
6455 | +" --output-32bit" "\n" | |
6456 | +" --output-64bit" "\n" | |
6457 | +" --output-8bit" "\n" | |
6458 | +" --output-f32bit" "\n" | |
6459 | +" --output-float32bit" "\n" | |
6460 | +" --output-f64bit" "\n" | |
6461 | +" --output-float64bit" "\n" | |
6462 | +" --output-linear" "\n" | |
6463 | +" --output-ulaw" "\n" | |
6464 | +" --output-alaw" "\n" | |
6465 | +" --[no-]output-swab" "\n", fp); | |
6466 | + fputs("\n", fp); | |
6467 | + fputs("Available WRD interfaces (-W, --wrd option):" "\n", fp); | |
6468 | 6468 | for (wlpp = wrdt_list; (wlp = *wlpp) != NULL; wlpp++) |
6469 | - fprintf(fp, " -W%c %s" NLS, wlp->id, wlp->name); | |
6470 | - fputs(NLS, fp); | |
6469 | + fprintf(fp, " -W%c %s" "\n", wlp->id, wlp->name); | |
6470 | + fputs("\n", fp); | |
6471 | 6471 | close_pager(fp); |
6472 | 6472 | exit(EXIT_SUCCESS); |
6473 | 6473 | return 0; // dummy call |
@@ -8363,8 +8363,9 @@ MAIN_INTERFACE int timidity_pre_load_configuration(void) | ||
8363 | 8363 | #ifdef __W32__ |
8364 | 8364 | /* Windows */ |
8365 | 8365 | char *strp; |
8366 | - struct timidity_file *check; | |
8367 | - char local[1024]; | |
8366 | + struct timidity_file *tf; | |
8367 | + char local[FILEPATH_MAX] = { 0 }; | |
8368 | + const char cfgname[] = CONFIG_FILE_NAME_P; | |
8368 | 8369 | |
8369 | 8370 | #if defined(IA_W32GUI) || defined(IA_W32G_SYN) |
8370 | 8371 | extern char *ConfigFile; |
@@ -8376,14 +8377,14 @@ MAIN_INTERFACE int timidity_pre_load_configuration(void) | ||
8376 | 8377 | safe_free(s); |
8377 | 8378 | strcat(ConfigFile, "\\TIMIDITY.CFG"); |
8378 | 8379 | } |
8379 | - strncpy(local, ConfigFile, sizeof(local) - 1); | |
8380 | - if((check = open_file(local, 0, OF_NORMAL))) | |
8380 | + strlcpy(local, ConfigFile, sizeof(local) - 1); | |
8381 | + if ((tf = open_file(local, 1, OF_NORMAL))) | |
8381 | 8382 | { |
8382 | - close_file(check); | |
8383 | - if(!read_config_file(local, 0, 0)) { | |
8384 | - got_a_configuration = 1; | |
8385 | - return 0; | |
8386 | - } | |
8383 | + close_file(tf); | |
8384 | + if (!read_config_file(local, 0, 0)) { | |
8385 | + got_a_configuration = 1; | |
8386 | + return 0; | |
8387 | + } | |
8387 | 8388 | } |
8388 | 8389 | #endif |
8389 | 8390 |
@@ -8402,9 +8403,9 @@ MAIN_INTERFACE int timidity_pre_load_configuration(void) | ||
8402 | 8403 | { |
8403 | 8404 | *(++strp)='\0'; |
8404 | 8405 | strncat(local,"TIMIDITY.CFG",sizeof(local)-strlen(local)-1); |
8405 | - if((check = open_file(local, 0, OF_NORMAL))) | |
8406 | + if((tf = open_file(local, 1, OF_NORMAL))) | |
8406 | 8407 | { |
8407 | - close_file(check); | |
8408 | + close_file(tf); | |
8408 | 8409 | if(!read_config_file(local, 0, 0)) { |
8409 | 8410 | got_a_configuration = 1; |
8410 | 8411 | return 0; |
@@ -8417,9 +8418,9 @@ MAIN_INTERFACE int timidity_pre_load_configuration(void) | ||
8417 | 8418 | */ |
8418 | 8419 | GetWindowsDirectory(local, 1023 - 13); |
8419 | 8420 | strcat(local, "\\TIMIDITY.CFG"); |
8420 | - if((check = open(local, 0)) >= 0) | |
8421 | + if((tf = open_file(local, 1, OF_NORMAL))) | |
8421 | 8422 | { |
8422 | - close(check); | |
8423 | + close_file(tf); | |
8423 | 8424 | if(!read_config_file(local, 0, 0)) { |
8424 | 8425 | got_a_configuration = 1; |
8425 | 8426 | return 0; |
@@ -8918,7 +8919,7 @@ MAIN_INTERFACE int timidity_play_main(int nfiles, char **files) | ||
8918 | 8919 | } |
8919 | 8920 | |
8920 | 8921 | #ifdef IA_W32GUI |
8921 | -int w32gSecondTiMidity(int opt, int argc, char **argv); | |
8922 | +int w32gSecondTiMidity(int opt, int argc, char **argv, int nfiles, char **files); | |
8922 | 8923 | int w32gSecondTiMidityExit(void); |
8923 | 8924 | int w32gLoadDefaultPlaylist(void); |
8924 | 8925 | int w32gSaveDefaultPlaylist(void); |
@@ -9087,19 +9088,6 @@ int main(int argc, char **argv) | ||
9087 | 9088 | if (CoInitialize(NULL) == S_OK) |
9088 | 9089 | CoInitializeOK = 1; |
9089 | 9090 | w32g_initialize(); |
9090 | -#ifdef IA_W32GUI | |
9091 | - /* Secondary TiMidity Execute */ | |
9092 | - /* FirstLoadIniFile(); */ | |
9093 | - if (w32gSecondTiMidity(SecondMode, argc, argv) == FALSE) { | |
9094 | - w32gSecondTiMidityExit(); | |
9095 | - if (CoInitializeOK) | |
9096 | - CoUninitialize(); | |
9097 | - w32g_free_playlist(); | |
9098 | - w32g_uninitialize(); | |
9099 | - w32g_free_doc(); | |
9100 | - return 0; | |
9101 | - } | |
9102 | -#endif | |
9103 | 9091 | for (c = 1; c < argc; c++) |
9104 | 9092 | if (is_directory(argv[c])) { |
9105 | 9093 | char *p; |
@@ -9175,6 +9163,21 @@ int main(int argc, char **argv) | ||
9175 | 9163 | return 1; /* problems with command line */ |
9176 | 9164 | #endif |
9177 | 9165 | } |
9166 | + nfiles = argc - optind; | |
9167 | + files = argv + optind; | |
9168 | +#ifdef IA_W32GUI | |
9169 | + /* Secondary TiMidity Execute */ | |
9170 | + /* FirstLoadIniFile(); */ | |
9171 | + if (w32gSecondTiMidity(SecondMode, argc, argv, nfiles, files) == FALSE) { | |
9172 | + w32gSecondTiMidityExit(); | |
9173 | + if (CoInitializeOK) | |
9174 | + CoUninitialize(); | |
9175 | + w32g_free_playlist(); | |
9176 | + w32g_uninitialize(); | |
9177 | + w32g_free_doc(); | |
9178 | + return 0; | |
9179 | + } | |
9180 | +#endif | |
9178 | 9181 | timidity_init_player(); |
9179 | 9182 | ///r |
9180 | 9183 | load_all_instrument(); |
@@ -9185,8 +9188,6 @@ int main(int argc, char **argv) | ||
9185 | 9188 | #endif |
9186 | 9189 | begin_compute_thread(); |
9187 | 9190 | #endif |
9188 | - nfiles = argc - optind; | |
9189 | - files = argv + optind; | |
9190 | 9191 | if (nfiles > 0 |
9191 | 9192 | && ctl->id_character != 'r' && ctl->id_character != 'A' |
9192 | 9193 | && ctl->id_character != 'W' && ctl->id_character != 'N' |