From: <pst...@us...> - 2010-05-10 06:05:44
|
Revision: 782 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=782&view=rev Author: pstieber Date: 2010-05-10 06:05:38 +0000 (Mon, 10 May 2010) Log Message: ----------- 1. Changed FAR PASCAL to CALLBACK. 2. Type cast some function to LPTIMECALLBACK for the 64-bit build. 3. Removed WIN32 from the 64-bit builds. Modified Paths: -------------- trunk/jazz/src/mswin/WindowsMidiInterface.cpp trunk/jazz/src/mswin/WindowsMidiInterface.h trunk/jazz/src/mswin/WindowsPlayer.cpp trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj Modified: trunk/jazz/src/mswin/WindowsMidiInterface.cpp =================================================================== --- trunk/jazz/src/mswin/WindowsMidiInterface.cpp 2010-05-10 04:08:59 UTC (rev 781) +++ trunk/jazz/src/mswin/WindowsMidiInterface.cpp 2010-05-10 06:05:38 UTC (rev 782) @@ -3,7 +3,7 @@ // // Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved. // Modifications Copyright (C) 2004 Patrick Earl -// Modifications Copyright (C) 2008 Peter J. Stieber +// Modifications Copyright (C) 2008-2010 Peter J. Stieber // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -148,7 +148,7 @@ // handle incoming midi data (internal clock) -void FAR PASCAL midiIntInputHandler( +void CALLBACK midiIntInputHandler( HMIDIIN hMidiIn, WORD wMsg, DWORD dwInstance, @@ -186,12 +186,13 @@ } } - - - - // play output (internal clock) -void FAR PASCAL midiIntTimerHandler(UINT wTimerId, UINT wMsg, DWORD dwUser, DWORD dw1, DWORD dw2) +void CALLBACK midiIntTimerHandler( + UINT wTimerId, + UINT wMsg, + DWORD dwUser, + DWORD dw1, + DWORD dw2) { tWinPlayerState *state = (tWinPlayerState *)dwUser; if ( !state->playing ) @@ -203,7 +204,12 @@ midi_event *m = state->thru_buffer.peek(); if (midiOutShortMsg(state->hout, m->data) == MIDIERR_NOTREADY) { - timeSetEvent(state->min_timer_period, state->min_timer_period * 5, midiIntTimerHandler, (DWORD)state, TIME_ONESHOT); + timeSetEvent( + state->min_timer_period, + state->min_timer_period * 5, + (LPTIMECALLBACK) midiIntTimerHandler, + (DWORD) state, + TIME_ONESHOT); return; } (void)state->thru_buffer.get(); @@ -233,7 +239,12 @@ if (midiOutShortMsg(state->hout, m->data) == MIDIERR_NOTREADY) { // try again later - timeSetEvent(state->min_timer_period, state->min_timer_period * 5, midiIntTimerHandler, (DWORD)state, TIME_ONESHOT); + timeSetEvent( + state->min_timer_period, + state->min_timer_period * 5, + (LPTIMECALLBACK) midiIntTimerHandler, + (DWORD) state, + TIME_ONESHOT); return; } } @@ -251,15 +262,16 @@ delay = (long)state->min_timer_period; else if (delay > (long)state->max_timer_period) delay = (long)state->max_timer_period; - timeSetEvent((UINT)delay, state->min_timer_period, midiIntTimerHandler, (DWORD)state, TIME_ONESHOT); + timeSetEvent( + (UINT) delay, + state->min_timer_period, + (LPTIMECALLBACK) midiIntTimerHandler, + (DWORD) state, + TIME_ONESHOT); } - - - - // handle incoming midi data (midi clock source) (songpointer) -void FAR PASCAL midiMidiInputHandler( +void CALLBACK midiMidiInputHandler( HMIDIIN hMidiIn, WORD wMsg, DWORD dwInstance, @@ -307,12 +319,13 @@ } } - - - - // play output (midi clock source) (songpointer) -void FAR PASCAL midiMidiTimerHandler(UINT wTimerId, UINT wMsg, DWORD dwUser, DWORD dw1, DWORD dw2) +void CALLBACK midiMidiTimerHandler( + UINT wTimerId, + UINT wMsg, + DWORD dwUser, + DWORD dw1, + DWORD dw2) { tWinPlayerState *state = (tWinPlayerState *)dwUser; if ( !state->playing ) @@ -324,7 +337,12 @@ midi_event *m = state->thru_buffer.peek(); if (midiOutShortMsg(state->hout, m->data) == MIDIERR_NOTREADY) { - timeSetEvent(state->min_timer_period, state->min_timer_period * 5, midiMidiTimerHandler, (DWORD)state, TIME_ONESHOT); + timeSetEvent( + state->min_timer_period, + state->min_timer_period * 5, + (LPTIMECALLBACK) midiMidiTimerHandler, + (DWORD) state, + TIME_ONESHOT); return; } (void)state->thru_buffer.get(); @@ -359,7 +377,12 @@ if (midiOutShortMsg(state->hout, m->data) == MIDIERR_NOTREADY) { // try again later - timeSetEvent(state->min_timer_period, state->min_timer_period * 5, midiMidiTimerHandler, (DWORD)state, TIME_ONESHOT); + timeSetEvent( + state->min_timer_period, + state->min_timer_period * 5, + (LPTIMECALLBACK) midiMidiTimerHandler, + (DWORD) state, + TIME_ONESHOT); return; } } @@ -379,15 +402,16 @@ else if (delay > (long)state->max_timer_period) delay = (long)state->max_timer_period; - timeSetEvent((UINT)delay, state->min_timer_period, midiMidiTimerHandler, (DWORD)state, TIME_ONESHOT); + timeSetEvent( + (UINT) delay, + state->min_timer_period, + (LPTIMECALLBACK) midiMidiTimerHandler, + (DWORD) state, + TIME_ONESHOT); } - - - - // handle incoming midi data (MTC clock source) -void FAR PASCAL midiMtcInputHandler( +void CALLBACK midiMtcInputHandler( HMIDIIN hMidiIn, WORD wMsg, DWORD dwInstance, @@ -494,11 +518,13 @@ } } - - - // play output (MTC clock source) -void FAR PASCAL midiMtcTimerHandler(UINT wTimerId, UINT wMsg, DWORD dwUser, DWORD dw1, DWORD dw2) +void CALLBACK midiMtcTimerHandler( + UINT wTimerId, + UINT wMsg, + DWORD dwUser, + DWORD dw1, + DWORD dw2) { tWinPlayerState *state = (tWinPlayerState *)dwUser; if ( !state->playing ) @@ -512,7 +538,12 @@ midi_event *m = state->thru_buffer.peek(); if (midiOutShortMsg(state->hout, m->data) == MIDIERR_NOTREADY) { - timeSetEvent(state->min_timer_period, state->min_timer_period * 5, midiMtcTimerHandler, (DWORD)state, TIME_ONESHOT); + timeSetEvent( + state->min_timer_period, + state->min_timer_period * 5, + (LPTIMECALLBACK) midiMtcTimerHandler, + (DWORD) state, + TIME_ONESHOT); return; } (void)state->thru_buffer.get(); @@ -547,7 +578,12 @@ if (midiOutShortMsg(state->hout, m->data) == MIDIERR_NOTREADY) { // try again later - timeSetEvent(state->min_timer_period, state->min_timer_period * 5, midiMtcTimerHandler, (DWORD)state, TIME_ONESHOT); + timeSetEvent( + state->min_timer_period, + state->min_timer_period * 5, + (LPTIMECALLBACK) midiMtcTimerHandler, + (DWORD) state, + TIME_ONESHOT); return; } } @@ -565,11 +601,14 @@ delay = (long)state->min_timer_period; else if (delay > (long)state->max_timer_period) delay = (long)state->max_timer_period; - timeSetEvent((UINT)delay, state->min_timer_period, midiMtcTimerHandler, (DWORD)state, TIME_ONESHOT); + timeSetEvent( + (UINT) delay, + state->min_timer_period, + (LPTIMECALLBACK) midiMtcTimerHandler, + (DWORD) state, + TIME_ONESHOT); } - - void CALLBACK MidiOutProc( HMIDIOUT hmo, UINT wMsg, Modified: trunk/jazz/src/mswin/WindowsMidiInterface.h =================================================================== --- trunk/jazz/src/mswin/WindowsMidiInterface.h 2010-05-10 04:08:59 UTC (rev 781) +++ trunk/jazz/src/mswin/WindowsMidiInterface.h 2010-05-10 06:05:38 UTC (rev 782) @@ -3,7 +3,7 @@ // // Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved. // Modifications Copyright (C) 2004 Patrick Earl -// Modifications Copyright (C) 2008 Peter J. Stieber +// Modifications Copyright (C) 2008-2010 Peter J. Stieber // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -29,13 +29,12 @@ extern "C" { -// in win-3.x this has to be in a dll! -void FAR PASCAL midiIntInputHandler(HMIDIIN, WORD, DWORD, DWORD, DWORD); -void FAR PASCAL midiMidiInputHandler(HMIDIIN, WORD, DWORD, DWORD, DWORD); -void FAR PASCAL midiMtcInputHandler(HMIDIIN, WORD, DWORD, DWORD, DWORD); -void FAR PASCAL midiIntTimerHandler(UINT, UINT, DWORD, DWORD, DWORD); -void FAR PASCAL midiMidiTimerHandler(UINT, UINT, DWORD, DWORD, DWORD); -void FAR PASCAL midiMtcTimerHandler(UINT, UINT, DWORD, DWORD, DWORD); +void CALLBACK midiIntInputHandler(HMIDIIN, WORD, DWORD, DWORD, DWORD); +void CALLBACK midiMidiInputHandler(HMIDIIN, WORD, DWORD, DWORD, DWORD); +void CALLBACK midiMtcInputHandler(HMIDIIN, WORD, DWORD, DWORD, DWORD); +void CALLBACK midiIntTimerHandler(UINT, UINT, DWORD, DWORD, DWORD); +void CALLBACK midiMidiTimerHandler(UINT, UINT, DWORD, DWORD, DWORD); +void CALLBACK midiMtcTimerHandler(UINT, UINT, DWORD, DWORD, DWORD); tWinPlayerState FAR * FAR PASCAL NewWinPlayerState(); void FAR PASCAL DeleteWinPlayerState(tWinPlayerState FAR * state); Modified: trunk/jazz/src/mswin/WindowsPlayer.cpp =================================================================== --- trunk/jazz/src/mswin/WindowsPlayer.cpp 2010-05-10 04:08:59 UTC (rev 781) +++ trunk/jazz/src/mswin/WindowsPlayer.cpp 2010-05-10 06:05:38 UTC (rev 782) @@ -3,7 +3,7 @@ // // Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved. // Modifications Copyright (C) 2004 Patrick Earl -// Modifications Copyright (C) 2008 Peter J. Stieber +// Modifications Copyright (C) 2008-2010 Peter J. Stieber // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -669,7 +669,12 @@ mpState->virtual_clock = Clock - mpState->ticks_per_signal; mpState->signal_time = mpState->start_time - 5000L; // mpState->playing = TRUE; - timeSetEvent(mpState->min_timer_period, mpState->min_timer_period, midiMidiTimerHandler, (DWORD)mpState, TIME_ONESHOT); + timeSetEvent( + mpState->min_timer_period, + mpState->min_timer_period, + (LPTIMECALLBACK) midiMidiTimerHandler, + (DWORD) mpState, + TIME_ONESHOT); break; case CsMtc: if (!Continue) @@ -698,8 +703,8 @@ timeSetEvent( mpState->min_timer_period, mpState->min_timer_period, - midiMtcTimerHandler, - (DWORD)mpState, + (LPTIMECALLBACK) midiMtcTimerHandler, + (DWORD) mpState, TIME_ONESHOT); break; case CsInt: @@ -709,8 +714,8 @@ timeSetEvent( mpState->min_timer_period, mpState->min_timer_period, - midiIntTimerHandler, - (DWORD)mpState, + (LPTIMECALLBACK) midiIntTimerHandler, + (DWORD) mpState, TIME_ONESHOT); break; } Modified: trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj =================================================================== --- trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj 2010-05-10 04:08:59 UTC (rev 781) +++ trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj 2010-05-10 06:05:38 UTC (rev 782) @@ -117,7 +117,7 @@ /> </Configuration> <Configuration - Name="Release GUI VC9|Win32" + Name="Debug GUI VC9|x64" OutputDirectory="BuildDir\$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="BuildDir\$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" @@ -138,22 +138,20 @@ /> <Tool Name="VCMIDLTool" - PreprocessorDefinitions="NDEBUG" + PreprocessorDefinitions="_DEBUG" MkTypLibCompatible="true" SuppressStartupBanner="true" - TargetEnvironment="1" + TargetEnvironment="3" TypeLibraryName=".\$(OutDir)\JazzPlusPlus.tlb" HeaderFileName="" /> <Tool Name="VCCLCompilerTool" - Optimization="3" - InlineFunctionExpansion="1" - AdditionalIncludeDirectories=""$(EXT_PKGS)\wxMSW-2.8.11-VC9\lib\vc_lib\msw";"$(EXT_PKGS)\wxMSW-2.8.11-VC9\include";..\src;..\src\mswin" - PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;WINVER=0x0400;STRICT;NOMINMAX" - StringPooling="true" - RuntimeLibrary="2" - EnableFunctionLevelLinking="true" + Optimization="0" + AdditionalIncludeDirectories=""$(EXT_PKGS)\wxMSW-2.8.11-VC9\lib\vc_lib_x64\mswd";"$(EXT_PKGS)\wxMSW-2.8.11-VC9\include";..\src;..\src\mswin" + PreprocessorDefinitions="_DEBUG;_WINDOWS;WINVER=0x0501;STRICT;NOMINMAX;__WXDEBUG__;WXDEBUG=1" + BasicRuntimeChecks="3" + RuntimeLibrary="3" ForceConformanceInForLoopScope="true" RuntimeTypeInfo="true" UsePrecompiledHeader="0" @@ -172,7 +170,7 @@ /> <Tool Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" + PreprocessorDefinitions="_DEBUG" Culture="1033" AdditionalIncludeDirectories="$(EXT_PKGS)\wxMSW-2.8.11-VC9\include" /> @@ -181,17 +179,18 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="wxmsw28_xrc.lib wxbase28_xml.lib wxexpat.lib wxmsw28_core.lib wxmsw28_adv.lib wxmsw28_html.lib wxbase28.lib wxpng.lib wxzlib.lib wxjpeg.lib wxtiff.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib opengl32.lib glu32.lib" + AdditionalDependencies="wxmsw28d_xrc.lib wxbase28d_xml.lib wxexpatd.lib wxmsw28d_core.lib wxmsw28d_adv.lib wxmsw28d_html.lib wxbase28d.lib wxpngd.lib wxzlibd.lib wxjpegd.lib wxtiffd.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib opengl32.lib glu32.lib" OutputFile=".\$(OutDir)\JazzPlusPlus.exe" LinkIncremental="1" SuppressStartupBanner="true" - AdditionalLibraryDirectories=""$(EXT_PKGS)\wxMSW-2.8.11-VC9\lib\vc_lib"" + AdditionalLibraryDirectories=""$(EXT_PKGS)\wxMSW-2.8.11-VC9\lib\vc_lib_x64"" IgnoreDefaultLibraryNames="" + GenerateDebugInformation="true" ProgramDatabaseFile=".\$(OutDir)\JazzPlusPlus.pdb" SubSystem="2" RandomizedBaseAddress="1" DataExecutionPrevention="0" - TargetMachine="1" + TargetMachine="17" /> <Tool Name="VCALinkTool" @@ -216,7 +215,7 @@ /> </Configuration> <Configuration - Name="Debug GUI VC9|x64" + Name="Release GUI VC9|Win32" OutputDirectory="BuildDir\$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="BuildDir\$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" @@ -237,20 +236,22 @@ /> <Tool Name="VCMIDLTool" - PreprocessorDefinitions="_DEBUG" + PreprocessorDefinitions="NDEBUG" MkTypLibCompatible="true" SuppressStartupBanner="true" - TargetEnvironment="3" + TargetEnvironment="1" TypeLibraryName=".\$(OutDir)\JazzPlusPlus.tlb" HeaderFileName="" /> <Tool Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories=""$(EXT_PKGS)\wxMSW-2.8.11-VC9\lib\vc_lib_x64\mswd";"$(EXT_PKGS)\wxMSW-2.8.11-VC9\include";..\src;..\src\mswin" - PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;WINVER=0x0400;STRICT;NOMINMAX;__WXDEBUG__;WXDEBUG=1" - BasicRuntimeChecks="3" - RuntimeLibrary="3" + Optimization="3" + InlineFunctionExpansion="1" + AdditionalIncludeDirectories=""$(EXT_PKGS)\wxMSW-2.8.11-VC9\lib\vc_lib\msw";"$(EXT_PKGS)\wxMSW-2.8.11-VC9\include";..\src;..\src\mswin" + PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;WINVER=0x0400;STRICT;NOMINMAX" + StringPooling="true" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" ForceConformanceInForLoopScope="true" RuntimeTypeInfo="true" UsePrecompiledHeader="0" @@ -269,7 +270,7 @@ /> <Tool Name="VCResourceCompilerTool" - PreprocessorDefinitions="_DEBUG" + PreprocessorDefinitions="NDEBUG" Culture="1033" AdditionalIncludeDirectories="$(EXT_PKGS)\wxMSW-2.8.11-VC9\include" /> @@ -278,18 +279,17 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="wxmsw28d_xrc.lib wxbase28d_xml.lib wxexpatd.lib wxmsw28d_core.lib wxmsw28d_adv.lib wxmsw28d_html.lib wxbase28d.lib wxpngd.lib wxzlibd.lib wxjpegd.lib wxtiffd.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib opengl32.lib glu32.lib" + AdditionalDependencies="wxmsw28_xrc.lib wxbase28_xml.lib wxexpat.lib wxmsw28_core.lib wxmsw28_adv.lib wxmsw28_html.lib wxbase28.lib wxpng.lib wxzlib.lib wxjpeg.lib wxtiff.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib opengl32.lib glu32.lib" OutputFile=".\$(OutDir)\JazzPlusPlus.exe" LinkIncremental="1" SuppressStartupBanner="true" - AdditionalLibraryDirectories=""$(EXT_PKGS)\wxMSW-2.8.11-VC9\lib\vc_lib_x64"" + AdditionalLibraryDirectories=""$(EXT_PKGS)\wxMSW-2.8.11-VC9\lib\vc_lib"" IgnoreDefaultLibraryNames="" - GenerateDebugInformation="true" ProgramDatabaseFile=".\$(OutDir)\JazzPlusPlus.pdb" SubSystem="2" RandomizedBaseAddress="1" DataExecutionPrevention="0" - TargetMachine="17" + TargetMachine="1" /> <Tool Name="VCALinkTool" @@ -347,7 +347,7 @@ Optimization="3" InlineFunctionExpansion="1" AdditionalIncludeDirectories=""$(EXT_PKGS)\wxMSW-2.8.11-VC9\lib\vc_lib_x64\msw";"$(EXT_PKGS)\wxMSW-2.8.11-VC9\include";..\src;..\src\mswin" - PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;WINVER=0x0400;STRICT;NOMINMAX" + PreprocessorDefinitions="NDEBUG;_WINDOWS;WINVER=0x0501;STRICT;NOMINMAX" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -361,6 +361,7 @@ WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" + CallingConvention="2" CompileAs="0" DisableSpecificWarnings="4351" /> @@ -456,7 +457,7 @@ /> </FileConfiguration> <FileConfiguration - Name="Release GUI VC9|Win32" + Name="Debug GUI VC9|x64" ExcludedFromBuild="true" > <Tool @@ -464,7 +465,7 @@ /> </FileConfiguration> <FileConfiguration - Name="Debug GUI VC9|x64" + Name="Release GUI VC9|Win32" ExcludedFromBuild="true" > <Tool @@ -492,7 +493,7 @@ /> </FileConfiguration> <FileConfiguration - Name="Release GUI VC9|Win32" + Name="Debug GUI VC9|x64" ExcludedFromBuild="true" > <Tool @@ -500,7 +501,7 @@ /> </FileConfiguration> <FileConfiguration - Name="Debug GUI VC9|x64" + Name="Release GUI VC9|Win32" ExcludedFromBuild="true" > <Tool @@ -1095,22 +1096,22 @@ /> </FileConfiguration> <FileConfiguration - Name="Release GUI VC9|Win32" + Name="Debug GUI VC9|x64" > <Tool Name="VCCustomBuildTool" + Description="Performing Custom Help Build Step" CommandLine="echo cd "$(InputDir)"
cd "$(InputDir)"
echo $(EXT_PKGS)\wxMSW-2.8.11-VC9\bin\tex2rtf "$(InputName).tex" "$(InputName).html" -html -twice
$(EXT_PKGS)\wxMSW-2.8.11-VC9\bin\tex2rtf "$(InputName).tex" "$(InputName).html" -html -twice
" - Outputs="$(InputDir)$(InputName)_contents.html" + Outputs="$(InputDir)$(InputName)_contents.html;$(InputDir)$(InputName).hhc;$(InputDir)$(InputName).hhp;$(InputDir)$(InputName).hhk;$(InputDir)$(InputName).ref;$(InputDir)$(InputName).con;$(InputDir)$(InputName).htx" /> </FileConfiguration> <FileConfiguration - Name="Debug GUI VC9|x64" + Name="Release GUI VC9|Win32" > <Tool Name="VCCustomBuildTool" - Description="Performing Custom Help Build Step" CommandLine="echo cd "$(InputDir)"
cd "$(InputDir)"
echo $(EXT_PKGS)\wxMSW-2.8.11-VC9\bin\tex2rtf "$(InputName).tex" "$(InputName).html" -html -twice
$(EXT_PKGS)\wxMSW-2.8.11-VC9\bin\tex2rtf "$(InputName).tex" "$(InputName).html" -html -twice
" - Outputs="$(InputDir)$(InputName)_contents.html;$(InputDir)$(InputName).hhc;$(InputDir)$(InputName).hhp;$(InputDir)$(InputName).hhk;$(InputDir)$(InputName).ref;$(InputDir)$(InputName).con;$(InputDir)$(InputName).htx" + Outputs="$(InputDir)$(InputName)_contents.html" /> </FileConfiguration> <FileConfiguration This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |