Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ed2a6e4a
Commit
ed2a6e4a
authored
May 04, 2005
by
Robert Reif
Committed by
Alexandre Julliard
May 04, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set driver type properly.
parent
2b638567
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
4 deletions
+52
-4
propset.c
dlls/dsound/propset.c
+52
-4
No files found.
dlls/dsound/propset.c
View file @
ed2a6e4a
...
...
@@ -1063,6 +1063,7 @@ static HRESULT WINAPI DSPROPERTY_Enumerate1(
for
(
wod
=
0
;
wod
<
devs
;
++
wod
)
{
err
=
mmErr
(
waveOutMessage
((
HWAVEOUT
)
wod
,
DRV_QUERYDSOUNDDESC
,(
DWORD
)
&
desc
,
0
));
if
(
err
==
DS_OK
)
{
PIDSCDRIVER
drv
;
ZeroMemory
(
&
data
,
sizeof
(
data
));
data
.
DataFlow
=
DIRECTSOUNDDEVICE_DATAFLOW_RENDER
;
data
.
WaveDeviceId
=
wod
;
...
...
@@ -1073,6 +1074,13 @@ static HRESULT WINAPI DSPROPERTY_Enumerate1(
MultiByteToWideChar
(
CP_ACP
,
0
,
data
.
DescriptionA
,
-
1
,
data
.
DescriptionW
,
sizeof
(
data
.
DescriptionW
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
data
.
ModuleA
,
-
1
,
data
.
ModuleW
,
sizeof
(
data
.
ModuleW
)
);
data
.
Type
=
DIRECTSOUNDDEVICE_TYPE_EMULATED
;
err
=
mmErr
(
waveOutMessage
((
HWAVEOUT
)
wod
,
DRV_QUERYDSOUNDIFACE
,
(
DWORD
)
&
drv
,
0
));
if
(
err
==
DS_OK
&&
drv
)
data
.
Type
=
DIRECTSOUNDDEVICE_TYPE_VXD
;
else
WARN
(
"waveOutMessage(DRV_QUERYDSOUNDIFACE) failed
\n
"
);
TRACE
(
"calling Callback(%p,%p)
\n
"
,
&
data
,
ppd
->
Context
);
(
ppd
->
Callback
)(
&
data
,
ppd
->
Context
);
}
...
...
@@ -1082,16 +1090,24 @@ static HRESULT WINAPI DSPROPERTY_Enumerate1(
for
(
wid
=
0
;
wid
<
devs
;
++
wid
)
{
err
=
mmErr
(
waveInMessage
((
HWAVEIN
)
wid
,
DRV_QUERYDSOUNDDESC
,(
DWORD
)
&
desc
,
0
));
if
(
err
==
DS_OK
)
{
PIDSCDRIVER
drv
;
ZeroMemory
(
&
data
,
sizeof
(
data
));
data
.
DataFlow
=
DIRECTSOUNDDEVICE_DATAFLOW_
RENDER
;
data
.
WaveDeviceId
=
w
o
d
;
data
.
DeviceId
=
DSOUND_
renderer_guids
[
wo
d
];
data
.
DataFlow
=
DIRECTSOUNDDEVICE_DATAFLOW_
CAPTURE
;
data
.
WaveDeviceId
=
w
i
d
;
data
.
DeviceId
=
DSOUND_
capture_guids
[
wi
d
];
lstrcpynA
(
data
.
DescriptionA
,
desc
.
szDesc
,
sizeof
(
data
.
DescriptionA
));
lstrcpynA
(
data
.
ModuleA
,
desc
.
szDrvname
,
sizeof
(
data
.
ModuleA
));
MultiByteToWideChar
(
CP_ACP
,
0
,
data
.
DescriptionA
,
-
1
,
data
.
DescriptionW
,
sizeof
(
data
.
DescriptionW
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
data
.
ModuleA
,
-
1
,
data
.
ModuleW
,
sizeof
(
data
.
ModuleW
)
);
data
.
Type
=
DIRECTSOUNDDEVICE_TYPE_EMULATED
;
err
=
mmErr
(
waveInMessage
((
HWAVEIN
)
wid
,
DRV_QUERYDSOUNDIFACE
,
(
DWORD
)
&
drv
,
0
));
if
(
err
==
DS_OK
&&
drv
)
data
.
Type
=
DIRECTSOUNDDEVICE_TYPE_VXD
;
else
WARN
(
"waveInMessage(DRV_QUERYDSOUNDIFACE) failed
\n
"
);
TRACE
(
"calling Callback(%p,%p)
\n
"
,
&
data
,
ppd
->
Context
);
(
ppd
->
Callback
)(
&
data
,
ppd
->
Context
);
}
...
...
@@ -1143,6 +1159,7 @@ static HRESULT WINAPI DSPROPERTY_EnumerateA(
if
(
err
==
DS_OK
)
{
CHAR
*
szInterface
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
/
sizeof
(
WCHAR
));
if
(
szInterface
)
{
PIDSCDRIVER
drv
;
ZeroMemory
(
&
data
,
sizeof
(
data
));
data
.
DataFlow
=
DIRECTSOUNDDEVICE_DATAFLOW_RENDER
;
data
.
WaveDeviceId
=
wod
;
...
...
@@ -1152,6 +1169,13 @@ static HRESULT WINAPI DSPROPERTY_EnumerateA(
WideCharToMultiByte
(
CP_ACP
,
0
,
nameW
,
size
/
sizeof
(
WCHAR
),
szInterface
,
size
/
sizeof
(
WCHAR
),
NULL
,
NULL
);
data
.
Interface
=
szInterface
;
data
.
Type
=
DIRECTSOUNDDEVICE_TYPE_EMULATED
;
err
=
mmErr
(
waveOutMessage
((
HWAVEOUT
)
wod
,
DRV_QUERYDSOUNDIFACE
,
(
DWORD
)
&
drv
,
0
));
if
(
err
==
DS_OK
&&
drv
)
data
.
Type
=
DIRECTSOUNDDEVICE_TYPE_VXD
;
else
WARN
(
"waveOutMessage(DRV_QUERYDSOUNDIFACE) failed
\n
"
);
TRACE
(
"calling Callback(%p,%p)
\n
"
,
&
data
,
ppd
->
Context
);
(
ppd
->
Callback
)(
&
data
,
ppd
->
Context
);
}
...
...
@@ -1176,6 +1200,7 @@ static HRESULT WINAPI DSPROPERTY_EnumerateA(
if
(
err
==
DS_OK
)
{
CHAR
*
szInterface
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
/
sizeof
(
WCHAR
));
if
(
szInterface
)
{
PIDSCDRIVER
drv
;
ZeroMemory
(
&
data
,
sizeof
(
data
));
data
.
DataFlow
=
DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE
;
data
.
WaveDeviceId
=
wid
;
...
...
@@ -1185,6 +1210,13 @@ static HRESULT WINAPI DSPROPERTY_EnumerateA(
WideCharToMultiByte
(
CP_ACP
,
0
,
nameW
,
size
/
sizeof
(
WCHAR
),
szInterface
,
size
/
sizeof
(
WCHAR
),
NULL
,
NULL
);
data
.
Interface
=
szInterface
;
data
.
Type
=
DIRECTSOUNDDEVICE_TYPE_EMULATED
;
err
=
mmErr
(
waveInMessage
((
HWAVEIN
)
wid
,
DRV_QUERYDSOUNDIFACE
,
(
DWORD
)
&
drv
,
0
));
if
(
err
==
DS_OK
&&
drv
)
data
.
Type
=
DIRECTSOUNDDEVICE_TYPE_VXD
;
else
WARN
(
"waveInMessage(DRV_QUERYDSOUNDIFACE) failed
\n
"
);
TRACE
(
"calling Callback(%p,%p)
\n
"
,
&
data
,
ppd
->
Context
);
(
ppd
->
Callback
)(
&
data
,
ppd
->
Context
);
}
...
...
@@ -1243,6 +1275,7 @@ static HRESULT WINAPI DSPROPERTY_EnumerateW(
if
(
wInterface
)
{
err
=
mmErr
(
waveOutMessage
((
HWAVEOUT
)
wod
,
DRV_QUERYDEVICEINTERFACE
,
(
DWORD_PTR
)
wInterface
,
size
));
if
(
err
==
DS_OK
)
{
PIDSCDRIVER
drv
;
ZeroMemory
(
&
data
,
sizeof
(
data
));
data
.
DataFlow
=
DIRECTSOUNDDEVICE_DATAFLOW_RENDER
;
data
.
WaveDeviceId
=
wod
;
...
...
@@ -1255,6 +1288,13 @@ static HRESULT WINAPI DSPROPERTY_EnumerateW(
data
.
Module
=
wModule
;
data
.
Interface
=
wInterface
;
data
.
Type
=
DIRECTSOUNDDEVICE_TYPE_EMULATED
;
err
=
mmErr
(
waveOutMessage
((
HWAVEOUT
)
wod
,
DRV_QUERYDSOUNDIFACE
,
(
DWORD
)
&
drv
,
0
));
if
(
err
==
DS_OK
&&
drv
)
data
.
Type
=
DIRECTSOUNDDEVICE_TYPE_VXD
;
else
WARN
(
"waveOutMessage(DRV_QUERYDSOUNDIFACE) failed
\n
"
);
TRACE
(
"calling Callback(%p,%p)
\n
"
,
&
data
,
ppd
->
Context
);
(
ppd
->
Callback
)(
&
data
,
ppd
->
Context
);
}
...
...
@@ -1279,8 +1319,9 @@ static HRESULT WINAPI DSPROPERTY_EnumerateW(
if
(
err
==
DS_OK
)
{
WCHAR
*
wInterface
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
wInterface
)
{
err
=
mmErr
(
waveInMessage
((
HWAVEIN
)
w
o
d
,
DRV_QUERYDEVICEINTERFACE
,
(
DWORD_PTR
)
wInterface
,
size
));
err
=
mmErr
(
waveInMessage
((
HWAVEIN
)
w
i
d
,
DRV_QUERYDEVICEINTERFACE
,
(
DWORD_PTR
)
wInterface
,
size
));
if
(
err
==
DS_OK
)
{
PIDSCDRIVER
drv
;
ZeroMemory
(
&
data
,
sizeof
(
data
));
data
.
DataFlow
=
DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE
;
data
.
WaveDeviceId
=
wid
;
...
...
@@ -1292,6 +1333,13 @@ static HRESULT WINAPI DSPROPERTY_EnumerateW(
data
.
Description
=
wDescription
;
data
.
Module
=
wModule
;
data
.
Interface
=
wInterface
;
data
.
Type
=
DIRECTSOUNDDEVICE_TYPE_EMULATED
;
err
=
mmErr
(
waveInMessage
((
HWAVEIN
)
wid
,
DRV_QUERYDSOUNDIFACE
,
(
DWORD
)
&
drv
,
0
));
if
(
err
==
DS_OK
&&
drv
)
data
.
Type
=
DIRECTSOUNDDEVICE_TYPE_VXD
;
else
WARN
(
"waveInMessage(DRV_QUERYDSOUNDIFACE) failed
\n
"
);
TRACE
(
"calling Callback(%p,%p)
\n
"
,
&
data
,
ppd
->
Context
);
(
ppd
->
Callback
)(
&
data
,
ppd
->
Context
);
}
...
...
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