home *** CD-ROM | disk | FTP | other *** search
/ The Equalizer BBS / equalizer-bbs-collection_2004.zip / equalizer-bbs-collection / DEMOSCENE-STUFF / DEMOVT15.ZIP / EXAMPLES.EXE / C / CTST.C < prev    next >
C/C++ Source or Header  |  1994-04-22  |  1KB  |  52 lines

  1. /* -------------------------- CTST.C ---------------------------- */
  2. /* C interface to DemoVT v1.5 and higher; test program.           */
  3. /* Written bye Jare of Iguana in 1994.                            */
  4. /* -------------------------------------------------------------- */
  5.  
  6. #include <stdio.h>
  7. #include <string.h>
  8. #include <conio.h>
  9. #include <dos.h>
  10.  
  11. #include "cdvt.h"
  12.  
  13. int main() {
  14.     char buf[300];
  15.  
  16.     if (!DVT_Init()) {
  17.         puts("DemoVT is not present.");
  18.         return 1;
  19.     }
  20.     if (DVTInfo == NULL) {
  21.         puts("DemoVT is present, but there was some obscure error.");
  22.         return 1;
  23.     }
  24.     printf("There it is!!!! Info available at address %04X:%04X\n"
  25.            "                API entry point at %04X:%04X\n",
  26.            FP_SEG(DVTInfo), FP_OFF(DVTInfo),
  27.            FP_SEG(DVTInfo->entryPoint), FP_OFF(DVTInfo->entryPoint));
  28.  
  29.     _fmemcpy(buf, DVTAppIdFound + 1, DVTAppIdFound[0]);
  30.     buf[DVTAppIdFound[0]] = '\0';
  31.     printf("DemoVT version string is: >>%s<<\n", buf);
  32.  
  33.     puts("Beginning....");
  34.     DVT_BeginSync();
  35.     DVT_SetSoundVolume(255);
  36. //    DVT_ConnectTimer();
  37.     DVT_WaitForStart();
  38.     puts("GO!");
  39.     while (!kbhit()) {
  40.         DVT_CallMusic();
  41.         printf("\rTicks: %6.6ld  Pos: %2d/%02d", DVT_GetTickCounter(),
  42.                DVTInfo->seq, DVTInfo->pos);
  43.     }
  44.     getch();
  45.     puts("");
  46.  
  47.     return 0;
  48. }
  49.  
  50. /* -------------------------- CTST.C ---------------------------- */
  51.  
  52.