From fdc15856d04f85683bbf602d8679a72580b40b48 Mon Sep 17 00:00:00 2001 From: Shoichi Tamuki Date: Mon, 26 Apr 2004 01:39:18 +0000 Subject: [PATCH] Rename --flac-compression-level -> --flac-complevel --- ChangeLog | 6 ++++ doc/C/timidity.1 | 7 ++-- doc/ja_JP.eucJP/timidity.1 | 12 +++---- timidity/timidity.c | 84 +++++++++++++++++++++++++--------------------- 4 files changed, 60 insertions(+), 49 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7016fee2..2d9a8c03 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-04-26 TAMUKI Shoichi + + * doc/C/timidity.1, doc/ja_JP.eucJP/timidity.1: Update + * timidity/timidity.c: + Rename --flac-compression-level -> --flac-complevel + 2004-04-25 TAMUKI Shoichi * doc/C/timidity.1, doc/ja_JP.eucJP/timidity.1, diff --git a/doc/C/timidity.1 b/doc/C/timidity.1 index ceea2d22..5e4536b8 100644 --- a/doc/C/timidity.1 +++ b/doc/C/timidity.1 @@ -633,7 +633,7 @@ In either way, linear interpolation is used if audio queue < 99%. .br .ns .TP -.BI "\-\-flac\-compression\-level " n +.BI "\-\-flac\-complevel " n .br .ns .TP @@ -673,10 +673,9 @@ the list. .br Special in Ogg FLAC output mode, verifying generated data (will be a bit slower), the size of header padding (default is 4096), the -compression level (0 to 8) (default is 5), and enabling OggFLAC output +compression level (0 to 8) (default is 5), and enabling OggFLAC stream can be specified by \fB\-\-flac\-verify\fP, \fB\-\-flac\-padding\fP, -\fB\-\-flac\-compression\-level\fP and \fB\-\-oggflac\fP options -respectively. +\fB\-\-flac\-complevel\fP and \fB\-\-oggflac\fP options respectively. .br Special in Ogg Speex output mode, the compression quality (0 to 10) (default is 8), Enabling VBR output, enabling ABR output and setting diff --git a/doc/ja_JP.eucJP/timidity.1 b/doc/ja_JP.eucJP/timidity.1 index 90548da4..f3f5cc5f 100644 --- a/doc/ja_JP.eucJP/timidity.1 +++ b/doc/ja_JP.eucJP/timidity.1 @@ -640,7 +640,7 @@ MIDI .br .ns .TP -.BI "\-\-flac\-compression\-level " n +.BI "\-\-flac\-complevel " n .br .ns .TP @@ -676,11 +676,11 @@ MIDI ½ÐÎϥ⡼¥É¤ä¥Õ¥©¡¼¥Þ¥Ã¥È¤ò»ØÄꤷ¤Þ¤¹¡£ .br Ogg FLAC ½ÐÎϥ⡼¥É¤Ç¤Ï¡¤ÊÌÅÓ \fB\-\-flac\-verify\fP¡¤ -\fB\-\-flac\-padding\fP¡¤\fB\-\-flac\-compression\-level\fP¡¤ -\fB\-\-oggflac\fP ¥ª¥×¥·¥ç¥ó¤Ë¤è¤ê¡¤¤½¤ì¤¾¤ì¸µÇÈ·Á¤È¤Î¤Ù¥ê¥Õ¥¡¥¤(°µ½Ì® -ÅÙ¤¬¾¯¤·ÃÙ¤¯¤Ê¤ë)¡¤¥Õ¥¡¥¤¥ë¥Ø¥Ã¥À¤Î¥Ñ¥Ç¥£¥ó¥°Ä¹(¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï -\fB4096\fP)¡¤\fB0\fP ¤«¤é \fB8\fP ¤Þ¤Ç¤Î°µ½Ì¥ì¥Ù¥ë(¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï -\fB5\fP)¡¤Ogg ¥¹¥È¥ê¡¼¥à¤Ç½ÐÎϤò»ØÄê¤Ç¤­¤Þ¤¹¡£ +\fB\-\-flac\-padding\fP¡¤\fB\-\-flac\-complevel\fP¡¤\fB\-\-oggflac\fP +¥ª¥×¥·¥ç¥ó¤Ë¤è¤ê¡¤¤½¤ì¤¾¤ì¸µÇÈ·Á¤È¤Î¤Ù¥ê¥Õ¥¡¥¤(°µ½Ì®ÅÙ¤¬¾¯¤·ÃÙ¤¯¤Ê¤ë)¡¤ +¥Õ¥¡¥¤¥ë¥Ø¥Ã¥À¤Î¥Ñ¥Ç¥£¥ó¥°Ä¹(¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï\fB4096\fP)¡¤\fB0\fP ¤«¤é +\fB8\fP ¤Þ¤Ç¤Î°µ½Ì¥ì¥Ù¥ë(¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï\fB5\fP)¡¤OggFLAC ¥¹¥È¥ê¡¼¥à¤Ç½Ð +ÎϤò»ØÄê¤Ç¤­¤Þ¤¹¡£ .br Ogg Speex ½ÐÎϥ⡼¥É¤Ç¤Ï¡¤ÊÌÅÓ \fB\-\-speex\-quality\fP¡¤ \fB\-\-speex\-vbr\fP¡¤\fB\-\-speex\-abr\fP¡¤\fB\-\-speex\-vad\fP¡¤ diff --git a/timidity/timidity.c b/timidity/timidity.c index 683be943..5ccfbc28 100644 --- a/timidity/timidity.c +++ b/timidity/timidity.c @@ -173,15 +173,10 @@ enum { TIM_OPT_OUTPUT_BITWIDTH, TIM_OPT_OUTPUT_FORMAT, TIM_OPT_OUTPUT_SWAB, -#ifdef AU_FLAC TIM_OPT_FLAC_VERIFY, TIM_OPT_FLAC_PADDING, TIM_OPT_FLAC_COMPLEVEL, -#ifdef AU_OGGFLAC TIM_OPT_FLAC_OGGFLAC, -#endif /* AU_OGGFLAC */ -#endif /* AU_FLAC */ -#ifdef AU_SPEEX TIM_OPT_SPEEX_QUALITY, TIM_OPT_SPEEX_VBR, TIM_OPT_SPEEX_ABR, @@ -189,7 +184,6 @@ enum { TIM_OPT_SPEEX_DTX, TIM_OPT_SPEEX_COMPLEXITY, TIM_OPT_SPEEX_NFRAMES, -#endif /* AU_SPEEX */ TIM_OPT_OUTPUT_FILE, TIM_OPT_PATCH_FILE, TIM_OPT_POLYPHONY, @@ -313,7 +307,7 @@ static const struct option longopts[] = { #ifdef AU_FLAC { "flac-verify", no_argument, NULL, TIM_OPT_FLAC_VERIFY }, { "flac-padding", required_argument, NULL, TIM_OPT_FLAC_PADDING }, - { "flac-compression-level", required_argument, NULL, TIM_OPT_FLAC_COMPLEVEL }, + { "flac-complevel", required_argument, NULL, TIM_OPT_FLAC_COMPLEVEL }, #ifdef AU_OGGFLAC { "oggflac", no_argument, NULL, TIM_OPT_FLAC_OGGFLAC }, #endif /* AU_OGGFLAC */ @@ -3638,6 +3632,34 @@ static inline int parse_opt_h(const char *arg) " n+1 point Gauss-like interpolation, n=1-34 (default 25)", " -O mode --output-mode=mode", " Select output mode and format (see below for list)", +#ifdef AU_FLAC +" --flac-verify (for Ogg FLAC only)", +" Verify a correct encoding", +" --flac-padding=n (for Ogg FLAC only)", +" Write a PADDING block of length n", +" --flac-complevel=n (for Ogg FLAC only)", +" Set compression level n:[0..8]", +#ifdef AU_OGGFLAC +" --oggflac (for Ogg FLAC only)", +" Output OggFLAC stream (experimental)", +#endif /* AU_OGGFLAC */ +#endif /* AU_FLAC */ +#ifdef AU_SPEEX +" --speex-quality=n (for Ogg Speex only)", +" Encoding quality n:[0..10]", +" --speex-vbr (for Ogg Speex only)", +" Enable variable bit-rate (VBR)", +" --speex-abr=n (for Ogg Speex only)", +" Enable average bit-rate (ABR) at rate bps", +" --speex-vad (for Ogg Speex only)", +" Enable voice activity detection (VAD)", +" --speex-dtx (for Ogg Speex only)", +" Enable file-based discontinuous transmission (DTX)", +" --speex-complexity=n (for Ogg Speex only)", +" Set encoding complexity n:[0-10]", +" --speex-nframes=n (for Ogg Speex only)", +" Number of frames per Ogg packet n:[0-10]", +#endif " -o file --output-file=file", " Output to another file (or device/server) (Use \"-\" for stdout)", " -P file --patch-file=file", @@ -3841,6 +3863,9 @@ static inline int parse_opt_h(const char *arg) for (pmpp = play_mode_list; (pmp = *pmpp) != NULL; pmpp++) fprintf(fp, " -O%c %s" NLS, pmp->id_character, pmp->id_name); +#ifdef AU_AO + show_ao_device_info(fp); +#endif /* AU_AO */ fputs(NLS, fp); fputs("Output format options (append to -O? option):" NLS " `S' stereo" NLS @@ -3868,32 +3893,6 @@ static inline int parse_opt_h(const char *arg) " --output-alaw" NLS " --[no-]output-swab" NLS, fp); fputs(NLS, fp); -#ifdef AU_AO - show_ao_device_info(fp); - fputs(NLS, fp); -#endif /* AU_AO */ -#ifdef AU_FLAC - fputs("FLAC output format long options:" NLS -" --flac-verify Verify a correct encoding" NLS -" --flac-padding=n Write a PADDING block of length n" NLS -" --flac-compression-level=n Set compression level n:[0..8]" NLS, fp); -#ifdef AU_OGGFLAC - fputs(" --oggflac Output OggFLAC stream " - "(experimental)" NLS, fp); -#endif /* AU_OGGFLAC */ - fputs(NLS, fp); -#endif /* AU_FLAC */ -#ifdef AU_SPEEX - fputs("Speex output format long options:" NLS -" --speex-quality=n Encoding quality n:[0..10]" NLS -" --speex-vbr Enable variable bit-rate (VBR)" NLS -" --speex-abr=n Enable average bit-rate (ABR) at rate bps" NLS -" --speex-vad Enable voice activity detection (VAD)" NLS -" --speex-dtx Enable file-based discontinuous transmission (DTX)" NLS -" --speex-complexity=n Set encoding complexity n:[0-10]" NLS -" --speex-nframes=n Number of frames per Ogg packet n:[0-10]" NLS, fp); - fputs(NLS, fp); -#endif fputs("Available WRD interfaces (-W, --wrd option):" NLS, fp); for (wlpp = wrdt_list; (wlp = *wlpp) != NULL; wlpp++) fprintf(fp, " -W%c %s" NLS, wlp->id, wlp->name); @@ -4365,43 +4364,50 @@ static inline int parse_opt_flac_oggflac(const char *arg) #endif /* AU_FLAC */ #ifdef AU_SPEEX -extern void speex_set_option_quality(int quality); -extern void speex_set_option_vbr(int vbr); -extern void speex_set_option_abr(int rate); -extern void speex_set_option_vad(int vad); -extern void speex_set_option_dtx(int dtx); -extern void speex_set_option_complexity(int complexity); +extern void speex_set_option_quality(int); +extern void speex_set_option_vbr(int); +extern void speex_set_option_abr(int); +extern void speex_set_option_vad(int); +extern void speex_set_option_dtx(int); +extern void speex_set_option_complexity(int); +extern void speex_set_option_nframes(int); static inline int parse_opt_speex_quality(const char *arg) { speex_set_option_quality(atoi(arg)); return 0; } + static inline int parse_opt_speex_vbr(const char *arg) { speex_set_option_vbr(1); return 0; } + static inline int parse_opt_speex_abr(const char *arg) { speex_set_option_abr(atoi(arg)); return 0; } + static inline int parse_opt_speex_vad(const char *arg) { speex_set_option_vad(1); return 0; } + static inline int parse_opt_speex_dtx(const char *arg) { speex_set_option_dtx(1); return 0; } + static inline int parse_opt_speex_complexity(const char *arg) { speex_set_option_complexity(atoi(arg)); return 0; } + static inline int parse_opt_speex_nframes(const char *arg) { speex_set_option_nframes(atoi(arg)); -- 2.11.0