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
52400723
Commit
52400723
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: Don't use DirectSoundDevice calls directly.
parent
26df03d2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
35 deletions
+17
-35
duplex.c
dlls/dsound/duplex.c
+17
-35
No files found.
dlls/dsound/duplex.c
View file @
52400723
...
...
@@ -49,7 +49,7 @@ typedef struct IDirectSoundFullDuplexImpl
LONG
ref
;
/* IDirectSoundFullDuplexImpl fields */
DirectSoundDevice
*
renderer_device
;
IDirectSound8
*
renderer_device
;
IDirectSoundCapture
*
capture_device
;
LPUNKNOWN
pUnknown
;
...
...
@@ -195,7 +195,7 @@ static HRESULT WINAPI IDirectSoundFullDuplex_IDirectSound8_CreateSoundBuffer(
{
IDirectSoundFullDuplex_IDirectSound8
*
This
=
(
IDirectSoundFullDuplex_IDirectSound8
*
)
iface
;
TRACE
(
"(%p,%p,%p,%p)
\n
"
,
This
,
dsbd
,
ppdsb
,
lpunk
);
return
DirectSoundDevice_CreateSoundBuffer
(
This
->
pdsfd
->
renderer_device
,
dsbd
,
ppdsb
,
lpunk
,
TRUE
);
return
IDirectSound8_CreateSoundBuffer
(
This
->
pdsfd
->
renderer_device
,
dsbd
,
ppdsb
,
lpunk
);
}
static
HRESULT
WINAPI
IDirectSoundFullDuplex_IDirectSound8_GetCaps
(
...
...
@@ -204,7 +204,7 @@ static HRESULT WINAPI IDirectSoundFullDuplex_IDirectSound8_GetCaps(
{
IDirectSoundFullDuplex_IDirectSound8
*
This
=
(
IDirectSoundFullDuplex_IDirectSound8
*
)
iface
;
TRACE
(
"(%p,%p)
\n
"
,
This
,
lpDSCaps
);
return
DirectSoundDevice
_GetCaps
(
This
->
pdsfd
->
renderer_device
,
lpDSCaps
);
return
IDirectSound8
_GetCaps
(
This
->
pdsfd
->
renderer_device
,
lpDSCaps
);
}
static
HRESULT
WINAPI
IDirectSoundFullDuplex_IDirectSound8_DuplicateSoundBuffer
(
...
...
@@ -214,7 +214,7 @@ static HRESULT WINAPI IDirectSoundFullDuplex_IDirectSound8_DuplicateSoundBuffer(
{
IDirectSoundFullDuplex_IDirectSound8
*
This
=
(
IDirectSoundFullDuplex_IDirectSound8
*
)
iface
;
TRACE
(
"(%p,%p,%p)
\n
"
,
This
,
psb
,
ppdsb
);
return
DirectSoundDevice
_DuplicateSoundBuffer
(
This
->
pdsfd
->
renderer_device
,
psb
,
ppdsb
);
return
IDirectSound8
_DuplicateSoundBuffer
(
This
->
pdsfd
->
renderer_device
,
psb
,
ppdsb
);
}
static
HRESULT
WINAPI
IDirectSoundFullDuplex_IDirectSound8_SetCooperativeLevel
(
...
...
@@ -224,7 +224,7 @@ static HRESULT WINAPI IDirectSoundFullDuplex_IDirectSound8_SetCooperativeLevel(
{
IDirectSoundFullDuplex_IDirectSound8
*
This
=
(
IDirectSoundFullDuplex_IDirectSound8
*
)
iface
;
TRACE
(
"(%p,%p,%s)
\n
"
,
This
,
hwnd
,
dumpCooperativeLevel
(
level
));
return
DirectSoundDevice
_SetCooperativeLevel
(
This
->
pdsfd
->
renderer_device
,
hwnd
,
level
);
return
IDirectSound8
_SetCooperativeLevel
(
This
->
pdsfd
->
renderer_device
,
hwnd
,
level
);
}
static
HRESULT
WINAPI
IDirectSoundFullDuplex_IDirectSound8_Compact
(
...
...
@@ -232,7 +232,7 @@ static HRESULT WINAPI IDirectSoundFullDuplex_IDirectSound8_Compact(
{
IDirectSoundFullDuplex_IDirectSound8
*
This
=
(
IDirectSoundFullDuplex_IDirectSound8
*
)
iface
;
TRACE
(
"(%p)
\n
"
,
This
);
return
DirectSoundDevice
_Compact
(
This
->
pdsfd
->
renderer_device
);
return
IDirectSound8
_Compact
(
This
->
pdsfd
->
renderer_device
);
}
static
HRESULT
WINAPI
IDirectSoundFullDuplex_IDirectSound8_GetSpeakerConfig
(
...
...
@@ -241,7 +241,7 @@ static HRESULT WINAPI IDirectSoundFullDuplex_IDirectSound8_GetSpeakerConfig(
{
IDirectSoundFullDuplex_IDirectSound8
*
This
=
(
IDirectSoundFullDuplex_IDirectSound8
*
)
iface
;
TRACE
(
"(%p, %p)
\n
"
,
This
,
lpdwSpeakerConfig
);
return
DirectSoundDevice
_GetSpeakerConfig
(
This
->
pdsfd
->
renderer_device
,
lpdwSpeakerConfig
);
return
IDirectSound8
_GetSpeakerConfig
(
This
->
pdsfd
->
renderer_device
,
lpdwSpeakerConfig
);
}
static
HRESULT
WINAPI
IDirectSoundFullDuplex_IDirectSound8_SetSpeakerConfig
(
...
...
@@ -250,7 +250,7 @@ static HRESULT WINAPI IDirectSoundFullDuplex_IDirectSound8_SetSpeakerConfig(
{
IDirectSoundFullDuplex_IDirectSound8
*
This
=
(
IDirectSoundFullDuplex_IDirectSound8
*
)
iface
;
TRACE
(
"(%p,0x%08x)
\n
"
,
This
,
config
);
return
DirectSoundDevice
_SetSpeakerConfig
(
This
->
pdsfd
->
renderer_device
,
config
);
return
IDirectSound8
_SetSpeakerConfig
(
This
->
pdsfd
->
renderer_device
,
config
);
}
static
HRESULT
WINAPI
IDirectSoundFullDuplex_IDirectSound8_Initialize
(
...
...
@@ -259,7 +259,7 @@ static HRESULT WINAPI IDirectSoundFullDuplex_IDirectSound8_Initialize(
{
IDirectSoundFullDuplex_IDirectSound8
*
This
=
(
IDirectSoundFullDuplex_IDirectSound8
*
)
iface
;
TRACE
(
"(%p, %s)
\n
"
,
This
,
debugstr_guid
(
lpcGuid
));
return
DirectSoundDevice_Initialize
(
&
This
->
pdsfd
->
renderer_device
,
lpcGuid
);
return
IDirectSound8_Initialize
(
This
->
pdsfd
->
renderer_device
,
lpcGuid
);
}
static
HRESULT
WINAPI
IDirectSoundFullDuplex_IDirectSound8_VerifyCertification
(
...
...
@@ -268,7 +268,7 @@ static HRESULT WINAPI IDirectSoundFullDuplex_IDirectSound8_VerifyCertification(
{
IDirectSoundFullDuplex_IDirectSound8
*
This
=
(
IDirectSoundFullDuplex_IDirectSound8
*
)
iface
;
TRACE
(
"(%p, %p)
\n
"
,
This
,
cert
);
return
DirectSoundDevice
_VerifyCertification
(
This
->
pdsfd
->
renderer_device
,
cert
);
return
IDirectSound8
_VerifyCertification
(
This
->
pdsfd
->
renderer_device
,
cert
);
}
static
const
IDirectSound8Vtbl
DirectSoundFullDuplex_DirectSound8_Vtbl
=
...
...
@@ -525,7 +525,7 @@ IDirectSoundFullDuplexImpl_Release( LPDIRECTSOUNDFULLDUPLEX iface )
if
(
This
->
capture_device
)
IDirectSoundCapture_Release
(
This
->
capture_device
);
if
(
This
->
renderer_device
)
DirectSoundDevice
_Release
(
This
->
renderer_device
);
IDirectSound
_Release
(
This
->
renderer_device
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
TRACE
(
"(%p) released
\n
"
,
This
);
}
...
...
@@ -546,7 +546,6 @@ IDirectSoundFullDuplexImpl_Initialize(
{
HRESULT
hr
;
IDirectSoundFullDuplexImpl
*
This
=
(
IDirectSoundFullDuplexImpl
*
)
iface
;
IDirectSoundBufferImpl
*
dsb
;
TRACE
(
"(%p,%s,%s,%p,%p,%p,%x,%p,%p)
\n
"
,
This
,
debugstr_guid
(
pCaptureGuid
),
debugstr_guid
(
pRendererGuid
),
...
...
@@ -560,7 +559,9 @@ IDirectSoundFullDuplexImpl_Initialize(
return
DSERR_ALREADYINITIALIZED
;
}
hr
=
DirectSoundDevice_Initialize
(
&
This
->
renderer_device
,
pRendererGuid
);
hr
=
DSOUND_Create8
(
&
IID_IDirectSound8
,
&
This
->
renderer_device
);
if
(
SUCCEEDED
(
hr
))
hr
=
IDirectSound_Initialize
(
This
->
renderer_device
,
pRendererGuid
);
if
(
hr
!=
DS_OK
)
{
WARN
(
"DirectSoundDevice_Initialize() failed
\n
"
);
*
lplpDirectSoundCaptureBuffer8
=
NULL
;
...
...
@@ -568,20 +569,10 @@ IDirectSoundFullDuplexImpl_Initialize(
return
hr
;
}
if
(
dwLevel
==
DSSCL_PRIORITY
||
dwLevel
==
DSSCL_EXCLUSIVE
)
{
WARN
(
"level=%s not fully supported
\n
"
,
dwLevel
==
DSSCL_PRIORITY
?
"DSSCL_PRIORITY"
:
"DSSCL_EXCLUSIVE"
);
}
This
->
renderer_device
->
priolevel
=
dwLevel
;
IDirectSound8_SetCooperativeLevel
(
This
->
renderer_device
,
hWnd
,
dwLevel
);
hr
=
DSOUND_PrimarySetFormat
(
This
->
renderer_device
,
lpDsBufferDesc
->
lpwfxFormat
,
dwLevel
==
DSSCL_EXCLUSIVE
);
if
(
hr
!=
DS_OK
)
{
WARN
(
"DSOUND_PrimarySetFormat() failed
\n
"
);
*
lplpDirectSoundCaptureBuffer8
=
NULL
;
*
lplpDirectSoundBuffer8
=
NULL
;
return
hr
;
}
hr
=
IDirectSoundBufferImpl_Create
(
This
->
renderer_device
,
&
dsb
,
lpDsBufferDesc
);
hr
=
IDirectSound8_CreateSoundBuffer
(
This
->
renderer_device
,
lpDsBufferDesc
,
(
IDirectSoundBuffer
**
)
lplpDirectSoundBuffer8
,
NULL
);
if
(
hr
!=
DS_OK
)
{
WARN
(
"IDirectSoundBufferImpl_Create() failed
\n
"
);
*
lplpDirectSoundCaptureBuffer8
=
NULL
;
...
...
@@ -589,15 +580,6 @@ IDirectSoundFullDuplexImpl_Initialize(
return
hr
;
}
hr
=
SecondaryBufferImpl_Create
(
dsb
,
(
SecondaryBufferImpl
**
)
lplpDirectSoundBuffer8
);
if
(
hr
!=
DS_OK
)
{
WARN
(
"SecondaryBufferImpl_Create() failed
\n
"
);
*
lplpDirectSoundCaptureBuffer8
=
NULL
;
*
lplpDirectSoundBuffer8
=
NULL
;
return
hr
;
}
IDirectSoundBuffer8_AddRef
(
*
lplpDirectSoundBuffer8
);
hr
=
DSOUND_CaptureCreate8
(
&
IID_IDirectSoundCapture8
,
&
This
->
capture_device
);
if
(
SUCCEEDED
(
hr
))
hr
=
IDirectSoundCapture_Initialize
(
This
->
capture_device
,
pCaptureGuid
);
...
...
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