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
fa13d013
Commit
fa13d013
authored
Apr 05, 2003
by
Robert Reif
Committed by
Alexandre Julliard
Apr 05, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a problem when multiple devices are present and a device other
than the first one is used.
parent
fc47be57
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
19 deletions
+10
-19
capture.c
dlls/dsound/capture.c
+2
-1
dsound_main.c
dlls/dsound/dsound_main.c
+8
-18
No files found.
dlls/dsound/capture.c
View file @
fa13d013
...
...
@@ -517,8 +517,9 @@ IDirectSoundCaptureImpl_Initialize(
/* if no DirectSound interface available, use WINMM API instead */
This
->
drvdesc
.
dwFlags
=
DSDDESC_DOMMSYSTEMOPEN
|
DSDDESC_DOMMSYSTEMSETFORMAT
;
This
->
drvdesc
.
dnDevNode
=
wid
;
/* FIXME? */
}
This
->
drvdesc
.
dnDevNode
=
wid
;
/* open the DirectSound driver if available */
if
(
This
->
driver
&&
(
err
==
DS_OK
))
...
...
dlls/dsound/dsound_main.c
View file @
fa13d013
...
...
@@ -718,8 +718,10 @@ HRESULT WINAPI DirectSoundCreate8(LPCGUID lpcGUID,LPDIRECTSOUND8 *ppDS,IUnknown
GUID
devGuid
;
TRACE
(
"(%p,%p,%p)
\n
"
,
lpcGUID
,
ippDS
,
pUnkOuter
);
if
(
ippDS
==
NULL
)
if
(
ippDS
==
NULL
)
{
WARN
(
"invalid parameter
\n
"
);
return
DSERR_INVALIDPARAM
;
}
/* Get dsound configuration */
setup_dsound_options
();
...
...
@@ -733,9 +735,9 @@ HRESULT WINAPI DirectSoundCreate8(LPCGUID lpcGUID,LPDIRECTSOUND8 *ppDS,IUnknown
return
DSERR_INVALIDPARAM
;
}
if
(
dsound
&&
IsEqualGUID
(
&
devGuid
,
&
dsound
->
guid
)
)
{
ERR
(
"dsound already opened
\n
"
);
if
(
dsound
)
{
if
(
IsEqualGUID
(
&
devGuid
,
&
dsound
->
guid
)
)
{
ERR
(
"dsound already opened
\n
"
);
IDirectSound_AddRef
((
LPDIRECTSOUND
)
dsound
);
*
ippDS
=
dsound
;
return
DS_OK
;
...
...
@@ -791,7 +793,6 @@ HRESULT WINAPI DirectSoundCreate8(LPCGUID lpcGUID,LPDIRECTSOUND8 *ppDS,IUnknown
(
*
ippDS
)
->
state
=
STATE_STOPPED
;
(
*
ippDS
)
->
nrofbuffers
=
0
;
(
*
ippDS
)
->
buffers
=
NULL
;
/* (*ippDS)->primary = NULL; */
(
*
ippDS
)
->
listener
=
NULL
;
(
*
ippDS
)
->
prebuf
=
ds_snd_queue_max
;
...
...
@@ -803,9 +804,10 @@ HRESULT WINAPI DirectSoundCreate8(LPCGUID lpcGUID,LPDIRECTSOUND8 *ppDS,IUnknown
}
else
{
/* if no DirectSound interface available, use WINMM API instead */
(
*
ippDS
)
->
drvdesc
.
dwFlags
=
DSDDESC_DOMMSYSTEMOPEN
|
DSDDESC_DOMMSYSTEMSETFORMAT
;
(
*
ippDS
)
->
drvdesc
.
dnDevNode
=
wod
;
/* FIXME? */
}
(
*
ippDS
)
->
drvdesc
.
dnDevNode
=
wod
;
/* Set default wave format (may need it for waveOutOpen) */
(
*
ippDS
)
->
wfx
.
wFormatTag
=
WAVE_FORMAT_PCM
;
/* We rely on the sound driver to return the actual sound format of
...
...
@@ -830,22 +832,10 @@ HRESULT WINAPI DirectSoundCreate8(LPCGUID lpcGUID,LPDIRECTSOUND8 *ppDS,IUnknown
if
(
ds_hw_accel
!=
DS_HW_ACCEL_EMULATION
)
flags
|=
WAVE_DIRECTSOUND
;
/* FIXME: is this right? */
(
*
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
),
err
=
mmErr
(
waveOutOpen
(
&
((
*
ippDS
)
->
hwo
),
(
*
ippDS
)
->
drvdesc
.
dnDevNode
,
&
((
*
ippDS
)
->
wfx
),
(
DWORD
)
DSOUND_callback
,
(
DWORD
)(
*
ippDS
),
flags
));
(
*
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