aboutsummaryrefslogtreecommitdiff
path: root/src/adlmidi_private.hpp
diff options
context:
space:
mode:
authorWohlstand <admin@wohlnet.ru>2017-10-18 02:22:01 +0300
committerWohlstand <admin@wohlnet.ru>2017-10-18 02:22:01 +0300
commit380d08e1a234efb17cf15a6b6c2d00c52e4fc648 (patch)
tree563567a5615623db8e9e3acdffa3be8f44cb84ba /src/adlmidi_private.hpp
parentd7b33b8d4fc3efe90d8e388d451966fa4baefba6 (diff)
downloadlibADLMIDI-380d08e1a234efb17cf15a6b6c2d00c52e4fc648.tar.gz
libADLMIDI-380d08e1a234efb17cf15a6b6c2d00c52e4fc648.tar.bz2
libADLMIDI-380d08e1a234efb17cf15a6b6c2d00c52e4fc648.zip
Smooth finalizing, rewinding, and a bit more crash safety
* Smooth finalizing of song when loop is disabled (old ugly hack has been removed :wink:) * Added an ability to reset song position to begin (very helpful when song reaches the end) * Avoided possible crashes on attempt to fetch sample data without opening of MIDI file
Diffstat (limited to 'src/adlmidi_private.hpp')
-rw-r--r--src/adlmidi_private.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/adlmidi_private.hpp b/src/adlmidi_private.hpp
index 7bb5774..e039f85 100644
--- a/src/adlmidi_private.hpp
+++ b/src/adlmidi_private.hpp
@@ -75,6 +75,8 @@
#include "adldata.hh"
#include "adlmidi.h"
+#define ADL_UNUSED(x) (void)x
+
extern std::string ADLMIDI_ErrorString;
/*
@@ -299,6 +301,7 @@ public:
std::string musTitle;
fraction<uint64_t> InvDeltaTicks, Tempo;
bool trackStart,
+ atEnd,
loopStart,
loopEnd,
loopStart_passed /*Tells that "loopStart" already passed*/,
@@ -470,6 +473,8 @@ public:
*/
double Tick(double s, double granularity);
+ void rewind();
+
/* RealTime event triggers */
void realTime_ResetState();
@@ -505,7 +510,7 @@ private:
MIDIchannel::activenoteiterator i,
unsigned props_mask,
int32_t select_adlchn = -1);
- void ProcessEvents();
+ bool ProcessEvents();
void HandleEvent(size_t tk);
// Determine how good a candidate this adlchannel