|
From: <pst...@us...> - 2011-08-08 00:54:04
|
Revision: 905
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=905&view=rev
Author: pstieber
Date: 2011-08-08 00:53:58 +0000 (Mon, 08 Aug 2011)
Log Message:
-----------
1. Changed dev to DeviceId.
2. Fixed incorrect pointer casts from DWORD to DWORD_PTR in calls to midiInOpen and midiOutOpen.
This fixed a crash in the Windows 64-bit build.
Modified Paths:
--------------
trunk/jazz/src/mswin/WindowsPlayer.cpp
Modified: trunk/jazz/src/mswin/WindowsPlayer.cpp
===================================================================
--- trunk/jazz/src/mswin/WindowsPlayer.cpp 2011-08-08 00:13:55 UTC (rev 904)
+++ trunk/jazz/src/mswin/WindowsPlayer.cpp 2011-08-08 00:53:58 UTC (rev 905)
@@ -81,24 +81,24 @@
// select input device
if (ilong >= 0)
{
- UINT dev = (UINT)ilong;
+ UINT DeviceId = (UINT)ilong;
UINT rc;
switch (gpConfig->GetValue(C_ClockSource))
{
case CsMidi:
rc = midiInOpen(
&mpState->hinp,
- dev,
- (DWORD)midiMidiInputHandler,
- (DWORD)mpState,
+ DeviceId,
+ (DWORD_PTR)midiMidiInputHandler,
+ (DWORD_PTR)mpState,
CALLBACK_FUNCTION);
break;
case CsMtc:
rc = midiInOpen(
&mpState->hinp,
- dev,
- (DWORD)midiMtcInputHandler,
- (DWORD)mpState,
+ DeviceId,
+ (DWORD_PTR)midiMtcInputHandler,
+ (DWORD_PTR)mpState,
CALLBACK_FUNCTION);
break;
case CsInt:
@@ -106,9 +106,9 @@
default:
rc = midiInOpen(
&mpState->hinp,
- dev,
- (DWORD)midiIntInputHandler,
- (DWORD)mpState,
+ DeviceId,
+ (DWORD_PTR)midiIntInputHandler,
+ (DWORD_PTR)mpState,
CALLBACK_FUNCTION);
break;
}
@@ -123,16 +123,18 @@
// select output device
if (olong >= 0)
{
- UINT dev = (UINT)olong;
- if (dev == MAX_MIDI_DEVS)
- dev = MIDI_MAPPER;
+ UINT DeviceId = (UINT)olong;
+ if (DeviceId == MAX_MIDI_DEVS)
+ {
+ DeviceId = MIDI_MAPPER;
+ }
- //UINT rc = midiOutOpen(&mpState->hout, dev, 0L, 0L, 0L);
+ //UINT rc = midiOutOpen(&mpState->hout, DeviceId, 0L, 0L, 0L);
UINT rc = midiOutOpen(
&mpState->hout,
- dev,
- (DWORD)MidiOutProc,
- (DWORD)mpState,
+ DeviceId,
+ (DWORD_PTR)MidiOutProc,
+ (DWORD_PTR)mpState,
CALLBACK_FUNCTION);
if (rc)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|