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
8856ea79
Commit
8856ea79
authored
Sep 27, 2011
by
Andrew Eikum
Committed by
Alexandre Julliard
Sep 27, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Reimplement PropertySet on mmdevapi.
parent
3735ecac
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
6 deletions
+18
-6
dsound_main.c
dlls/dsound/dsound_main.c
+14
-6
dsound_private.h
dlls/dsound/dsound_private.h
+4
-0
propset.c
dlls/dsound/propset.c
+0
-0
No files found.
dlls/dsound/dsound_main.c
View file @
8856ea79
...
@@ -78,6 +78,8 @@ static IMMDeviceEnumerator *g_devenum;
...
@@ -78,6 +78,8 @@ static IMMDeviceEnumerator *g_devenum;
static
CRITICAL_SECTION
g_devenum_lock
;
static
CRITICAL_SECTION
g_devenum_lock
;
static
HANDLE
g_devenum_thread
;
static
HANDLE
g_devenum_thread
;
WCHAR
wine_vxd_drv
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
'm'
,
'm'
,
'.'
,
'v'
,
'x'
,
'd'
,
0
};
HRESULT
mmErr
(
UINT
err
)
HRESULT
mmErr
(
UINT
err
)
{
{
switch
(
err
)
{
switch
(
err
)
{
...
@@ -491,7 +493,9 @@ HRESULT get_mmdevice(EDataFlow flow, const GUID *tgt, IMMDevice **device)
...
@@ -491,7 +493,9 @@ HRESULT get_mmdevice(EDataFlow flow, const GUID *tgt, IMMDevice **device)
return
DSERR_INVALIDPARAM
;
return
DSERR_INVALIDPARAM
;
}
}
static
HRESULT
enumerate_mmdevices
(
EDataFlow
flow
,
GUID
*
guids
,
/* S_FALSE means the callback returned FALSE at some point
* S_OK means the callback always returned TRUE */
HRESULT
enumerate_mmdevices
(
EDataFlow
flow
,
GUID
*
guids
,
LPDSENUMCALLBACKW
cb
,
void
*
user
)
LPDSENUMCALLBACKW
cb
,
void
*
user
)
{
{
IMMDeviceEnumerator
*
devenum
;
IMMDeviceEnumerator
*
devenum
;
...
@@ -503,8 +507,6 @@ static HRESULT enumerate_mmdevices(EDataFlow flow, GUID *guids,
...
@@ -503,8 +507,6 @@ static HRESULT enumerate_mmdevices(EDataFlow flow, GUID *guids,
static
const
WCHAR
primary_desc
[]
=
{
'P'
,
'r'
,
'i'
,
'm'
,
'a'
,
'r'
,
'y'
,
' '
,
static
const
WCHAR
primary_desc
[]
=
{
'P'
,
'r'
,
'i'
,
'm'
,
'a'
,
'r'
,
'y'
,
' '
,
'S'
,
'o'
,
'u'
,
'n'
,
'd'
,
' '
,
'D'
,
'r'
,
'i'
,
'v'
,
'e'
,
'r'
,
0
};
'S'
,
'o'
,
'u'
,
'n'
,
'd'
,
' '
,
'D'
,
'r'
,
'i'
,
'v'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
empty_drv
[]
=
{
0
};
static
const
WCHAR
empty_drv
[]
=
{
0
};
static
const
WCHAR
wine_vxd_drv
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
'm'
,
'm'
,
'.'
,
'v'
,
'x'
,
'd'
,
0
};
devenum
=
get_mmdevenum
();
devenum
=
get_mmdevenum
();
if
(
!
devenum
)
if
(
!
devenum
)
...
@@ -574,7 +576,7 @@ static HRESULT enumerate_mmdevices(EDataFlow flow, GUID *guids,
...
@@ -574,7 +576,7 @@ static HRESULT enumerate_mmdevices(EDataFlow flow, GUID *guids,
IMMDeviceCollection_Release
(
coll
);
IMMDeviceCollection_Release
(
coll
);
return
DS_OK
;
return
(
keep_going
==
TRUE
)
?
S_OK
:
S_FALSE
;
}
}
/***************************************************************************
/***************************************************************************
...
@@ -594,6 +596,8 @@ HRESULT WINAPI DirectSoundEnumerateW(
...
@@ -594,6 +596,8 @@ HRESULT WINAPI DirectSoundEnumerateW(
LPDSENUMCALLBACKW
lpDSEnumCallback
,
LPDSENUMCALLBACKW
lpDSEnumCallback
,
LPVOID
lpContext
)
LPVOID
lpContext
)
{
{
HRESULT
hr
;
TRACE
(
"(%p,%p)
\n
"
,
lpDSEnumCallback
,
lpContext
);
TRACE
(
"(%p,%p)
\n
"
,
lpDSEnumCallback
,
lpContext
);
if
(
lpDSEnumCallback
==
NULL
)
{
if
(
lpDSEnumCallback
==
NULL
)
{
...
@@ -603,8 +607,9 @@ HRESULT WINAPI DirectSoundEnumerateW(
...
@@ -603,8 +607,9 @@ HRESULT WINAPI DirectSoundEnumerateW(
setup_dsound_options
();
setup_dsound_options
();
return
enumerate_mmdevices
(
eRender
,
DSOUND_renderer_guids
,
hr
=
enumerate_mmdevices
(
eRender
,
DSOUND_renderer_guids
,
lpDSEnumCallback
,
lpContext
);
lpDSEnumCallback
,
lpContext
);
return
SUCCEEDED
(
hr
)
?
DS_OK
:
hr
;
}
}
/***************************************************************************
/***************************************************************************
...
@@ -655,6 +660,8 @@ DirectSoundCaptureEnumerateW(
...
@@ -655,6 +660,8 @@ DirectSoundCaptureEnumerateW(
LPDSENUMCALLBACKW
lpDSEnumCallback
,
LPDSENUMCALLBACKW
lpDSEnumCallback
,
LPVOID
lpContext
)
LPVOID
lpContext
)
{
{
HRESULT
hr
;
TRACE
(
"(%p,%p)
\n
"
,
lpDSEnumCallback
,
lpContext
);
TRACE
(
"(%p,%p)
\n
"
,
lpDSEnumCallback
,
lpContext
);
if
(
lpDSEnumCallback
==
NULL
)
{
if
(
lpDSEnumCallback
==
NULL
)
{
...
@@ -664,8 +671,9 @@ DirectSoundCaptureEnumerateW(
...
@@ -664,8 +671,9 @@ DirectSoundCaptureEnumerateW(
setup_dsound_options
();
setup_dsound_options
();
return
enumerate_mmdevices
(
eCapture
,
DSOUND_capture_guids
,
hr
=
enumerate_mmdevices
(
eCapture
,
DSOUND_capture_guids
,
lpDSEnumCallback
,
lpContext
);
lpDSEnumCallback
,
lpContext
);
return
SUCCEEDED
(
hr
)
?
DS_OK
:
hr
;
}
}
/*******************************************************************************
/*******************************************************************************
...
...
dlls/dsound/dsound_private.h
View file @
8856ea79
...
@@ -436,6 +436,8 @@ extern struct list DSOUND_renderers DECLSPEC_HIDDEN;
...
@@ -436,6 +436,8 @@ extern struct list DSOUND_renderers DECLSPEC_HIDDEN;
extern
GUID
DSOUND_renderer_guids
[
MAXWAVEDRIVERS
]
DECLSPEC_HIDDEN
;
extern
GUID
DSOUND_renderer_guids
[
MAXWAVEDRIVERS
]
DECLSPEC_HIDDEN
;
extern
GUID
DSOUND_capture_guids
[
MAXWAVEDRIVERS
]
DECLSPEC_HIDDEN
;
extern
GUID
DSOUND_capture_guids
[
MAXWAVEDRIVERS
]
DECLSPEC_HIDDEN
;
extern
WCHAR
wine_vxd_drv
[]
DECLSPEC_HIDDEN
;
HRESULT
mmErr
(
UINT
err
)
DECLSPEC_HIDDEN
;
HRESULT
mmErr
(
UINT
err
)
DECLSPEC_HIDDEN
;
void
setup_dsound_options
(
void
)
DECLSPEC_HIDDEN
;
void
setup_dsound_options
(
void
)
DECLSPEC_HIDDEN
;
const
char
*
dumpCooperativeLevel
(
DWORD
level
)
DECLSPEC_HIDDEN
;
const
char
*
dumpCooperativeLevel
(
DWORD
level
)
DECLSPEC_HIDDEN
;
...
@@ -445,3 +447,5 @@ HRESULT get_mmdevice(EDataFlow flow, const GUID *tgt, IMMDevice **device) DECLSP
...
@@ -445,3 +447,5 @@ HRESULT get_mmdevice(EDataFlow flow, const GUID *tgt, IMMDevice **device) DECLSP
BOOL
DSOUND_check_supported
(
IAudioClient
*
client
,
DWORD
rate
,
BOOL
DSOUND_check_supported
(
IAudioClient
*
client
,
DWORD
rate
,
DWORD
depth
,
WORD
channels
)
DECLSPEC_HIDDEN
;
DWORD
depth
,
WORD
channels
)
DECLSPEC_HIDDEN
;
UINT
DSOUND_create_timer
(
LPTIMECALLBACK
cb
,
DWORD_PTR
user
)
DECLSPEC_HIDDEN
;
UINT
DSOUND_create_timer
(
LPTIMECALLBACK
cb
,
DWORD_PTR
user
)
DECLSPEC_HIDDEN
;
HRESULT
enumerate_mmdevices
(
EDataFlow
flow
,
GUID
*
guids
,
LPDSENUMCALLBACKW
cb
,
void
*
user
)
DECLSPEC_HIDDEN
;
dlls/dsound/propset.c
View file @
8856ea79
This diff is collapsed.
Click to expand it.
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