SOSFNCT.H 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. /****************************************************************************
  2. File : sosfnct.h
  3. Programmer(s) : Don Fowler, Nick Skrepetos
  4. Date :
  5. Purpose : Include Files For Zortech C++ Compiler
  6. Last Updated :
  7. ****************************************************************************
  8. Copyright(c) 1993,1994 Human Machine Interfaces
  9. All Rights Reserved
  10. ****************************************************************************/
  11. #ifndef _SOS_FUNCTIONS
  12. #define _SOS_FUNCTIONS
  13. #pragma pack(4)
  14. WORD sosDIGILockMemory ( VOID );
  15. WORD sosDIGIUnLockMemory ( VOID );
  16. WORD sosDIGIInitSystem ( LPSTR, WORD );
  17. WORD sosDIGIUnInitSystem ( VOID );
  18. WORD sosDIGIInitDriver ( WORD, _SOS_HARDWARE far *,
  19. _SOS_INIT_DRIVER far *, WORD far * );
  20. WORD sosDIGIUnInitDriver ( WORD, BOOL, BOOL );
  21. WORD sosDIGILoadDriver ( WORD, WORD, LPSTR far *, LPSTR far *, PSTR, PSTR, WORD * );
  22. WORD sosDIGIUnLoadDriver ( WORD );
  23. WORD sosDIGIGetDeviceCaps ( WORD, LPSOSDEVICECAPS );
  24. #ifdef PHARLAP
  25. LPSTR sosDIGIAllocateBuffer ( WORD , WORD *, WORD * );
  26. #else
  27. LPSTR sosDIGIAllocateBuffer ( WORD , WORD *, WORD * );
  28. #endif
  29. WORD sosDIGIStopSample ( WORD, WORD );
  30. WORD sosDIGISamplesPlaying ( WORD );
  31. BOOL sosDIGISampleDone ( WORD, WORD );
  32. BOOL sosDIGISampleFilling ( WORD, WORD );
  33. WORD sosDIGIStartSample ( WORD, _SOS_START_SAMPLE far * );
  34. WORD sosDIGIContinueSample ( WORD, WORD, _SOS_START_SAMPLE far * );
  35. WORD sosDIGIDetectInit ( LPSTR );
  36. WORD sosDIGIDetectUnInit ( VOID );
  37. WORD sosDIGIDetectFindHardware ( WORD, _SOS_CAPABILITIES far *, WORD far * );
  38. WORD sosDIGIDetectFindFirst ( _SOS_CAPABILITIES far *, WORD far * );
  39. WORD sosDIGIDetectFindNext ( _SOS_CAPABILITIES far *, WORD far * );
  40. WORD sosDIGIDetectGetSettings ( _SOS_HARDWARE far * );
  41. WORD sosDIGIDetectGetCaps ( WORD, _SOS_CAPABILITIES far * );
  42. WORD sosDIGIDetectVerifySettings( _SOS_HARDWARE far * );
  43. PSTR sosGetErrorString ( WORD );
  44. WORD sosDIGILoadTimer ( WORD , LPSTR far *, LPSTR far *, PSTR, PSTR, WORD * );
  45. WORD sosDIGIUnLoadTimer ( WORD );
  46. WORD sosTIMERRegisterEvent ( WORD wCallRate, VOID ( far * lpTimerEvent )( VOID ), WORD far *lpTimerHandle );
  47. WORD sosTIMERInitSystem ( WORD, WORD );
  48. WORD sosTIMERUnInitSystem ( WORD );
  49. WORD sosTIMERSetRate ( WORD );
  50. WORD sosTIMERRemoveEvent ( WORD );
  51. WORD sosTIMERAlterEventRate ( WORD, WORD );
  52. WORD sosTIMERGetEventRate ( WORD );
  53. VOID far sosTIMEROldHandler ( VOID );
  54. VOID far sosTIMERHandler ( VOID );
  55. // functions in soscntl.c
  56. WORD sosDIGISetSampleVolume ( WORD, WORD, WORD );
  57. WORD sosDIGIGetSampleVolume ( WORD, WORD );
  58. WORD sosDIGISetChannel ( WORD, WORD, WORD );
  59. WORD sosDIGIGetChannel ( WORD, WORD );
  60. WORD sosDIGIGetBytesProcessed ( WORD, WORD );
  61. WORD sosDIGIGetLoopCount ( WORD, WORD );
  62. WORD sosDIGISetPanLocation ( WORD, WORD, WORD );
  63. WORD sosDIGIGetPanLocation ( WORD, WORD );
  64. DWORD sosDIGISetPitch ( WORD, WORD, DWORD );
  65. DWORD sosDIGIGetPitch ( WORD, WORD );
  66. WORD sosDIGIGetDMAPosition ( WORD );
  67. WORD sosDIGISetPanSpeed ( WORD, WORD, WORD );
  68. WORD sosDIGIGetPanSpeed ( WORD, WORD );
  69. WORD sosDIGIGetSampleID ( WORD, WORD );
  70. WORD sosDIGIGetSampleHandle ( WORD, WORD );
  71. WORD sosDIGISetMasterVolume ( WORD, WORD );
  72. #ifdef PHARLAP
  73. VOID sosFreeVDSPage ( unsigned short, unsigned short, DWORD );
  74. WORD sosAllocVDSPage ( unsigned short *, unsigned short *, DWORD * );
  75. #else
  76. WORD sosAllocVDSPage ( LPSTR *, WORD *, WORD * );
  77. VOID sosFreeVDSPage ( WORD, WORD, LONG );
  78. #endif
  79. #ifdef __cplusplus
  80. extern "C" {
  81. #endif
  82. #ifdef PHARLAP
  83. extern int cdecl sosRealFree ( int );
  84. extern BOOL cdecl _sos_read( WORD, LPSTR, WORD, WORD * );
  85. extern int cdecl sosRealAlloc( int, int *, int * );
  86. extern void cdecl sosDRVFarMemCopy( LPSTR, LPSTR, WORD );
  87. extern int cdecl sosGetCS( VOID );
  88. extern int cdecl sosGetES( VOID );
  89. #else
  90. extern int cdecl sosRealAlloc ( int, int *, int * );
  91. extern int cdecl sosRealFree ( int );
  92. #endif
  93. // sos driver functions
  94. extern WORD cdecl sosDRVLockMemory ( DWORD, DWORD );
  95. extern WORD cdecl sosDRVUnLockMemory ( DWORD, DWORD );
  96. extern void cdecl sosDRVGetCapsInfo ( LPSTR, LPSTR, _SOS_CAPABILITIES far * );
  97. extern void cdecl sosDetDRVGetCapsInfo ( LPSTR, LPSTR, _SOS_CAPABILITIES far * );
  98. extern void cdecl sosDRVGetCapsPtr ( LPSTR, LPSTR, _SOS_CAPABILITIES far * );
  99. extern void cdecl sosDRVInit ( LPSTR, LPSTR, int, int, int, int, int, int );
  100. extern void cdecl sosDRVStart ( LPSTR, LPSTR, int, int );
  101. extern void cdecl sosDRVSetRate ( LPSTR, LPSTR, int );
  102. extern void cdecl sosDRVSetAction ( LPSTR, LPSTR );
  103. extern void cdecl sosDRVStop ( LPSTR, LPSTR );
  104. extern void cdecl sosDRVUnInit ( LPSTR, LPSTR );
  105. extern void cdecl sosDRVGetFillInfo ( LPSTR, LPSTR, LPSTR, int, int, int, _SOS_FILL_INFO * );
  106. extern void cdecl sosFillSampleStructs ( PSTR, LPSTR );
  107. extern WORD cdecl sosDetDRVExist ( LPSTR, LPSTR );
  108. extern WORD cdecl sosDetDRVGetSettings ( LPSTR, LPSTR );
  109. extern WORD cdecl sosDetDRVVerifySettings( LPSTR, WORD, WORD, WORD, LPSTR );
  110. extern WORD cdecl sosDIGIInitForWindows( WORD );
  111. extern WORD cdecl sosDIGIUnInitForWindows( WORD );
  112. extern LPSTR cdecl sosAllocateFarMem ( WORD, PSTR, WORD * );
  113. extern LPSTR cdecl sosCreateAliasCS ( LPSTR );
  114. extern VOID cdecl sosFreeSelector ( LPSTR, DWORD );
  115. extern LPSTR cdecl sosMAKEDOSPtr ( PSTR );
  116. extern VOID cdecl sosDetDRVSetEnvString ( DWORD, PSTR );
  117. extern PSTR cdecl sosDetDRVGetEnvString ( DWORD );
  118. extern VOID cdecl sosDetDRVEnvStringInit ( LPSTR, LPSTR );
  119. extern VOID cdecl sosDRVSetupCallFunctions( LPSTR, LPSTR, LPSTR, LPSTR );
  120. extern WORD cdecl sosDRVGetFreeMemory ( VOID );
  121. extern WORD cdecl sosDRVAllocVDSStruct ( WORD, WORD *, WORD * );
  122. extern WORD cdecl sosDRVFreeVDSStruct ( WORD, WORD );
  123. extern WORD cdecl sosDRVIsWindowsActive ( VOID );
  124. extern WORD cdecl sosDRVVDSGetBuffer ( WORD );
  125. extern WORD cdecl sosDRVVDSFreeBuffer ( WORD );
  126. extern WORD cdecl getDS( VOID );
  127. extern WORD cdecl sosDRVMakeDMASelector ( WORD );
  128. extern WORD cdecl sosDRVFreeDMASelector ( WORD );
  129. extern void cdecl sosTIMERDRVInit( int wRate, void ( far * )( void ) );
  130. extern void cdecl sosTIMERDRVUnInit( void );
  131. extern void cdecl sosTIMERDRVHandler( void );
  132. extern void cdecl sosTIMERDRVFHandler( void );
  133. extern void cdecl sosTIMERDRVEnable( void );
  134. extern void cdecl sosTIMERDRVDisable( void );
  135. extern void cdecl sosTIMERDRVCallOld( void );
  136. extern void cdecl sosTIMERDRVSetRate( WORD );
  137. extern void cdecl sosDIGITimer_Start( void );
  138. extern void cdecl sosDIGITimer_End( void );
  139. extern void cdecl sosDIGIDrv_Start( void );
  140. extern void cdecl sosDIGIDrv_End( void );
  141. #ifdef __cplusplus
  142. }
  143. #endif
  144. // external functions for handling system initialization and
  145. // uninitialization
  146. WORD sosEXDIGInitDriver ( WORD, WORD, WORD, LPSTR,
  147. _SOS_HARDWARE far *, WORD * );
  148. WORD sosEXDIGIUnInitDriver ( VOID );
  149. WORD sosEXDETFindDriver ( WORD, LPSTR, _SOS_HARDWARE far *,
  150. _SOS_CAPABILITIES far * );
  151. // memory locking prototypes
  152. VOID sosDIGICaps_Start( VOID );
  153. VOID sosDIGICaps_End( VOID );
  154. VOID sosDIGIErr_Start( VOID );
  155. VOID sosDIGIErr_End( VOID );
  156. VOID sosDIGITmr_Start( VOID );
  157. VOID sosDIGITmr_End( VOID );
  158. VOID sosDIGIStart_Start( VOID );
  159. VOID sosDIGIStart_End( VOID );
  160. VOID sosDIGIPlyng_Start( VOID );
  161. VOID sosDIGIPlyng_End( VOID );
  162. VOID sosDIGIRate_Start( VOID );
  163. VOID sosDIGIRate_End( VOID );
  164. VOID sosDIGIDone_Start( VOID );
  165. VOID sosDIGIDone_End( VOID );
  166. VOID sosDIGIDetec_Start( VOID );
  167. VOID sosDIGIDetec_End( VOID );
  168. VOID sosDIGIInit_Start( VOID );
  169. VOID sosDIGIInit_End( VOID );
  170. VOID sosDIGILoad_Start( VOID );
  171. VOID sosDIGILoad_End( VOID );
  172. VOID sosDIGICntl_Start( VOID );
  173. VOID sosDIGICntl_End( VOID );
  174. #pragma pack()
  175. #endif