if(ip == NULL && bk != 0) { /* Instrument is not found. Retry to load the instrument from bank 0 */ if((ip = bank[0]->tone[prog].instrument) == NULL) ip = bank[0]->tone[prog].instrument = load_instrument(dr, 0, prog); if(ip != NULL) { 
if (ip == NULL && bk) { /* Instrument is not found. * Retry to load the instrument from bank 0 */ if ((ip = bank[0]->tone[prog].instrument) == NULL) ip = bank[0]->tone[prog].instrument = load_instrument(dr, 0, prog); if (ip) { 
Instrument *play_midi_load_instrument(int dr, int bk, int prog){    ToneBank **bank = ((dr) ? drumset : tonebank);	ToneBankElement *elm;    Instrument *ip;    int load_success;    if(bank[bk] == NULL)	bk = 0;    load_success = 0;    if(! opt_realtime_playing)    {	ip = bank[bk]->tone[prog].instrument;#ifndef SUPPRESS_CHANNEL_LAYER	if(ip == MAGIC_LOAD_INSTRUMENT || ip == NULL)#else	if(ip == MAGIC_LOAD_INSTRUMENT)#endif	{	    ip = bank[bk]->tone[prog].instrument =		load_instrument(dr, bk, prog);	    if(ip != NULL)		load_success = 1;	}	if(ip == NULL && bk != 0)	{	    /* Instrument is not found.	       Retry to load the instrument from bank 0 */	    if((ip = bank[0]->tone[prog].instrument) == NULL)		ip = bank[0]->tone[prog].instrument =		    load_instrument(dr, 0, prog);	    if(ip != NULL)	    {			/* duplicate tone bank parameter */			elm = &bank[bk]->tone[prog];			memcpy(elm, &bank[0]->tone[prog], sizeof(ToneBankElement));			elm->instrument = ip;			dup_tone_bank_element(dr, bk, prog);			load_success = 1;	    }	}    }    else    {	if((ip = bank[bk]->tone[prog].instrument) == NULL)	{	    ip = bank[bk]->tone[prog].instrument =		load_instrument(dr, bk, prog);	    if(ip != NULL)		load_success = 1;	}	if(ip == NULL && bk != 0)	{	    /* Instrument is not found.	       Retry to load the instrument from bank 0 */	    if((ip = bank[0]->tone[prog].instrument) == NULL)		ip = bank[0]->tone[prog].instrument =		    load_instrument(dr, 0, prog);	    if(ip != NULL)	    {			/* duplicate tone bank parameter */			elm = &bank[bk]->tone[prog];			memcpy(elm, &bank[0]->tone[prog], sizeof(ToneBankElement));			elm->instrument = ip;			dup_tone_bank_element(dr, bk, prog);			load_success = 1;	    }	}    }    if(load_success)	aq_add(NULL, 0); /* Update software buffer */    if(ip == MAGIC_ERROR_INSTRUMENT)	return NULL;    if(ip == NULL)	bank[bk]->tone[prog].instrument = MAGIC_ERROR_INSTRUMENT;    return ip;}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/af4e6418e1b0d714cbd94789491dfa6e0c318b93/playmidi.c/buggy/timidity/playmidi.c