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
f13394f7
Commit
f13394f7
authored
Feb 23, 2013
by
Jörg Höhle
Committed by
Alexandre Julliard
Feb 27, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmsystem: Always use CALLBACK_FUNCTION to update MIDI/WAVEHDR.dwFlags.
parent
1cc26cba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
16 deletions
+13
-16
mmsystem.c
dlls/mmsystem.dll16/mmsystem.c
+13
-16
No files found.
dlls/mmsystem.dll16/mmsystem.c
View file @
f13394f7
...
...
@@ -734,8 +734,7 @@ UINT16 WINAPI midiOutOpen16(HMIDIOUT16* lphMidiOut, UINT16 uDeviceID,
{
return
MMSYSERR_NOMEM
;
}
if
((
dwFlags
&
CALLBACK_TYPEMASK
)
!=
CALLBACK_NULL
)
dwFlags
=
(
dwFlags
&
~
CALLBACK_TYPEMASK
)
|
CALLBACK_FUNCTION
;
dwFlags
=
(
dwFlags
&
~
CALLBACK_TYPEMASK
)
|
CALLBACK_FUNCTION
;
ret
=
midiOutOpen
(
&
hmo
,
uDeviceID
,
(
DWORD
)
thunk
,
dwInstance
,
dwFlags
);
if
(
ret
==
MMSYSERR_NOERROR
)
{
...
...
@@ -938,8 +937,7 @@ UINT16 WINAPI midiInOpen16(HMIDIIN16* lphMidiIn, UINT16 uDeviceID,
{
return
MMSYSERR_NOMEM
;
}
if
((
dwFlags
&
CALLBACK_TYPEMASK
)
!=
CALLBACK_NULL
)
dwFlags
=
(
dwFlags
&
~
CALLBACK_TYPEMASK
)
|
CALLBACK_FUNCTION
;
dwFlags
=
(
dwFlags
&
~
CALLBACK_TYPEMASK
)
|
CALLBACK_FUNCTION
;
ret
=
midiInOpen
(
&
hmid
,
uDeviceID
,
(
DWORD
)
thunk
,
dwInstance
,
dwFlags
);
if
(
ret
==
MMSYSERR_NOERROR
)
{
...
...
@@ -1099,8 +1097,7 @@ MMRESULT16 WINAPI midiStreamOpen16(HMIDISTRM16* phMidiStrm, LPUINT16 devid,
{
return
MMSYSERR_NOMEM
;
}
if
((
fdwOpen
&
CALLBACK_TYPEMASK
)
!=
CALLBACK_NULL
)
fdwOpen
=
(
fdwOpen
&
~
CALLBACK_TYPEMASK
)
|
CALLBACK_FUNCTION
;
fdwOpen
=
(
fdwOpen
&
~
CALLBACK_TYPEMASK
)
|
CALLBACK_FUNCTION
;
ret
=
midiStreamOpen
(
&
hMidiStrm32
,
&
devid32
,
cMidi
,
(
DWORD
)
thunk
,
dwInstance
,
fdwOpen
);
if
(
ret
==
MMSYSERR_NOERROR
)
{
...
...
@@ -1233,8 +1230,7 @@ UINT16 WINAPI waveOutOpen16(HWAVEOUT16* lphWaveOut, UINT16 uDeviceID,
{
return
MMSYSERR_NOMEM
;
}
if
((
dwFlags
&
CALLBACK_TYPEMASK
)
!=
CALLBACK_NULL
)
dwFlags
=
(
dwFlags
&
~
CALLBACK_TYPEMASK
)
|
CALLBACK_FUNCTION
;
dwFlags
=
(
dwFlags
&
~
CALLBACK_TYPEMASK
)
|
CALLBACK_FUNCTION
;
/* since layout of WAVEFORMATEX is the same for 16/32 bits, we directly
* call the 32 bit version
* however, we need to promote correctly the wave mapper id
...
...
@@ -1243,11 +1239,12 @@ UINT16 WINAPI waveOutOpen16(HWAVEOUT16* lphWaveOut, UINT16 uDeviceID,
ret
=
waveOutOpen
(
&
hWaveOut
,
(
uDeviceID
==
(
UINT16
)
-
1
)
?
(
UINT
)
-
1
:
uDeviceID
,
lpFormat
,
(
DWORD
)
thunk
,
dwInstance
,
dwFlags
);
if
(
lphWaveOut
!=
NULL
&&
ret
==
MMSYSERR_NOERROR
)
*
lphWaveOut
=
HWAVEOUT_16
(
hWaveOut
);
if
(
ret
==
MMSYSERR_NOERROR
&&
!
(
dwFlags
&
WAVE_FORMAT_QUERY
))
{
MMSYSTDRV_SetHandle
(
thunk
,
(
void
*
)
hWaveOut
);
else
MMSYSTDRV_DeleteThunk
(
thunk
);
if
(
lphWaveOut
!=
NULL
)
*
lphWaveOut
=
HWAVEOUT_16
(
hWaveOut
);
}
else
MMSYSTDRV_DeleteThunk
(
thunk
);
return
ret
;
}
...
...
@@ -1512,8 +1509,7 @@ UINT16 WINAPI waveInOpen16(HWAVEIN16* lphWaveIn, UINT16 uDeviceID,
{
return
MMSYSERR_NOMEM
;
}
if
((
dwFlags
&
CALLBACK_TYPEMASK
)
!=
CALLBACK_NULL
)
dwFlags
=
(
dwFlags
&
~
CALLBACK_TYPEMASK
)
|
CALLBACK_FUNCTION
;
dwFlags
=
(
dwFlags
&
~
CALLBACK_TYPEMASK
)
|
CALLBACK_FUNCTION
;
/* since layout of WAVEFORMATEX is the same for 16/32 bits, we directly
* call the 32 bit version
* however, we need to promote correctly the wave mapper id
...
...
@@ -1522,11 +1518,12 @@ UINT16 WINAPI waveInOpen16(HWAVEIN16* lphWaveIn, UINT16 uDeviceID,
ret
=
waveInOpen
(
&
hWaveIn
,
(
uDeviceID
==
(
UINT16
)
-
1
)
?
(
UINT
)
-
1
:
uDeviceID
,
lpFormat
,
(
DWORD
)
thunk
,
dwInstance
,
dwFlags
);
if
(
lphWaveIn
!=
NULL
&&
ret
==
MMSYSERR_NOERROR
)
*
lphWaveIn
=
HWAVEIN_16
(
hWaveIn
);
if
(
ret
==
MMSYSERR_NOERROR
&&
!
(
dwFlags
&
WAVE_FORMAT_QUERY
))
{
MMSYSTDRV_SetHandle
(
thunk
,
(
void
*
)
hWaveIn
);
else
MMSYSTDRV_DeleteThunk
(
thunk
);
if
(
lphWaveIn
!=
NULL
)
*
lphWaveIn
=
HWAVEOUT_16
(
hWaveIn
);
}
else
MMSYSTDRV_DeleteThunk
(
thunk
);
return
ret
;
}
...
...
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