View | Details | Raw Unified | Return to bug 17846
Collapse All | Expand All

(-)SDL_mixer-1.2.8/timidity/config.h.alt (-7 / +1 lines)
Lines 167-182 typedef char int8; Link Here
167
167
168
#define MAX_AMPLIFICATION 800
168
#define MAX_AMPLIFICATION 800
169
169
170
/* You could specify a complete path, e.g. "/etc/timidity.cfg", and
171
   then specify the library directory in the configuration file. */
172
#define CONFIG_FILE	"timidity.cfg"
173
#define CONFIG_FILE_ETC "/etc/timidity.cfg"
174
#define CONFIG_FILE_ETC_TIMIDITY "/etc/timidity/timidity.cfg"
175
176
#if defined(__WIN32__) || defined(__OS2__)
170
#if defined(__WIN32__) || defined(__OS2__)
177
#define DEFAULT_PATH	"\\TIMIDITY"
171
#define DEFAULT_PATH	"\\TIMIDITY"
178
#else
172
#else
179
#define DEFAULT_PATH	"/usr/local/lib/timidity"
173
#define DEFAULT_PATH	"/usr/share/timidity"
180
#endif
174
#endif
181
175
182
/* These affect general volume */
176
/* These affect general volume */
(-)SDL_mixer-1.2.8/timidity/timidity.c.alt (-6 / +7 lines)
Lines 294-305 static int read_config_file(char *name) Link Here
294
294
295
int Timidity_Init(int rate, int format, int channels, int samples)
295
int Timidity_Init(int rate, int format, int channels, int samples)
296
{
296
{
297
  if (read_config_file(CONFIG_FILE)<0) {
297
  char cfgfile[PATH_MAX];
298
    if (read_config_file(CONFIG_FILE_ETC)<0) {
298
299
      if (read_config_file(CONFIG_FILE_ETC_TIMIDITY)<0) {
299
  strcpy(cfgfile, DEFAULT_PATH);
300
        return(-1);
300
  strcat(cfgfile, "/midia.cfg");
301
      }
301
302
    }
302
  if (read_config_file(cfgfile) < 0) {
303
    return(-1);
303
  }
304
  }
304
305
305
  if (channels < 1 || channels == 3 || channels == 5 || channels > 6) return(-1);
306
  if (channels < 1 || channels == 3 || channels == 5 || channels > 6) return(-1);

Return to bug 17846