Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

513 lines
17 KiB

  1. /****************************************************************************
  2. MODULE: MIDI_OBJ.HPP
  3. Tab Settings: 5 9
  4. PURPOSE: Header to define SWFF MIDI device objects
  5. FUNCTIONS:
  6. Classes with members and methods are kept in this header file
  7. Version Date Author Comments
  8. 0.1 10-Sep-96 MEA original
  9. 1.1 17-Mar-97 MEA DX-FF mode
  10. 21-Mar-99 waltw Removed unreferenced UpdateJoystickParams,
  11. GetJoystickParams
  12. 16-Mar-99 waltw Add dwDeviceID param: CJoltMidi::Initialize
  13. and pass down food chain
  14. ****************************************************************************/
  15. #ifndef MIDI_OBJ_SEEN
  16. #define MIDI_OBJ_SEEN
  17. #include <windows.h>
  18. #include <mmsystem.h>
  19. #include <assert.h>
  20. #include "hau_midi.hpp"
  21. #include "midi.hpp"
  22. #include "dinput.h"
  23. #include "vxdioctl.hpp"
  24. #include "ffeature.h"
  25. #include "sw_error.hpp"
  26. #define MAX_SCALE 1.27 // 1 to 100 = 1 to 127
  27. #define TICKRATE 2 // 2 ms per tick divisor
  28. #define SWFF_SHAREDMEM_FILE "SWFF_SharedMemFile"
  29. #define SWFF_MIDIEVENT "SWFFMidiEvent\0"
  30. #define SWFF_SHAREDMEM_MUTEX "SWFFSharedMemMutex\0"
  31. #define SWFF_JOLTOUTPUTDATA_MUTEX "SWFFJoltOutputDataMutex\0"
  32. #define SIZE_SHARED_MEMORY 1024 // 1024 bytes
  33. #define MUTEX_TIMEOUT 10000 // 10 seconds timeout
  34. // spring
  35. #define DEF_SCALE_KX 100
  36. #define DEF_SCALE_KY 100
  37. // damper
  38. #define DEF_SCALE_BX 100
  39. #define DEF_SCALE_BY 100
  40. // inertia
  41. #define DEF_SCALE_MX 80
  42. #define DEF_SCALE_MY 80
  43. // friction
  44. #define DEF_SCALE_FX 100
  45. #define DEF_SCALE_FY 100
  46. // wall
  47. #define DEF_SCALE_W 100
  48. typedef struct _FIRMWARE_PARAMS
  49. {
  50. DWORD dwScaleKx;
  51. DWORD dwScaleKy;
  52. DWORD dwScaleBx;
  53. DWORD dwScaleBy;
  54. DWORD dwScaleMx;
  55. DWORD dwScaleMy;
  56. DWORD dwScaleFx;
  57. DWORD dwScaleFy;
  58. DWORD dwScaleW;
  59. } FIRMWARE_PARAMS, *PFIRMWARE_PARAMS;
  60. void GetFirmwareParams(UINT nJoystickID, PFIRMWARE_PARAMS pFirmwareParams);
  61. typedef struct _SYSTEM_PARAMS
  62. {
  63. RTCSPRING_PARAM RTCSpringParam;
  64. } SYSTEM_PARAMS, *PSYSTEM_PARAMS;
  65. void GetSystemParams(UINT nJoystickID, PSYSTEM_PARAMS pSystemParams);
  66. #define DEF_XY_CONST 22500
  67. #define DEF_ROT_CONST 17272
  68. #define DEF_SLDR_CONST 126
  69. #define DEF_AJ_POS 4
  70. #define DEF_AJ_ROT 2
  71. #define DEF_AJ_SLDR 2
  72. #define DEF_SPR_SCL ((DWORD)-256)
  73. #define DEF_BMP_SCL 60
  74. #define DEF_DMP_SCL ((DWORD)-3436)
  75. #define DEF_INERT_SCL ((DWORD)-2562)
  76. #define DEF_VEL_OFFSET_SCL 54
  77. #define DEF_ACC_OFFSET_SCL 40
  78. #define DEF_Y_MOT_BOOST 19661
  79. #define DEF_X_MOT_SATURATION 254
  80. typedef struct _JOYSTICK_PARAMS
  81. {
  82. DWORD dwXYConst;
  83. DWORD dwRotConst;
  84. DWORD dwSldrConst;
  85. DWORD dwAJPos;
  86. DWORD dwAJRot;
  87. DWORD dwAJSldr;
  88. DWORD dwSprScl;
  89. DWORD dwBmpScl;
  90. DWORD dwDmpScl;
  91. DWORD dwInertScl;
  92. DWORD dwVelOffScl;
  93. DWORD dwAccOffScl;
  94. DWORD dwYMotBoost;
  95. DWORD dwXMotSat;
  96. DWORD dwReserved;
  97. DWORD dwMasterGain;
  98. } JOYSTICK_PARAMS, *PJOYSTICK_PARAMS;
  99. // Shared Memory data structure
  100. typedef struct _SHARED_MEMORY {
  101. char m_cWaterMark[MAX_SIZE_SNAME];
  102. ULONG m_RefCnt;
  103. HANDLE m_hMidiOut;
  104. MIDIINFO m_MidiOutInfo;
  105. } SHARED_MEMORY, *PSHARED_MEMORY;
  106. // Effect Types conversion structure
  107. typedef struct _EFFECT_TYPE {
  108. ULONG ulHostSubType;
  109. BYTE bDeviceSubType;
  110. } EFFECT_TYPE, *PEFFECT_TYPE;
  111. //
  112. // --- ROM Effects default parameters structure
  113. //
  114. typedef struct _ROM_FX_PARAM {
  115. ULONG m_ROM_Id;
  116. ULONG m_ForceOutputRate;
  117. ULONG m_Gain;
  118. ULONG m_Duration;
  119. } ROM_FX_PARAM, *PROM_FX_PARAM;
  120. // Structure to pass instance data from the application
  121. // to the low-level callback function. (Output done notification)
  122. typedef struct callbackInstance_tag
  123. {
  124. HWND hWnd;
  125. HANDLE hSelf;
  126. DWORD dwDevice;
  127. HMIDIOUT hMapper;
  128. } CALLBACKINSTANCEDATA;
  129. typedef CALLBACKINSTANCEDATA FAR *LPCALLBACKINSTANCEDATA;
  130. class CJoltMidi;
  131. // --- MIDI Effect base class
  132. class CMidiEffect : public SYS_EX_HDR
  133. {
  134. protected:
  135. BYTE m_OpCode; // Sub-command opcode: e.g. DNLOAD_DATA
  136. BYTE m_SubType; // Effect SubType: e.g. BE_SPRING
  137. BYTE m_bEffectID; // 0x7F = Create New, else valid Effect ID
  138. MIDI_EFFECT Effect;
  139. MIDI_ENVELOPE Envelope;
  140. BYTE m_bAxisMask;
  141. BYTE m_bPlayMode; // DL_PLAY_SUPERIMPOSE || DL_PLAY_SOLO
  142. LPSTR m_pBuffer; // Ptr to a Midi SYS_EX Buffer
  143. int m_MidiBufferSize; // Size of SYS_EX buffer
  144. int m_LoopCount; // Loop Count for the playback
  145. LONG m_Duration; // Atomic Effect Duration (for 1 cycle)
  146. ENVELOPE m_Envelope; // Atomic Envelope (no loop count)
  147. EFFECT m_OriginalEffectParam; // the effect param when the effect was created
  148. public:
  149. // Constructor/Destructor
  150. CMidiEffect(ULONG ulButtonPlayMask);
  151. CMidiEffect(PEFFECT pEffect, PENVELOPE pEnvelope);
  152. virtual ~CMidiEffect(void);
  153. // Methods
  154. ULONG SubTypeOf(void);
  155. BYTE EffectIDOf(void) { return m_bEffectID; }
  156. ULONG DurationOf(void) { return m_Duration * TICKRATE; }
  157. BYTE AxisMaskOf(void) { return m_bAxisMask; }
  158. ULONG DirectionAngle2DOf(void)
  159. { return(Effect.bAngleL+((USHORT)Effect.bAngleH<<7));}
  160. BYTE GainOf(void) { return Effect.bGain; }
  161. ULONG ButtonPlayMaskOf(void)
  162. { return(Effect.bButtonPlayL+((USHORT)Effect.bButtonPlayH<<7));}
  163. ULONG ForceOutRateOf(void)
  164. { return (Effect.bForceOutRateL+((USHORT)Effect.bForceOutRateH<<7));}
  165. ULONG PlayModeOf(void) {
  166. if (DL_PLAY_SOLO == m_bPlayMode)
  167. return PLAY_SOLO;
  168. else
  169. return PLAY_SUPERIMPOSE; }
  170. int MidiBufferSizeOf(void) { return m_MidiBufferSize; }
  171. LPSTR LockedBufferPtrOf(void) { return m_pBuffer; }
  172. int LoopCountOf(void) { return m_LoopCount; }
  173. PEFFECT OriginalEffectParamOf() { return &m_OriginalEffectParam; }
  174. ENVELOPE * EnvelopePtrOf() { return &m_Envelope; }
  175. void SetSubType(ULONG ulArg);
  176. void SetEffectID(BYTE bArg) { m_bEffectID = bArg; }
  177. void SetDuration(ULONG ulArg);
  178. void SetAxisMask(BYTE bArg) { m_bAxisMask = bArg; }
  179. void SetDirectionAngle(ULONG ulArg)
  180. { Effect.bAngleL = (BYTE) ulArg & 0x7f;
  181. Effect.bAngleH = (BYTE) ((ulArg >> 7) & 0x03); }
  182. void SetGain(BYTE bArg) { Effect.bGain = (BYTE) (bArg * MAX_SCALE); }
  183. void SetButtonPlaymask(ULONG ulArg)
  184. { Effect.bButtonPlayL = (BYTE) ulArg & 0x7f;
  185. Effect.bButtonPlayH = (BYTE) ((ulArg >> 7) & 0x03);}
  186. void SetForceOutRate(ULONG ulArg)
  187. { Effect.bForceOutRateL = (BYTE) ulArg & 0x7f;
  188. Effect.bForceOutRateH = (BYTE) ((ulArg >> 7) & 0x03); }
  189. void SetMidiBufferSize(int nArg) { m_MidiBufferSize = nArg; }
  190. void SetMidiBufferPtr(LPSTR pArg) { m_pBuffer = pArg; }
  191. void SetPlayMode(ULONG ulArg) {
  192. if (PLAY_SOLO == ulArg)
  193. m_bPlayMode = DL_PLAY_SOLO;
  194. else
  195. m_bPlayMode = DL_PLAY_SUPERIMPOSE; }
  196. void SetLoopCount(ULONG ulAction)
  197. { m_LoopCount = ((ulAction >> 16) & 0xffff); }
  198. void SetTotalDuration(void);
  199. void SetEnvelope(PENVELOPE pArg)
  200. { m_Envelope.m_Type = pArg->m_Type;
  201. m_Envelope.m_Attack = pArg->m_Attack;
  202. m_Envelope.m_Sustain = pArg->m_Sustain;
  203. m_Envelope.m_Decay = pArg->m_Decay;
  204. m_Envelope.m_StartAmp = pArg->m_StartAmp;
  205. m_Envelope.m_SustainAmp = pArg->m_SustainAmp;
  206. m_Envelope.m_EndAmp = pArg->m_EndAmp; }
  207. void ComputeEnvelope(void);
  208. BYTE ComputeChecksum(PBYTE pArg, int nBufferSize);
  209. virtual PBYTE GenerateSysExPacket(void) = 0;
  210. HRESULT SendPacket(PDNHANDLE pDnloadID, int nPacketSize);
  211. virtual HRESULT DestroyEffect();
  212. };
  213. // --- MIDI Behavioral Effect derived class
  214. class CMidiBehavioral : public CMidiEffect
  215. {
  216. protected:
  217. BE_XXX m_BE_XXXParam; // Behavioral Parameters (non scaled)
  218. public:
  219. // Constructor/Destructor
  220. CMidiBehavioral(PEFFECT pEffect, PENVELOPE pEnvelope, PBE_XXX pBE_XXX);
  221. virtual ~CMidiBehavioral(void);
  222. // Methods
  223. LONG XConstantOf(void) { return m_BE_XXXParam.m_XConstant; }
  224. LONG YConstantOf(void) { return m_BE_XXXParam.m_YConstant; }
  225. LONG Param3Of(void) { return m_BE_XXXParam.m_Param3; }
  226. LONG Param4Of(void) { return m_BE_XXXParam.m_Param4; }
  227. void SetEffectParams(PEFFECT pEffect, PBE_XXX pBE_XXX);
  228. void SetXConstant(LONG lArg) { m_BE_XXXParam.m_XConstant = lArg; }
  229. void SetYConstant(LONG lArg) { m_BE_XXXParam.m_YConstant = lArg; }
  230. void SetParam3(LONG lArg) { m_BE_XXXParam.m_Param3 = lArg; }
  231. void SetParam4(LONG lArg) { m_BE_XXXParam.m_Param4 = lArg; }
  232. virtual PBYTE GenerateSysExPacket(void);
  233. };
  234. // --- MIDI Friction Effect derived class
  235. class CMidiFriction : public CMidiBehavioral
  236. {
  237. protected:
  238. public:
  239. // Constructor/Destructor
  240. CMidiFriction(PEFFECT pEffect, PENVELOPE pEnvelope, PBE_XXX pBE_XXX);
  241. virtual ~CMidiFriction(void);
  242. // Methods
  243. virtual PBYTE GenerateSysExPacket(void);
  244. };
  245. // --- MIDI Wall Effect derived class
  246. class CMidiWall : public CMidiBehavioral
  247. {
  248. protected:
  249. public:
  250. // Constructor/Destructor
  251. CMidiWall(PEFFECT pEffect, PENVELOPE pEnvelope, PBE_XXX pBE_XXX);
  252. virtual ~CMidiWall(void);
  253. // Methods
  254. virtual PBYTE GenerateSysExPacket(void);
  255. };
  256. // --- MIDI RTC Spring Effect derived class
  257. class CMidiRTCSpring : public CMidiEffect
  258. {
  259. protected:
  260. RTCSPRING_PARAM m_RTCSPRINGParam; // RTCSpring Parameters (non scaled)
  261. public:
  262. // Constructor/Destructor
  263. CMidiRTCSpring(PRTCSPRING_PARAM pRTCSpring);
  264. virtual ~CMidiRTCSpring(void);
  265. // Methods
  266. LONG XKConstantOf(void) { return m_RTCSPRINGParam.m_XKConstant; }
  267. LONG YKConstantOf(void) { return m_RTCSPRINGParam.m_YKConstant; }
  268. LONG XAxisCenterOf(void) { return m_RTCSPRINGParam.m_XAxisCenter; }
  269. LONG YAxisCenterOf(void) { return m_RTCSPRINGParam.m_YAxisCenter; }
  270. LONG XSaturationOf(void) { return m_RTCSPRINGParam.m_XSaturation; }
  271. LONG YSaturationOf(void) { return m_RTCSPRINGParam.m_YSaturation; }
  272. LONG XDeadBandOf(void) { return m_RTCSPRINGParam.m_XDeadBand; }
  273. LONG YDeadBandOf(void) { return m_RTCSPRINGParam.m_YDeadBand; }
  274. void SetEffectParams(PRTCSPRING_PARAM pRTCSpring);
  275. // Methods
  276. virtual PBYTE GenerateSysExPacket(void);
  277. };
  278. // --- MIDI Delay Effect derived class
  279. class CMidiDelay : public CMidiEffect
  280. {
  281. protected:
  282. public:
  283. // Constructor/Destructor
  284. CMidiDelay(PEFFECT pEffect);
  285. virtual ~CMidiDelay(void);
  286. // Methods
  287. virtual PBYTE GenerateSysExPacket(void);
  288. };
  289. // --- MIDI Synthesized Effect derived class
  290. class CMidiSynthesized : public CMidiEffect
  291. {
  292. protected:
  293. ULONG m_Freq; // Frequency
  294. LONG m_MaxAmp; // Maximum Amplitude
  295. LONG m_MinAmp; // Minimum Amplitude
  296. public:
  297. // Constructor/Destructor
  298. CMidiSynthesized(PEFFECT pEffect, PENVELOPE pEnvelope, PSE_PARAM pParam);
  299. virtual ~CMidiSynthesized(void);
  300. // Methods
  301. ULONG FreqOf(void) { return m_Freq; }
  302. LONG MaxAmpOf(void) { return m_MaxAmp; }
  303. LONG MinAmpOf(void) { return m_MinAmp; }
  304. void SetEffectParams(PEFFECT pEffect, PSE_PARAM pParam, ULONG ulMode);
  305. void SetFreq(ULONG ulArg) { m_Freq = ulArg; }
  306. void SetMaxAmp(LONG lArg) { m_MaxAmp = lArg; }
  307. void SetMinAmp(LONG lArg) { m_MinAmp = lArg; }
  308. virtual PBYTE GenerateSysExPacket(void);
  309. };
  310. // --- MIDI UD_Waveform Effect derived class
  311. class CMidiUD_Waveform : public CMidiEffect
  312. {
  313. protected:
  314. EFFECT m_Effect;
  315. int m_NumberOfVectors;// Size of the Array
  316. PBYTE m_pArrayData; // Pointer to an scaled (+/-127) array of forces
  317. PBYTE m_pRawData; // Pointer to unscaled array of forces
  318. public:
  319. // Constructor/Destructor
  320. CMidiUD_Waveform(PEFFECT pEffect);
  321. CMidiUD_Waveform(PEFFECT pEffect, ULONG ulNumVectors, PLONG pArray);
  322. virtual ~CMidiUD_Waveform(void);
  323. // Methods
  324. PEFFECT EffectPtrOf() { return (PEFFECT) &m_Effect.m_Bytes; }
  325. int NumberOfVectorsOf(void) { return m_NumberOfVectors; }
  326. PBYTE ArrayDataPtrOf(void) { return m_pArrayData; }
  327. int CompressWaveform(PBYTE pSrcArray, PBYTE pDestArray, int nSrcSize, ULONG *pNewRate);
  328. void SetEffectParams(PEFFECT pEffect);
  329. int SetTypeParams(int nSize, PLONG pArray, ULONG *pNewRate);
  330. virtual PBYTE GenerateSysExPacket(void);
  331. };
  332. // --- Jolt Device base class
  333. class CJoltMidi
  334. {
  335. protected:
  336. LOCAL_PRODUCT_ID m_ProductID; // Device information
  337. FIRMWARE_PARAMS m_FirmwareParams; // Behavioral effect fudge factors
  338. DELAY_PARAMS m_DelayParams; // Timing parameters
  339. // Power Cycle Restore Thread variables
  340. #if 0
  341. DWORD m_dwThreadID;
  342. HANDLE m_hDataEvent;
  343. HANDLE m_hDataThread;
  344. DWORD m_dwThreadSignal;
  345. DWORD m_dwThreadStatus; // TRUE = thread is alive, else FALSE
  346. #endif
  347. ULONG m_COMMInterface; // COMM_WINMM || COMM_MIDI_BACKDOOR || COMM_SERIAL_BACKDOOR || COMM_SERIAL_FILE
  348. ULONG m_COMMPort; // e.g. 330, 3F8, or 0 for winmm
  349. HANDLE m_hVxD; // Handle to VxD for IOCTL interface
  350. HANDLE m_hMidiOutputEvent; // Handle to Midi Output Event
  351. BYTE m_MidiChannel; // Midi Channel
  352. SWFF_ERROR m_Error; // System Error codes
  353. MIDIINFO m_MidiOutInfo; // Midi output Info structure
  354. BOOL m_ShutdownSent; // TRUE = Last command sent was Shutdown
  355. DIAG_COUNTER m_DiagCounter; // For debugging, Diagnostics counter
  356. SWDEVICESTATE m_DeviceState;
  357. HANDLE m_hPrimaryBuffer; // Handle to locked memory
  358. LPBYTE m_pPrimaryBuffer; // Pointer to the Primary buffer memory
  359. PROM_FX_PARAM m_pRomFxTable; // Default settings for ROM Effects
  360. HANDLE m_hSharedMemoryFile; // Handle to a memory mapped file
  361. PSHARED_MEMORY m_pSharedMemory; // Pointer to a Shared Memory structure
  362. HANDLE m_hSWFFDataMutex; // Local copy of Mutex handle
  363. public:
  364. // Constructor/Destructor
  365. CJoltMidi(void);
  366. ~CJoltMidi(void);
  367. // Methods
  368. HANDLE SWFFDataMutexHandleOf() { return m_hSWFFDataMutex; }
  369. HRESULT Initialize(DWORD dwDeviceID);
  370. #if 0
  371. DWORD ThreadIDOf(void) { return m_dwThreadID; }
  372. HANDLE DataEventOf(void) {return m_hDataEvent; }
  373. HANDLE DataThreadOf(void) {return m_hDataThread; }
  374. DWORD ThreadSignalOf(void) { return m_dwThreadSignal; }
  375. DWORD ThreadStatusOf(void) { return m_dwThreadStatus; }
  376. #endif
  377. HANDLE MidiOutputEventHandleOf(void) { return m_hMidiOutputEvent; }
  378. HMIDIOUT MidiOutHandleOf(void) { return HMIDIOUT(m_pSharedMemory->m_hMidiOut); }
  379. UINT GetSharedMemoryReferenceCount() { return (m_pSharedMemory != NULL) ? m_pSharedMemory->m_RefCnt : 0; }
  380. BYTE MidiChannelOf(void) { return m_MidiChannel; }
  381. void CJoltGetLastError(SWFF_ERROR* pError)
  382. { pError->HCode = m_Error.HCode;
  383. pError->ulDriverCode = m_Error.ulDriverCode; }
  384. MIDIINFO *MidiOutInfoOf(void) { return &m_MidiOutInfo; }
  385. BOOL ShutdownSentOf(void) { return m_ShutdownSent; }
  386. PDIAG_COUNTER DiagCounterPtrOf() { return &m_DiagCounter; }
  387. PBYTE PrimaryBufferPtrOf() { return m_pPrimaryBuffer; }
  388. LOCAL_PRODUCT_ID* ProductIDPtrOf() { return &m_ProductID; }
  389. PFIRMWARE_PARAMS FirmwareParamsPtrOf() {return &m_FirmwareParams; }
  390. PDELAY_PARAMS DelayParamsPtrOf() {return &m_DelayParams; }
  391. ULONG COMMInterfaceOf() { return m_COMMInterface; }
  392. ULONG COMMPortOf() { return m_COMMPort; }
  393. #if 0
  394. void SetThreadIDOf(DWORD dwArg) { m_dwThreadID = dwArg; }
  395. void SetDataEvent(HANDLE hArg) { m_hDataEvent = hArg; }
  396. void SetDataThread(HANDLE hArg) { m_hDataThread = hArg; }
  397. void SetThreadSignal(DWORD dwArg) { m_dwThreadSignal = dwArg; }
  398. void SetThreadStatus(DWORD dwArg) { m_dwThreadStatus = dwArg; }
  399. BOOL LockJoltOutputData(void);
  400. void UnlockJoltOutputData(void);
  401. #endif
  402. BOOL LockSharedMemory(void);
  403. void UnlockSharedMemory(void);
  404. void SetSWFFDataMutexHandle(HANDLE hArg) { m_hSWFFDataMutex = hArg;}
  405. void SetMidiOutHandle(HMIDIOUT hArg) { LockSharedMemory();
  406. m_pSharedMemory->m_hMidiOut = hArg;
  407. UnlockSharedMemory();}
  408. void SetMidiChannel(BYTE nArg) { m_MidiChannel = nArg; }
  409. void SetShutdownSent(BOOL bArg) { m_ShutdownSent = bArg; }
  410. void ClearDiagCounters(void) { m_DiagCounter.m_NACKCounter = 0;
  411. m_DiagCounter.m_LongMsgCounter = 0;
  412. m_DiagCounter.m_ShortMsgCounter = 0;
  413. m_DiagCounter.m_RetryCounter = 0; }
  414. void BumpNACKCounter(void) { m_DiagCounter.m_NACKCounter++; }
  415. void BumpLongMsgCounter(void) { m_DiagCounter.m_LongMsgCounter++; }
  416. void BumpShortMsgCounter(void) { m_DiagCounter.m_ShortMsgCounter++; }
  417. void BumpRetryCounter(void) { m_DiagCounter.m_RetryCounter++; }
  418. HRESULT LogError(HRESULT hSystemError, HRESULT DriverError);
  419. SWDEVICESTATE GetSWDeviceStateNoUpdate() const { return m_DeviceState; }
  420. void UpdateDeviceMode(ULONG ulMode);
  421. HRESULT GetJoltID(LOCAL_PRODUCT_ID* pProductID);
  422. // Midi management
  423. BOOL DetectMidiDevice(DWORD dwDeviceID, ULONG *pCOMMPort);
  424. HRESULT MidiSendShortMsg(BYTE cStatus, BYTE cData1,BYTE cData2);
  425. HRESULT MidiSendLongMsg(void);
  426. // Response from Jolt management
  427. HRESULT GetAckNackData(int nTimeWait, PACKNACK pAckNack, USHORT ackMethod);
  428. BOOL QueryForJolt(void);
  429. // Digital OverDrive interface
  430. HRESULT InitDigitalOverDrive(DWORD dwDeviceID);
  431. HANDLE VxDHandleOf(void) { return m_hVxD; }
  432. // ROM Effects
  433. HRESULT SetupROM_Fx(PEFFECT pEffect);
  434. // Thread
  435. // HRESULT PowerCycleThreadCreate(void);
  436. };
  437. #endif // of ifndef MIDI_OBJ_SEEN