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

  1. {$A+,B-,D-,E+,F-,I+,L-,N-,O-,R-,S-,V+}
  2. {$M 2024,0,10000}
  3. {**************************************************************************
  4.  
  5.                                CMFDEMO
  6.                        Program to test SBFMPAS
  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 testcmf;
  34.  
  35. uses crt, sbfmpas;
  36.  
  37. var
  38.  muzak:pointer;
  39.  version:word;
  40.  status:byte;
  41.  ch:char;
  42.  
  43. begin
  44.  writeln('SBMF Play CMF Demo. By Anthony Rumble.');
  45.  writeln('Copyright (c) Zackzon Labs');
  46.  if paramcount<1 then
  47.  begin
  48.   writeln('Help.');
  49.   writeln('Command Line Options');
  50.   writeln('CMFDEMO <filename.CMF>');
  51.   writeln('Plays the CMF file filename.CMF');
  52.   writeln;
  53.   halt(1);
  54.  end;
  55.  if initialize then writeln('SBFMDRV Active') else
  56.  begin
  57.   writeln('SBFMDRV not Active');
  58.   halt(1);
  59.  end;
  60.  version:=SBFM_Get_Version;
  61.  writeln('Version ',hi(version),'.',lo(version));
  62.  SBFM_Set_Status(@status);
  63.  muzak:=SBFM_Load_CMF(paramstr(1));
  64.  if not SBFM_Play_Music(muzak) then
  65.  begin
  66.   writeln('Problem Playing Music');
  67.   halt(1);
  68.  end;
  69.  repeat;
  70.  write('Status = ',status);
  71.  write(#13);
  72.  until ((keypressed) or (status=0));
  73.  if keypressed then ch:=readkey;
  74.  SBFM_Reset;
  75. end.
  76.