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
ace56c62
Commit
ace56c62
authored
Mar 25, 2002
by
Chris Morgan
Committed by
Alexandre Julliard
Mar 25, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dsound will now try as many devices as are available when trying to
open a waveOut device in DirectSoundCreate().
parent
5a82fa19
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
4 deletions
+22
-4
dsound_main.c
dlls/dsound/dsound_main.c
+22
-4
No files found.
dlls/dsound/dsound_main.c
View file @
ace56c62
...
...
@@ -1175,6 +1175,9 @@ static HRESULT DSOUND_PrimaryPlay(IDirectSoundBufferImpl *dsb)
static
HRESULT
DSOUND_PrimaryStop
(
IDirectSoundBufferImpl
*
dsb
)
{
HRESULT
err
=
DS_OK
;
TRACE
(
"
\n
"
);
if
(
dsb
->
hwbuf
)
{
err
=
IDsDriverBuffer_Stop
(
dsb
->
hwbuf
);
if
(
err
==
DSERR_BUFFERLOST
)
{
...
...
@@ -3525,8 +3528,8 @@ HRESULT WINAPI DirectSoundCreate(REFGUID lpGUID,LPDIRECTSOUND *ppDS,IUnknown *pU
if
(
!
wodn
)
return
DSERR_NODRIVER
;
/* FIXME: How do we find the GUID of an audio device? */
/* Well, just use the first available device for now...
*/
wod
=
0
;
wod
=
0
;
/* start at the first audio device
*/
/* Get output device caps */
waveOutGetDevCapsA
(
wod
,
&
wcaps
,
sizeof
(
wcaps
));
/* DRV_QUERYDSOUNDIFACE is a "Wine extension" to get the DSound interface */
...
...
@@ -3570,11 +3573,26 @@ HRESULT WINAPI DirectSoundCreate(REFGUID lpGUID,LPDIRECTSOUND *ppDS,IUnknown *pU
/* If the driver requests being opened through MMSYSTEM
* (which is recommended by the DDK), it is supposed to happen
* before the DirectSound interface is opened */
if
((
*
ippDS
)
->
drvdesc
.
dwFlags
&
DSDDESC_DOMMSYSTEMOPEN
)
{
if
((
*
ippDS
)
->
drvdesc
.
dwFlags
&
DSDDESC_DOMMSYSTEMOPEN
)
{
/* FIXME: is this right? */
err
=
mmErr
(
waveOutOpen
(
&
((
*
ippDS
)
->
hwo
),
(
*
ippDS
)
->
drvdesc
.
dnDevNode
,
&
((
*
ippDS
)
->
wfx
),
(
*
ippDS
)
->
drvdesc
.
dnDevNode
=
0
;
err
=
DSERR_ALLOCATED
;
/* if this device is busy try the next one */
while
((
err
==
DSERR_ALLOCATED
)
&&
((
*
ippDS
)
->
drvdesc
.
dnDevNode
<
wodn
))
{
err
=
mmErr
(
waveOutOpen
(
&
((
*
ippDS
)
->
hwo
),
(
*
ippDS
)
->
drvdesc
.
dnDevNode
,
&
((
*
ippDS
)
->
wfx
),
(
DWORD
)
DSOUND_callback
,
(
DWORD
)(
*
ippDS
),
CALLBACK_FUNCTION
|
WAVE_DIRECTSOUND
));
(
*
ippDS
)
->
drvdesc
.
dnDevNode
++
;
/* next wave device */
}
(
*
ippDS
)
->
drvdesc
.
dnDevNode
--
;
/* take away last increment */
}
if
(
drv
&&
(
err
==
DS_OK
))
...
...
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