ReactOS 0.4.15-dev-7931-gfd331f1
secondary.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Configuration of network devices
4 * FILE: dll/directx/dsound_new/secondary.c
5 * PURPOSE: Secondary IDirectSoundBuffer8 implementation
6 *
7 * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org)
8 */
9
10
11#include "precomp.h"
12
13typedef struct
14{
15 const IDirectSoundBuffer8Vtbl *lpVtbl;
16 LONG ref;
17
19 DWORD dwLevel;
21 DWORD dwFrequency;
24 LONG VolumePan;
32
34
35
37
43 LPVOID* ppobj)
44{
45 LPOLESTR pStr;
47
49 IsEqualIID(riid, &IID_IDirectSoundBuffer) ||
50 IsEqualIID(riid, &IID_IDirectSoundBuffer8))
51 {
52 *ppobj = (LPVOID)&This->lpVtbl;
54 return S_OK;
55 }
56
57 if (SUCCEEDED(StringFromIID(riid, &pStr)))
58 {
59 DPRINT("No Interface for class %s\n", pStr);
60 CoTaskMemFree(pStr);
61 }
62 return E_NOINTERFACE;
63}
64
69{
70 ULONG ref;
72
74
75 return ref;
76
77}
78
83{
84 ULONG ref;
86
87 ref = InterlockedDecrement(&(This->ref));
88
89 if (!ref)
90 {
91 HeapFree(GetProcessHeap(), 0, This->Buffer);
92 HeapFree(GetProcessHeap(), 0, This->Format);
94 }
95
96 return ref;
97}
98
100WINAPI
103 LPDSBCAPS pDSBufferCaps)
104{
106
107 if (!pDSBufferCaps)
108 {
109 /* invalid parameter */
110 return DSERR_INVALIDPARAM;
111 }
112
113 if (pDSBufferCaps->dwSize < sizeof(DSBCAPS))
114 {
115 /* invalid buffer size */
116 return DSERR_INVALIDPARAM;
117 }
118
119 /* get buffer details */
120 pDSBufferCaps->dwUnlockTransferRate = 0;
121 pDSBufferCaps->dwPlayCpuOverhead = 0;
122 pDSBufferCaps->dwSize = This->BufferSize;
123 pDSBufferCaps->dwFlags = This->dwFlags;
124
125 return DS_OK;
126}
127
129WINAPI
132 LPDWORD pdwCurrentPlayCursor,
133 LPDWORD pdwCurrentWriteCursor)
134{
136
137 //DPRINT("SecondaryDirectSoundBuffer8Impl_fnGetCurrentPosition This %p Play %p Write %p\n", This, pdwCurrentPlayCursor, pdwCurrentWriteCursor);
138
139 if (pdwCurrentWriteCursor)
140 {
141 *pdwCurrentWriteCursor = This->BufferPosition;
142 }
143
144 return PrimaryDirectSoundBuffer_GetPosition(This->PrimaryBuffer, pdwCurrentPlayCursor, NULL);
145}
146
148WINAPI
151 LPWAVEFORMATEX pwfxFormat,
152 DWORD dwSizeAllocated,
153 LPDWORD pdwSizeWritten)
154{
155 DWORD FormatSize;
157
158 FormatSize = sizeof(WAVEFORMATEX) + This->Format->cbSize;
159
160 if (!pwfxFormat && !pdwSizeWritten)
161 {
162 /* invalid parameter */
163 return DSERR_INVALIDPARAM;
164 }
165
166 if (!pwfxFormat)
167 {
168 /* return required format size */
169 *pdwSizeWritten = FormatSize;
170 return DS_OK;
171 }
172 else
173 {
174 if (dwSizeAllocated >= FormatSize)
175 {
176 /* copy format */
177 CopyMemory(pwfxFormat, This->Format, FormatSize);
178
179 if (pdwSizeWritten)
180 *pdwSizeWritten = FormatSize;
181
182 return DS_OK;
183 }
184 /* buffer too small */
185 if (pdwSizeWritten)
186 *pdwSizeWritten = 0;
187
188 return DSERR_INVALIDPARAM;
189 }
190}
191
193WINAPI
196 LPLONG plVolume)
197{
199
200 if (!plVolume)
201 {
202 /* invalid parameter */
203 return DSERR_INVALIDPARAM;
204 }
205
206 /* get volume */
207 *plVolume = This->Volume;
208
209 return DS_OK;
210}
211
213WINAPI
216 LPLONG plPan)
217{
219
220 if (!plPan)
221 {
222 /* invalid parameter */
223 return DSERR_INVALIDPARAM;
224 }
225
226 /* get frequency */
227 *plPan = This->VolumePan;
228
229 return DS_OK;
230}
231
233WINAPI
236 LPDWORD pdwFrequency)
237{
239
240 if (!pdwFrequency)
241 {
242 /* invalid parameter */
243 return DSERR_INVALIDPARAM;
244 }
245
246 /* get frequency */
247 *pdwFrequency = This->dwFrequency;
248
249 return DS_OK;
250}
251
253WINAPI
256 LPDWORD pdwStatus)
257{
259
260 if (!pdwStatus)
261 {
262 /* invalid parameter */
263 return DSERR_INVALIDPARAM;
264 }
265
266 *pdwStatus = 0;
267 if (This->State == KSSTATE_RUN || This->State == KSSTATE_ACQUIRE)
268 {
269 /* buffer is playing */
270 *pdwStatus |= DSBSTATUS_PLAYING;
271 if (This->Flags & DSBPLAY_LOOPING)
272 *pdwStatus |= DSBSTATUS_LOOPING;
273 }
274
275 return DS_OK;
276}
277
279WINAPI
282 LPDIRECTSOUND pDirectSound,
283 LPCDSBUFFERDESC pcDSBufferDesc)
284{
285 /* RTFM */
287}
288
290WINAPI
294 DWORD dwBytes,
295 LPVOID *ppvAudioPtr1,
296 LPDWORD pdwAudioBytes1,
297 LPVOID *ppvAudioPtr2,
298 LPDWORD pdwAudioBytes2,
300{
302
303 DPRINT("This %p dwOffset %u dwBytes %u ppvAudioPtr1 %p pdwAudioBytes1 %p ppvAudioPtr2 %p pdwAudioBytes2 %p dwFlags %x This->BufferSize %u\n",
304 This, dwOffset, dwBytes, ppvAudioPtr1, pdwAudioBytes1, ppvAudioPtr2, pdwAudioBytes2, dwFlags, This->BufferSize);
305
307 {
308 *ppvAudioPtr1 = (LPVOID)This->Buffer;
309 *pdwAudioBytes1 = This->BufferSize;
310 if (ppvAudioPtr2)
311 *ppvAudioPtr2 = NULL;
312 if (pdwAudioBytes2)
313 *pdwAudioBytes2 = 0;
314
315 return DS_OK;
316 }
318 {
320 return DSERR_UNSUPPORTED;
321 }
322 else
323 {
324 ASSERT(dwOffset < This->BufferSize);
325 ASSERT(dwBytes <= This->BufferSize);
326
327 dwBytes = min(This->BufferSize - dwOffset, dwBytes);
328
329 *ppvAudioPtr1 = This->Buffer + dwOffset;
330 *pdwAudioBytes1 = dwBytes;
331
332 This->BufferPosition = dwOffset + dwBytes;
333
334 if (This->BufferPosition == This->BufferSize)
335 This->BufferPosition = 0;
336
337 if (ppvAudioPtr2)
338 *ppvAudioPtr2 = NULL;
339 if (pdwAudioBytes2)
340 *pdwAudioBytes2 = 0;
341
342 return DS_OK;
343 }
344}
345
347WINAPI
350 DWORD dwReserved1,
351 DWORD dwPriority,
353{
354 HRESULT hResult;
356
357 if (dwReserved1 != 0)
358 {
359 /* must be zero */
360 return DSERR_INVALIDPARAM;
361 }
362
363 /* sanity check */
365
366
367 if (This->State == KSSTATE_RUN)
368 {
369 /* sound buffer is already playing */
370 return DS_OK;
371 }
372
373 /* set dataformat */
374 hResult = PrimaryDirectSoundBuffer_SetFormat(This->PrimaryBuffer, This->Format, TRUE);
375
376 if (!SUCCEEDED(hResult))
377 {
378 /* failed */
379 DPRINT1("Failed to set format Tag %u Samples %u Bytes %u nChannels %u\n", This->Format->wFormatTag, This->Format->nSamplesPerSec, This->Format->wBitsPerSample, This->Format->nChannels);
380 return hResult;
381 }
382
383 /* start primary buffer */
385 /* acquire primary buffer */
387 /* HACK write buffer */
388 PrimaryDirectSoundBuffer_Write(This->PrimaryBuffer, This->Buffer, This->BufferSize);
389 /* release primary buffer */
391
392 DPRINT("SetFormatSuccess PrimaryBuffer %p\n", This->PrimaryBuffer);
393 This->State = KSSTATE_RUN;
394
395 return DS_OK;
396}
397
399WINAPI
402 DWORD dwNewPosition)
403{
405
406 DPRINT("Setting position %u\n", dwNewPosition);
407 This->Position = dwNewPosition;
408
409 return DS_OK;
410}
411
413WINAPI
416 LPCWAVEFORMATEX pcfxFormat)
417{
418 /* RTFM */
419 return DSERR_INVALIDCALL;
420}
421
423WINAPI
426 LONG lVolume)
427{
429
430 if (lVolume < DSBVOLUME_MIN || lVolume > DSBVOLUME_MAX)
431 {
432 /* invalid parameter */
433 return DSERR_INVALIDPARAM;
434 }
435
436
437 /* Store volume */
438 This->Volume = lVolume;
439
440 return DS_OK;
441}
442
444WINAPI
447 LONG lPan)
448{
450
451 if (lPan < DSBPAN_LEFT || lPan > DSBPAN_RIGHT)
452 {
453 /* invalid parameter */
454 return DSERR_INVALIDPARAM;
455 }
456
457 /* Store volume pan */
458 This->VolumePan = lPan;
459
460 return DS_OK;
461}
462
464WINAPI
467 DWORD dwFrequency)
468{
470
471 if (dwFrequency == DSBFREQUENCY_ORIGINAL)
472 {
473 /* restore original frequency */
474 dwFrequency = This->Format->nSamplesPerSec;
475 }
476
477 if (dwFrequency < DSBFREQUENCY_MIN || dwFrequency > DSBFREQUENCY_MAX)
478 {
479 /* invalid frequency */
480 return DSERR_INVALIDPARAM;
481 }
482
483 if (dwFrequency != This->dwFrequency)
484 {
485 /* FIXME handle frequency change */
486 }
487
488 /* store frequency */
489 This->dwFrequency = dwFrequency;
490
491 return DS_OK;
492}
493
495WINAPI
498{
500
504
505 DPRINT("SecondaryDirectSoundBuffer8Impl_fnStop\n");
506
507
508 /* set state to stop */
509 This->State = KSSTATE_STOP;
510 This->BufferPosition = 0;
511
512 return DS_OK;
513}
514
515
517WINAPI
520 LPVOID pvAudioPtr1,
521 DWORD dwAudioBytes1,
522 LPVOID pvAudioPtr2,
523 DWORD dwAudioBytes2)
524{
525 //DPRINT("SecondaryDirectSoundBuffer8Impl_fnUnlock pvAudioPtr1 %p dwAudioBytes1 %u pvAudioPtr2 %p dwAudioBytes2 %u Unimplemented\n");
526 return DS_OK;
527}
528
529
530
531
533WINAPI
536{
538 return DSERR_INVALIDPARAM;
539}
540
541
543WINAPI
546 DWORD dwEffectsCount,
547 LPDSEFFECTDESC pDSFXDesc,
548 LPDWORD pdwResultCodes)
549{
551 return DSERR_INVALIDPARAM;
552}
553
555WINAPI
559 DWORD dwEffectsCount,
560 LPDWORD pdwResultCodes)
561{
563 return DSERR_INVALIDPARAM;
564}
565
567WINAPI
570 REFGUID rguidObject,
571 DWORD dwIndex,
572 REFGUID rguidInterface,
573 LPVOID *ppObject)
574{
576 return DSERR_INVALIDPARAM;
577}
578
579static IDirectSoundBuffer8Vtbl vt_DirectSoundBuffer8 =
580{
581 /* IUnknown methods */
585 /* IDirectSoundBuffer methods */
604 /* IDirectSoundBuffer8 methods */
608};
609
614 DWORD dwLevel,
615 LPCDSBUFFERDESC lpcDSBufferDesc,
616 LPDIRECTSOUNDBUFFER8 PrimaryBuffer)
617{
618 ULONG FormatSize;
620
621 if (!This)
622 {
623 /* not enough memory */
624 return DSERR_OUTOFMEMORY;
625 }
626
627 FormatSize = sizeof(WAVEFORMATEX) + lpcDSBufferDesc->lpwfxFormat->cbSize;
628
629 This->Format = HeapAlloc(GetProcessHeap(), 0, FormatSize);
630 if (!This->Format)
631 {
632 /* not enough memory */
634 return DSERR_OUTOFMEMORY;
635 }
636
637 /* sanity check */
638 ASSERT(lpcDSBufferDesc->dwBufferBytes);
639
640 /* allocate sound buffer */
641 This->Buffer = HeapAlloc(GetProcessHeap(), 0, lpcDSBufferDesc->dwBufferBytes);
642 if (!This->Buffer)
643 {
644 /* not enough memory */
645 HeapFree(GetProcessHeap(), 0, This->Format);
647 return DSERR_OUTOFMEMORY;
648 }
649
650 /* fill buffer with silence */
651 FillMemory(This->Buffer, lpcDSBufferDesc->dwBufferBytes, lpcDSBufferDesc->lpwfxFormat->wBitsPerSample == 8 ? 0x80 : 0);
652
653 This->ref = 1;
654 This->lpVtbl = &vt_DirectSoundBuffer8;
655 This->Filter = Filter;
656 This->dwLevel = dwLevel;
657 This->dwFlags = lpcDSBufferDesc->dwFlags;
658 This->dwFrequency = lpcDSBufferDesc->lpwfxFormat->nSamplesPerSec;
659 This->State = KSSTATE_STOP;
660 This->Volume = DSBVOLUME_MAX;
661 This->VolumePan = DSBPAN_CENTER;
662 This->Flags = 0;
663 This->Position = 0;
664 This->BufferSize = lpcDSBufferDesc->dwBufferBytes;
665 This->PrimaryBuffer = PrimaryBuffer;
666
667 CopyMemory(This->Format, lpcDSBufferDesc->lpwfxFormat, FormatSize);
668
670 return DS_OK;
671}
672
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define DPRINT1
Definition: precomp.h:8
const GUID IID_IUnknown
#define UNIMPLEMENTED
Definition: debug.h:115
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
VOID PrimaryDirectSoundBuffer_ReleaseLock(LPDIRECTSOUNDBUFFER8 iface)
Definition: primary.c:757
VOID PrimaryDirectSoundBuffer_AcquireLock(LPDIRECTSOUNDBUFFER8 iface)
Definition: primary.c:746
DWORD PrimaryDirectSoundBuffer_Write(LPDIRECTSOUNDBUFFER8 iface, LPVOID Buffer, DWORD BufferSize)
Definition: primary.c:587
VOID PrimaryDirectSoundBuffer_SetState(LPDIRECTSOUNDBUFFER8 iface, KSSTATE State)
Definition: primary.c:621
HRESULT PrimaryDirectSoundBuffer_GetPosition(LPDIRECTSOUNDBUFFER8 iface, LPDWORD pdwCurrentPlayCursor, LPDWORD pdwCurrentWriteCursor)
Definition: primary.c:644
HRESULT PrimaryDirectSoundBuffer_SetFormat(LPDIRECTSOUNDBUFFER8 iface, LPWAVEFORMATEX pcfxFormat, BOOL bLooped)
Definition: primary.c:694
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define DSERR_ALREADYINITIALIZED
Definition: dsound.h:129
#define DSERR_UNSUPPORTED
Definition: dsound.h:127
#define DSBPAN_CENTER
Definition: dsound.h:227
#define DSBFREQUENCY_MAX
Definition: dsound.h:232
#define DSERR_OUTOFMEMORY
Definition: dsound.h:125
#define DSBLOCK_ENTIREBUFFER
Definition: dsound.h:204
#define DSBLOCK_FROMWRITECURSOR
Definition: dsound.h:203
#define DSBSTATUS_LOOPING
Definition: dsound.h:198
#define DSBVOLUME_MAX
Definition: dsound.h:229
#define DSBFREQUENCY_ORIGINAL
Definition: dsound.h:233
#define DSERR_INVALIDCALL
Definition: dsound.h:122
struct IDirectSound * LPDIRECTSOUND
Definition: dsound.h:70
#define DSBSTATUS_PLAYING
Definition: dsound.h:196
#define DS_OK
Definition: dsound.h:116
#define DSERR_INVALIDPARAM
Definition: dsound.h:121
struct IDirectSoundBuffer8 * LPDIRECTSOUNDBUFFER8
Definition: dsound.h:79
#define DSBPLAY_LOOPING
Definition: dsound.h:189
#define DSBPAN_RIGHT
Definition: dsound.h:228
#define FillMemory(BUF, SIZ, MASK)
Definition: strucsup.c:31
unsigned long DWORD
Definition: ntddk_ex.h:95
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1801
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
KSSTATE
Definition: ks.h:1214
@ KSSTATE_ACQUIRE
Definition: ks.h:1216
@ KSSTATE_PAUSE
Definition: ks.h:1217
@ KSSTATE_RUN
Definition: ks.h:1218
@ KSSTATE_STOP
Definition: ks.h:1215
if(dx< 0)
Definition: linetemp.h:194
UNICODE_STRING Volume
Definition: fltkernel.h:1172
#define ASSERT(a)
Definition: mode.c:44
static LPOLESTR
Definition: stg_prop.c:27
#define min(a, b)
Definition: monoChain.cc:55
#define LPVOID
Definition: nt_native.h:45
_In_ DWORD _In_ DWORD dwOffset
Definition: ntgdi.h:2033
_Check_return_ HRESULT WINAPI StringFromIID(_In_ REFIID rclsid, _Outptr_ LPOLESTR *lplpsz)
long LONG
Definition: pedump.c:60
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
_In_ UCHAR _In_ ULONG _Out_ PUCHAR _Outptr_result_bytebuffer_ OutBufferLength PVOID * OutBuffer
Definition: scsi.h:4071
HRESULT WINAPI SecondaryDirectSoundBuffer8Impl_fnAcquireResources(LPDIRECTSOUNDBUFFER8 iface, DWORD dwFlags, DWORD dwEffectsCount, LPDWORD pdwResultCodes)
Definition: secondary.c:556
HRESULT WINAPI SecondaryDirectSoundBuffer8Impl_fnGetCurrentPosition(LPDIRECTSOUNDBUFFER8 iface, LPDWORD pdwCurrentPlayCursor, LPDWORD pdwCurrentWriteCursor)
Definition: secondary.c:130
HRESULT WINAPI SecondaryDirectSoundBuffer8Impl_fnGetCaps(LPDIRECTSOUNDBUFFER8 iface, LPDSBCAPS pDSBufferCaps)
Definition: secondary.c:101
HRESULT WINAPI SecondaryDirectSoundBuffer8Impl_fnPlay(LPDIRECTSOUNDBUFFER8 iface, DWORD dwReserved1, DWORD dwPriority, DWORD dwFlags)
Definition: secondary.c:348
HRESULT NewSecondarySoundBuffer(LPDIRECTSOUNDBUFFER8 *OutBuffer, LPFILTERINFO Filter, DWORD dwLevel, LPCDSBUFFERDESC lpcDSBufferDesc, LPDIRECTSOUNDBUFFER8 PrimaryBuffer)
Definition: secondary.c:611
HRESULT WINAPI SecondaryDirectSoundBuffer8Impl_fnSetVolume(LPDIRECTSOUNDBUFFER8 iface, LONG lVolume)
Definition: secondary.c:424
HRESULT WINAPI SecondaryDirectSoundBuffer8Impl_fnGetStatus(LPDIRECTSOUNDBUFFER8 iface, LPDWORD pdwStatus)
Definition: secondary.c:254
HRESULT WINAPI SecondaryDirectSoundBuffer8Impl_fnGetFrequency(LPDIRECTSOUNDBUFFER8 iface, LPDWORD pdwFrequency)
Definition: secondary.c:234
HRESULT WINAPI SecondaryDirectSoundBuffer8Impl_fnGetVolume(LPDIRECTSOUNDBUFFER8 iface, LPLONG plVolume)
Definition: secondary.c:194
HRESULT WINAPI SecondaryDirectSoundBuffer8Impl_fnSetPan(LPDIRECTSOUNDBUFFER8 iface, LONG lPan)
Definition: secondary.c:445
HRESULT WINAPI SecondaryDirectSoundBuffer8Impl_fnRestore(LPDIRECTSOUNDBUFFER8 iface)
Definition: secondary.c:534
HRESULT WINAPI SecondaryDirectSoundBuffer8Impl_fnGetObjectInPath(LPDIRECTSOUNDBUFFER8 iface, REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject)
Definition: secondary.c:568
HRESULT WINAPI SecondaryDirectSoundBuffer8Impl_fnGetFormat(LPDIRECTSOUNDBUFFER8 iface, LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, LPDWORD pdwSizeWritten)
Definition: secondary.c:149
HRESULT WINAPI SecondaryDirectSoundBuffer8Impl_fnUnlock(LPDIRECTSOUNDBUFFER8 iface, LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioBytes2)
Definition: secondary.c:518
HRESULT WINAPI SecondaryDirectSoundBuffer8Impl_fnSetFrequency(LPDIRECTSOUNDBUFFER8 iface, DWORD dwFrequency)
Definition: secondary.c:465
ULONG WINAPI SecondaryDirectSoundBuffer8Impl_fnRelease(LPDIRECTSOUNDBUFFER8 iface)
Definition: secondary.c:81
static IDirectSoundBuffer8Vtbl vt_DirectSoundBuffer8
Definition: secondary.c:579
HRESULT WINAPI SecondaryDirectSoundBuffer8Impl_fnGetPan(LPDIRECTSOUNDBUFFER8 iface, LPLONG plPan)
Definition: secondary.c:214
HRESULT WINAPI SecondaryDirectSoundBuffer8Impl_fnLock(LPDIRECTSOUNDBUFFER8 iface, DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1, LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags)
Definition: secondary.c:291
HRESULT WINAPI SecondaryDirectSoundBuffer8Impl_fnStop(LPDIRECTSOUNDBUFFER8 iface)
Definition: secondary.c:496
HRESULT WINAPI SecondaryDirectSoundBuffer8Impl_fnQueryInterface(LPDIRECTSOUNDBUFFER8 iface, IN REFIID riid, LPVOID *ppobj)
Definition: secondary.c:40
ULONG WINAPI SecondaryDirectSoundBuffer8Impl_fnAddRef(LPDIRECTSOUNDBUFFER8 iface)
Definition: secondary.c:67
HRESULT WINAPI SecondaryDirectSoundBuffer8Impl_fnInitialize(LPDIRECTSOUNDBUFFER8 iface, LPDIRECTSOUND pDirectSound, LPCDSBUFFERDESC pcDSBufferDesc)
Definition: secondary.c:280
HRESULT WINAPI SecondaryDirectSoundBuffer8Impl_fnSetFormat(LPDIRECTSOUNDBUFFER8 iface, LPCWAVEFORMATEX pcfxFormat)
Definition: secondary.c:414
HRESULT WINAPI SecondaryDirectSoundBuffer8Impl_fnSetCurrentPosition(LPDIRECTSOUNDBUFFER8 iface, DWORD dwNewPosition)
Definition: secondary.c:400
struct CDirectSoundBuffer * LPCDirectSoundBuffer
HRESULT WINAPI SecondaryDirectSoundBuffer8Impl_fnSetFX(LPDIRECTSOUNDBUFFER8 iface, DWORD dwEffectsCount, LPDSEFFECTDESC pDSFXDesc, LPDWORD pdwResultCodes)
Definition: secondary.c:544
#define DPRINT
Definition: sndvol32.h:71
LPWAVEFORMATEX Format
Definition: secondary.c:25
LPDIRECTSOUNDBUFFER8 PrimaryBuffer
Definition: secondary.c:33
DWORD BufferPosition
Definition: secondary.c:22
DWORD dwUnlockTransferRate
Definition: dsound.h:242
DWORD dwPlayCpuOverhead
Definition: dsound.h:243
DWORD dwFlags
Definition: dsound.h:240
DWORD dwSize
Definition: dsound.h:239
DWORD dwFlags
Definition: dsound.h:289
DWORD dwBufferBytes
Definition: dsound.h:290
LPWAVEFORMATEX lpwfxFormat
Definition: dsound.h:292
Definition: scsiwmi.h:51
WORD cbSize
Definition: mmreg.h:84
DWORD nSamplesPerSec
Definition: mmreg.h:80
WORD wBitsPerSample
Definition: mmreg.h:83
Definition: send.c:48
int32_t * LPLONG
Definition: typedefs.h:58
uint32_t * LPDWORD
Definition: typedefs.h:59
#define IN
Definition: typedefs.h:39
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254
#define CopyMemory
Definition: winbase.h:1710
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:2364