From b043032a89f38e2b3191a65dab9ae4e8202d48f3 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Sun, 12 Nov 2017 07:32:11 +0300 Subject: libADLMIDI now is buildable under OpenWatcom except of some workarounds - Need a different way to create a static library, otherwise it don't wanna be built. - Needed a different custom STL containers (std::vector and std::set) implementation that will work and will don't glitch with a crashes --- src/adlmidi_private.hpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/adlmidi_private.hpp') diff --git a/src/adlmidi_private.hpp b/src/adlmidi_private.hpp index c860a88..408fede 100644 --- a/src/adlmidi_private.hpp +++ b/src/adlmidi_private.hpp @@ -53,9 +53,10 @@ typedef __int32 ssize_t; # include #endif -#ifdef __DJGPP__ +#if defined(__DJGPP__) || (defined(__WATCOMC__) && (defined(__DOS__) || defined(__DOS4G__) || defined(__DOS4GNZ__))) #define ADLMIDI_HW_OPL #include +#ifdef __DJGPP__ #include #include #include @@ -63,6 +64,8 @@ typedef __int32 ssize_t; #include #endif +#endif + #include #include #include @@ -72,6 +75,7 @@ typedef __int32 ssize_t; #include #include #include +#include #include #include // vector #include // deque @@ -89,11 +93,13 @@ typedef __int32 ssize_t; #include "fraction.hpp" +#ifndef ADLMIDI_HW_OPL #ifdef ADLMIDI_USE_DOSBOX_OPL #include "dbopl.h" #else #include "nukedopl3.h" #endif +#endif #include "adldata.hh" #include "adlmidi.h" //Main API @@ -529,7 +535,7 @@ public: users_t users; // If the channel is keyoff'd - long koff_time_until_neglible; + int64_t koff_time_until_neglible; // For channel allocation: AdlChannel(): users(), koff_time_until_neglible(0) { } void AddAge(int64_t ms); @@ -695,7 +701,7 @@ public: { std::string label; double pos_time; - unsigned long pos_ticks; + uint64_t pos_ticks; }; std::vector Ch; @@ -893,7 +899,7 @@ private: // Determine how good a candidate this adlchannel // would be for playing a note from this instrument. - long CalculateAdlChannelGoodness(unsigned c, const MIDIchannel::NoteInfo::Phys &ins, uint16_t /*MidCh*/) const; + long CalculateAdlChannelGoodness(unsigned c, const MIDIchannel::NoteInfo::Phys &ins, uint16_t /*MidCh*/); // A new note will be played on this channel using this instrument. // Kill existing notes on this channel (or don't, if we do arpeggio) -- cgit v1.2.3