#define INCL_KBD #define INCL_DOSFILEMGR #define INCL_DOSDEVICES #define INCL_DOSEXCEPTIONS /* Exception values */ #define INCL_DOSDATETIME #define INCL_DOSPROCESS #define INCL_BASE #include #include #include #include #include #include #include #include "play.h" char syntax[] = "Incorrect command line syntax. Usage: PLAY [/options] filename\n\ /h - displays this text\n\ /b:xxxxx - buffersize in bytes (default 8192 bytes)\n"; char wrongpar[] = "Unknown parameter.\n"; char *filename = "record.dat"; USHORT CurPosX, CurPosY; int ulBuffersize = 8192; REC_STRUCT RecSettings; /*************************************************************************/ /*************************************************************************/ int main(int argc, char *argv[]) { KBDKEYINFO key; int i; for(i=1;i 64*1024) ulBuffersize = 8192; break; case 'h': case 'H': cout << syntax; return(FALSE); default: cout << wrongpar; return(FALSE); } } else { filename = &argv[i][0]; } } if(!OpenDevice()) return(FALSE); cout << "DART Playback applet for the Manley Gravis UltraSound MMPM/2 Drivers" << endl; cout << "Copyright (1996) Sander van Leeuwen" << endl; cout << "Press Escape to exit" << endl << endl; cout << "Playing file: " << filename << endl; StartPlayback(); while(TRUE) { key.chChar = 0; DosSleep(50); //1 seconde delay KbdCharIn(&key, 1, 0); //don't wait for key if(key.chChar == 27) break; } CloseDevice(); return(TRUE); }