MMDSYSTM.INT 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. {========================================================================}
  2. {= (c) 1995-98 SwiftSoft Ronald Dittrich =}
  3. {========================================================================}
  4. {= All Rights Reserved =}
  5. {========================================================================}
  6. {= D 01099 Dresden = Tel.: +0351-8012255 =}
  7. {= Loewenstr.7a = info@swiftsoft.de =}
  8. {========================================================================}
  9. {= Actual versions on http://www.swiftsoft.de/mmtools.html =}
  10. {========================================================================}
  11. {= This code is for reference purposes only and may not be copied or =}
  12. {= distributed in any format electronic or otherwise except one copy =}
  13. {= for backup purposes. =}
  14. {= =}
  15. {= No Delphi Component Kit or Component individually or in a collection=}
  16. {= subclassed or otherwise from the code in this unit, or associated =}
  17. {= .pas, .dfm, .dcu, .asm or .obj files may be sold or distributed =}
  18. {= without express permission from SwiftSoft. =}
  19. {= =}
  20. {= For more licence informations please refer to the associated =}
  21. {= HelpFile. =}
  22. {========================================================================}
  23. {= $Date: 20.01.1998 - 18:00:00 $ =}
  24. {========================================================================}
  25. unit MMDSystm;
  26. {$C FIXED PRELOAD PERMANENT}
  27. {$I COMPILER.INC}
  28. interface
  29. uses
  30. Windows,
  31. OLE2,
  32. SysUtils,
  33. MMSystem,
  34. MMUtils,
  35. MMRegs,
  36. MMWaveIO,
  37. MMPCMSup,
  38. MMDSound;
  39. { Emulated devices are very, very slow:
  40. change this value to adjust the buffer return time for emulated drivers
  41. }
  42. const
  43. TIMEADJUST : integer = 60;
  44. const
  45. DS_NEEDVOLUME = $10000000;
  46. DS_NEEDPAN = $20000000;
  47. DS_NEEDFREQ = $40000000;
  48. procedure DSSetHWND(hWaveOut: HWAVEOUT; hw: HWND);
  49. function DSCreatePrimaryBuffer(hWaveOut: HWAVEOUT; lpFormat: PWaveFormatEx): HRESULT;
  50. function DSWaveOutOpen(lphWaveOut: PHWAVEOUT; uDeviceID: UINT; lpFormat: PWaveFormatEx;
  51. dwCallback, dwInstance, dwFlags: DWORD): MMRESULT; stdcall;
  52. function DSWaveOutClose(hWaveOut: HWAVEOUT): MMRESULT;
  53. function DSWaveOutPrepareHeader(hWaveOut: HWAVEOUT; lpWaveHdr: PWaveHdr;
  54. uSize: UINT): MMRESULT;
  55. function DSWaveOutUnprepareHeader(hWaveOut: HWAVEOUT; lpWaveHdr: PWaveHdr;
  56. uSize: UINT): MMRESULT;
  57. function DSWaveOutWrite(hWaveOut: HWAVEOUT; lpWaveHdr: PWaveHdr;
  58. uSize: UINT): MMRESULT;
  59. function DSWaveOutPause(hWaveOut: HWAVEOUT): MMRESULT;
  60. function DSWaveOutRestart(hWaveOut: HWAVEOUT): MMRESULT;
  61. function DSWaveOutReset(hWaveOut: HWAVEOUT): MMRESULT;
  62. function DSWaveOutGetPosition(hWaveOut: HWAVEOUT; lpInfo: PMMTime;
  63. uSize: UINT): MMRESULT;
  64. function DSWaveOutSetVolume(hWaveOut: HWAVEOUT; dwVolume: DWORD): MMRESULT;
  65. function DSWaveOutGetVolume(hWaveOut: HWAVEOUT; lpdwVolume: PDWORD): MMRESULT;
  66. function DSWaveOutSetPan(hWaveOut: HWAVEOUT; dwPan: DWORD): MMRESULT;
  67. function DSWaveOutGetPan(hWaveOut: HWAVEOUT; lpdwPan: PDWORD): MMRESULT;
  68. function DSWaveOutSetPlaybackRate(hWaveOut: HWAVEOUT; dwRate: DWORD): MMRESULT;
  69. function DSWaveOutGetPlaybackRate(hWaveOut: HWAVEOUT; lpdwRate: PDWORD): MMRESULT;
  70. implementation