/*
TiMidity++ -- MIDI to WAVE converter and player
- Copyright (C) 1999-2007 Masanao Izumo <iz@onicos.co.jp>
+ Copyright (C) 1999-2008 Masanao Izumo <iz@onicos.co.jp>
Copyright (C) 1995 Tuukka Toivonen <tt@cgs.fi>
This program is free software; you can redistribute it and/or modify
TIM_OPT_POLY_REDUCE,
TIM_OPT_MUTE,
TIM_OPT_TEMPER_MUTE,
+ TIM_OPT_PRESERVE_SILENCE,
TIM_OPT_AUDIO_BUFFER,
TIM_OPT_CACHE_SIZE,
TIM_OPT_SAMPLE_FREQ,
TIM_OPT_FREQ_TABLE,
TIM_OPT_PURE_INT,
TIM_OPT_MODULE,
- TIM_OPT_PRESERVE_SILENCE,
/* last entry */
TIM_OPT_LAST = TIM_OPT_PURE_INT
};
{ "polyphony-reduction", optional_argument, NULL, TIM_OPT_POLY_REDUCE },
{ "mute", required_argument, NULL, TIM_OPT_MUTE },
{ "temper-mute", required_argument, NULL, TIM_OPT_TEMPER_MUTE },
+ { "preserve-silence", no_argument, NULL, TIM_OPT_PRESERVE_SILENCE },
{ "audio-buffer", required_argument, NULL, TIM_OPT_AUDIO_BUFFER },
{ "cache-size", required_argument, NULL, TIM_OPT_CACHE_SIZE },
{ "sampling-freq", required_argument, NULL, TIM_OPT_SAMPLE_FREQ },
{ "freq-table", required_argument, NULL, TIM_OPT_FREQ_TABLE },
{ "pure-intonation", optional_argument, NULL, TIM_OPT_PURE_INT },
{ "module", required_argument, NULL, TIM_OPT_MODULE },
- { "preserve-silence", no_argument, NULL, TIM_OPT_PRESERVE_SILENCE },
{ NULL, no_argument, NULL, '\0' }
};
#define INTERACTIVE_INTERFACE_IDS "kmqagrwAWNP"
static inline int parse_opt_p1(const char *);
static inline int parse_opt_Q(const char *);
static inline int parse_opt_Q1(const char *);
+static inline int parse_opt_preserve_silence(const char *);
static inline int parse_opt_q(const char *);
static inline int parse_opt_R(const char *);
static inline int parse_opt_S(const char *);
static inline void expand_escape_string(char *);
static inline int parse_opt_Z(char *);
static inline int parse_opt_Z1(const char *);
-static inline int parse_opt_preserve_silence(const char *);
static inline int parse_opt_default_module(const char *);
__attribute__((noreturn))
static inline int parse_opt_fail(const char *);
static BOOL WINAPI handler(DWORD dw)
{
#if defined(IA_WINSYN) || defined(IA_PORTMIDISYN)
- if( ctl->id_character == 'W'
- || ctl->id_character == 'P' )
- {
- rtsyn_midiports_close();
- }
+ if (ctl->id_character == 'W' || ctl->id_character == 'P')
+ rtsyn_midiports_close();
#endif
-
-
-//#if defined(IA_NPSYN)
-// if( ctl->id_character == 'N')
-// {
-// return FALSE; //why FALSE need? It must close by intr++;
-// }
-//#endif
- printf ("***BREAK" NLS); fflush(stdout);
- intr++;
- return TRUE;
+#if 0
+#if defined(IA_NPSYN)
+ if (ctl->id_character == 'N')
+ return FALSE; /* why FALSE need? It must close by intr++; */
+#endif
+#endif
+ printf ("***BREAK" NLS);
+ fflush(stdout);
+ intr++;
+ return TRUE;
}
#endif
-
int effect_lr_mode = -1;
/* 0: left delay
* 1: right delay
}
return 0;
}
+
MAIN_INTERFACE int set_tim_opt_short_cfg(int c, char *optarg)
{
int err = 0;
return parse_opt_Q(arg);
case TIM_OPT_TEMPER_MUTE:
return parse_opt_Q1(arg);
+ case TIM_OPT_PRESERVE_SILENCE:
+ return parse_opt_preserve_silence(arg);
case TIM_OPT_AUDIO_BUFFER:
return parse_opt_q(arg);
case TIM_OPT_CACHE_SIZE:
return parse_opt_Z1(arg);
case TIM_OPT_MODULE:
return parse_opt_default_module(arg);
- case TIM_OPT_PRESERVE_SILENCE:
- return parse_opt_preserve_silence(arg);
default:
ctl->cmsg(CMSG_FATAL, VERB_NORMAL,
"[BUG] Inconceivable case branch %d", c);
abort();
}
}
+
MAIN_INTERFACE int set_tim_opt_long_cfg(int c, char *optarg, int index)
{
const struct option *the_option = &(longopts[index]);
static inline int parse_opt_c(char *arg)
{
#ifdef __W32__
- if(got_a_configuration == 1) return 0;
+ if (got_a_configuration == 1)
+ return 0;
#endif
if (read_config_file(arg, 0))
return 1;
" Number of frames per Ogg packet n:[0-10]",
#endif
" -o file --output-file=file",
-" Output to another file (or device No./server) (Use \"-\" for stdout)",
-" \"-o -1\" shows available device No. list."
+" Output to another file (or device/server) (Use \"-\" for stdout)",
+#if defined(AU_PORTAUDIO) || defined(AU_WIN32)
+" Set the output device no. (-1 shows available device no. list)",
+#endif
" -P file --patch-file=file",
" Use patch file for all programs",
" -p n --polyphony=n",
" Allow n-voice polyphony. Optional auto polyphony reduction",
" (a) --[no-]polyphony-reduction",
" Toggle automatic polyphony reduction. Enabled by default",
-" --preserve-silence",
-" Do not drop initial silence. Default: drop initial silence",
" -Q n[,...] --mute=n[,...]",
" Ignore channel n (0: ignore all, -n: resume channel n)",
" (t) --temper-mute=n[,...]",
" Quiet temperament type n (0..3: preset, 4..7: user-defined)",
+" --preserve-silence",
+" Do not drop initial silence. Default: drop initial silence",
" -q sec/n --audio-buffer=sec/n",
" Specify audio buffer in seconds",
" sec: Maxmum buffer, n: Filled to start (default is 5.0/100%%)",
" `A' A-Law encoding" NLS
" `x' byte-swapped output" NLS, fp);
fputs(NLS, fp);
-#if defined(AU_PORTAUDIO) || defined(AU_WIN32)
- fputs("Output device options (append to -O? option):" NLS
-" `d(n)' Output device ID (blank shows available device list)" NLS, fp);
- fputs(NLS, fp);
-#endif
fputs("Alternative output format long options:" NLS
" --output-stereo" NLS
" --output-mono" NLS
return 0;
}
-
#ifdef AU_FLAC
extern void flac_set_option_verify(int);
extern void flac_set_option_padding(int);
return 0;
}
+static inline int parse_opt_preserve_silence(const char *arg)
+{
+ opt_preserve_silence = 1;
+ return 0;
+}
+
static inline int parse_opt_q(const char *arg)
{
char *max_buff = safe_strdup(arg);
return 0;
}
-static inline int parse_opt_preserve_silence(const char *arg)
-{
- opt_preserve_silence = 1;
- return 0;
-}
-
__attribute__((noreturn))
static inline int parse_opt_fail(const char *arg)
{
* function. It is possible coredump if the signal is called in printf's.
*/
-
write(2, "Terminated sig=0x", 17);
s[0] = "0123456789abcdef"[(sig >> 4) & 0xf];
s[1] = "0123456789abcdef"[sig & 0xf];
files = argv + optind;
if (nfiles > 0
&& ctl->id_character != 'r' && ctl->id_character != 'A'
- && ctl->id_character != 'W' && ctl->id_character != 'N' && ctl->id_character != 'P')
+ && ctl->id_character != 'W' && ctl->id_character != 'N'
+ && ctl->id_character != 'P')
files = expand_file_archives(files, &nfiles);
if (nfiles > 0)
files_nbuf = files[0];
w32g_free_doc();
#else
#ifdef IA_NPSYN
- timeBeginPeriod( 1 );
+ timeBeginPeriod(1);
#endif
main_ret = timidity_play_main(nfiles, files);
#ifdef IA_NPSYN
- timeEndPeriod( 1 );
+ timeEndPeriod(1);
#endif
#ifdef IA_W32G_SYN
if (CoInitializeOK)
free(wrdt_open_opts);
if (nfiles > 0
&& ctl->id_character != 'r' && ctl->id_character != 'A'
- && ctl->id_character != 'W' && ctl->id_character != 'N' && ctl->id_character != 'P') {
+ && ctl->id_character != 'W' && ctl->id_character != 'N'
+ && ctl->id_character != 'P') {
free(files_nbuf);
free(files);
}