timidity/timidity.c
changeset 416 67aaecd0610d
parent 319 1aa81b70e07b
child 421 de784f36729a
     1.1 --- a/timidity/timidity.c	Sat Oct 03 09:29:50 2009 +0000
     1.2 +++ b/timidity/timidity.c	Sat Oct 03 09:50:42 2009 +0000
     1.3 @@ -294,10 +294,13 @@
     1.4  
     1.5  int Timidity_Init(int rate, int format, int channels, int samples)
     1.6  {
     1.7 -  if (read_config_file(CONFIG_FILE)<0) {
     1.8 -    if (read_config_file(CONFIG_FILE_ETC)<0) {
     1.9 -      if (read_config_file(CONFIG_FILE_ETC_TIMIDITY)<0) {
    1.10 -        return(-1);
    1.11 +  const char *env = getenv("TIMIDITY_CFG");
    1.12 +  if (!env || read_config_file(env)<0) {
    1.13 +    if (read_config_file(CONFIG_FILE)<0) {
    1.14 +      if (read_config_file(CONFIG_FILE_ETC)<0) {
    1.15 +        if (read_config_file(CONFIG_FILE_ETC_TIMIDITY)<0) {
    1.16 +          return(-1);
    1.17 +        }
    1.18        }
    1.19      }
    1.20    }