home *** CD-ROM | disk | FTP | other *** search
Wrap
; tdsound.inc (c) Minde 06/08/99 montana@is.lt ; Content: TASM DirectSound include file ver. 1.2 ; converted from dsound.h, DX ver. 6.1 ; ; Feel free to use or distribute the package, part or whole, for any ; non-commercial use preferably crediting me. ; Also feel free to contact me at the above address if you experience any ; problems or notice any omissions. DirectSoundEnumerate EQU DirectSoundEnumerateA DirectSoundCaptureEnumerate EQU DirectSoundCaptureEnumerateA DirectSoundCreate PROCDESC STDCALL :DWORD, :DWORD, :DWORD DirectSoundEnumerateA PROCDESC STDCALL :DWORD, :DWORD DirectSoundCaptureCreate PROCDESC STDCALL :DWORD, :DWORD, :DWORD DirectSoundCaptureEnumerateA PROCDESC STDCALL :DWORD, :DWORD CLSID_DirectSound GUID <047d4d946h,062e8h,011cfh,093h,0bch,044h,045h,053h,054h,000h,000h> CLSID_DirectSoundCapture GUID <0b0210780h,089cdh,011d0h,0afh,008h,000h,0a0h,0c9h,025h,0cdh,016h> IID_IDirectSound GUID <0279AFA83h,04981h,011CEh,0A5h,021h,000h,020h,0AFh,00Bh,0E5h,060h> IID_IDirectSoundBuffer GUID <0279AFA85h,04981h,011CEh,0A5h,021h,000h,020h,0AFh,00Bh,0E5h,060h> IID_IDirectSound3DListener GUID <0279AFA84h,04981h,011CEh,0A5h,021h,000h,020h,0AFh,00Bh,0E5h,060h> IID_IDirectSound3DBuffer GUID <0279AFA86h,04981h,011CEh,0A5h,021h,000h,020h,0AFh,00Bh,0E5h,060h> IID_IDirectSoundCapture GUID <0b0210781h,089cdh,011d0h,0afh,008h,000h,0a0h,0c9h,025h,0cdh,016h> IID_IDirectSoundCaptureBuffer GUID <0b0210782h,089cdh,011d0h,0afh,008h,000h,0a0h,0c9h,025h,0cdh,016h> IID_IDirectSoundNotify GUID <0b0210783h,089cdh,011d0h,0afh,008h,000h,0a0h,0c9h,025h,0cdh,016h> IID_IKsPropertySet GUID <031efac30h,0515ch,011d0h,0a9h,0aah,000h,0aah,000h,061h,0beh,093h> ;============================================================================= ; Structures ;============================================================================= DSCAPS STRUCT dscaps_dwSize DD ? dscaps_dwFlags DD ? dscaps_dwMinSecondarySampleRate DD ? dscaps_dwMaxSecondarySampleRate DD ? dscaps_dwPrimaryBuffers DD ? dscaps_dwMaxHwMixingAllBuffers DD ? dscaps_dwMaxHwMixingStaticBuffers DD ? dscaps_dwMaxHwMixingStreamingBuffers DD ? dscaps_dwFreeHwMixingAllBuffers DD ? dscaps_dwFreeHwMixingStaticBuffers DD ? dscaps_dwFreeHwMixingStreamingBuffers DD ? dscaps_dwMaxHw3DAllBuffers DD ? dscaps_dwMaxHw3DStaticBuffers DD ? dscaps_dwMaxHw3DStreamingBuffers DD ? dscaps_dwFreeHw3DAllBuffers DD ? dscaps_dwFreeHw3DStaticBuffers DD ? dscaps_dwFreeHw3DStreamingBuffers DD ? dscaps_dwTotalHwMemBytes DD ? dscaps_dwFreeHwMemBytes DD ? dscaps_dwMaxContigFreeHwMemBytes DD ? dscaps_dwUnlockTransferRateHwBuffers DD ? dscaps_dwPlayCpuOverheadSwBuffers DD ? dscaps_dwReserved1 DD ? dscaps_dwReserved2 DD ? DSCAPS ENDS DSBCAPS STRUCT dsbcaps_dwSize DD ? dsbcaps_dwFlags DD ? dsbcaps_dwBufferBytes DD ? dsbcaps_dwUnlockTransferRate DD ? dsbcaps_dwPlayCpuOverhead DD ? DSBCAPS ENDS DSBUFFERDESC STRUCT dsbufferdesc_dwSize DD ? dsbufferdesc_dwFlags DD ? dsbufferdesc_dwBufferBytes DD ? dsbufferdesc_dwReserved DD ? dsbufferdesc_lpwfxFormat DD ? ; pionter to waveformatex DSBUFFERDESC ENDS ; THIS IS NEEDED FOR STRUCT (see above...) WAVEFORMATEX STRUCT wFormatTag DW ? ; format type nChannels DW ? ; number of channels (i.e. mono, stereo...) nSamplesPerSec DD ? ; sample rate nAvgBytesPerSec DD ? ; for buffer estimation nBlockAlign DW ? ; block size of data wBitsPerSample DW ? ; number of bits per sample of mono data cbSize DW ? ; the count in bytes of the size of ; extra information (after cbSize) WAVEFORMATEX ENDS DS3DBUFFER STRUCT ds3dbuffer_dwSize DD ? ds3dbuffer_vPosition D3DVECTOR ? ds3dbuffer_vVelocity D3DVECTOR ? ds3dbuffer_dwInsideConeAngle DD ? ds3dbuffer_dwOutsideConeAngle DD ? ds3dbuffer_vConeOrientation D3DVECTOR ? ds3dbuffer_lConeOutsideVolume DD ? ds3dbuffer_flMinDistance D3DVALUE ? ds3dbuffer_flMaxDistance D3DVALUE ? ds3dbuffer_dwMode DD ? DS3DBUFFER ENDS DS3DLISTENER STRUCT ds3dlistener_dwSize DD ? ds3dlistener_vPosition D3DVECTOR ? ds3dlistener_vVelocity D3DVECTOR ? ds3dlistener_vOrientFront D3DVECTOR ? ds3dlistener_vOrientTop D3DVECTOR ? ds3dlistener_flDistanceFactor D3DVALUE ? ds3dlistener_flRolloffFactor D3DVALUE ? ds3dlistener_flDopplerFactor D3DVALUE ? DS3DLISTENER ENDS DSCCAPS struct dsccaps_dwSize DD ? dsccaps_dwFlags DD ? dsccaps_dwFormats DD ? dsccaps_dwChannels DD ? DSCCAPS ends DSCBUFFERDESC struct dscbufferdesc_dwSize DD ? dscbufferdesc_dwFlags DD ? dscbufferdesc_dwBufferBytes DD ? dscbufferdesc_dwReserved DD ? dscbufferdesc_lpwfxFormat DD ? DSCBUFFERDESC ends DSCBCAPS struct dscbcaps_dwSize DD ? dscbcaps_dwFlags DD ? dscbcaps_dwBufferBytes DD ? dscbcaps_dwReserved DD ? DSCBCAPS ends DSBPOSITIONNOTIFY struct dsbpositionnotify_dwOffset DD ? dsbpositionnotify_hEventNotify DD ? DSBPOSITIONNOTIFY ends ;============================================================================== ; METHODS... ;============================================================================== ; IDirectSound ; IUnknown methods DSQueryInterface = 0 DSAddRef = 4 DSRelease = 8 ; IDirectSound methods DSCreateSoundBuffer = 12 DSGetCaps = 16 DSDuplicateSoundBuffer = 20 DSSetCooperativeLevel = 24 DSCompact = 28 DSGetSpeakerConfig = 32 DSSetSpeakerConfig = 36 DSInitialize = 40 ; IDirectSoundBuffer ; IUnknown methods DSBQueryInterface = 0 DSBAddRef = 4 DSBRelease = 8 ; IDirectSoundBuffer methods DSBGetCaps = 12 DSBGetCurrentPosition = 16 DSBGetFormat = 20 DSBGetVolume = 24 DSBGetPan = 28 DSBGetFrequency = 32 DSBGetStatus = 36 DSBInitialize = 40 DSBLock = 44 DSBPlay = 48 DSBSetCurrentPosition = 52 DSBSetFormat = 56 DSBSetVolume = 60 DSBSetPan = 64 DSBSetFrequency = 68 DSBStop = 72 DSBUnlock = 76 DSBRestore = 80 ; IDirectSound3DListener ; IUnknown methods DS3DLQueryInterface = 0 DS3DLAddRef = 4 DS3DLRelease = 8 ; IDirectSound3D methods DS3DLGetAllParameters = 12 DS3DLGetDistanceFactor = 16 DS3DLGetDopplerFactor = 20 DS3DLGetOrientation = 24 DS3DLGetPosition = 28 DS3DLGetRolloffFactor = 32 DS3DLGetVelocity = 36 DS3DLSetAllParameters = 40 DS3DLSetDistanceFactor = 44 DS3DLSetDopplerFactor = 48 DS3DLSetOrientation = 52 DS3DLSetPosition = 56 DS3DLSetRolloffFactor = 60 DS3DLSetVelocity = 64 DS3DLCommitDeferredSettings = 68 ; IDirectSound3DBuffer ; IUnknown methods DS3DBQueryInterface = 0 DS3DBAddRef = 4 DS3DBRelease = 8 ; IDirectSoundBuffer3D methods DS3DBGetAllParameters = 12 DS3DBGetConeAngles = 16 DS3DBGetConeOrientation = 20 DS3DBGetConeOutsideVolume = 24 DS3DBGetMaxDistance = 28 DS3DBGetMinDistance = 32 DS3DBGetMode = 36 DS3DBGetPosition = 40 DS3DBGetVelocity = 44 DS3DBSetAllParameters = 48 DS3DBSetConeAngles = 52 DS3DBSetConeOrientation = 56 DS3DBSetConeOutsideVolume = 60 DS3DBSetMaxDistance = 64 DS3DBSetMinDistance = 68 DS3DBSetMode = 72 DS3DBSetPosition = 76 DS3DBSetVelocity = 80 ; IDirectSoundCapture ; IUnknown methods DSCQueryInterface = 0 DSCAddRef = 4 DSCRelease = 8 ; IDirectSoundCapture methods DSCCreateCaptureBuffer = 12 DSCGetCaps = 16 DSCInitialize = 20 ; IDirectSoundCaptureBuffer ; IUnknown methods DSCBQueryInterface = 0 DSCBAddRef = 4 DSCBRelease = 8 ; IDirectSoundCaptureBuffer methods DSCBGetCaps = 12 DSCBGetCurrentPosition = 16 DSCBGetFormat = 20 DSCBGetStatus = 24 DSCBInitialize = 28 DSCBLock = 32 DSCBStart = 36 DSCBStop = 40 DSCBUnlock = 44 ; IDirectSoundNotify ; IUnknown methods DSNQueryInterface = 0 DSNAddRef = 4 DSNRelease = 8 ; IDirectSoundNotify methods DSNSetNotificationPositions = 12 ; IKsPropertySet ; IUnknown methods KSPSQueryInterface = 0 KSPSAddRef = 4 KSPSRelease = 8 ; IKsPropertySet methods KSPSGet = 12 KSPSSet = 16 KSPSQuerySupport = 20 KSPROPERTY_SUPPORT_GET = 00000001h; KSPROPERTY_SUPPORT_SET = 00000002h; ;============================================================================== ; Return Codes, Errors ... ;============================================================================== DS_OK EQU 0 DSERR_ALLOCATED EQU 88780000h+10; The call failed because resources (such as a priority level) were already being used by another caller. DSERR_CONTROLUNAVAIL EQU 88780000h+30; The control (vol,pan,etc.) requested by the caller is not available. DSERR_INVALIDPARAM EQU E_INVALIDARG; An invalid parameter was passed to the returning function DSERR_INVALIDCALL EQU 88780000h+50; This call is not valid for the current state of this object DSERR_GENERIC EQU E_FAIL ; An undetermined error occured inside the DSound subsystem DSERR_PRIOLEVELNEEDED EQU 88780000h+70; The caller does not have the priority level required for the function to succeed. DSERR_OUTOFMEMORY EQU E_OUTOFMEMORY; The DSound subsystem couldn't allocate sufficient memory to complete the caller's request. DSERR_BADFORMAT EQU 88780000h+100; The specified WAVE format is not supported DSERR_UNSUPPORTED EQU E_NOTIMPL ; The function called is not supported at this time DSERR_NODRIVER EQU 88780000h+120; No sound driver is available for use DSERR_ALREADYINITIALIZED EQU 88780000h+130; This object is already initialized DSERR_NOAGGREGATION EQU CLASS_E_NOAGGREGATION; This object does not support aggregation DSERR_BUFFERLOST EQU 88780000h+150; The buffer memory has been lost, and must be Restored. DSERR_OTHERAPPHASPRIO EQU 88780000h+160; Another app has a higher priority level, preventing this call from DSERR_UNINITIALIZED EQU 88780000h+170; The Initialize() member on the Direct Sound Object has not been called or called successfully before calls to other members. DSERR_NOINTERFACE = E_NOINTERFACE; ;==========================================================================; ; Flags... ;==========================================================================; DSCAPS_PRIMARYMONO EQU 000000001h DSCAPS_PRIMARYSTEREO EQU 000000002h DSCAPS_PRIMARY8BIT EQU 000000004h DSCAPS_PRIMARY16BIT EQU 000000008h DSCAPS_CONTINUOUSRATE EQU 000000010h DSCAPS_EMULDRIVER EQU 000000020h DSCAPS_CERTIFIED EQU 000000040h DSCAPS_SECONDARYMONO EQU 000000100h DSCAPS_SECONDARYSTEREO EQU 000000200h DSCAPS_SECONDARY8BIT EQU 000000400h DSCAPS_SECONDARY16BIT EQU 000000800h DSBPLAY_LOOPING EQU 000000001h DSBSTATUS_PLAYING EQU 000000001h DSBSTATUS_BUFFERLOST EQU 000000002h DSBSTATUS_LOOPING EQU 000000004h DSBLOCK_FROMWRITECURSOR EQU 000000001h DSBLOCK_ENTIREBUFFER EQU 000000002h DSSCL_NORMAL EQU 1 DSSCL_PRIORITY EQU 2 DSSCL_EXCLUSIVE EQU 3 DSSCL_WRITEPRIMARY EQU 4 DS3DMODE_NORMAL EQU 0 DS3DMODE_HEADRELATIVE EQU 1 DS3DMODE_DISABLE EQU 2 DS3D_IMMEDIATE EQU 0 DS3D_DEFERRED EQU 1 DS3D_MINDISTANCEFACTOR EQU <0.0f> DS3D_MAXDISTANCEFACTOR EQU <10.0f> DS3D_DEFAULTDISTANCEFACTOR EQU <1.0f> DS3D_MINROLLOFFFACTOR EQU <0.0f> DS3D_MAXROLLOFFFACTOR EQU <10.0f> DS3D_DEFAULTROLLOFFFACTOR EQU <1.0f> DS3D_MINDOPPLERFACTOR EQU <0.0f> DS3D_MAXDOPPLERFACTOR EQU <10.0f> DS3D_DEFAULTDOPPLERFACTOR EQU <1.0f> DS3D_DEFAULTMINDISTANCE EQU <1.0f> DS3D_DEFAULTMAXDISTANCE EQU <1000000000.0f> DS3D_MINCONEANGLE = 0 DS3D_MAXCONEANGLE = 360 DS3D_DEFAULTCONEANGLE = 360 DS3D_DEFAULTCONEOUTSIDEVOLUME = 0 DSBCAPS_PRIMARYBUFFER EQU 000000001h DSBCAPS_STATIC EQU 000000002h DSBCAPS_LOCHARDWARE EQU 000000004h DSBCAPS_LOCSOFTWARE EQU 000000008h DSBCAPS_CTRL3D EQU 000000010h DSBCAPS_CTRLFREQUENCY EQU 000000020h DSBCAPS_CTRLPAN EQU 000000040h DSBCAPS_CTRLVOLUME EQU 000000080h DSBCAPS_CTRLDEFAULT EQU 0000000E0h ; Pan + volume + frequency. DSBCAPS_CTRLALL EQU 0000000F0h ; All control capabilities DSBCAPS_STICKYFOCUS EQU 000004000h DSBCAPS_GLOBALFOCUS EQU 000008000h DSBCAPS_GETCURRENTPOSITION2 EQU 000010000h ; More accurate play cursor under emulation DSBCAPS_MUTE3DATMAXDISTANCE EQU 000020000h DSCBCAPS_WAVEMAPPED EQU 080000000h DSSPEAKER_HEADPHONE EQU 1 DSSPEAKER_MONO EQU 2 DSSPEAKER_QUAD EQU 3 DSSPEAKER_STEREO EQU 4 DSSPEAKER_SURROUND EQU 5 DSSPEAKER_GEOMETRY_MIN = 00000005h; 5 degrees DSSPEAKER_GEOMETRY_NARROW = 0000000Ah; 10 degrees DSSPEAKER_GEOMETRY_WIDE = 00000014h; 20 degrees DSSPEAKER_GEOMETRY_MAX = 000000B4h; 180 degrees DSCCAPS_EMULDRIVER = 00000020h; DSCBLOCK_ENTIREBUFFER = 00000001h; DSCBSTATUS_CAPTURING = 00000001h; DSCBSTATUS_LOOPING = 00000002h; DSCBSTART_LOOPING = 00000001h; DSBFREQUENCY_MIN = 100; DSBFREQUENCY_MAX = 100000; DSBFREQUENCY_ORIGINAL = 0; DSBPAN_LEFT = -10000; DSBPAN_CENTER = 0; DSBPAN_RIGHT = 10000; DSBVOLUME_MIN = -10000; DSBVOLUME_MAX = 0; DSBSIZE_MIN = 4; DSBSIZE_MAX = 0FFFFFFFh; DSBPN_OFFSETSTOP = DWORD (-1) ;end of file