Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
26df03d2
Commit
26df03d2
authored
Nov 24, 2009
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Nov 30, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Use DirectSoundCapture properly in duplex.
parent
9123f28e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
duplex.c
dlls/dsound/duplex.c
+14
-9
No files found.
dlls/dsound/duplex.c
View file @
26df03d2
...
...
@@ -24,6 +24,8 @@
#define NONAMELESSSTRUCT
#define NONAMELESSUNION
#define CINTERFACE
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
...
...
@@ -48,7 +50,7 @@ typedef struct IDirectSoundFullDuplexImpl
/* IDirectSoundFullDuplexImpl fields */
DirectSoundDevice
*
renderer_device
;
DirectSoundCaptureDevice
*
capture_device
;
IDirectSoundCapture
*
capture_device
;
LPUNKNOWN
pUnknown
;
LPDIRECTSOUND8
pDS8
;
...
...
@@ -368,7 +370,7 @@ static HRESULT WINAPI IDirectSoundFullDuplex_IDirectSoundCapture_CreateCaptureBu
{
IDirectSoundFullDuplex_IDirectSoundCapture
*
This
=
(
IDirectSoundFullDuplex_IDirectSoundCapture
*
)
iface
;
TRACE
(
"(%p,%p,%p,%p)
\n
"
,
This
,
lpcDSCBufferDesc
,
lplpDSCaptureBuffer
,
pUnk
);
return
IDirectSoundCapture
Impl_CreateCaptureBuffer
(
This
->
pdsfd
->
pDSC
,
lpcDSCBufferDesc
,
lplpDSCaptureBuffer
,
pUnk
);
return
IDirectSoundCapture
_CreateCaptureBuffer
(
This
->
pdsfd
->
capture_device
,
lpcDSCBufferDesc
,
lplpDSCaptureBuffer
,
pUnk
);
}
static
HRESULT
WINAPI
IDirectSoundFullDuplex_IDirectSoundCapture_GetCaps
(
...
...
@@ -377,7 +379,7 @@ static HRESULT WINAPI IDirectSoundFullDuplex_IDirectSoundCapture_GetCaps(
{
IDirectSoundFullDuplex_IDirectSoundCapture
*
This
=
(
IDirectSoundFullDuplex_IDirectSoundCapture
*
)
iface
;
TRACE
(
"(%p,%p)
\n
"
,
This
,
lpDSCCaps
);
return
IDirectSoundCapture
Impl_GetCaps
(
This
->
pdsfd
->
pDSC
,
lpDSCCaps
);
return
IDirectSoundCapture
_GetCaps
(
This
->
pdsfd
->
capture_device
,
lpDSCCaps
);
}
static
HRESULT
WINAPI
IDirectSoundFullDuplex_IDirectSoundCapture_Initialize
(
...
...
@@ -386,7 +388,7 @@ static HRESULT WINAPI IDirectSoundFullDuplex_IDirectSoundCapture_Initialize(
{
IDirectSoundFullDuplex_IDirectSoundCapture
*
This
=
(
IDirectSoundFullDuplex_IDirectSoundCapture
*
)
iface
;
TRACE
(
"(%p, %s)
\n
"
,
This
,
debugstr_guid
(
lpcGUID
));
return
IDirectSoundCapture
Impl_Initialize
(
This
->
pdsfd
->
pDSC
,
lpcGUID
);
return
IDirectSoundCapture
_Initialize
(
This
->
pdsfd
->
capture_device
,
lpcGUID
);
}
static
const
IDirectSoundCaptureVtbl
DirectSoundFullDuplex_DirectSoundCapture_Vtbl
=
...
...
@@ -521,7 +523,7 @@ IDirectSoundFullDuplexImpl_Release( LPDIRECTSOUNDFULLDUPLEX iface )
if
(
!
ref
)
{
if
(
This
->
capture_device
)
DirectSoundCaptureDevic
e_Release
(
This
->
capture_device
);
IDirectSoundCaptur
e_Release
(
This
->
capture_device
);
if
(
This
->
renderer_device
)
DirectSoundDevice_Release
(
This
->
renderer_device
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
@@ -596,7 +598,9 @@ IDirectSoundFullDuplexImpl_Initialize(
}
IDirectSoundBuffer8_AddRef
(
*
lplpDirectSoundBuffer8
);
hr
=
DirectSoundCaptureDevice_Initialize
(
&
This
->
capture_device
,
pCaptureGuid
);
hr
=
DSOUND_CaptureCreate8
(
&
IID_IDirectSoundCapture8
,
&
This
->
capture_device
);
if
(
SUCCEEDED
(
hr
))
hr
=
IDirectSoundCapture_Initialize
(
This
->
capture_device
,
pCaptureGuid
);
if
(
hr
!=
DS_OK
)
{
WARN
(
"DirectSoundCaptureDevice_Initialize() failed
\n
"
);
*
lplpDirectSoundCaptureBuffer8
=
NULL
;
...
...
@@ -604,9 +608,10 @@ IDirectSoundFullDuplexImpl_Initialize(
return
hr
;
}
hr
=
IDirectSoundCaptureBufferImpl_Create
(
This
->
capture_device
,
(
IDirectSoundCaptureBufferImpl
**
)
lplpDirectSoundCaptureBuffer8
,
lpDscBufferDesc
);
hr
=
IDirectSoundCapture_CreateCaptureBuffer
(
This
->
capture_device
,
lpDscBufferDesc
,
(
IDirectSoundCaptureBuffer
**
)
lplpDirectSoundCaptureBuffer8
,
NULL
);
if
(
hr
!=
DS_OK
)
{
WARN
(
"IDirectSoundCaptureBufferImpl_Create() failed
\n
"
);
*
lplpDirectSoundCaptureBuffer8
=
NULL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment