/*************************************************************************** * NAME: VOICE1.C ** COPYRIGHT: ** "Copyright (c) 1992, by FORTE ** ** "This software is furnished under a license and may be used, ** copied, or disclosed only in accordance with the terms of such ** license and with the inclusion of the above copyright notice. ** This software or any other copies thereof may not be provided or ** otherwise made available to any other person. No title to and ** ownership of the software is hereby transfered." **************************************************************************** * CREATION DATE: 11/18/92 *--------------------------------------------------------------------------* * VERSION DATE NAME DESCRIPTION *> 1.0 11/18/92 Original ***************************************************************************/ #include #include #include "forte.h" #include "gf1proto.h" #include "gf1hware.h" #include "gf1os.h" void UltraVoiceOn(int voice,unsigned long begin,unsigned long start_loop,unsigned long end_loop,unsigned char control,unsigned long freq) { /* Might want to do a noteoff() here, just in case .... */ UltraSetFrequency(voice,freq); UltraStartVoice(voice,begin,start_loop,end_loop,control); /************************************************************************* NOTE: To play a sample backwards, 'begin' should be set to address * that you want it to start at, start must be a lower address than the * end. Also turn on the decreasing addresses bit in the control byte. * Now the sample will begin playing at begin, with decreasing addresses * thru the end location until it hits the start location. It will then * loop back to the end position, (if looping enabled) *************************************************************************/ } void UltraVoiceOff(int voice,int end) { if (end) { /* This could be used to change the end point and let the sample */ /* stop at end (sampled decay.... ) */ UltraSetLoopMode(voice,0x00); } else { UltraStopVoice(voice); } }