From 77a2101c06e6225ad1f72efc0add1c202441a82c Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 24 Mar 2018 21:30:59 +0100 Subject: [PATCH] - re-applied my changes to ADLMIDI code: * disable sstream. No point pulling in such a large piece of code for two error messages. * disable MSVC warnings which get emitted by the code. --- src/sound/adlmidi/adlmidi.cpp | 4 ++-- src/sound/adlmidi/adlmidi_private.hpp | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/sound/adlmidi/adlmidi.cpp b/src/sound/adlmidi/adlmidi.cpp index 787c729c4..1adf399cc 100644 --- a/src/sound/adlmidi/adlmidi.cpp +++ b/src/sound/adlmidi/adlmidi.cpp @@ -107,7 +107,7 @@ ADLMIDI_EXPORT int adl_setBank(ADL_MIDIPlayer *device, int bank) MIDIplay *play = reinterpret_cast(device->adl_midiPlayer); if(static_cast(bankno) >= NumBanks) { - #ifndef __WATCOMC__ + #if 0 //ndef __WATCOMC__ std::stringstream s; s << "bank number may only be 0.." << (NumBanks - 1) << ".\n"; play->setErrorString(s.str()); @@ -142,7 +142,7 @@ ADLMIDI_EXPORT int adl_setNumFourOpsChn(ADL_MIDIPlayer *device, int ops4) MIDIplay *play = reinterpret_cast(device->adl_midiPlayer); if((unsigned int)ops4 > 6 * play->m_setup.NumCards) { - #ifndef __WATCOMC__ + #if 0 //ndef __WATCOMC__ std::stringstream s; s << "number of four-op channels may only be 0.." << (6 * (play->m_setup.NumCards)) << " when " << play->m_setup.NumCards << " OPL3 cards are used.\n"; play->setErrorString(s.str()); diff --git a/src/sound/adlmidi/adlmidi_private.hpp b/src/sound/adlmidi/adlmidi_private.hpp index 8b2bf19da..8f0c6579f 100644 --- a/src/sound/adlmidi/adlmidi_private.hpp +++ b/src/sound/adlmidi/adlmidi_private.hpp @@ -75,7 +75,6 @@ typedef int32_t ssize_t; #include #include #include -#include //#ifdef __WATCOMC__ //#include //TODO: Implemnet a workaround for OpenWatcom to fix a crash while using those containers //#include @@ -105,6 +104,13 @@ typedef int32_t ssize_t; #include #include +#ifdef _MSC_VER +#pragma warning(disable:4319) +#pragma warning(disable:4267) +#pragma warning(disable:4244) +#pragma warning(disable:4146) +#endif + #include "fraction.hpp" #ifndef ADLMIDI_HW_OPL