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
d4d14cde
Commit
d4d14cde
authored
Jan 11, 2015
by
Mark Harmstone
Committed by
Alexandre Julliard
Jan 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Pretend we have hardware buffers.
When running in Windows XP mode, XAudio2 will refuse to output surround sound unless it can open a buffer with DSBCAPS_LOCHARDWARE.
parent
b5aec2e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
9 deletions
+26
-9
buffer.c
dlls/dsound/buffer.c
+3
-0
dsound.c
dlls/dsound/dsound.c
+23
-9
No files found.
dlls/dsound/buffer.c
View file @
d4d14cde
...
...
@@ -994,6 +994,9 @@ void secondarybuffer_destroy(IDirectSoundBufferImpl *This)
if
(
ref
>
1
)
WARN
(
"Destroying buffer with %u in use interfaces
\n
"
,
ref
-
1
);
if
(
This
->
dsbd
.
dwFlags
&
DSBCAPS_LOCHARDWARE
)
This
->
device
->
drvcaps
.
dwFreeHwMixingAllBuffers
++
;
DirectSoundDevice_RemoveBuffer
(
This
->
device
,
This
);
RtlDeleteResource
(
&
This
->
lock
);
...
...
dlls/dsound/dsound.c
View file @
d4d14cde
...
...
@@ -271,8 +271,15 @@ static HRESULT WINAPI IDirectSound8Impl_GetCaps(IDirectSound8 *iface, DSCAPS *ds
dscaps
->
dwMaxHwMixingStaticBuffers
=
This
->
device
->
drvcaps
.
dwMaxHwMixingStaticBuffers
;
dscaps
->
dwMaxHwMixingStreamingBuffers
=
This
->
device
->
drvcaps
.
dwMaxHwMixingStreamingBuffers
;
dscaps
->
dwFreeHwMixingAllBuffers
=
This
->
device
->
drvcaps
.
dwFreeHwMixingAllBuffers
;
dscaps
->
dwFreeHwMixingStaticBuffers
=
This
->
device
->
drvcaps
.
dwFreeHwMixingStaticBuffers
;
dscaps
->
dwFreeHwMixingStreamingBuffers
=
This
->
device
->
drvcaps
.
dwFreeHwMixingStreamingBuffers
;
if
(
This
->
device
->
drvcaps
.
dwFreeHwMixingAllBuffers
>
0
)
{
dscaps
->
dwFreeHwMixingStaticBuffers
=
This
->
device
->
drvcaps
.
dwFreeHwMixingStaticBuffers
;
dscaps
->
dwFreeHwMixingStreamingBuffers
=
This
->
device
->
drvcaps
.
dwFreeHwMixingStreamingBuffers
;
}
else
{
dscaps
->
dwFreeHwMixingStaticBuffers
=
0
;
dscaps
->
dwFreeHwMixingStreamingBuffers
=
0
;
}
dscaps
->
dwMaxHw3DAllBuffers
=
This
->
device
->
drvcaps
.
dwMaxHw3DAllBuffers
;
dscaps
->
dwMaxHw3DStaticBuffers
=
This
->
device
->
drvcaps
.
dwMaxHw3DStaticBuffers
;
dscaps
->
dwMaxHw3DStreamingBuffers
=
This
->
device
->
drvcaps
.
dwMaxHw3DStreamingBuffers
;
...
...
@@ -913,9 +920,12 @@ HRESULT DirectSoundDevice_Initialize(DirectSoundDevice ** ppDevice, LPCGUID lpcG
device
->
drvcaps
.
dwPrimaryBuffers
=
1
;
device
->
drvcaps
.
dwMinSecondarySampleRate
=
DSBFREQUENCY_MIN
;
device
->
drvcaps
.
dwMaxSecondarySampleRate
=
DSBFREQUENCY_MAX
;
device
->
drvcaps
.
dwMaxHwMixingAllBuffers
=
1
;
device
->
drvcaps
.
dwMaxHwMixingAllBuffers
=
1
6
;
device
->
drvcaps
.
dwMaxHwMixingStaticBuffers
=
1
;
device
->
drvcaps
.
dwMaxHwMixingStreamingBuffers
=
1
;
device
->
drvcaps
.
dwFreeHwMixingAllBuffers
=
device
->
drvcaps
.
dwMaxHwMixingAllBuffers
;
device
->
drvcaps
.
dwFreeHwMixingStaticBuffers
=
device
->
drvcaps
.
dwMaxHwMixingStaticBuffers
;
device
->
drvcaps
.
dwFreeHwMixingStreamingBuffers
=
device
->
drvcaps
.
dwMaxHwMixingStreamingBuffers
;
ZeroMemory
(
&
device
->
volpan
,
sizeof
(
device
->
volpan
));
...
...
@@ -975,10 +985,12 @@ HRESULT DirectSoundDevice_CreateSoundBuffer(
TRACE
(
"(lpwfxFormat=%p)
\n
"
,
dsbd
->
lpwfxFormat
);
}
if
(
dsbd
->
dwFlags
&
DSBCAPS_LOCHARDWARE
&&
!
(
dsbd
->
dwFlags
&
DSBCAPS_PRIMARYBUFFER
))
{
TRACE
(
"LOCHARDWARE is not supported, returning E_NOTIMPL
\n
"
);
return
E_NOTIMPL
;
if
(
!
(
dsbd
->
dwFlags
&
DSBCAPS_PRIMARYBUFFER
)
&&
dsbd
->
dwFlags
&
DSBCAPS_LOCHARDWARE
&&
device
->
drvcaps
.
dwFreeHwMixingAllBuffers
==
0
)
{
WARN
(
"ran out of emulated hardware buffers
\n
"
);
return
DSERR_ALLOCATED
;
}
if
(
dsbd
->
dwFlags
&
DSBCAPS_PRIMARYBUFFER
)
{
...
...
@@ -1062,9 +1074,11 @@ HRESULT DirectSoundDevice_CreateSoundBuffer(
}
hres
=
IDirectSoundBufferImpl_Create
(
device
,
&
dsb
,
dsbd
);
if
(
dsb
)
if
(
dsb
)
{
*
ppdsb
=
(
IDirectSoundBuffer
*
)
&
dsb
->
IDirectSoundBuffer8_iface
;
else
if
(
dsbd
->
dwFlags
&
DSBCAPS_LOCHARDWARE
)
device
->
drvcaps
.
dwFreeHwMixingAllBuffers
--
;
}
else
WARN
(
"IDirectSoundBufferImpl_Create failed
\n
"
);
}
...
...
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