{========================================================================} {= (c) 1995-98 SwiftSoft Ronald Dittrich =} {========================================================================} {= All Rights Reserved =} {========================================================================} {= D 01099 Dresden = Tel.: +0351-8012255 =} {= Loewenstr.7a = info@swiftsoft.de =} {========================================================================} {= Actual versions on http://www.swiftsoft.de/mmtools.html =} {========================================================================} {= This code is for reference purposes only and may not be copied or =} {= distributed in any format electronic or otherwise except one copy =} {= for backup purposes. =} {= =} {= No Delphi Component Kit or Component individually or in a collection=} {= subclassed or otherwise from the code in this unit, or associated =} {= .pas, .dfm, .dcu, .asm or .obj files may be sold or distributed =} {= without express permission from SwiftSoft. =} {= =} {= For more licence informations please refer to the associated =} {= HelpFile. =} {========================================================================} {= $Date: 20.01.1998 - 18:00:00 $ =} {========================================================================} unit MMDSystm; {$C FIXED PRELOAD PERMANENT} {$I COMPILER.INC} interface uses Windows, OLE2, SysUtils, MMSystem, MMUtils, MMRegs, MMWaveIO, MMPCMSup, MMDSound; { Emulated devices are very, very slow: change this value to adjust the buffer return time for emulated drivers } const TIMEADJUST : integer = 60; const DS_NEEDVOLUME = $10000000; DS_NEEDPAN = $20000000; DS_NEEDFREQ = $40000000; procedure DSSetHWND(hWaveOut: HWAVEOUT; hw: HWND); function DSCreatePrimaryBuffer(hWaveOut: HWAVEOUT; lpFormat: PWaveFormatEx): HRESULT; function DSWaveOutOpen(lphWaveOut: PHWAVEOUT; uDeviceID: UINT; lpFormat: PWaveFormatEx; dwCallback, dwInstance, dwFlags: DWORD): MMRESULT; stdcall; function DSWaveOutClose(hWaveOut: HWAVEOUT): MMRESULT; function DSWaveOutPrepareHeader(hWaveOut: HWAVEOUT; lpWaveHdr: PWaveHdr; uSize: UINT): MMRESULT; function DSWaveOutUnprepareHeader(hWaveOut: HWAVEOUT; lpWaveHdr: PWaveHdr; uSize: UINT): MMRESULT; function DSWaveOutWrite(hWaveOut: HWAVEOUT; lpWaveHdr: PWaveHdr; uSize: UINT): MMRESULT; function DSWaveOutPause(hWaveOut: HWAVEOUT): MMRESULT; function DSWaveOutRestart(hWaveOut: HWAVEOUT): MMRESULT; function DSWaveOutReset(hWaveOut: HWAVEOUT): MMRESULT; function DSWaveOutGetPosition(hWaveOut: HWAVEOUT; lpInfo: PMMTime; uSize: UINT): MMRESULT; function DSWaveOutSetVolume(hWaveOut: HWAVEOUT; dwVolume: DWORD): MMRESULT; function DSWaveOutGetVolume(hWaveOut: HWAVEOUT; lpdwVolume: PDWORD): MMRESULT; function DSWaveOutSetPan(hWaveOut: HWAVEOUT; dwPan: DWORD): MMRESULT; function DSWaveOutGetPan(hWaveOut: HWAVEOUT; lpdwPan: PDWORD): MMRESULT; function DSWaveOutSetPlaybackRate(hWaveOut: HWAVEOUT; dwRate: DWORD): MMRESULT; function DSWaveOutGetPlaybackRate(hWaveOut: HWAVEOUT; lpdwRate: PDWORD): MMRESULT; implementation