rem: TRACE(("voice pointer %p\n", voice));
context: int32 emuxki_int(void *arg){	emuxki_dev	 *card = arg;	uint32       ipr, curblk;	bool gotone = false;	emuxki_voice *voice;	emuxki_stream *stream;		while ((ipr = emuxki_reg_read_32(&card->config, EMU_IPR))) {		gotone = true;		if (ipr & EMU_IPR_INTERVALTIMER) {			TRACE(("EMU_IPR_INTERVALTIMER\n"));			LIST_FOREACH(stream, &card->streams, next) {				if ((stream->use & EMU_USE_PLAY) == 0 ||					(stream->state & EMU_STATE_STARTED) == 0 ||					(stream->inth == NULL))						continue;								voice = stream->first_voice;				TRACE(("voice %p\n", voice));				curblk = emuxki_voice_curaddr(voice) /				       voice->blksize;				//TRACE(("EMU_IPR_INTERVALTIMER at trigblk %lu\n", curblk));				//TRACE(("EMU_IPR_INTERVALTIMER at voice->trigblk %lu\n", voice->trigblk));				if (curblk == voice->trigblk) {					//TRACE(("EMU_IPR_INTERVALTIMER at trigblk %lu\n", curblk));					//dump_voice(voice);					//trace_hardware_regs(&card->config);					TRACE(("voice pointer %p\n", voice));																			if(stream->inth)						stream->inth(stream->inthparam);					voice->trigblk++;					voice->trigblk %= voice->blkmod;				}			}		}#if MIDI		if (ipr & (/*EMU_IPR_MIDITRANSBUFE | */EMU_IPR_MIDIRECVBUFE)) {			midi_interrupt(card);		}		if (ipr & (EMU_IPR_MIDITRANSBUFE)) {			if(!midi_interrupt(card)) {				emuxki_inte_disable(&card->config, EMU_INTE_MIDITXENABLE);				TRACE(("EMU_INTE_MIDITXENABLE disabled\n"));			}		}#endif		if (ipr & (EMU_IPR_ADCBUFHALFFULL | EMU_IPR_ADCBUFFULL			| EMU_IPR_MICBUFHALFFULL | EMU_IPR_MICBUFFULL			| EMU_IPR_EFXBUFHALFFULL | EMU_IPR_EFXBUFFULL)) {			//TRACE(("EMU_IPR_ADCBUF\n"));			LIST_FOREACH(stream, &card->streams, next) {				if ((stream->use & EMU_USE_RECORD) == 0 ||					(stream->state & EMU_STATE_STARTED) == 0 ||					(stream->inth == NULL))						continue;				voice = stream->first_voice;				curblk = emuxki_voice_curaddr(voice) /				       voice->blksize;				//TRACE(("EMU_IPR_ADCBUF at trigblk %lu\n", curblk));				//TRACE(("EMU_IPR_ADCBUF at voice->trigblk %lu\n", voice->trigblk));				if (curblk == voice->trigblk) {					//TRACE(("EMU_IPR_ADCBUF at trigblk %lu\n", curblk));					//dump_voice(voice);					//trace_hardware_regs(&card->config);																			if(stream->inth)						stream->inth(stream->inthparam);					voice->trigblk++;					voice->trigblk %= voice->blkmod;				}			}		}				/*if (ipr & (EMU_IPR_CHANNELLOOP)) {			TRACE(("EMU_IPR_CHANNELLOOP pending channel : %u\n", ipr & EMU_IPR_CHNOMASK));			LIST_FOREACH(stream, &card->streams, next)			LIST_FOREACH(voice, &stream->voices, next) {				if ((voice->use & EMU_USE_PLAY) == 0 ||					(voice->state & EMU_STATE_STARTED) == 0)						continue;				TRACE(("EMU_IPR_CHANNELLOOP at trigblk %lu\n", emuxki_voice_curaddr(voice)));				TRACE(("EMU_IPR_CHANNELLOOP read %x\n", emuxki_chan_read(&voice->card->config, 0, EMU_CLIPL)));				emuxki_chan_write(&voice->card->config, 0, EMU_CLIPL, emuxki_chan_read(&voice->card->config, 0, EMU_CLIPL));			}		}*/				if (ipr & ~(EMU_IPR_RATETRCHANGE | EMU_IPR_INTERVALTIMER 				| EMU_IPR_MIDITRANSBUFE | EMU_IPR_MIDIRECVBUFE				| EMU_IPR_ADCBUFHALFFULL | EMU_IPR_ADCBUFFULL				| EMU_IPR_MICBUFHALFFULL | EMU_IPR_MICBUFFULL				| EMU_IPR_EFXBUFHALFFULL | EMU_IPR_EFXBUFFULL))			TRACE(("Got interrupt 0x%08x !!!\n",			       ipr & ~(EMU_IPR_RATETRCHANGE |				       EMU_IPR_INTERVALTIMER)));		emuxki_reg_write_32(&card->config, EMU_IPR, ipr);	}		if(gotone)		return B_HANDLED_INTERRUPT;	TRACE(("Got unhandled interrupt\n"));	return B_UNHANDLED_INTERRUPT;}