home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / sound / sbutil / demosrc.exe / VOCADEMO.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1991-04-25  |  2.2 KB  |  89 lines

  1. {$A+,B-,D-,E+,F-,G-,I+,L-,N-,O-,R-,S-,V+,X-}
  2. {$M 3000,0,1008}
  3. {**************************************************************************
  4.  
  5.                                VOCADEMO
  6.              Shows how to Dynamically load and play a VOC
  7.  
  8.                              Date: 4/4/91
  9.                               Version: 1
  10.  
  11. ***************************************************************************
  12.  
  13.                    Copyright (c) 1991, Zackzon Labs.
  14.  
  15.                        Author: Anthony Rumble
  16.  
  17. ==========
  18. Addresses:
  19. ==========
  20. InterNet: c9106510@cc.newcastle.edu
  21. SIGNet 28:2200/108
  22.  
  23. Snail Mail:
  24.  32 Woolwich Rd.
  25.  Hunters Hill, NSW, 2110
  26.  Australia
  27.  
  28. -------------------------------------------------------------------------
  29.                               HISTORY
  30. -------------------------------------------------------------------------
  31. 1.0 - Works fine so far
  32. *************************************************************************}
  33. program sbpiano;
  34.  
  35. uses crt, sbvox, misc;
  36.  
  37. const
  38.  ver='1.0b';
  39.  
  40. var
  41.  version:integer;
  42.  err:integer;
  43.  ch:char;
  44.  status:word;
  45.  newsnd:pointer;
  46.  
  47. {****************************************************************************
  48.                                    MAIN
  49. ----------------------------------------------------------------------------
  50. ****************************************************************************}
  51. begin
  52.  clrscr;
  53.  writeln('   Sound Blaster VOC Player ',ver);
  54.  writeln('   By Anthony Rumble');
  55.  writeln('   Copyright (c) 1991. Zackzon Labs');
  56.  writeln;
  57.  {Get version Number}
  58.  version := vox_get_version;
  59.  writeln('   CT-VOICE Version ',hi(version),'.',lo(version));
  60.  {Initialise the CT-VOICE driver}
  61.  err := vox_initial;
  62.  if err<>0 then
  63.  begin
  64.   case err of
  65.    1:writeln('Voice Card Fails');
  66.    2:writeln('I/O read/write faile');
  67.    3:writeln('Interupt for DMA fails');
  68.   end;
  69.   halt(1);
  70.  end;
  71.  
  72.  {Setup the Status Variable}
  73.  vox_status_addx(@status);
  74.  
  75.  if paramcount>0 then newsnd:=load_voc(paramstr(1))
  76.  else
  77.  begin
  78.   writeln('VOCADEMO <filename.VOC>');
  79.   writeln;
  80.   halt(1);
  81.  end;
  82.  
  83.  vox_terminate;
  84.  vox_output(newsnd);
  85.  repeat;
  86.  until (keypressed) or (status=0);
  87.  if keypressed then ch:=readkey;
  88.  vox_terminate;
  89. end.