GUS Programmer's Digest Fri Aug 20 00:07 Volume 3: Issue 7 Today's Topics: Standard Info: - Meta-info about the GUS can be found at the end of the Digest. - Before you ask a question, please READ THE FAQ. ---------------------------------------------------------------------- Date: Thu, 19 Aug 1993 20:16:06 +0200 From: Robert Bielik Message-ID: <199308191816.AA25199@meryl.csd.uu.se> About wave-irq's again... ------------------------------ Date: (null) From: (null) >There is a better way to solve this problem. An UltraStopVoice() MUSt >be called if yo are supposed to get and IRQ and the voice is then >supposed to stop (not loop or rollover...). If the stop is not done, >you will get constant irqs and hang the machine. As I understand it,the GUS plays samples til the end position where the DRAM counter stops. Question: Does the GUS generate irq's as long as the DRAM counter equals the end position AND has the wave-irq. bit set ? I did remove the UltraStopVoice() from irq.c and got everything to work perfectly,even with the Rollover feature. Though the rollover did NOT function if looping of the voice was enabled. But with disabled looping ,it irq:d at the end-position and continued playing... To make up for spurious irq's I used Timer1 to ignore the irq's for a while.. In your update of irq.c you write : static void handle_voice() { . . . . voice_bit = 1 << voice; /* See if any waveform irqs first */ if (!(irq_source & VOICE_WAVE_IRQ)) { /* See if we have already serviced this voice ... */ if (!(wave_ignore & voice_bit)) { outportb(_gf1_data.voice_select,voice); outportb(_gf1_data.reg_select,GET_CONTROL); temp1 = inportb (_gf1_data.data_hi); outportb(_gf1_data.reg_select,GET_VOLUME_CONTROL); temp2 = inportb (_gf1_data.data_hi); /* If EITHER looping is on OR ROLLOVER is on, don't stop voice */ if (!((temp1 & VC_LOOP_ENABLE) || (temp2 & VC_ROLLOVER))) { UltraStopVoice(voice); ---> ---> wave_ignore |= voice_bit; } /* Call waveform processing function.... */ _gf1_data.wavetable_func(voice); } } if (!(irq_source & VOICE_VOLUME_IRQ)) { if (!(volume_ignore & voice_bit)) { outportb(_gf1_data.voice_select,voice); outportb(_gf1_data.reg_select,GET_VOLUME_CONTROL); temp1 = inportb (_gf1_data.data_hi); /* If volume looping is enabled, don't stop it */ if (!(temp1 & VL_LOOP_ENABLE)) { UltraStopVolume(voice); ---> ---> volume_ignore |= voice_bit; } /* Call envelope processing function.... */ _gf1_data.volume_func(voice); } } } } Shouldn't the marked statements be executed whether or not the loop bits or the rollover bit is set ? Thanx for your very quick response ! Regards.. Robert Bielik . nh91rbi@csd.uu.se ------------------------------ End of GUS Programmer's Digest V3 #7 ************************************ To post to tomorrow's digest: To (un)subscribe or get help: To contact a human (last resort): FTP sites: archive.epas.utoronto.ca pub/pc/ultrasound wuarchive.wustl.edu systems/msdos/ultrasound Hints: - Get the FAQ from the FTP sites or the request server. - Mail to for info about other GUS related mailing lists (UNIX, OS/2, GUS-MIDI, etc.)