Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ffb51208
Commit
ffb51208
authored
Aug 31, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Use the same struct for the primary buffer object as for the secondary.
parent
ee9c0279
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
48 deletions
+52
-48
dsound.c
dlls/dsound/dsound.c
+3
-3
dsound_private.h
dlls/dsound/dsound_private.h
+3
-17
primary.c
dlls/dsound/primary.c
+45
-27
sound3d.c
dlls/dsound/sound3d.c
+1
-1
No files found.
dlls/dsound/dsound.c
View file @
ffb51208
...
...
@@ -1557,12 +1557,12 @@ HRESULT DirectSoundDevice_CreateSoundBuffer(
if
(
device
->
hwbuf
)
device
->
dsbd
.
dwFlags
|=
DSBCAPS_LOCHARDWARE
;
else
device
->
dsbd
.
dwFlags
|=
DSBCAPS_LOCSOFTWARE
;
hres
=
PrimaryBufferImpl_C
reate
(
device
,
&
(
device
->
primary
),
&
(
device
->
dsbd
));
hres
=
primarybuffer_c
reate
(
device
,
&
(
device
->
primary
),
&
(
device
->
dsbd
));
if
(
device
->
primary
)
{
IDirectSoundBuffer_AddRef
((
LPDIRECTSOUNDBUFFER8
)(
device
->
primary
));
*
ppdsb
=
(
LPDIRECTSOUNDBUFFER
)(
device
->
primary
);
}
else
WARN
(
"
PrimaryBufferImpl_Create
failed
\n
"
);
WARN
(
"
primarybuffer_create()
failed
\n
"
);
}
}
else
{
IDirectSoundBufferImpl
*
dsb
;
...
...
@@ -1664,7 +1664,7 @@ HRESULT DirectSoundDevice_DuplicateSoundBuffer(
}
/* make sure we have a secondary buffer */
if
(
(
PrimaryBufferImpl
*
)
psb
==
device
->
primary
)
{
if
(
psb
==
(
IDirectSoundBuffer
*
)
&
device
->
primary
->
IDirectSoundBuffer8_iface
)
{
WARN
(
"trying to duplicate primary buffer
\n
"
);
*
ppdsb
=
NULL
;
return
DSERR_INVALIDCALL
;
...
...
dlls/dsound/dsound_private.h
View file @
ffb51208
...
...
@@ -57,7 +57,6 @@ typedef struct IDirectSoundCaptureNotifyImpl IDirectSoundCaptureNotifyImpl;
typedef
struct
IDirectSound3DListenerImpl
IDirectSound3DListenerImpl
;
typedef
struct
IDirectSound3DBufferImpl
IDirectSound3DBufferImpl
;
typedef
struct
IKsBufferPropertySetImpl
IKsBufferPropertySetImpl
;
typedef
struct
PrimaryBufferImpl
PrimaryBufferImpl
;
typedef
struct
DirectSoundDevice
DirectSoundDevice
;
typedef
struct
DirectSoundCaptureDevice
DirectSoundCaptureDevice
;
...
...
@@ -93,7 +92,7 @@ struct DirectSoundDevice
IDirectSoundBufferImpl
**
buffers
;
RTL_RWLOCK
buffer_list_lock
;
CRITICAL_SECTION
mixlock
;
PrimaryBufferImpl
*
primary
;
IDirectSoundBufferImpl
*
primary
;
DSBUFFERDESC
dsbd
;
DWORD
speaker_config
;
LPBYTE
tmp_buffer
,
mix_buffer
;
...
...
@@ -210,21 +209,6 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
void
secondarybuffer_destroy
(
IDirectSoundBufferImpl
*
This
)
DECLSPEC_HIDDEN
;
/*****************************************************************************
* PrimaryBuffer implementation structure
*/
struct
PrimaryBufferImpl
{
const
IDirectSoundBufferVtbl
*
lpVtbl
;
LONG
ref
;
DirectSoundDevice
*
device
;
};
HRESULT
PrimaryBufferImpl_Create
(
DirectSoundDevice
*
device
,
PrimaryBufferImpl
**
ppdsb
,
LPCDSBUFFERDESC
dsbd
)
DECLSPEC_HIDDEN
;
/*****************************************************************************
* DirectSoundCaptureDevice implementation structure
*/
struct
DirectSoundCaptureDevice
...
...
@@ -350,6 +334,8 @@ HRESULT DSOUND_PrimaryStop(DirectSoundDevice *device) DECLSPEC_HIDDEN;
HRESULT
DSOUND_PrimaryGetPosition
(
DirectSoundDevice
*
device
,
LPDWORD
playpos
,
LPDWORD
writepos
)
DECLSPEC_HIDDEN
;
LPWAVEFORMATEX
DSOUND_CopyFormat
(
LPCWAVEFORMATEX
wfex
)
DECLSPEC_HIDDEN
;
HRESULT
DSOUND_ReopenDevice
(
DirectSoundDevice
*
device
,
BOOL
forcewave
)
DECLSPEC_HIDDEN
;
HRESULT
primarybuffer_create
(
DirectSoundDevice
*
device
,
IDirectSoundBufferImpl
**
ppdsb
,
const
DSBUFFERDESC
*
dsbd
)
DECLSPEC_HIDDEN
;
/* duplex.c */
...
...
dlls/dsound/primary.c
View file @
ffb51208
This diff is collapsed.
Click to expand it.
dlls/dsound/sound3d.c
View file @
ffb51208
...
...
@@ -758,7 +758,7 @@ static HRESULT WINAPI IDirectSound3DListenerImpl_QueryInterface(
if
(
IsEqualGUID
(
riid
,
&
IID_IDirectSoundBuffer
)
)
{
if
(
!
This
->
device
->
primary
)
PrimaryBufferImpl_Create
(
This
->
device
,
&
(
This
->
device
->
primary
),
&
(
This
->
device
->
dsbd
)
);
primarybuffer_create
(
This
->
device
,
&
This
->
device
->
primary
,
&
This
->
device
->
dsbd
);
if
(
This
->
device
->
primary
)
{
*
ppobj
=
This
->
device
->
primary
;
IDirectSoundBuffer_AddRef
((
LPDIRECTSOUNDBUFFER
)
*
ppobj
);
...
...
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