Skip to content

Commit

Permalink
Search timidity.cfg also in /etc
Browse files Browse the repository at this point in the history
  • Loading branch information
pmandin committed Jul 4, 2005
1 parent e035fba commit 836db36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions timidity/config.h
Expand Up @@ -218,6 +218,8 @@ typedef char int8;
/* You could specify a complete path, e.g. "/etc/timidity.cfg", and
then specify the library directory in the configuration file. */
#define CONFIG_FILE "timidity.cfg"
#define CONFIG_FILE_ETC "/etc/timidity.cfg"

#ifdef __WIN32__
#define DEFAULT_PATH "\\TIMIDITY"
#else
Expand Down
4 changes: 3 additions & 1 deletion timidity/timidity.c
Expand Up @@ -295,7 +295,9 @@ static int read_config_file(char *name)
int Timidity_Init(int rate, int format, int channels, int samples)
{
if (read_config_file(CONFIG_FILE)<0) {
return(-1);
if (read_config_file(CONFIG_FILE_ETC)<0) {
return(-1);
}
}

if (channels < 1 || channels == 3 || channels == 5 || channels > 6) return(-1);
Expand Down

0 comments on commit 836db36

Please sign in to comment.