home *** CD-ROM | disk | FTP | other *** search
- {$A+,B-,D-,E+,F-,G-,I+,L-,N-,O-,R-,S-,V+,X-}
- {$M 3000,0,1008}
- {**************************************************************************
-
- VOCADEMO
- Shows how to Dynamically load and play a VOC
-
- Date: 4/4/91
- Version: 1
-
- ***************************************************************************
-
- Copyright (c) 1991, Zackzon Labs.
-
- Author: Anthony Rumble
-
- ==========
- Addresses:
- ==========
- InterNet: c9106510@cc.newcastle.edu
- SIGNet 28:2200/108
-
- Snail Mail:
- 32 Woolwich Rd.
- Hunters Hill, NSW, 2110
- Australia
-
- -------------------------------------------------------------------------
- HISTORY
- -------------------------------------------------------------------------
- 1.0 - Works fine so far
- *************************************************************************}
- program sbpiano;
-
- uses crt, sbvox, misc;
-
- const
- ver='1.0b';
-
- var
- version:integer;
- err:integer;
- ch:char;
- status:word;
- newsnd:pointer;
-
- {****************************************************************************
- MAIN
- ----------------------------------------------------------------------------
- ****************************************************************************}
- begin
- clrscr;
- writeln(' Sound Blaster VOC Player ',ver);
- writeln(' By Anthony Rumble');
- writeln(' Copyright (c) 1991. Zackzon Labs');
- writeln;
- {Get version Number}
- version := vox_get_version;
- writeln(' CT-VOICE Version ',hi(version),'.',lo(version));
- {Initialise the CT-VOICE driver}
- err := vox_initial;
- if err<>0 then
- begin
- case err of
- 1:writeln('Voice Card Fails');
- 2:writeln('I/O read/write faile');
- 3:writeln('Interupt for DMA fails');
- end;
- halt(1);
- end;
-
- {Setup the Status Variable}
- vox_status_addx(@status);
-
- if paramcount>0 then newsnd:=load_voc(paramstr(1))
- else
- begin
- writeln('VOCADEMO <filename.VOC>');
- writeln;
- halt(1);
- end;
-
- vox_terminate;
- vox_output(newsnd);
- repeat;
- until (keypressed) or (status=0);
- if keypressed then ch:=readkey;
- vox_terminate;
- end.