+1999-11-29 Masanao Izumo <mo@goice.co.jp>
+
+ * Version 2.8.1 released.
+
+1999-11-29 Masanao Izumo <mo@goice.co.jp>
+
+ * timidity/timidity.c,interface/{gtk_c.c,motif_c.c,w32g_i.c,w32g_util.c,
+ w32g_ini.c,wrdt_wcon.c,xaw_c.c}: Bug fixes about overrunning in strncpy.
+
+1999-11-24 Masanao Izumo <mo@goice.co.jp>
+
+ * configure.in: Fix typoes
+
+1999-11-19 Eric A. Welsh <ewelsh@gpc.wustl.edu>
+
+ * timidity/playmidi.c (reduce_voice_CPU): Obsoleted. Use reduce_voice()
+ instead of reduce_voice_CPU().
+
1999-11-24 Masanao Izumo <mo@goice.co.jp>
* Version 2.8.0 released.
wave interpolation in resampling.
--enable-spline=linear Linear interpolation (default)
--enable-spline=cubic Cubic interpolation
- --enable-spline=lanrange Langrange interpolation
+ --enable-spline=lagrange Lagrange interpolation
--enable-spline=no No interplation
1999-11-12 Masanao Izumo <mo@goice.co.jp>
+11/29, 1999
+ * Version 2.8.1 released.
+
11/24, 1999
* Version 2.8.0 released.
* In GTK, added support for printing the lyrics from .kar files
* New configure option to choose wave interpolation in resampling.
--with-spline=linear Linear interpolation (default)
--with-spline=cubic Cubic interpolation
- --with-spline=lanrange Langrange interpolation
+ --with-spline=lagrange Lagrange interpolation
--with-spline=no No interplation
* New command line option `-m N' to specify sustain time (msec).
-m 1 Effectively behaves as if all sustains are ignored,
#define HAVE_MMSYSTEM_H\r
\r
/* In VDS Macro AAA=BBB is not available. */\r
-#define TIMID_VERSION "2.8.0"\r
+#define TIMID_VERSION "2.8.1"\r
#define DEFAULT_PATH ".\\"\r
#define AU_W32\r
#define WINSOCK\r
ac_help="$ac_help
--enable-spectrogram Enable Sound Spectrogram Viewer (default is no)"
ac_help="$ac_help
- --enable-spline=[method] Specify spline method: no|linear|cubic|lanrange
+ --enable-spline=[method] Specify spline method: no|linear|cubic|lagrange
(default is linear)"
ac_help="$ac_help
--enable-wrd Enable WRD interface for X (default is no)"
PACKAGE=TiMidity++
-VERSION=2.8.0
+VERSION=2.8.1
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
{ echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
xcubic)
EXTRADEFS="$EXTRADEFS -DCSPLINE_INTERPOLATION"
;;
- xlanrange)
+ xlagrange)
EXTRADEFS="$EXTRADEFS -DLAGRANGE_INTERPOLATION"
;;
xno)
AC_INIT(timidity/timidity.c)
SHELL=${CONFIG_SHELL-/bin/sh}
AC_CANONICAL_SYSTEM
-AM_INIT_AUTOMAKE(TiMidity++, 2.8.0, no-define)
+AM_INIT_AUTOMAKE(TiMidity++, 2.8.1, no-define)
dnl To use CONTAINS() macro (See acinclude.m4)
CONTAINS_INIT
dnl Wave Spline Interpolations
AC_ARG_ENABLE(spline,
- [ --enable-spline=[method] Specify spline method: no|linear|cubic|lanrange
+ [ --enable-spline=[method] Specify spline method: no|linear|cubic|lagrange
(default is linear)],
[ case "x$enableval" in
xlinear)
xcubic)
EXTRADEFS="$EXTRADEFS -DCSPLINE_INTERPOLATION"
;;
- xlanrange)
+ xlagrange)
EXTRADEFS="$EXTRADEFS -DLAGRANGE_INTERPOLATION"
;;
xno)
}
else
{
- strncpy(lyric_buf, lyric + 1, sizeof(lyric_buf));
+ strncpy(lyric_buf, lyric + 1, sizeof(lyric_buf) - 1);
gtk_pipe_int_write(LYRIC_MESSAGE);
gtk_pipe_string_write(lyric_buf);
}
}
else
{
- strncpy(lyric_buf, lyric + 1, sizeof(lyric_buf));
+ strncpy(lyric_buf, lyric + 1, sizeof(lyric_buf) - 1);
gtk_pipe_int_write(LYRIC_MESSAGE);
gtk_pipe_string_write(lyric_buf);
}
}
else
{
- strncpy(lyric_buf, lyric + 1, sizeof(lyric_buf));
+ strncpy(lyric_buf, lyric + 1, sizeof(lyric_buf) - 1);
m_pipe_int_write(LYRIC_MESSAGE);
m_pipe_string_write(lyric_buf);
}
}
else
{
- strncpy(lyric_buf, lyric + 1, sizeof(lyric_buf));
+ strncpy(lyric_buf, lyric + 1, sizeof(lyric_buf) - 1);
m_pipe_int_write(LYRIC_MESSAGE);
m_pipe_string_write(lyric_buf);
}
if(!itemidlist)\r
return; /* Cancel */\r
SHGetPathFromIDList(itemidlist, Buffer);\r
- strncpy(biBuffer, Buffer, sizeof(biBuffer));\r
+ strncpy(biBuffer, Buffer, sizeof(Buffer) - 1);\r
w32g_lock_open_file = 1;\r
directory_form(Buffer);\r
w32g_send_rc(RC_EXT_LOAD_FILE, (int32)Buffer);\r
IniGetKeyInt(INI_SEC_TIMIDITY,"opt_channel_pressure",&(st->opt_channel_pressure));\r
IniGetKeyInt(INI_SEC_TIMIDITY,"opt_trace_text_meta_event",&(st->opt_trace_text_meta_event));\r
IniGetKeyInt(INI_SEC_TIMIDITY,"opt_overlap_voice_allow",&(st->opt_overlap_voice_allow));\r
- IniGetKeyStringN(INI_SEC_TIMIDITY,"opt_default_mid",buff,sizeof(buff));\r
+ IniGetKeyStringN(INI_SEC_TIMIDITY,"opt_default_mid",buff,sizeof(buff)-1);\r
st->opt_default_mid = str2mID(buff);\r
IniGetKeyInt(INI_SEC_TIMIDITY,"default_tonebank",&(st->default_tonebank));\r
IniGetKeyInt(INI_SEC_TIMIDITY,"special_tonebank",&(st->special_tonebank));\r
st->spectrogram_update_sec = v_float;\r
#endif\r
IniGetKeyIntArray(INI_SEC_TIMIDITY,"default_program",st->default_program,MAX_CHANNELS);\r
- IniGetKeyStringN(INI_SEC_TIMIDITY,"opt_ctl",st->opt_ctl,sizeof(st->opt_ctl));\r
+ IniGetKeyStringN(INI_SEC_TIMIDITY,"opt_ctl",st->opt_ctl,sizeof(st->opt_ctl)-1);\r
IniGetKeyInt(INI_SEC_TIMIDITY,"opt_realtime_playing",&(st->opt_realtime_playing));\r
IniGetKeyInt(INI_SEC_TIMIDITY,"reduce_voice_threshold",&(st->reduce_voice_threshold));\r
- IniGetKeyStringN(INI_SEC_TIMIDITY,"opt_playmode",st->opt_playmode,sizeof(st->opt_playmode));\r
- IniGetKeyStringN(INI_SEC_TIMIDITY,"OutputName",st->OutputName,sizeof(st->OutputName));\r
+ IniGetKeyStringN(INI_SEC_TIMIDITY,"opt_playmode",st->opt_playmode,sizeof(st->opt_playmode)-1);\r
+ IniGetKeyStringN(INI_SEC_TIMIDITY,"OutputName",st->OutputName,sizeof(st->OutputName)-1);\r
IniGetKeyInt(INI_SEC_TIMIDITY,"voices",&(st->voices));\r
IniGetKeyInt(INI_SEC_TIMIDITY,"auto_reduce_polyphony",&(st->auto_reduce_polyphony));\r
IniGetKeyInt32(INI_SEC_TIMIDITY,"quietchannels",(int32 *)&(st->quietchannels));\r
- IniGetKeyStringN(INI_SEC_TIMIDITY,"opt_qsize",st->opt_qsize,sizeof(st->opt_qsize));\r
+ IniGetKeyStringN(INI_SEC_TIMIDITY,"opt_qsize",st->opt_qsize,sizeof(st->opt_qsize)-1);\r
IniGetKeyInt32(INI_SEC_TIMIDITY,"modify_release",&(st->modify_release));\r
- IniGetKeyStringN(INI_SEC_TIMIDITY,"allocate_cache_size",buff,sizeof(buff));\r
+ IniGetKeyStringN(INI_SEC_TIMIDITY,"allocate_cache_size",buff,sizeof(buff)-1);\r
st->allocate_cache_size = str2size(buff);\r
IniGetKeyInt(INI_SEC_TIMIDITY,"output_rate",&(st->output_rate));\r
- IniGetKeyStringN(INI_SEC_TIMIDITY,"output_text_code",st->output_text_code,sizeof(st->output_text_code));\r
+ IniGetKeyStringN(INI_SEC_TIMIDITY,"output_text_code",st->output_text_code,sizeof(st->output_text_code)-1);\r
IniGetKeyInt(INI_SEC_TIMIDITY,"free_instruments_afterwards",&(st->free_instruments_afterwards));\r
- IniGetKeyStringN(INI_SEC_TIMIDITY,"out_wrd",st->opt_wrd,sizeof(st->opt_wrd));\r
+ IniGetKeyStringN(INI_SEC_TIMIDITY,"out_wrd",st->opt_wrd,sizeof(st->opt_wrd)-1);\r
#if defined(__W32__) && defined(SMFCONV)\r
IniGetKeyInt(INI_SEC_TIMIDITY,"opt_rcpcv_dll",&(st->opt_rcpcv_dll));\r
#endif\r
if(play_mode->encoding & PE_BYTESWAP)\r
st->opt_playmode[j++] = 'x';\r
st->opt_playmode[j] = '\0';\r
- strncpy(st->OutputName,OutputName,sizeof(st->OutputName));\r
+ strncpy(st->OutputName,OutputName,sizeof(st->OutputName)-1);\r
st->voices = SetValue(voices, 1, MAX_VOICES);\r
st->auto_reduce_polyphony = auto_reduce_polyphony;\r
st->quietchannels = quietchannels;\r
st->output_rate = DEFAULT_RATE;\r
}\r
st->output_rate = SetValue(st->output_rate,MIN_OUTPUT_RATE,MAX_OUTPUT_RATE);\r
- strncpy(st->output_text_code,output_text_code,sizeof(st->output_text_code));\r
+ strncpy(st->output_text_code,output_text_code,sizeof(st->output_text_code)-1);\r
st->free_instruments_afterwards = free_instruments_afterwards;\r
st->opt_wrd[0] = wrdt->id;\r
if(wrdt_open_opts)\r
- strncpy(st->opt_wrd + 1, wrdt_open_opts, sizeof(st->opt_wrd) - 1);\r
+ strncpy(st->opt_wrd + 1, wrdt_open_opts, sizeof(st->opt_wrd) - 2);\r
else\r
st->opt_wrd[1] = '\0';\r
#if defined(__W32__) && defined(SMFCONV)\r
int IniVersionCheck(void)\r
{\r
char version[INI_MAXLEN];\r
- if(IniGetKeyStringN(INI_SEC_PLAYER,"IniVersion",version,sizeof(version)) == 0 &&\r
+ if(IniGetKeyStringN(INI_SEC_PLAYER,"IniVersion",version,sizeof(version)-1) == 0 &&\r
strcmp(version, IniVersion) == 0)\r
return 1; // UnChanged\r
return 0;\r
char local[201];
local[0] = '\033';
local[1] = '[';
- strncpy(local+2,str,200-2);
+ strncpy(local+2,str,sizeof(local)-3);
local[200] = '\0';
putstring_with_esc(local);
}
else if(lyric[2] == 'T')
snprintf(lyric_buf, sizeof(lyric_buf), "Title: %s", lyric + 3);
else
- strncpy(lyric_buf, lyric + 1, sizeof(lyric_buf));
+ strncpy(lyric_buf, lyric + 1, sizeof(lyric_buf) - 1);
a_pipe_write_msg(lyric_buf);
lyric_col = 0;
}
else
{
- strncpy(lyric_buf + lyric_col, lyric + 1, sizeof(lyric_buf) - lyric_col);
+ strncpy(lyric_buf + lyric_col, lyric + 1, sizeof(lyric_buf) - lyric_col - 1);
a_pipe_write_msg(lyric_buf);
lyric_col += strlen(lyric + 1);
}
return ip;
}
+#if 0
+/* reduce_voice_CPU() may not have any speed advantage over reduce_voice().
+ * So this function is not used, now.
+ */
+
/* The goal of this routine is to free as much CPU as possible without
loosing too much sound quality. We would like to know how long a note
has been playing, but since we usually can't calculate this, we guess at
return lowest;
}
+#endif
/* this reduces voices while maintaining sound quality */
static int reduce_voice(void)
}
for(i = 0; i < kill_nv; i++)
- {
- v = reduce_voice_CPU();
-
- /* Tell VOICE_DIE to interface */
- voice[v].status = VOICE_DIE;
- ctl_note_event(v);
- free_voice(v);
- }
+ v = reduce_voice();
/* lower max # of allowed voices to let the buffer recover */
if (auto_reduce_polyphony) {
extern char *ConfigFile;
if(!ConfigFile[0])
strcpy(ConfigFile, W32G_TIMIDITY_CFG);
- strncpy(local, ConfigFile, sizeof(local));
+ strncpy(local, ConfigFile, sizeof(local) - 1);
#else
/* !IA_W32GUI */
GetWindowsDirectory(local, 1023 - 13);
#ifdef IA_W32GUI
{
extern char *ConfigFile;
- strncpy(config1, ConfigFile, sizeof(config1));
+ strncpy(config1, ConfigFile, sizeof(config1) - 1);
}
#else
/* !IA_W32GUI */