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
06d6dd3e
Commit
06d6dd3e
authored
Jan 27, 2010
by
Jörg Höhle
Committed by
Alexandre Julliard
Feb 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Perform stricter MIDI-related error checking.
parent
ed7a3662
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
winmm.c
dlls/winmm/winmm.c
+16
-7
No files found.
dlls/winmm/winmm.c
View file @
06d6dd3e
...
...
@@ -130,6 +130,10 @@ const char* WINMM_ErrorToString(MMRESULT error)
ERR_TO_STR
(
WAVERR_STILLPLAYING
);
ERR_TO_STR
(
WAVERR_UNPREPARED
);
ERR_TO_STR
(
WAVERR_SYNC
);
ERR_TO_STR
(
MIDIERR_INVALIDSETUP
);
ERR_TO_STR
(
MIDIERR_NODEVICE
);
ERR_TO_STR
(
MIDIERR_STILLPLAYING
);
ERR_TO_STR
(
MIDIERR_UNPREPARED
);
}
#undef ERR_TO_STR
return
wine_dbg_sprintf
(
"Unknown(0x%08x)"
,
error
);
...
...
@@ -882,9 +886,7 @@ static LPWINE_MIDI MIDI_OutAlloc(HMIDIOUT* lphMidiOut, DWORD_PTR* lpdwCallback,
lpwm
=
(
LPWINE_MIDI
)
MMDRV_Alloc
(
size
,
MMDRV_MIDIOUT
,
&
hMidiOut
,
lpdwFlags
,
lpdwCallback
,
lpdwInstance
);
if
(
lphMidiOut
!=
NULL
)
*
lphMidiOut
=
hMidiOut
;
*
lphMidiOut
=
hMidiOut
;
if
(
lpwm
)
{
lpwm
->
mod
.
hMidi
=
hMidiOut
;
...
...
@@ -1777,8 +1779,7 @@ MMRESULT WINAPI midiStreamOpen(HMIDISTRM* lphMidiStrm, LPUINT lpuDeviceID,
return
MMSYSERR_NOMEM
;
}
lpMidiStrm
->
hDevice
=
hMidiOut
;
if
(
lphMidiStrm
)
*
lphMidiStrm
=
(
HMIDISTRM
)
hMidiOut
;
*
lphMidiStrm
=
(
HMIDISTRM
)
hMidiOut
;
lpwm
->
mld
.
uDeviceID
=
*
lpuDeviceID
;
...
...
@@ -1820,11 +1821,19 @@ MMRESULT WINAPI midiStreamOut(HMIDISTRM hMidiStrm, LPMIDIHDR lpMidiHdr,
TRACE
(
"(%p, %p, %u)!
\n
"
,
hMidiStrm
,
lpMidiHdr
,
cbMidiHdr
);
if
(
cbMidiHdr
<
sizeof
(
MIDIHDR
)
||
!
lpMidiHdr
||
!
lpMidiHdr
->
lpData
)
return
MMSYSERR_INVALPARAM
;
if
(
!
(
lpMidiHdr
->
dwFlags
&
MHDR_PREPARED
))
return
MIDIERR_UNPREPARED
;
if
(
lpMidiHdr
->
dwFlags
&
MHDR_INQUEUE
)
return
MIDIERR_STILLPLAYING
;
if
(
!
MMSYSTEM_GetMidiStream
(
hMidiStrm
,
&
lpMidiStrm
,
NULL
))
{
ret
=
MMSYSERR_INVALHANDLE
;
}
else
if
(
!
lpMidiHdr
)
{
ret
=
MMSYSERR_INVALPARAM
;
}
else
{
lpMidiHdr
->
dwFlags
|=
MHDR_ISSTRM
;
if
(
!
PostThreadMessageA
(
lpMidiStrm
->
dwThreadID
,
WINE_MSM_HEADER
,
cbMidiHdr
,
(
LPARAM
)
lpMidiHdr
))
{
...
...
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