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
aeddf2c4
Commit
aeddf2c4
authored
Apr 03, 2003
by
Robert Reif
Committed by
Alexandre Julliard
Apr 03, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added wide character enumeration of sound devices.
parent
acd4bc0d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
73 additions
and
3 deletions
+73
-3
dsound_main.c
dlls/dsound/dsound_main.c
+73
-3
No files found.
dlls/dsound/dsound_main.c
View file @
aeddf2c4
...
...
@@ -347,10 +347,63 @@ HRESULT WINAPI DirectSoundEnumerateW(
LPDSENUMCALLBACKW
lpDSEnumCallback
,
LPVOID
lpContext
)
{
FIXME
(
"lpDSEnumCallback = %p, lpContext = %p: stub
\n
"
,
lpDSEnumCallback
,
lpContext
);
unsigned
devs
,
wod
;
DSDRIVERDESC
desc
;
GUID
guid
;
int
err
;
WCHAR
wDesc
[
MAXPNAMELEN
];
WCHAR
wName
[
MAXPNAMELEN
];
TRACE
(
"lpDSEnumCallback = %p, lpContext = %p
\n
"
,
lpDSEnumCallback
,
lpContext
);
if
(
lpDSEnumCallback
==
NULL
)
{
WARN
(
"invalid parameter
\n
"
);
return
DSERR_INVALIDPARAM
;
}
devs
=
waveOutGetNumDevs
();
if
(
devs
>
0
)
{
if
(
GetDeviceID
(
&
DSDEVID_DefaultPlayback
,
&
guid
)
==
DS_OK
)
{
GUID
temp
;
for
(
wod
=
0
;
wod
<
devs
;
++
wod
)
{
err
=
mmErr
(
waveOutMessage
((
HWAVEOUT
)
wod
,
DRV_QUERYDSOUNDGUID
,(
DWORD
)
&
temp
,
0
));
if
(
err
==
DS_OK
)
{
if
(
IsEqualGUID
(
&
guid
,
&
temp
)
)
{
err
=
mmErr
(
waveOutMessage
((
HWAVEOUT
)
wod
,
DRV_QUERYDSOUNDDESC
,(
DWORD
)
&
desc
,
0
));
if
(
err
==
DS_OK
)
{
TRACE
(
"calling lpDSEnumCallback(%s,
\"
%s
\"
,
\"
%s
\"
,%p)
\n
"
,
debugstr_guid
(
&
DSDEVID_DefaultPlayback
),
"Primary Sound Driver"
,
desc
.
szDrvName
,
lpContext
);
MultiByteToWideChar
(
CP_ACP
,
0
,
"Primary Sound Driver"
,
-
1
,
wDesc
,
sizeof
(
wDesc
)
/
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
desc
.
szDrvName
,
-
1
,
wName
,
sizeof
(
wName
)
/
sizeof
(
WCHAR
)
);
if
(
lpDSEnumCallback
((
LPGUID
)
&
DSDEVID_DefaultPlayback
,
wDesc
,
wName
,
lpContext
)
==
FALSE
)
return
DS_OK
;
}
}
}
}
}
}
return
DS_OK
;
for
(
wod
=
0
;
wod
<
devs
;
++
wod
)
{
err
=
mmErr
(
waveOutMessage
((
HWAVEOUT
)
wod
,
DRV_QUERYDSOUNDDESC
,(
DWORD
)
&
desc
,
0
));
if
(
err
==
DS_OK
)
{
err
=
mmErr
(
waveOutMessage
((
HWAVEOUT
)
wod
,
DRV_QUERYDSOUNDGUID
,(
DWORD
)
&
guid
,
0
));
if
(
err
==
DS_OK
)
{
TRACE
(
"calling lpDSEnumCallback(%s,
\"
%s
\"
,
\"
%s
\"
,%p)
\n
"
,
debugstr_guid
(
&
guid
),
desc
.
szDesc
,
desc
.
szDrvName
,
lpContext
);
MultiByteToWideChar
(
CP_ACP
,
0
,
desc
.
szDesc
,
-
1
,
wDesc
,
sizeof
(
wDesc
)
/
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
desc
.
szDrvName
,
-
1
,
wName
,
sizeof
(
wName
)
/
sizeof
(
WCHAR
)
);
if
(
lpDSEnumCallback
(
&
guid
,
wDesc
,
wName
,
lpContext
)
==
FALSE
)
return
DS_OK
;
}
}
}
return
DS_OK
;
}
...
...
@@ -873,6 +926,23 @@ static HRESULT WINAPI DSCF_CreateInstance(
/* FIXME: reuse already created dsound if present? */
return
DirectSoundCreate8
(
riid
,(
LPDIRECTSOUND8
*
)
ppobj
,
pOuter
);
}
if
(
IsEqualGUID
(
&
IID_IDirectSoundCapture
,
riid
)
||
IsEqualGUID
(
&
IID_IDirectSoundCapture8
,
riid
)
)
{
return
DirectSoundCaptureCreate8
(
0
,(
LPDIRECTSOUNDCAPTURE8
*
)
ppobj
,
pOuter
);
}
/* DxDiag tries to create this */
if
(
IsEqualGUID
(
&
IID_IKsPropertySet
,
riid
)
)
{
FIXME
(
"(%p,%p,%s,%p) IID_IKsPropertySet not implemented
\n
"
,
This
,
pOuter
,
debugstr_guid
(
riid
),
ppobj
);
/* FIXME: what is DxDiag looking for here? */
#if 0
return IKsPropertySetImpl_Create(0,(IKsPropertySetImpl**)ppobj);
#else
return
E_NOINTERFACE
;
#endif
}
FIXME
(
"(%p,%p,%s,%p) Interface not found!
\n
"
,
This
,
pOuter
,
debugstr_guid
(
riid
),
ppobj
);
return
E_NOINTERFACE
;
}
...
...
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