home *** CD-ROM | disk | FTP | other *** search
/ Intermedia 1998 January / inter1_98.iso / www / rozi / MOD2.ZIP / VOCS.DOC < prev    next >
Text File  |  1995-05-20  |  3KB  |  82 lines

  1.  
  2.  VOC playing routines for SB PRO.
  3.  (C) Copyright by TSC-Software, 1993-95
  4.  
  5.  --------------------------------------
  6.  
  7.  Play Creative Voice Files through your Soundblaster card. Either from base
  8.  memory or XMS, you decide! This TPU supports all 8-bit VOC-file formats.
  9.  
  10.  
  11.  The following data and procedures are declared as public:
  12.  
  13.  
  14.   Const
  15.    RAM  = 0;                          { constants for LoadVOC }
  16.    XMS  = 1;
  17.  
  18.    OFF  = 0;                          { constants for Speaker access }
  19.    ON   = 1;
  20.  
  21.    DMAChannel: Word = 1;              { default DMA-channel, no autodetect }
  22.  
  23.   Type
  24.    VOCDataRec = ^VOCInfoRec;          { information about VOC-files }
  25.    VOCInfoRec = Record
  26.     Size:     LongInt;
  27.     Addr:     Pointer;
  28.     Handle:   Word;
  29.    End;
  30.  
  31.   Var
  32.    StatusWord: Word;                  { Check this word, if you want to   }
  33.                                       { know, if currently music is being }
  34.                                       { played.  0=No music, 0FFFFh=music }
  35.  
  36.                       { If this value is 8000h after the  }
  37.                       { program startup sequence, the in- }
  38.                       { ternal driver wasn't initialised  }
  39.                       { and you can't play music.      }
  40.  
  41.  
  42.   Function  LoadVOC(FName: String; FSeek: LongInt; Memory: Byte; Var VOCData: VOCDataRec): Byte;
  43.   { Load a VOC-file from file "FName" at position "FSeek", into memory. The }
  44.   { VOC must have been converted with VREMOVE. You can load every VOC-file  }
  45.   { whose size is less than 65529 bytes into base memory (Memory=RAM). Lar- }
  46.   { ger files must be loaded into XMS. If LoadVOC returns a non-zero value, }
  47.   { an error has occured else the VOC-file has been loaded.                 }
  48.   { Memory requirements:                                                    }
  49.   {  RAM -> VOC-file (base) + VOCData (base)                                }
  50.   {  XMS -> VOC-file (XMS)  + VOCData (base) + Buffer 65528 bytes (base)    }
  51.   {         Buffer is automaticly being released after the loading process  }
  52.  
  53.   Procedure FreeVOC(Var VOCData: VOCDataRec);
  54.   { Frees up all memory taken by the VOC-file and additional data           }
  55.  
  56.   Procedure PlayVOC(Var VOCData: VOCDataRec);
  57.   { Plays a VOC-file either from base mem or XMS, depending how it has been }
  58.   { loaded. Note: YOU CAN'T PLAY A SAMPLE OVER A MODULE. So stop playing a  }
  59.   { AMIGA MOD-file, if you want to output a VOC-file. Check STATUSWORD, if  }
  60.   { you're currently playing a VOC-file or not.                             }
  61.  
  62.   Procedure StopVOC;
  63.   { Stop playing the VOC-file.                                              }
  64.  
  65.   Procedure BreakVOC;
  66.   { Interrupt playing process.                                              }
  67.  
  68.   Procedure ContiVOC;
  69.   { Continue to play.                                                       }
  70.  
  71.   Procedure Speaker(Access: Word);
  72.   { Turns the connection between DSP and LINE OUT on or off. Turn the spea- }
  73.   { kers on before you play a VOC-file and turn it off before you leave the }
  74.   { program. OFF=0, ON=1                                                    }
  75.  
  76.   Procedure ResetDrv;
  77.   { Turns the internal Soundblaster driver off. You MUST call this function }
  78.   { before exiting the program.                                             }
  79.  
  80.  
  81.   Take a look at VPLAY.PAS how to use the unit. This unit needs DETECT.TPU
  82.   and XMSDRV.TPU for internal processes.