home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / pascal / sbvoice / demo.pas next >
Encoding:
Pascal/Delphi Source File  |  1993-03-31  |  1.2 KB  |  39 lines

  1. {
  2.   This program will TRY to play the Sound Blaster's .VOC files.
  3.  
  4.   It might not work if you have changed the Factory setup of the
  5.   Sound Blaster, But i guess most you guys didnt touch it...
  6.  
  7.   So, If you have any problems call me at : 04-331277 and i might
  8.   be able to help you, Ask for Yaron.
  9.  
  10.   NOTICE: The number is in Israel.
  11.  
  12.   Global number should be : +1-972-4-336582
  13. }
  14.  
  15. {$M 16384,0,0}
  16.  
  17. Uses SBVoice,Crt; { Using the Sound Blaster unit and CRT unit }
  18.  
  19. Begin
  20.   ClrScr;
  21.   Writeln('Demo for using the Pascal''s Sound Blaster unit.'+Chr(10));
  22.   Writeln('Demo - (C) 1991 Crash Line Systems inc.');
  23.   Writeln('Unit - (C) 1991 Amit K. Mathur.'+Chr(10));
  24.   If ParamCount = 1 then { If one parameter is given then start playing }
  25.   Begin
  26.     Writeln('Playing: ',ParamStr(1)+Chr(10));
  27.     LoadVoice(ParamStr(1),0,0); { Load the VOC file into memory }
  28.     SB_SetStatusWord(seg(statusword),ofs(statusword)); { Check for end of VOC }
  29.     SB_Output(seg(soundfile),ofs(soundfile)+26); { Play the VOC itself }
  30.     While not StatusWord=0 do; { Wait till thr VOC has finished playing }
  31.     SB_UnInstall;
  32.   End;
  33.   If ParamCount <> 1 then
  34.   Begin
  35.     Writeln(Chr(10)+'Usage: DEMO [d:\path\]filename.voc'+Chr(10));
  36.     Halt;
  37.   End;
  38. End.
  39.