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
6ad96214
Commit
6ad96214
authored
May 02, 2003
by
Lionel Ulmer
Committed by
Alexandre Julliard
May 02, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- misc. tracing fixes
- handle IID_IDirectSound(8) as the default sound driver
parent
88240805
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
5 deletions
+19
-5
dsound_main.c
dlls/dsound/dsound_main.c
+19
-5
No files found.
dlls/dsound/dsound_main.c
View file @
6ad96214
...
@@ -747,8 +747,10 @@ HRESULT WINAPI DirectSoundCreate8(LPCGUID lpcGUID,LPDIRECTSOUND8 *ppDS,IUnknown
...
@@ -747,8 +747,10 @@ HRESULT WINAPI DirectSoundCreate8(LPCGUID lpcGUID,LPDIRECTSOUND8 *ppDS,IUnknown
unsigned
wod
,
wodn
;
unsigned
wod
,
wodn
;
HRESULT
err
=
DSERR_INVALIDPARAM
;
HRESULT
err
=
DSERR_INVALIDPARAM
;
GUID
devGuid
;
GUID
devGuid
;
TRACE
(
"(%p,%p,%p)
\n
"
,
lpcGUID
,
ippDS
,
pUnkOuter
)
;
BOOLEAN
found
=
FALSE
;
TRACE
(
"(%s,%p,%p)
\n
"
,
debugstr_guid
(
lpcGUID
),
ippDS
,
pUnkOuter
);
if
(
ippDS
==
NULL
)
{
if
(
ippDS
==
NULL
)
{
WARN
(
"invalid parameter
\n
"
);
WARN
(
"invalid parameter
\n
"
);
return
DSERR_INVALIDPARAM
;
return
DSERR_INVALIDPARAM
;
...
@@ -758,7 +760,10 @@ HRESULT WINAPI DirectSoundCreate8(LPCGUID lpcGUID,LPDIRECTSOUND8 *ppDS,IUnknown
...
@@ -758,7 +760,10 @@ HRESULT WINAPI DirectSoundCreate8(LPCGUID lpcGUID,LPDIRECTSOUND8 *ppDS,IUnknown
setup_dsound_options
();
setup_dsound_options
();
/* Default device? */
/* Default device? */
if
(
!
lpcGUID
||
IsEqualGUID
(
lpcGUID
,
&
GUID_NULL
)
)
if
(
!
lpcGUID
||
IsEqualGUID
(
lpcGUID
,
&
GUID_NULL
)
||
IsEqualGUID
(
lpcGUID
,
&
IID_IDirectSound
)
||
IsEqualGUID
(
lpcGUID
,
&
IID_IDirectSound8
))
lpcGUID
=
&
DSDEVID_DefaultPlayback
;
lpcGUID
=
&
DSDEVID_DefaultPlayback
;
if
(
GetDeviceID
(
lpcGUID
,
&
devGuid
)
!=
DS_OK
)
{
if
(
GetDeviceID
(
lpcGUID
,
&
devGuid
)
!=
DS_OK
)
{
...
@@ -781,6 +786,8 @@ HRESULT WINAPI DirectSoundCreate8(LPCGUID lpcGUID,LPDIRECTSOUND8 *ppDS,IUnknown
...
@@ -781,6 +786,8 @@ HRESULT WINAPI DirectSoundCreate8(LPCGUID lpcGUID,LPDIRECTSOUND8 *ppDS,IUnknown
wodn
=
waveOutGetNumDevs
();
wodn
=
waveOutGetNumDevs
();
if
(
!
wodn
)
return
DSERR_NODRIVER
;
if
(
!
wodn
)
return
DSERR_NODRIVER
;
TRACE
(
" expecting GUID %s.
\n
"
,
debugstr_guid
(
&
devGuid
));
for
(
wod
=
0
;
wod
<
wodn
;
wod
++
)
{
for
(
wod
=
0
;
wod
<
wodn
;
wod
++
)
{
GUID
guid
;
GUID
guid
;
err
=
mmErr
(
waveOutMessage
((
HWAVEOUT
)
wod
,
DRV_QUERYDSOUNDGUID
,(
DWORD
)(
&
guid
),
0
));
err
=
mmErr
(
waveOutMessage
((
HWAVEOUT
)
wod
,
DRV_QUERYDSOUNDGUID
,(
DWORD
)(
&
guid
),
0
));
...
@@ -788,8 +795,10 @@ HRESULT WINAPI DirectSoundCreate8(LPCGUID lpcGUID,LPDIRECTSOUND8 *ppDS,IUnknown
...
@@ -788,8 +795,10 @@ HRESULT WINAPI DirectSoundCreate8(LPCGUID lpcGUID,LPDIRECTSOUND8 *ppDS,IUnknown
WARN
(
"waveOutMessage failed; err=%lx
\n
"
,
err
);
WARN
(
"waveOutMessage failed; err=%lx
\n
"
,
err
);
return
err
;
return
err
;
}
}
TRACE
(
"got GUID %s for wod %d.
\n
"
,
debugstr_guid
(
&
guid
),
wod
);
if
(
IsEqualGUID
(
&
devGuid
,
&
guid
)
)
{
if
(
IsEqualGUID
(
&
devGuid
,
&
guid
)
)
{
err
=
DS_OK
;
err
=
DS_OK
;
found
=
TRUE
;
break
;
break
;
}
}
}
}
...
@@ -799,6 +808,11 @@ HRESULT WINAPI DirectSoundCreate8(LPCGUID lpcGUID,LPDIRECTSOUND8 *ppDS,IUnknown
...
@@ -799,6 +808,11 @@ HRESULT WINAPI DirectSoundCreate8(LPCGUID lpcGUID,LPDIRECTSOUND8 *ppDS,IUnknown
return
DSERR_INVALIDPARAM
;
return
DSERR_INVALIDPARAM
;
}
}
if
(
found
==
FALSE
)
{
WARN
(
"No device found matching given ID - trying with default one !
\n
"
);
wod
=
ds_default_playback
;
}
/* DRV_QUERYDSOUNDIFACE is a "Wine extension" to get the DSound interface */
/* DRV_QUERYDSOUNDIFACE is a "Wine extension" to get the DSound interface */
waveOutMessage
((
HWAVEOUT
)
wod
,
DRV_QUERYDSOUNDIFACE
,
(
DWORD
)
&
drv
,
0
);
waveOutMessage
((
HWAVEOUT
)
wod
,
DRV_QUERYDSOUNDIFACE
,
(
DWORD
)
&
drv
,
0
);
...
@@ -994,14 +1008,14 @@ static IClassFactoryImpl DSOUND_CF = {&DSCF_Vtbl, 1 };
...
@@ -994,14 +1008,14 @@ static IClassFactoryImpl DSOUND_CF = {&DSCF_Vtbl, 1 };
*/
*/
DWORD
WINAPI
DSOUND_DllGetClassObject
(
REFCLSID
rclsid
,
REFIID
riid
,
LPVOID
*
ppv
)
DWORD
WINAPI
DSOUND_DllGetClassObject
(
REFCLSID
rclsid
,
REFIID
riid
,
LPVOID
*
ppv
)
{
{
TRACE
(
"(%
p,%p
,%p)
\n
"
,
debugstr_guid
(
rclsid
),
debugstr_guid
(
riid
),
ppv
);
TRACE
(
"(%
s,%s
,%p)
\n
"
,
debugstr_guid
(
rclsid
),
debugstr_guid
(
riid
),
ppv
);
if
(
IsEqualCLSID
(
&
IID_IClassFactory
,
riid
)
)
{
if
(
IsEqualCLSID
(
&
IID_IClassFactory
,
riid
)
)
{
*
ppv
=
(
LPVOID
)
&
DSOUND_CF
;
*
ppv
=
(
LPVOID
)
&
DSOUND_CF
;
IClassFactory_AddRef
((
IClassFactory
*
)
*
ppv
);
IClassFactory_AddRef
((
IClassFactory
*
)
*
ppv
);
return
S_OK
;
return
S_OK
;
}
}
FIXME
(
"(%
p,%p
,%p): no interface found.
\n
"
,
debugstr_guid
(
rclsid
),
debugstr_guid
(
riid
),
ppv
);
FIXME
(
"(%
s,%s
,%p): no interface found.
\n
"
,
debugstr_guid
(
rclsid
),
debugstr_guid
(
riid
),
ppv
);
return
CLASS_E_CLASSNOTAVAILABLE
;
return
CLASS_E_CLASSNOTAVAILABLE
;
}
}
...
...
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