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
3747fb74
Commit
3747fb74
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: Move the primary buffer description into the buffer object.
parent
c0565143
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
19 deletions
+17
-19
dsound.c
dlls/dsound/dsound.c
+10
-10
dsound_private.h
dlls/dsound/dsound_private.h
+0
-1
primary.c
dlls/dsound/primary.c
+7
-8
No files found.
dlls/dsound/dsound.c
View file @
3747fb74
...
...
@@ -1552,16 +1552,16 @@ HRESULT DirectSoundDevice_CreateSoundBuffer(
IDirectSoundBuffer_AddRef
((
LPDIRECTSOUNDBUFFER8
)(
device
->
primary
));
*
ppdsb
=
(
LPDIRECTSOUNDBUFFER
)(
device
->
primary
);
}
else
{
device
->
dsbd
=
*
dsbd
;
device
->
dsbd
.
dwFlags
&=
~
(
DSBCAPS_LOCHARDWARE
|
DSBCAPS_LOCSOFTWARE
);
if
(
device
->
hwbuf
)
device
->
dsbd
.
dwFlags
|=
DSBCAPS_LOCHARDWARE
;
else
device
->
dsbd
.
dwFlags
|=
DSBCAPS_LOCSOFTWARE
;
hres
=
primarybuffer_create
(
device
,
&
(
device
->
primary
),
&
(
device
->
dsbd
))
;
if
(
device
->
primary
)
*
ppdsb
=
(
IDirectSoundBuffer
*
)
&
device
->
primary
->
IDirectSoundBuffer8_iface
;
else
WARN
(
"primarybuffer_create() failed
\n
"
);
hres
=
primarybuffer_create
(
device
,
&
device
->
primary
,
dsbd
)
;
if
(
device
->
primary
)
{
*
ppdsb
=
(
IDirectSoundBuffer
*
)
&
device
->
primary
->
IDirectSoundBuffer8_iface
;
device
->
primary
->
dsbd
.
dwFlags
&=
~
(
DSBCAPS_LOCHARDWARE
|
DSBCAPS_LOCSOFTWARE
)
;
if
(
device
->
hwbuf
)
device
->
primary
->
dsbd
.
dwFlags
|=
DSBCAPS_LOCHARDWARE
;
else
device
->
primary
->
dsbd
.
dwFlags
|=
DSBCAPS_LOCSOFTWARE
;
}
else
WARN
(
"primarybuffer_create() failed
\n
"
);
}
}
else
{
IDirectSoundBufferImpl
*
dsb
;
...
...
dlls/dsound/dsound_private.h
View file @
3747fb74
...
...
@@ -93,7 +93,6 @@ struct DirectSoundDevice
RTL_RWLOCK
buffer_list_lock
;
CRITICAL_SECTION
mixlock
;
IDirectSoundBufferImpl
*
primary
;
DSBUFFERDESC
dsbd
;
DWORD
speaker_config
;
LPBYTE
tmp_buffer
,
mix_buffer
;
DWORD
tmp_buffer_len
,
mix_buffer_len
;
...
...
dlls/dsound/primary.c
View file @
3747fb74
...
...
@@ -642,7 +642,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetVolume(
HRESULT
hres
=
DS_OK
;
TRACE
(
"(%p,%d)
\n
"
,
iface
,
vol
);
if
(
!
(
device
->
dsbd
.
dwFlags
&
DSBCAPS_CTRLVOLUME
))
{
if
(
!
(
This
->
dsbd
.
dwFlags
&
DSBCAPS_CTRLVOLUME
))
{
WARN
(
"control unavailable
\n
"
);
return
DSERR_CONTROLUNAVAIL
;
}
...
...
@@ -686,7 +686,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetVolume(
DWORD
ampfactors
;
TRACE
(
"(%p,%p)
\n
"
,
iface
,
vol
);
if
(
!
(
device
->
dsbd
.
dwFlags
&
DSBCAPS_CTRLVOLUME
))
{
if
(
!
(
This
->
dsbd
.
dwFlags
&
DSBCAPS_CTRLVOLUME
))
{
WARN
(
"control unavailable
\n
"
);
return
DSERR_CONTROLUNAVAIL
;
}
...
...
@@ -985,7 +985,7 @@ static HRESULT WINAPI PrimaryBufferImpl_SetPan(
HRESULT
hres
=
DS_OK
;
TRACE
(
"(%p,%d)
\n
"
,
iface
,
pan
);
if
(
!
(
device
->
dsbd
.
dwFlags
&
DSBCAPS_CTRLPAN
))
{
if
(
!
(
This
->
dsbd
.
dwFlags
&
DSBCAPS_CTRLPAN
))
{
WARN
(
"control unavailable
\n
"
);
return
DSERR_CONTROLUNAVAIL
;
}
...
...
@@ -1032,7 +1032,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetPan(
DWORD
ampfactors
;
TRACE
(
"(%p,%p)
\n
"
,
iface
,
pan
);
if
(
!
(
device
->
dsbd
.
dwFlags
&
DSBCAPS_CTRLPAN
))
{
if
(
!
(
This
->
dsbd
.
dwFlags
&
DSBCAPS_CTRLPAN
))
{
WARN
(
"control unavailable
\n
"
);
return
DSERR_CONTROLUNAVAIL
;
}
...
...
@@ -1102,7 +1102,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetFrequency(
return
DSERR_INVALIDPARAM
;
}
if
(
!
(
device
->
dsbd
.
dwFlags
&
DSBCAPS_CTRLFREQUENCY
))
{
if
(
!
(
This
->
dsbd
.
dwFlags
&
DSBCAPS_CTRLFREQUENCY
))
{
WARN
(
"control unavailable
\n
"
);
return
DSERR_CONTROLUNAVAIL
;
}
...
...
@@ -1138,7 +1138,7 @@ static HRESULT WINAPI PrimaryBufferImpl_GetCaps(
return
DSERR_INVALIDPARAM
;
}
caps
->
dwFlags
=
device
->
dsbd
.
dwFlags
;
caps
->
dwFlags
=
This
->
dsbd
.
dwFlags
;
caps
->
dwBufferBytes
=
device
->
buflen
;
/* Windows reports these as zero */
...
...
@@ -1258,8 +1258,7 @@ HRESULT primarybuffer_create(DirectSoundDevice *device, IDirectSoundBufferImpl *
dsb
->
numIfaces
=
1
;
dsb
->
device
=
device
;
dsb
->
IDirectSoundBuffer8_iface
.
lpVtbl
=
(
IDirectSoundBuffer8Vtbl
*
)
&
dspbvt
;
device
->
dsbd
=
*
dsbd
;
dsb
->
dsbd
=
*
dsbd
;
TRACE
(
"Created primary buffer at %p
\n
"
,
dsb
);
TRACE
(
"(formattag=0x%04x,chans=%d,samplerate=%d,"
...
...
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