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
c427708b
Commit
c427708b
authored
Aug 09, 2004
by
Robert Reif
Committed by
Alexandre Julliard
Aug 09, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change MIXER_GetDev to take pointer to returned address pointer and
return one of 3 possible return values rather than an address or NULL.
parent
8abc3ab1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
16 deletions
+27
-16
winmm.c
dlls/winmm/winmm.c
+27
-16
No files found.
dlls/winmm/winmm.c
View file @
c427708b
...
...
@@ -207,9 +207,10 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad)
/**************************************************************************
* find out the real mixer ID depending on hmix (depends on dwFlags)
*/
static
LPWINE_MIXER
MIXER_GetDev
(
HMIXEROBJ
hmix
,
DWORD
dwFlags
)
static
UINT
MIXER_GetDev
(
HMIXEROBJ
hmix
,
DWORD
dwFlags
,
LPWINE_MIXER
*
lplpwm
)
{
LPWINE_MIXER
lpwm
=
NULL
;
UINT
uRet
=
MMSYSERR_NOERROR
;
switch
(
dwFlags
&
0xF0000000ul
)
{
case
MIXER_OBJECTF_MIXER
:
...
...
@@ -246,10 +247,15 @@ static LPWINE_MIXER MIXER_GetDev(HMIXEROBJ hmix, DWORD dwFlags)
lpwm
=
(
LPWINE_MIXER
)
MMDRV_GetRelated
(
hmix
,
MMDRV_AUX
,
TRUE
,
MMDRV_MIXER
);
break
;
default:
FIXME
(
"Unsupported flag (%08lx)
\n
"
,
dwFlags
&
0xF0000000ul
);
WARN
(
"Unsupported flag (%08lx)
\n
"
,
dwFlags
&
0xF0000000ul
);
lpwm
=
0
;
uRet
=
MMSYSERR_INVALFLAG
;
break
;
}
return
lpwm
;
*
lplpwm
=
lpwm
;
if
(
lpwm
==
0
&&
uRet
==
MMSYSERR_NOERROR
)
uRet
=
MMSYSERR_INVALPARAM
;
return
uRet
;
}
/**************************************************************************
...
...
@@ -364,17 +370,17 @@ UINT WINAPI mixerClose(HMIXER hMix)
UINT
WINAPI
mixerGetID
(
HMIXEROBJ
hmix
,
LPUINT
lpid
,
DWORD
fdwID
)
{
LPWINE_MIXER
lpwm
;
UINT
uRet
=
MMSYSERR_NOERROR
;
TRACE
(
"(%p %p %08lx)
\n
"
,
hmix
,
lpid
,
fdwID
);
if
((
lpwm
=
MIXER_GetDev
(
hmix
,
fdwID
))
==
NULL
)
{
return
MMSYSERR_INVALHANDLE
;
}
if
((
uRet
=
MIXER_GetDev
(
hmix
,
fdwID
,
&
lpwm
))
!=
MMSYSERR_NOERROR
)
return
uRet
;
if
(
lpid
)
*
lpid
=
lpwm
->
mld
.
uDeviceID
;
return
MMSYSERR_NOERROR
;
return
uRet
;
}
/**************************************************************************
...
...
@@ -384,11 +390,12 @@ UINT WINAPI mixerGetControlDetailsA(HMIXEROBJ hmix, LPMIXERCONTROLDETAILS lpmcdA
DWORD
fdwDetails
)
{
LPWINE_MIXER
lpwm
;
UINT
uRet
=
MMSYSERR_NOERROR
;
TRACE
(
"(%p, %p, %08lx)
\n
"
,
hmix
,
lpmcdA
,
fdwDetails
);
if
((
lpwm
=
MIXER_GetDev
(
hmix
,
fdwDetails
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
if
((
uRet
=
MIXER_GetDev
(
hmix
,
fdwDetails
,
&
lpwm
))
!=
MMSYSERR_NOERROR
)
return
uRet
;
if
(
lpmcdA
==
NULL
||
lpmcdA
->
cbStruct
!=
sizeof
(
*
lpmcdA
))
return
MMSYSERR_INVALPARAM
;
...
...
@@ -462,11 +469,12 @@ UINT WINAPI mixerGetLineControlsA(HMIXEROBJ hmix, LPMIXERLINECONTROLSA lpmlcA,
DWORD
fdwControls
)
{
LPWINE_MIXER
lpwm
;
UINT
uRet
=
MMSYSERR_NOERROR
;
TRACE
(
"(%p, %p, %08lx)
\n
"
,
hmix
,
lpmlcA
,
fdwControls
);
if
((
lpwm
=
MIXER_GetDev
(
hmix
,
fdwControls
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
if
((
uRet
=
MIXER_GetDev
(
hmix
,
fdwControls
,
&
lpwm
))
!=
MMSYSERR_NOERROR
)
return
uRet
;
if
(
lpmlcA
==
NULL
||
lpmlcA
->
cbStruct
!=
sizeof
(
*
lpmlcA
))
return
MMSYSERR_INVALPARAM
;
...
...
@@ -542,11 +550,12 @@ UINT WINAPI mixerGetLineControlsW(HMIXEROBJ hmix, LPMIXERLINECONTROLSW lpmlcW,
UINT
WINAPI
mixerGetLineInfoA
(
HMIXEROBJ
hmix
,
LPMIXERLINEA
lpmliW
,
DWORD
fdwInfo
)
{
LPWINE_MIXER
lpwm
;
UINT
uRet
=
MMSYSERR_NOERROR
;
TRACE
(
"(%p, %p, %08lx)
\n
"
,
hmix
,
lpmliW
,
fdwInfo
);
if
((
lpwm
=
MIXER_GetDev
(
hmix
,
fdwInfo
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
if
((
uRet
=
MIXER_GetDev
(
hmix
,
fdwInfo
,
&
lpwm
))
!=
MMSYSERR_NOERROR
)
return
uRet
;
return
MMDRV_Message
(
&
lpwm
->
mld
,
MXDM_GETLINEINFO
,
(
DWORD_PTR
)
lpmliW
,
fdwInfo
,
TRUE
);
...
...
@@ -589,7 +598,8 @@ UINT WINAPI mixerGetLineInfoW(HMIXEROBJ hmix, LPMIXERLINEW lpmliW,
WideCharToMultiByte
(
CP_ACP
,
0
,
lpmliW
->
Target
.
szPname
,
-
1
,
mliA
.
Target
.
szPname
,
sizeof
(
mliA
.
Target
.
szPname
),
NULL
,
NULL
);
break
;
default:
FIXME
(
"Unsupported fdwControls=0x%08lx
\n
"
,
fdwInfo
);
WARN
(
"Unsupported fdwControls=0x%08lx
\n
"
,
fdwInfo
);
return
MMSYSERR_INVALFLAG
;
}
ret
=
mixerGetLineInfoA
(
hmix
,
&
mliA
,
fdwInfo
);
...
...
@@ -625,11 +635,12 @@ UINT WINAPI mixerSetControlDetails(HMIXEROBJ hmix, LPMIXERCONTROLDETAILS lpmcdA,
DWORD
fdwDetails
)
{
LPWINE_MIXER
lpwm
;
UINT
uRet
=
MMSYSERR_NOERROR
;
TRACE
(
"(%p, %p, %08lx)
\n
"
,
hmix
,
lpmcdA
,
fdwDetails
);
if
((
lpwm
=
MIXER_GetDev
(
hmix
,
fdwDetails
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
if
((
uRet
=
MIXER_GetDev
(
hmix
,
fdwDetails
,
&
lpwm
))
!=
MMSYSERR_NOERROR
)
return
uRet
;
return
MMDRV_Message
(
&
lpwm
->
mld
,
MXDM_SETCONTROLDETAILS
,
(
DWORD_PTR
)
lpmcdA
,
fdwDetails
,
TRUE
);
...
...
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