Artifact 21a914ceb449058e9d81f4dd8997b14dda7be2dc:
- File
src/win32/directx/dsound8.d
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
The problem was __gshared. Replacing it with TLS fixed the issue. Remaining problem is that "hack.d"'s CloseHandle hack is not working anymore.
(user: kinaba) [annotate]
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
0000: 6d 6f 64 75 6c 65 20 77 69 6e 33 32 2e 64 69 72 module win32.dir
0010: 65 63 74 78 2e 64 73 6f 75 6e 64 38 3b 0d 0a 0d ectx.dsound8;...
0020: 0a 2f 2f 69 6d 70 6f 72 74 20 74 61 6e 67 6f 2e .//import tango.
0030: 73 79 73 2e 77 69 6e 33 32 2e 54 79 70 65 73 3b sys.win32.Types;
0040: 0d 0a 69 6d 70 6f 72 74 20 77 69 6e 33 32 2e 77 ..import win32.w
0050: 69 6e 64 6f 77 73 3b 0d 0a 0d 0a 61 6c 69 61 73 indows;....alias
0060: 20 47 55 49 44 2a 20 4c 50 43 47 55 49 44 3b 0d GUID* LPCGUID;.
0070: 0a 0d 0a 69 6e 74 65 72 66 61 63 65 20 49 55 6e ...interface IUn
0080: 6b 6e 6f 77 6e 0d 0a 7b 0d 0a 09 48 52 45 53 55 known..{...HRESU
0090: 4c 54 20 51 75 65 72 79 49 6e 74 65 72 66 61 63 LT QueryInterfac
00a0: 65 28 49 49 44 2a 20 72 69 69 64 2c 20 76 6f 69 e(IID* riid, voi
00b0: 64 2a 2a 20 70 76 4f 62 6a 65 63 74 29 3b 0d 0a d** pvObject);..
00c0: 09 55 4c 4f 4e 47 20 41 64 64 52 65 66 28 29 3b .ULONG AddRef();
00d0: 0d 0a 09 55 4c 4f 4e 47 20 52 65 6c 65 61 73 65 ...ULONG Release
00e0: 28 29 3b 0d 0a 7d 0d 0a 0d 0a 61 6c 69 61 73 20 ();..}....alias
00f0: 49 55 6e 6b 6e 6f 77 6e 20 4c 50 55 4e 4b 4e 4f IUnknown LPUNKNO
0100: 57 4e 3b 0d 0a 0d 0a 69 6e 74 65 72 66 61 63 65 WN;....interface
0110: 20 49 44 69 72 65 63 74 53 6f 75 6e 64 20 3a 20 IDirectSound :
0120: 49 55 6e 6b 6e 6f 77 6e 0d 0a 7b 0d 0a 09 65 78 IUnknown..{...ex
0130: 74 65 72 6e 28 57 69 6e 64 6f 77 73 29 3a 0d 0a tern(Windows):..
0140: 0d 0a 20 20 20 20 2f 2f 20 49 44 69 72 65 63 74 .. // IDirect
0150: 53 6f 75 6e 64 20 6d 65 74 68 6f 64 73 0d 0a 20 Sound methods..
0160: 20 20 20 48 52 45 53 55 4c 54 20 43 72 65 61 74 HRESULT Creat
0170: 65 53 6f 75 6e 64 42 75 66 66 65 72 20 20 20 20 eSoundBuffer
0180: 28 4c 50 43 44 53 42 55 46 46 45 52 44 45 53 43 (LPCDSBUFFERDESC
0190: 20 70 63 44 53 42 75 66 66 65 72 44 65 73 63 2c pcDSBufferDesc,
01a0: 20 4c 50 44 49 52 45 43 54 53 4f 55 4e 44 42 55 LPDIRECTSOUNDBU
01b0: 46 46 45 52 20 2a 70 70 44 53 42 75 66 66 65 72 FFER *ppDSBuffer
01c0: 2c 20 4c 50 55 4e 4b 4e 4f 57 4e 20 70 55 6e 6b , LPUNKNOWN pUnk
01d0: 4f 75 74 65 72 29 3b 0d 0a 20 20 20 20 48 52 45 Outer);.. HRE
01e0: 53 55 4c 54 20 47 65 74 43 61 70 73 20 20 20 20 SULT GetCaps
01f0: 20 20 20 20 20 20 20 20 20 20 28 4c 50 44 53 43 (LPDSC
0200: 41 50 53 20 70 44 53 43 61 70 73 29 3b 0d 0a 20 APS pDSCaps);..
0210: 20 20 20 48 52 45 53 55 4c 54 20 44 75 70 6c 69 HRESULT Dupli
0220: 63 61 74 65 53 6f 75 6e 64 42 75 66 66 65 72 20 cateSoundBuffer
0230: 28 4c 50 44 49 52 45 43 54 53 4f 55 4e 44 42 55 (LPDIRECTSOUNDBU
0240: 46 46 45 52 20 70 44 53 42 75 66 66 65 72 4f 72 FFER pDSBufferOr
0250: 69 67 69 6e 61 6c 2c 20 4c 50 44 49 52 45 43 54 iginal, LPDIRECT
0260: 53 4f 55 4e 44 42 55 46 46 45 52 20 2a 70 70 44 SOUNDBUFFER *ppD
0270: 53 42 75 66 66 65 72 44 75 70 6c 69 63 61 74 65 SBufferDuplicate
0280: 29 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c 54 20 );.. HRESULT
0290: 53 65 74 43 6f 6f 70 65 72 61 74 69 76 65 4c 65 SetCooperativeLe
02a0: 76 65 6c 20 20 28 48 57 4e 44 20 68 77 6e 64 2c vel (HWND hwnd,
02b0: 20 44 57 4f 52 44 20 64 77 4c 65 76 65 6c 29 3b DWORD dwLevel);
02c0: 0d 0a 20 20 20 20 48 52 45 53 55 4c 54 20 43 6f .. HRESULT Co
02d0: 6d 70 61 63 74 20 20 20 20 20 20 20 20 20 20 20 mpact
02e0: 20 20 20 28 29 3b 0d 0a 20 20 20 20 48 52 45 53 ();.. HRES
02f0: 55 4c 54 20 47 65 74 53 70 65 61 6b 65 72 43 6f ULT GetSpeakerCo
0300: 6e 66 69 67 20 20 20 20 20 28 4c 50 44 57 4f 52 nfig (LPDWOR
0310: 44 20 70 64 77 53 70 65 61 6b 65 72 43 6f 6e 66 D pdwSpeakerConf
0320: 69 67 29 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c ig);.. HRESUL
0330: 54 20 53 65 74 53 70 65 61 6b 65 72 43 6f 6e 66 T SetSpeakerConf
0340: 69 67 20 20 20 20 20 28 44 57 4f 52 44 20 64 77 ig (DWORD dw
0350: 53 70 65 61 6b 65 72 43 6f 6e 66 69 67 29 3b 0d SpeakerConfig);.
0360: 0a 20 20 20 20 48 52 45 53 55 4c 54 20 49 6e 69 . HRESULT Ini
0370: 74 69 61 6c 69 7a 65 20 20 20 20 20 20 20 20 20 tialize
0380: 20 20 28 4c 50 43 47 55 49 44 20 70 63 47 75 69 (LPCGUID pcGui
0390: 64 44 65 76 69 63 65 29 3b 0d 0a 7d 0d 0a 0d 0a dDevice);..}....
03a0: 61 6c 69 61 73 20 49 44 69 72 65 63 74 53 6f 75 alias IDirectSou
03b0: 6e 64 20 4c 50 44 49 52 45 43 54 53 4f 55 4e 44 nd LPDIRECTSOUND
03c0: 3b 0d 0a 0d 0a 69 6e 74 65 72 66 61 63 65 20 49 ;....interface I
03d0: 44 69 72 65 63 74 53 6f 75 6e 64 38 20 3a 20 49 DirectSound8 : I
03e0: 44 69 72 65 63 74 53 6f 75 6e 64 0d 0a 7b 0d 0a DirectSound..{..
03f0: 09 65 78 74 65 72 6e 28 57 69 6e 64 6f 77 73 29 .extern(Windows)
0400: 3a 0d 0a 0d 0a 20 20 20 20 2f 2f 20 49 44 69 72 :.... // IDir
0410: 65 63 74 53 6f 75 6e 64 38 20 6d 65 74 68 6f 64 ectSound8 method
0420: 73 0d 0a 20 20 20 20 48 52 45 53 55 4c 54 20 56 s.. HRESULT V
0430: 65 72 69 66 79 43 65 72 74 69 66 69 63 61 74 69 erifyCertificati
0440: 6f 6e 20 20 28 4c 50 44 57 4f 52 44 20 70 64 77 on (LPDWORD pdw
0450: 43 65 72 74 69 66 69 65 64 29 3b 0d 0a 7d 0d 0a Certified);..}..
0460: 0d 0a 61 6c 69 61 73 20 49 44 69 72 65 63 74 53 ..alias IDirectS
0470: 6f 75 6e 64 38 20 4c 50 44 49 52 45 43 54 53 4f ound8 LPDIRECTSO
0480: 55 4e 44 38 3b 0d 0a 0d 0a 69 6e 74 65 72 66 61 UND8;....interfa
0490: 63 65 20 49 44 69 72 65 63 74 53 6f 75 6e 64 42 ce IDirectSoundB
04a0: 75 66 66 65 72 20 3a 20 49 55 6e 6b 6e 6f 77 6e uffer : IUnknown
04b0: 0d 0a 7b 0d 0a 09 65 78 74 65 72 6e 28 57 69 6e ..{...extern(Win
04c0: 64 6f 77 73 29 3a 0d 0a 0d 0a 20 20 20 20 2f 2f dows):.... //
04d0: 20 49 44 69 72 65 63 74 53 6f 75 6e 64 42 75 66 IDirectSoundBuf
04e0: 66 65 72 20 6d 65 74 68 6f 64 73 0d 0a 20 20 20 fer methods..
04f0: 20 48 52 45 53 55 4c 54 20 47 65 74 43 61 70 73 HRESULT GetCaps
0500: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 28 4c (L
0510: 50 44 53 42 43 41 50 53 20 70 44 53 42 75 66 66 PDSBCAPS pDSBuff
0520: 65 72 43 61 70 73 29 3b 0d 0a 20 20 20 20 48 52 erCaps);.. HR
0530: 45 53 55 4c 54 20 47 65 74 43 75 72 72 65 6e 74 ESULT GetCurrent
0540: 50 6f 73 69 74 69 6f 6e 20 20 20 28 4c 50 44 57 Position (LPDW
0550: 4f 52 44 20 70 64 77 43 75 72 72 65 6e 74 50 6c ORD pdwCurrentPl
0560: 61 79 43 75 72 73 6f 72 2c 20 4c 50 44 57 4f 52 ayCursor, LPDWOR
0570: 44 20 70 64 77 43 75 72 72 65 6e 74 57 72 69 74 D pdwCurrentWrit
0580: 65 43 75 72 73 6f 72 29 3b 0d 0a 20 20 20 20 48 eCursor);.. H
0590: 52 45 53 55 4c 54 20 47 65 74 46 6f 72 6d 61 74 RESULT GetFormat
05a0: 20 20 20 20 20 20 20 20 20 20 20 20 28 4c 50 57 (LPW
05b0: 41 56 45 46 4f 52 4d 41 54 45 58 20 70 77 66 78 AVEFORMATEX pwfx
05c0: 46 6f 72 6d 61 74 2c 20 44 57 4f 52 44 20 64 77 Format, DWORD dw
05d0: 53 69 7a 65 41 6c 6c 6f 63 61 74 65 64 2c 20 4c SizeAllocated, L
05e0: 50 44 57 4f 52 44 20 70 64 77 53 69 7a 65 57 72 PDWORD pdwSizeWr
05f0: 69 74 74 65 6e 29 3b 0d 0a 20 20 20 20 48 52 45 itten);.. HRE
0600: 53 55 4c 54 20 47 65 74 56 6f 6c 75 6d 65 20 20 SULT GetVolume
0610: 20 20 20 20 20 20 20 20 20 20 28 4c 50 4c 4f 4e (LPLON
0620: 47 20 70 6c 56 6f 6c 75 6d 65 29 3b 0d 0a 20 20 G plVolume);..
0630: 20 20 48 52 45 53 55 4c 54 20 47 65 74 50 61 6e HRESULT GetPan
0640: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 28 (
0650: 4c 50 4c 4f 4e 47 20 70 6c 50 61 6e 29 3b 0d 0a LPLONG plPan);..
0660: 20 20 20 20 48 52 45 53 55 4c 54 20 47 65 74 46 HRESULT GetF
0670: 72 65 71 75 65 6e 63 79 20 20 20 20 20 20 20 20 requency
0680: 20 28 4c 50 44 57 4f 52 44 20 70 64 77 46 72 65 (LPDWORD pdwFre
0690: 71 75 65 6e 63 79 29 3b 0d 0a 20 20 20 20 48 52 quency);.. HR
06a0: 45 53 55 4c 54 20 47 65 74 53 74 61 74 75 73 20 ESULT GetStatus
06b0: 20 20 20 20 20 20 20 20 20 20 20 28 4c 50 44 57 (LPDW
06c0: 4f 52 44 20 70 64 77 53 74 61 74 75 73 29 3b 0d ORD pdwStatus);.
06d0: 0a 20 20 20 20 48 52 45 53 55 4c 54 20 49 6e 69 . HRESULT Ini
06e0: 74 69 61 6c 69 7a 65 20 20 20 20 20 20 20 20 20 tialize
06f0: 20 20 28 4c 50 44 49 52 45 43 54 53 4f 55 4e 44 (LPDIRECTSOUND
0700: 20 70 44 69 72 65 63 74 53 6f 75 6e 64 2c 20 4c pDirectSound, L
0710: 50 43 44 53 42 55 46 46 45 52 44 45 53 43 20 70 PCDSBUFFERDESC p
0720: 63 44 53 42 75 66 66 65 72 44 65 73 63 29 3b 0d cDSBufferDesc);.
0730: 0a 20 20 20 20 48 52 45 53 55 4c 54 20 4c 6f 63 . HRESULT Loc
0740: 6b 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 k
0750: 20 20 28 44 57 4f 52 44 20 64 77 4f 66 66 73 65 (DWORD dwOffse
0760: 74 2c 20 44 57 4f 52 44 20 64 77 42 79 74 65 73 t, DWORD dwBytes
0770: 2c 20 4c 50 56 4f 49 44 20 2a 70 70 76 41 75 64 , LPVOID *ppvAud
0780: 69 6f 50 74 72 31 2c 20 4c 50 44 57 4f 52 44 20 ioPtr1, LPDWORD
0790: 70 64 77 41 75 64 69 6f 42 79 74 65 73 31 2c 0d pdwAudioBytes1,.
07a0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .
07b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
07c0: 20 20 20 20 20 20 20 20 20 20 20 20 4c 50 56 4f LPVO
07d0: 49 44 20 2a 70 70 76 41 75 64 69 6f 50 74 72 32 ID *ppvAudioPtr2
07e0: 2c 20 4c 50 44 57 4f 52 44 20 70 64 77 41 75 64 , LPDWORD pdwAud
07f0: 69 6f 42 79 74 65 73 32 2c 20 44 57 4f 52 44 20 ioBytes2, DWORD
0800: 64 77 46 6c 61 67 73 29 3b 0d 0a 20 20 20 20 48 dwFlags);.. H
0810: 52 45 53 55 4c 54 20 50 6c 61 79 20 20 20 20 20 RESULT Play
0820: 20 20 20 20 20 20 20 20 20 20 20 20 28 44 57 4f (DWO
0830: 52 44 20 64 77 52 65 73 65 72 76 65 64 31 2c 20 RD dwReserved1,
0840: 44 57 4f 52 44 20 64 77 50 72 69 6f 72 69 74 79 DWORD dwPriority
0850: 2c 20 44 57 4f 52 44 20 64 77 46 6c 61 67 73 29 , DWORD dwFlags)
0860: 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c 54 20 53 ;.. HRESULT S
0870: 65 74 43 75 72 72 65 6e 74 50 6f 73 69 74 69 6f etCurrentPositio
0880: 6e 20 20 20 28 44 57 4f 52 44 20 64 77 4e 65 77 n (DWORD dwNew
0890: 50 6f 73 69 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 Position);..
08a0: 48 52 45 53 55 4c 54 20 53 65 74 46 6f 72 6d 61 HRESULT SetForma
08b0: 74 20 20 20 20 20 20 20 20 20 20 20 20 28 4c 50 t (LP
08c0: 43 57 41 56 45 46 4f 52 4d 41 54 45 58 20 70 63 CWAVEFORMATEX pc
08d0: 66 78 46 6f 72 6d 61 74 29 3b 0d 0a 20 20 20 20 fxFormat);..
08e0: 48 52 45 53 55 4c 54 20 53 65 74 56 6f 6c 75 6d HRESULT SetVolum
08f0: 65 20 20 20 20 20 20 20 20 20 20 20 20 28 4c 4f e (LO
0900: 4e 47 20 6c 56 6f 6c 75 6d 65 29 3b 0d 0a 20 20 NG lVolume);..
0910: 20 20 48 52 45 53 55 4c 54 20 53 65 74 50 61 6e HRESULT SetPan
0920: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 28 (
0930: 4c 4f 4e 47 20 6c 50 61 6e 29 3b 0d 0a 20 20 20 LONG lPan);..
0940: 20 48 52 45 53 55 4c 54 20 53 65 74 46 72 65 71 HRESULT SetFreq
0950: 75 65 6e 63 79 20 20 20 20 20 20 20 20 20 28 44 uency (D
0960: 57 4f 52 44 20 64 77 46 72 65 71 75 65 6e 63 79 WORD dwFrequency
0970: 29 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c 54 20 );.. HRESULT
0980: 53 74 6f 70 20 20 20 20 20 20 20 20 20 20 20 20 Stop
0990: 20 20 20 20 20 28 29 3b 0d 0a 20 20 20 20 48 52 ();.. HR
09a0: 45 53 55 4c 54 20 55 6e 6c 6f 63 6b 20 20 20 20 ESULT Unlock
09b0: 20 20 20 20 20 20 20 20 20 20 20 28 4c 50 56 4f (LPVO
09c0: 49 44 20 70 76 41 75 64 69 6f 50 74 72 31 2c 20 ID pvAudioPtr1,
09d0: 44 57 4f 52 44 20 64 77 41 75 64 69 6f 42 79 74 DWORD dwAudioByt
09e0: 65 73 31 2c 20 4c 50 56 4f 49 44 20 70 76 41 75 es1, LPVOID pvAu
09f0: 64 69 6f 50 74 72 32 2c 20 44 57 4f 52 44 20 64 dioPtr2, DWORD d
0a00: 77 41 75 64 69 6f 42 79 74 65 73 32 29 3b 0d 0a wAudioBytes2);..
0a10: 20 20 20 20 48 52 45 53 55 4c 54 20 52 65 73 74 HRESULT Rest
0a20: 6f 72 65 20 20 20 20 20 20 20 20 20 20 20 20 20 ore
0a30: 20 28 29 3b 0d 0a 7d 0d 0a 0d 0a 61 6c 69 61 73 ();..}....alias
0a40: 20 49 44 69 72 65 63 74 53 6f 75 6e 64 42 75 66 IDirectSoundBuf
0a50: 66 65 72 20 4c 50 44 49 52 45 43 54 53 4f 55 4e fer LPDIRECTSOUN
0a60: 44 42 55 46 46 45 52 3b 0d 0a 0d 0a 69 6e 74 65 DBUFFER;....inte
0a70: 72 66 61 63 65 20 49 44 69 72 65 63 74 53 6f 75 rface IDirectSou
0a80: 6e 64 33 44 4c 69 73 74 65 6e 65 72 20 3a 20 49 nd3DListener : I
0a90: 55 6e 6b 6e 6f 77 6e 0d 0a 7b 0d 0a 09 65 78 74 Unknown..{...ext
0aa0: 65 72 6e 28 57 69 6e 64 6f 77 73 29 3a 0d 0a 0d ern(Windows):...
0ab0: 0a 20 20 20 20 2f 2f 20 49 44 69 72 65 63 74 53 . // IDirectS
0ac0: 6f 75 6e 64 33 44 4c 69 73 74 65 6e 65 72 20 6d ound3DListener m
0ad0: 65 74 68 6f 64 73 0d 0a 20 20 20 20 48 52 45 53 ethods.. HRES
0ae0: 55 4c 54 20 47 65 74 41 6c 6c 50 61 72 61 6d 65 ULT GetAllParame
0af0: 74 65 72 73 20 20 20 20 20 20 20 20 20 28 4c 50 ters (LP
0b00: 44 53 33 44 4c 49 53 54 45 4e 45 52 20 70 4c 69 DS3DLISTENER pLi
0b10: 73 74 65 6e 65 72 29 3b 0d 0a 20 20 20 20 48 52 stener);.. HR
0b20: 45 53 55 4c 54 20 47 65 74 44 69 73 74 61 6e 63 ESULT GetDistanc
0b30: 65 46 61 63 74 6f 72 20 20 20 20 20 20 20 20 28 eFactor (
0b40: 44 33 44 56 41 4c 55 45 2a 20 70 66 6c 44 69 73 D3DVALUE* pflDis
0b50: 74 61 6e 63 65 46 61 63 74 6f 72 29 3b 0d 0a 20 tanceFactor);..
0b60: 20 20 20 48 52 45 53 55 4c 54 20 47 65 74 44 6f HRESULT GetDo
0b70: 70 70 6c 65 72 46 61 63 74 6f 72 20 20 20 20 20 pplerFactor
0b80: 20 20 20 20 28 44 33 44 56 41 4c 55 45 2a 20 70 (D3DVALUE* p
0b90: 66 6c 44 6f 70 70 6c 65 72 46 61 63 74 6f 72 29 flDopplerFactor)
0ba0: 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c 54 20 47 ;.. HRESULT G
0bb0: 65 74 4f 72 69 65 6e 74 61 74 69 6f 6e 20 20 20 etOrientation
0bc0: 20 20 20 20 20 20 20 20 28 44 33 44 56 45 43 54 (D3DVECT
0bd0: 4f 52 2a 20 70 76 4f 72 69 65 6e 74 46 72 6f 6e OR* pvOrientFron
0be0: 74 2c 20 44 33 44 56 45 43 54 4f 52 2a 20 70 76 t, D3DVECTOR* pv
0bf0: 4f 72 69 65 6e 74 54 6f 70 29 3b 0d 0a 20 20 20 OrientTop);..
0c00: 20 48 52 45 53 55 4c 54 20 47 65 74 50 6f 73 69 HRESULT GetPosi
0c10: 74 69 6f 6e 20 20 20 20 20 20 20 20 20 20 20 20 tion
0c20: 20 20 28 44 33 44 56 45 43 54 4f 52 2a 20 70 76 (D3DVECTOR* pv
0c30: 50 6f 73 69 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 Position);..
0c40: 48 52 45 53 55 4c 54 20 47 65 74 52 6f 6c 6c 6f HRESULT GetRollo
0c50: 66 66 46 61 63 74 6f 72 20 20 20 20 20 20 20 20 ffFactor
0c60: 20 28 44 33 44 56 41 4c 55 45 2a 20 70 66 6c 52 (D3DVALUE* pflR
0c70: 6f 6c 6c 6f 66 66 46 61 63 74 6f 72 29 3b 0d 0a olloffFactor);..
0c80: 20 20 20 20 48 52 45 53 55 4c 54 20 47 65 74 56 HRESULT GetV
0c90: 65 6c 6f 63 69 74 79 20 20 20 20 20 20 20 20 20 elocity
0ca0: 20 20 20 20 20 28 44 33 44 56 45 43 54 4f 52 2a (D3DVECTOR*
0cb0: 20 70 76 56 65 6c 6f 63 69 74 79 29 3b 0d 0a 20 pvVelocity);..
0cc0: 20 20 20 48 52 45 53 55 4c 54 20 53 65 74 41 6c HRESULT SetAl
0cd0: 6c 50 61 72 61 6d 65 74 65 72 73 20 20 20 20 20 lParameters
0ce0: 20 20 20 20 28 4c 50 43 44 53 33 44 4c 49 53 54 (LPCDS3DLIST
0cf0: 45 4e 45 52 20 70 63 4c 69 73 74 65 6e 65 72 2c ENER pcListener,
0d00: 20 44 57 4f 52 44 20 64 77 41 70 70 6c 79 29 3b DWORD dwApply);
0d10: 0d 0a 20 20 20 20 48 52 45 53 55 4c 54 20 53 65 .. HRESULT Se
0d20: 74 44 69 73 74 61 6e 63 65 46 61 63 74 6f 72 20 tDistanceFactor
0d30: 20 20 20 20 20 20 20 28 44 33 44 56 41 4c 55 45 (D3DVALUE
0d40: 20 66 6c 44 69 73 74 61 6e 63 65 46 61 63 74 6f flDistanceFacto
0d50: 72 2c 20 44 57 4f 52 44 20 64 77 41 70 70 6c 79 r, DWORD dwApply
0d60: 29 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c 54 20 );.. HRESULT
0d70: 53 65 74 44 6f 70 70 6c 65 72 46 61 63 74 6f 72 SetDopplerFactor
0d80: 20 20 20 20 20 20 20 20 20 28 44 33 44 56 41 4c (D3DVAL
0d90: 55 45 20 66 6c 44 6f 70 70 6c 65 72 46 61 63 74 UE flDopplerFact
0da0: 6f 72 2c 20 44 57 4f 52 44 20 64 77 41 70 70 6c or, DWORD dwAppl
0db0: 79 29 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c 54 y);.. HRESULT
0dc0: 20 53 65 74 4f 72 69 65 6e 74 61 74 69 6f 6e 20 SetOrientation
0dd0: 20 20 20 20 20 20 20 20 20 20 28 44 33 44 56 41 (D3DVA
0de0: 4c 55 45 20 78 46 72 6f 6e 74 2c 20 44 33 44 56 LUE xFront, D3DV
0df0: 41 4c 55 45 20 79 46 72 6f 6e 74 2c 20 44 33 44 ALUE yFront, D3D
0e00: 56 41 4c 55 45 20 7a 46 72 6f 6e 74 2c 0d 0a 20 VALUE zFront,..
0e10: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0e20: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0e30: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 33 D3
0e40: 44 56 41 4c 55 45 20 78 54 6f 70 2c 20 44 33 44 DVALUE xTop, D3D
0e50: 56 41 4c 55 45 20 79 54 6f 70 2c 20 44 33 44 56 VALUE yTop, D3DV
0e60: 41 4c 55 45 20 7a 54 6f 70 2c 20 44 57 4f 52 44 ALUE zTop, DWORD
0e70: 20 64 77 41 70 70 6c 79 29 3b 0d 0a 20 20 20 20 dwApply);..
0e80: 48 52 45 53 55 4c 54 20 53 65 74 50 6f 73 69 74 HRESULT SetPosit
0e90: 69 6f 6e 20 20 20 20 20 20 20 20 20 20 20 20 20 ion
0ea0: 20 28 44 33 44 56 41 4c 55 45 20 78 2c 20 44 33 (D3DVALUE x, D3
0eb0: 44 56 41 4c 55 45 20 79 2c 20 44 33 44 56 41 4c DVALUE y, D3DVAL
0ec0: 55 45 20 7a 2c 20 44 57 4f 52 44 20 64 77 41 70 UE z, DWORD dwAp
0ed0: 70 6c 79 29 3b 0d 0a 20 20 20 20 48 52 45 53 55 ply);.. HRESU
0ee0: 4c 54 20 53 65 74 52 6f 6c 6c 6f 66 66 46 61 63 LT SetRolloffFac
0ef0: 74 6f 72 20 20 20 20 20 20 20 20 20 28 44 33 44 tor (D3D
0f00: 56 41 4c 55 45 20 66 6c 52 6f 6c 6c 6f 66 66 46 VALUE flRolloffF
0f10: 61 63 74 6f 72 2c 20 44 57 4f 52 44 20 64 77 41 actor, DWORD dwA
0f20: 70 70 6c 79 29 3b 0d 0a 20 20 20 20 48 52 45 53 pply);.. HRES
0f30: 55 4c 54 20 53 65 74 56 65 6c 6f 63 69 74 79 20 ULT SetVelocity
0f40: 20 20 20 20 20 20 20 20 20 20 20 20 20 28 44 33 (D3
0f50: 44 56 41 4c 55 45 20 78 2c 20 44 33 44 56 41 4c DVALUE x, D3DVAL
0f60: 55 45 20 79 2c 20 44 33 44 56 41 4c 55 45 20 7a UE y, D3DVALUE z
0f70: 2c 20 44 57 4f 52 44 20 64 77 41 70 70 6c 79 29 , DWORD dwApply)
0f80: 3b 0d 0a 20 20 20 20 48 52 45 53 55 4c 54 20 43 ;.. HRESULT C
0f90: 6f 6d 6d 69 74 44 65 66 65 72 72 65 64 53 65 74 ommitDeferredSet
0fa0: 74 69 6e 67 73 20 20 20 28 29 3b 0d 0a 7d 0d 0a tings ();..}..
0fb0: 0d 0a 73 74 72 75 63 74 20 57 41 56 45 46 4f 52 ..struct WAVEFOR
0fc0: 4d 41 54 45 58 0d 0a 7b 0d 0a 09 75 73 68 6f 72 MATEX..{...ushor
0fd0: 74 20 77 46 6f 72 6d 61 74 54 61 67 3b 0d 0a 09 t wFormatTag;...
0fe0: 75 73 68 6f 72 74 20 6e 43 68 61 6e 6e 65 6c 73 ushort nChannels
0ff0: 3b 0d 0a 09 75 69 6e 74 20 6e 53 61 6d 70 6c 65 ;...uint nSample
1000: 73 50 65 72 53 65 63 3b 0d 0a 09 75 69 6e 74 20 sPerSec;...uint
1010: 6e 41 76 67 42 79 74 65 73 50 65 72 53 65 63 3b nAvgBytesPerSec;
1020: 0d 0a 09 75 73 68 6f 72 74 20 6e 42 6c 6f 63 6b ...ushort nBlock
1030: 41 6c 69 67 6e 3b 0d 0a 09 75 73 68 6f 72 74 20 Align;...ushort
1040: 77 42 69 74 73 50 65 72 53 61 6d 70 6c 65 3b 0d wBitsPerSample;.
1050: 0a 09 75 73 68 6f 72 74 20 63 62 53 69 7a 65 3b ..ushort cbSize;
1060: 0d 0a 7d 0d 0a 0d 0a 61 6c 69 61 73 20 57 41 56 ..}....alias WAV
1070: 45 46 4f 52 4d 41 54 45 58 2a 20 4c 50 57 41 56 EFORMATEX* LPWAV
1080: 45 46 4f 52 4d 41 54 45 58 2c 20 4c 50 43 57 41 EFORMATEX, LPCWA
1090: 56 45 46 4f 52 4d 41 54 45 58 3b 0d 0a 0d 0a 65 VEFORMATEX;....e
10a0: 6e 75 6d 20 3a 20 75 69 6e 74 0d 0a 7b 0d 0a 09 num : uint..{...
10b0: 57 41 56 45 5f 46 4f 52 4d 41 54 5f 50 43 4d 20 WAVE_FORMAT_PCM
10c0: 3d 20 31 0d 0a 7d 0d 0a 0d 0a 73 74 72 75 63 74 = 1..}....struct
10d0: 20 44 53 43 42 55 46 46 45 52 44 45 53 43 0d 0a DSCBUFFERDESC..
10e0: 7b 0d 0a 20 20 20 20 44 57 4f 52 44 20 20 20 20 {.. DWORD
10f0: 20 20 20 20 20 20 20 64 77 53 69 7a 65 3b 0d 0a dwSize;..
1100: 20 20 20 20 44 57 4f 52 44 20 20 20 20 20 20 20 DWORD
1110: 20 20 20 20 64 77 46 6c 61 67 73 3b 0d 0a 20 20 dwFlags;..
1120: 20 20 44 57 4f 52 44 20 20 20 20 20 20 20 20 20 DWORD
1130: 20 20 64 77 42 75 66 66 65 72 42 79 74 65 73 3b dwBufferBytes;
1140: 0d 0a 20 20 20 20 44 57 4f 52 44 20 20 20 20 20 .. DWORD
1150: 20 20 20 20 20 20 64 77 52 65 73 65 72 76 65 64 dwReserved
1160: 3b 0d 0a 20 20 20 20 4c 50 57 41 56 45 46 4f 52 ;.. LPWAVEFOR
1170: 4d 41 54 45 58 20 20 6c 70 77 66 78 46 6f 72 6d MATEX lpwfxForm
1180: 61 74 3b 0d 0a 20 20 20 20 44 57 4f 52 44 20 20 at;.. DWORD
1190: 20 20 20 20 20 20 20 20 20 64 77 46 58 43 6f 75 dwFXCou
11a0: 6e 74 3b 0d 0a 20 20 20 20 4c 50 44 53 43 45 46 nt;.. LPDSCEF
11b0: 46 45 43 54 44 45 53 43 20 6c 70 44 53 43 46 58 FECTDESC lpDSCFX
11c0: 44 65 73 63 3b 0d 0a 7d 0d 0a 0d 0a 61 6c 69 61 Desc;..}....alia
11d0: 73 20 44 53 43 42 55 46 46 45 52 44 45 53 43 2a s DSCBUFFERDESC*
11e0: 20 4c 50 44 53 43 42 55 46 46 45 52 44 45 53 43 LPDSCBUFFERDESC
11f0: 3b 0d 0a 0d 0a 73 74 72 75 63 74 20 44 53 42 55 ;....struct DSBU
1200: 46 46 45 52 44 45 53 43 0d 0a 7b 0d 0a 20 20 20 FFERDESC..{..
1210: 20 44 57 4f 52 44 20 20 20 20 20 20 20 20 20 20 DWORD
1220: 20 64 77 53 69 7a 65 3b 0d 0a 20 20 20 20 44 57 dwSize;.. DW
1230: 4f 52 44 20 20 20 20 20 20 20 20 20 20 20 64 77 ORD dw
1240: 46 6c 61 67 73 3b 0d 0a 20 20 20 20 44 57 4f 52 Flags;.. DWOR
1250: 44 20 20 20 20 20 20 20 20 20 20 20 64 77 42 75 D dwBu
1260: 66 66 65 72 42 79 74 65 73 3b 0d 0a 20 20 20 20 fferBytes;..
1270: 44 57 4f 52 44 20 20 20 20 20 20 20 20 20 20 20 DWORD
1280: 64 77 52 65 73 65 72 76 65 64 3b 0d 0a 20 20 20 dwReserved;..
1290: 20 4c 50 57 41 56 45 46 4f 52 4d 41 54 45 58 20 LPWAVEFORMATEX
12a0: 20 6c 70 77 66 78 46 6f 72 6d 61 74 3b 0d 0a 20 lpwfxFormat;..
12b0: 20 20 20 47 55 49 44 20 20 20 20 20 20 20 20 20 GUID
12c0: 20 20 20 67 75 69 64 33 44 41 6c 67 6f 72 69 74 guid3DAlgorit
12d0: 68 6d 3b 0d 0a 7d 0d 0a 0d 0a 61 6c 69 61 73 20 hm;..}....alias
12e0: 44 53 42 55 46 46 45 52 44 45 53 43 2a 20 4c 50 DSBUFFERDESC* LP
12f0: 43 44 53 42 55 46 46 45 52 44 45 53 43 3b 0d 0a CDSBUFFERDESC;..
1300: 0d 0a 73 74 72 75 63 74 20 44 53 43 41 50 53 0d ..struct DSCAPS.
1310: 0a 7b 0d 0a 20 20 20 20 44 57 4f 52 44 20 20 20 .{.. DWORD
1320: 20 20 20 20 20 20 20 20 64 77 53 69 7a 65 3b 0d dwSize;.
1330: 0a 20 20 20 20 44 57 4f 52 44 20 20 20 20 20 20 . DWORD
1340: 20 20 20 20 20 64 77 46 6c 61 67 73 3b 0d 0a 20 dwFlags;..
1350: 20 20 20 44 57 4f 52 44 20 20 20 20 20 20 20 20 DWORD
1360: 20 20 20 64 77 4d 69 6e 53 65 63 6f 6e 64 61 72 dwMinSecondar
1370: 79 53 61 6d 70 6c 65 52 61 74 65 3b 0d 0a 20 20 ySampleRate;..
1380: 20 20 44 57 4f 52 44 20 20 20 20 20 20 20 20 20 DWORD
1390: 20 20 64 77 4d 61 78 53 65 63 6f 6e 64 61 72 79 dwMaxSecondary
13a0: 53 61 6d 70 6c 65 52 61 74 65 3b 0d 0a 20 20 20 SampleRate;..
13b0: 20 44 57 4f 52 44 20 20 20 20 20 20 20 20 20 20 DWORD
13c0: 20 64 77 50 72 69 6d 61 72 79 42 75 66 66 65 72 dwPrimaryBuffer
13d0: 73 3b 0d 0a 20 20 20 20 44 57 4f 52 44 20 20 20 s;.. DWORD
13e0: 20 20 20 20 20 20 20 20 64 77 4d 61 78 48 77 4d dwMaxHwM
13f0: 69 78 69 6e 67 41 6c 6c 42 75 66 66 65 72 73 3b ixingAllBuffers;
1400: 0d 0a 20 20 20 20 44 57 4f 52 44 20 20 20 20 20 .. DWORD
1410: 20 20 20 20 20 20 64 77 4d 61 78 48 77 4d 69 78 dwMaxHwMix
1420: 69 6e 67 53 74 61 74 69 63 42 75 66 66 65 72 73 ingStaticBuffers
1430: 3b 0d 0a 20 20 20 20 44 57 4f 52 44 20 20 20 20 ;.. DWORD
1440: 20 20 20 20 20 20 20 64 77 4d 61 78 48 77 4d 69 dwMaxHwMi
1450: 78 69 6e 67 53 74 72 65 61 6d 69 6e 67 42 75 66 xingStreamingBuf
1460: 66 65 72 73 3b 0d 0a 20 20 20 20 44 57 4f 52 44 fers;.. DWORD
1470: 20 20 20 20 20 20 20 20 20 20 20 64 77 46 72 65 dwFre
1480: 65 48 77 4d 69 78 69 6e 67 41 6c 6c 42 75 66 66 eHwMixingAllBuff
1490: 65 72 73 3b 0d 0a 20 20 20 20 44 57 4f 52 44 20 ers;.. DWORD
14a0: 20 20 20 20 20 20 20 20 20 20 64 77 46 72 65 65 dwFree
14b0: 48 77 4d 69 78 69 6e 67 53 74 61 74 69 63 42 75 HwMixingStaticBu
14c0: 66 66 65 72 73 3b 0d 0a 20 20 20 20 44 57 4f 52 ffers;.. DWOR
14d0: 44 20 20 20 20 20 20 20 20 20 20 20 64 77 46 72 D dwFr
14e0: 65 65 48 77 4d 69 78 69 6e 67 53 74 72 65 61 6d eeHwMixingStream
14f0: 69 6e 67 42 75 66 66 65 72 73 3b 0d 0a 20 20 20 ingBuffers;..
1500: 20 44 57 4f 52 44 20 20 20 20 20 20 20 20 20 20 DWORD
1510: 20 64 77 4d 61 78 48 77 33 44 41 6c 6c 42 75 66 dwMaxHw3DAllBuf
1520: 66 65 72 73 3b 0d 0a 20 20 20 20 44 57 4f 52 44 fers;.. DWORD
1530: 20 20 20 20 20 20 20 20 20 20 20 64 77 4d 61 78 dwMax
1540: 48 77 33 44 53 74 61 74 69 63 42 75 66 66 65 72 Hw3DStaticBuffer
1550: 73 3b 0d 0a 20 20 20 20 44 57 4f 52 44 20 20 20 s;.. DWORD
1560: 20 20 20 20 20 20 20 20 64 77 4d 61 78 48 77 33 dwMaxHw3
1570: 44 53 74 72 65 61 6d 69 6e 67 42 75 66 66 65 72 DStreamingBuffer
1580: 73 3b 0d 0a 20 20 20 20 44 57 4f 52 44 20 20 20 s;.. DWORD
1590: 20 20 20 20 20 20 20 20 64 77 46 72 65 65 48 77 dwFreeHw
15a0: 33 44 41 6c 6c 42 75 66 66 65 72 73 3b 0d 0a 20 3DAllBuffers;..
15b0: 20 20 20 44 57 4f 52 44 20 20 20 20 20 20 20 20 DWORD
15c0: 20 20 20 64 77 46 72 65 65 48 77 33 44 53 74 61 dwFreeHw3DSta
15d0: 74 69 63 42 75 66 66 65 72 73 3b 0d 0a 20 20 20 ticBuffers;..
15e0: 20 44 57 4f 52 44 20 20 20 20 20 20 20 20 20 20 DWORD
15f0: 20 64 77 46 72 65 65 48 77 33 44 53 74 72 65 61 dwFreeHw3DStrea
1600: 6d 69 6e 67 42 75 66 66 65 72 73 3b 0d 0a 20 20 mingBuffers;..
1610: 20 20 44 57 4f 52 44 20 20 20 20 20 20 20 20 20 DWORD
1620: 20 20 64 77 54 6f 74 61 6c 48 77 4d 65 6d 42 79 dwTotalHwMemBy
1630: 74 65 73 3b 0d 0a 20 20 20 20 44 57 4f 52 44 20 tes;.. DWORD
1640: 20 20 20 20 20 20 20 20 20 20 64 77 46 72 65 65 dwFree
1650: 48 77 4d 65 6d 42 79 74 65 73 3b 0d 0a 20 20 20 HwMemBytes;..
1660: 20 44 57 4f 52 44 20 20 20 20 20 20 20 20 20 20 DWORD
1670: 20 64 77 4d 61 78 43 6f 6e 74 69 67 46 72 65 65 dwMaxContigFree
1680: 48 77 4d 65 6d 42 79 74 65 73 3b 0d 0a 20 20 20 HwMemBytes;..
1690: 20 44 57 4f 52 44 20 20 20 20 20 20 20 20 20 20 DWORD
16a0: 20 64 77 55 6e 6c 6f 63 6b 54 72 61 6e 73 66 65 dwUnlockTransfe
16b0: 72 52 61 74 65 48 77 42 75 66 66 65 72 73 3b 0d rRateHwBuffers;.
16c0: 0a 20 20 20 20 44 57 4f 52 44 20 20 20 20 20 20 . DWORD
16d0: 20 20 20 20 20 64 77 50 6c 61 79 43 70 75 4f 76 dwPlayCpuOv
16e0: 65 72 68 65 61 64 53 77 42 75 66 66 65 72 73 3b erheadSwBuffers;
16f0: 0d 0a 20 20 20 20 44 57 4f 52 44 20 20 20 20 20 .. DWORD
1700: 20 20 20 20 20 20 64 77 52 65 73 65 72 76 65 64 dwReserved
1710: 31 3b 0d 0a 20 20 20 20 44 57 4f 52 44 20 20 20 1;.. DWORD
1720: 20 20 20 20 20 20 20 20 64 77 52 65 73 65 72 76 dwReserv
1730: 65 64 32 3b 0d 0a 7d 0d 0a 0d 0a 61 6c 69 61 73 ed2;..}....alias
1740: 20 44 53 43 41 50 53 2a 20 4c 50 44 53 43 41 50 DSCAPS* LPDSCAP
1750: 53 3b 0d 0a 0d 0a 73 74 72 75 63 74 20 44 53 42 S;....struct DSB
1760: 43 41 50 53 0d 0a 7b 0d 0a 20 20 20 20 44 57 4f CAPS..{.. DWO
1770: 52 44 20 20 20 20 20 20 20 20 20 20 20 64 77 53 RD dwS
1780: 69 7a 65 3b 0d 0a 20 20 20 20 44 57 4f 52 44 20 ize;.. DWORD
1790: 20 20 20 20 20 20 20 20 20 20 64 77 46 6c 61 67 dwFlag
17a0: 73 3b 0d 0a 20 20 20 20 44 57 4f 52 44 20 20 20 s;.. DWORD
17b0: 20 20 20 20 20 20 20 20 64 77 42 75 66 66 65 72 dwBuffer
17c0: 42 79 74 65 73 3b 0d 0a 20 20 20 20 44 57 4f 52 Bytes;.. DWOR
17d0: 44 20 20 20 20 20 20 20 20 20 20 20 64 77 55 6e D dwUn
17e0: 6c 6f 63 6b 54 72 61 6e 73 66 65 72 52 61 74 65 lockTransferRate
17f0: 3b 0d 0a 20 20 20 20 44 57 4f 52 44 20 20 20 20 ;.. DWORD
1800: 20 20 20 20 20 20 20 64 77 50 6c 61 79 43 70 75 dwPlayCpu
1810: 4f 76 65 72 68 65 61 64 3b 0d 0a 7d 0d 0a 0d 0a Overhead;..}....
1820: 61 6c 69 61 73 20 44 53 42 43 41 50 53 20 2a 4c alias DSBCAPS *L
1830: 50 44 53 42 43 41 50 53 3b 0d 0a 0d 0a 73 74 72 PDSBCAPS;....str
1840: 75 63 74 20 44 53 43 45 46 46 45 43 54 44 45 53 uct DSCEFFECTDES
1850: 43 0d 0a 7b 0d 0a 20 20 20 20 44 57 4f 52 44 20 C..{.. DWORD
1860: 20 20 20 20 20 20 64 77 53 69 7a 65 3b 0d 0a 20 dwSize;..
1870: 20 20 20 44 57 4f 52 44 20 20 20 20 20 20 20 64 DWORD d
1880: 77 46 6c 61 67 73 3b 0d 0a 20 20 20 20 47 55 49 wFlags;.. GUI
1890: 44 20 20 20 20 20 20 20 20 67 75 69 64 44 53 43 D guidDSC
18a0: 46 58 43 6c 61 73 73 3b 0d 0a 20 20 20 20 47 55 FXClass;.. GU
18b0: 49 44 20 20 20 20 20 20 20 20 67 75 69 64 44 53 ID guidDS
18c0: 43 46 58 49 6e 73 74 61 6e 63 65 3b 0d 0a 20 20 CFXInstance;..
18d0: 20 20 44 57 4f 52 44 20 20 20 20 20 20 20 64 77 DWORD dw
18e0: 52 65 73 65 72 76 65 64 31 3b 0d 0a 20 20 20 20 Reserved1;..
18f0: 44 57 4f 52 44 20 20 20 20 20 20 20 64 77 52 65 DWORD dwRe
1900: 73 65 72 76 65 64 32 3b 0d 0a 7d 0d 0a 0d 0a 61 served2;..}....a
1910: 6c 69 61 73 20 44 53 43 45 46 46 45 43 54 44 45 lias DSCEFFECTDE
1920: 53 43 20 2a 4c 50 44 53 43 45 46 46 45 43 54 44 SC *LPDSCEFFECTD
1930: 45 53 43 3b 0d 0a 0d 0a 73 74 72 75 63 74 20 44 ESC;....struct D
1940: 53 33 44 4c 49 53 54 45 4e 45 52 0d 0a 7b 0d 0a S3DLISTENER..{..
1950: 20 20 20 20 44 57 4f 52 44 20 20 20 20 20 20 20 DWORD
1960: 20 20 20 20 64 77 53 69 7a 65 3b 0d 0a 20 20 20 dwSize;..
1970: 20 44 33 44 56 45 43 54 4f 52 20 20 20 20 20 20 D3DVECTOR
1980: 20 76 50 6f 73 69 74 69 6f 6e 3b 0d 0a 20 20 20 vPosition;..
1990: 20 44 33 44 56 45 43 54 4f 52 20 20 20 20 20 20 D3DVECTOR
19a0: 20 76 56 65 6c 6f 63 69 74 79 3b 0d 0a 20 20 20 vVelocity;..
19b0: 20 44 33 44 56 45 43 54 4f 52 20 20 20 20 20 20 D3DVECTOR
19c0: 20 76 4f 72 69 65 6e 74 46 72 6f 6e 74 3b 0d 0a vOrientFront;..
19d0: 20 20 20 20 44 33 44 56 45 43 54 4f 52 20 20 20 D3DVECTOR
19e0: 20 20 20 20 76 4f 72 69 65 6e 74 54 6f 70 3b 0d vOrientTop;.
19f0: 0a 20 20 20 20 44 33 44 56 41 4c 55 45 20 20 20 . D3DVALUE
1a00: 20 20 20 20 20 66 6c 44 69 73 74 61 6e 63 65 46 flDistanceF
1a10: 61 63 74 6f 72 3b 0d 0a 20 20 20 20 44 33 44 56 actor;.. D3DV
1a20: 41 4c 55 45 20 20 20 20 20 20 20 20 66 6c 52 6f ALUE flRo
1a30: 6c 6c 6f 66 66 46 61 63 74 6f 72 3b 0d 0a 20 20 lloffFactor;..
1a40: 20 20 44 33 44 56 41 4c 55 45 20 20 20 20 20 20 D3DVALUE
1a50: 20 20 66 6c 44 6f 70 70 6c 65 72 46 61 63 74 6f flDopplerFacto
1a60: 72 3b 0d 0a 7d 0d 0a 0d 0a 61 6c 69 61 73 20 44 r;..}....alias D
1a70: 53 33 44 4c 49 53 54 45 4e 45 52 20 2a 4c 50 44 S3DLISTENER *LPD
1a80: 53 33 44 4c 49 53 54 45 4e 45 52 2c 20 4c 50 43 S3DLISTENER, LPC
1a90: 44 53 33 44 4c 49 53 54 45 4e 45 52 3b 0d 0a 0d DS3DLISTENER;...
1aa0: 0a 61 6c 69 61 73 20 66 6c 6f 61 74 20 44 33 44 .alias float D3D
1ab0: 56 41 4c 55 45 3b 0d 0a 0d 0a 73 74 72 75 63 74 VALUE;....struct
1ac0: 20 44 33 44 56 45 43 54 4f 52 0d 0a 7b 0d 0a 20 D3DVECTOR..{..
1ad0: 20 20 20 66 6c 6f 61 74 20 78 3b 0d 0a 20 20 20 float x;..
1ae0: 20 66 6c 6f 61 74 20 79 3b 0d 0a 20 20 20 20 66 float y;.. f
1af0: 6c 6f 61 74 20 7a 3b 0d 0a 7d 0d 0a 0d 0a 65 78 loat z;..}....ex
1b00: 74 65 72 6e 28 57 69 6e 64 6f 77 73 29 20 65 78 tern(Windows) ex
1b10: 70 6f 72 74 20 48 52 45 53 55 4c 54 20 44 69 72 port HRESULT Dir
1b20: 65 63 74 53 6f 75 6e 64 43 72 65 61 74 65 38 28 ectSoundCreate8(
1b30: 4c 50 43 47 55 49 44 20 70 63 47 75 69 64 44 65 LPCGUID pcGuidDe
1b40: 76 69 63 65 2c 20 4c 50 44 49 52 45 43 54 53 4f vice, LPDIRECTSO
1b50: 55 4e 44 38 20 2a 70 70 44 53 38 2c 20 4c 50 55 UND8 *ppDS8, LPU
1b60: 4e 4b 4e 4f 57 4e 20 70 55 6e 6b 4f 75 74 65 72 NKNOWN pUnkOuter
1b70: 29 3b 0d 0a 0d 0a 63 6f 6e 73 74 20 44 53 53 43 );....const DSSC
1b80: 4c 5f 50 52 49 4f 52 49 54 59 20 3d 20 30 78 30 L_PRIORITY = 0x0
1b90: 30 30 30 30 30 30 32 3b 0d 0a 63 6f 6e 73 74 20 0000002;..const
1ba0: 44 53 42 43 41 50 53 5f 50 52 49 4d 41 52 59 42 DSBCAPS_PRIMARYB
1bb0: 55 46 46 45 52 20 3d 20 30 78 30 30 30 30 30 30 UFFER = 0x000000
1bc0: 30 31 3b 0d 0a 63 6f 6e 73 74 20 44 53 42 43 41 01;..const DSBCA
1bd0: 50 53 5f 43 54 52 4c 33 44 20 3d 20 30 78 30 30 PS_CTRL3D = 0x00
1be0: 30 30 30 30 31 30 3b 0d 0a 63 6f 6e 73 74 20 44 000010;..const D
1bf0: 53 42 43 41 50 53 5f 47 45 54 43 55 52 52 45 4e SBCAPS_GETCURREN
1c00: 54 50 4f 53 49 54 49 4f 4e 32 20 3d 20 30 78 30 TPOSITION2 = 0x0
1c10: 30 30 31 30 30 30 30 3b 0d 0a 63 6f 6e 73 74 20 0010000;..const
1c20: 44 53 42 43 41 50 53 5f 4c 4f 43 44 45 46 45 52 DSBCAPS_LOCDEFER
1c30: 20 3d 20 30 78 30 30 30 34 30 30 30 30 3b 0d 0a = 0x00040000;..
1c40: 63 6f 6e 73 74 20 44 53 42 50 4c 41 59 5f 4c 4f const DSBPLAY_LO
1c50: 4f 50 49 4e 47 20 3d 20 30 78 30 30 30 30 30 30 OPING = 0x000000
1c60: 30 31 3b 0d 0a 63 6f 6e 73 74 20 44 53 42 53 54 01;..const DSBST
1c70: 41 54 55 53 5f 50 4c 41 59 49 4e 47 20 3d 20 30 ATUS_PLAYING = 0
1c80: 78 30 30 30 30 30 30 30 31 3b 0d 0a 63 6f 6e 73 x00000001;..cons
1c90: 74 20 44 53 42 43 41 50 53 5f 43 54 52 4c 46 52 t DSBCAPS_CTRLFR
1ca0: 45 51 55 45 4e 43 59 20 3d 20 30 78 30 30 30 30 EQUENCY = 0x0000
1cb0: 30 30 32 30 3b 0d 0a 63 6f 6e 73 74 20 44 53 42 0020;..const DSB
1cc0: 43 41 50 53 5f 43 54 52 4c 50 41 4e 20 3d 20 30 CAPS_CTRLPAN = 0
1cd0: 78 30 30 30 30 30 30 34 30 3b 0d 0a 63 6f 6e 73 x00000040;..cons
1ce0: 74 20 44 53 42 43 41 50 53 5f 43 54 52 4c 56 4f t DSBCAPS_CTRLVO
1cf0: 4c 55 4d 45 20 3d 20 30 78 30 30 30 30 30 30 38 LUME = 0x0000008
1d00: 30 3b 0d 0a 63 6f 6e 73 74 20 44 53 42 4c 4f 43 0;..const DSBLOC
1d10: 4b 5f 45 4e 54 49 52 45 42 55 46 46 45 52 20 3d K_ENTIREBUFFER =
1d20: 20 30 78 30 30 30 30 30 30 30 32 3b 0d 0a 0d 0a 0x00000002;....
1d30: 63 6f 6e 73 74 20 47 55 49 44 20 49 49 44 5f 49 const GUID IID_I
1d40: 44 69 72 65 63 74 53 6f 75 6e 64 33 44 4c 69 73 DirectSound3DLis
1d50: 74 65 6e 65 72 38 20 3d 20 7b 30 78 32 37 39 41 tener8 = {0x279A
1d60: 46 41 38 34 2c 30 78 34 39 38 31 2c 30 78 31 31 FA84,0x4981,0x11
1d70: 43 45 2c 5b 30 78 41 35 2c 20 30 78 32 31 2c 20 CE,[0xA5, 0x21,
1d80: 30 78 30 30 2c 20 30 78 32 30 2c 20 30 78 41 46 0x00, 0x20, 0xAF
1d90: 2c 20 30 78 30 42 2c 20 30 78 45 35 2c 20 30 78 , 0x0B, 0xE5, 0x
1da0: 36 30 5d 7d 3b 60]};