aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVitaly Novichkov <admin@wohlnet.ru>2018-04-20 00:28:09 +0300
committerVitaly Novichkov <admin@wohlnet.ru>2018-04-20 00:28:09 +0300
commitcfacf50fc1422d88b169d02cfaf48dd8529e5a76 (patch)
treec203374b80142888f5e96a5be70505f0313e17ad /src
parent558cd429dbef266d94ef789efa6514fc9d531b95 (diff)
downloadlibADLMIDI-cfacf50fc1422d88b169d02cfaf48dd8529e5a76.tar.gz
libADLMIDI-cfacf50fc1422d88b169d02cfaf48dd8529e5a76.tar.bz2
libADLMIDI-cfacf50fc1422d88b169d02cfaf48dd8529e5a76.zip
Put some another functions into "ADLMIDI_DISABLE_MIDI_SEQUENCER" zone
Those functions are dead out of disabled MIDI Sequencer code, so, there are must NOT appear in the library when MIDI Sequencer is disabled.
Diffstat (limited to 'src')
-rw-r--r--src/adlmidi_load.cpp3
-rw-r--r--src/adlmidi_midiplay.cpp2
-rw-r--r--src/adlmidi_private.hpp15
3 files changed, 19 insertions, 1 deletions
diff --git a/src/adlmidi_load.cpp b/src/adlmidi_load.cpp
index 77e6f69..f87b547 100644
--- a/src/adlmidi_load.cpp
+++ b/src/adlmidi_load.cpp
@@ -32,6 +32,7 @@
# endif//XMI
#endif //ADLMIDI_DISABLE_MIDI_SEQUENCER
+#ifndef ADLMIDI_DISABLE_MIDI_SEQUENCER
uint64_t MIDIplay::ReadBEint(const void *buffer, size_t nbytes)
{
uint64_t result = 0;
@@ -54,6 +55,8 @@ uint64_t MIDIplay::ReadLEint(const void *buffer, size_t nbytes)
return result;
}
+#endif
+
bool MIDIplay::LoadBank(const std::string &filename)
{
fileReader file;
diff --git a/src/adlmidi_midiplay.cpp b/src/adlmidi_midiplay.cpp
index d984fe1..702ebea 100644
--- a/src/adlmidi_midiplay.cpp
+++ b/src/adlmidi_midiplay.cpp
@@ -760,6 +760,7 @@ void MIDIplay::applySetup()
ch.resize(opl.NumChannels);
}
+#ifndef ADLMIDI_DISABLE_MIDI_SEQUENCER
uint64_t MIDIplay::ReadVarLen(uint8_t **ptr)
{
uint64_t result = 0;
@@ -792,7 +793,6 @@ uint64_t MIDIplay::ReadVarLenEx(uint8_t **ptr, uint8_t *end, bool &ok)
return result;
}
-#ifndef ADLMIDI_DISABLE_MIDI_SEQUENCER
double MIDIplay::Tick(double s, double granularity)
{
s *= tempoMultiplier;
diff --git a/src/adlmidi_private.hpp b/src/adlmidi_private.hpp
index f6eea5a..3532126 100644
--- a/src/adlmidi_private.hpp
+++ b/src/adlmidi_private.hpp
@@ -1167,7 +1167,21 @@ public:
Setup m_setup;
+#ifndef ADLMIDI_DISABLE_MIDI_SEQUENCER
+ /**
+ * @brief Utility function to read Big-Endian integer from raw binary data
+ * @param buffer Pointer to raw binary buffer
+ * @param nbytes Count of bytes to parse integer
+ * @return Extracted unsigned integer
+ */
static uint64_t ReadBEint(const void *buffer, size_t nbytes);
+
+ /**
+ * @brief Utility function to read Little-Endian integer from raw binary data
+ * @param buffer Pointer to raw binary buffer
+ * @param nbytes Count of bytes to parse integer
+ * @return Extracted unsigned integer
+ */
static uint64_t ReadLEint(const void *buffer, size_t nbytes);
/**
@@ -1184,6 +1198,7 @@ public:
* @return Unsigned integer that conains parsed variable-length value
*/
uint64_t ReadVarLenEx(uint8_t **ptr, uint8_t *end, bool &ok);
+#endif
bool LoadBank(const std::string &filename);
bool LoadBank(const void *data, size_t size);