aboutsummaryrefslogtreecommitdiff
path: root/src/adlmidi_private.hpp
diff options
context:
space:
mode:
authorVitaly Novichkov <admin@wohlnet.ru>2018-06-24 23:11:47 +0300
committerVitaly Novichkov <admin@wohlnet.ru>2018-06-24 23:11:47 +0300
commit7e988eeb6b27c2001c401d7585e5030b48ee8bed (patch)
tree6d78cccbafb343f7dca67b687ca2157966d702e0 /src/adlmidi_private.hpp
parentf268fe2bc205f179a49a8001b4bc7e3288463283 (diff)
downloadlibADLMIDI-7e988eeb6b27c2001c401d7585e5030b48ee8bed.tar.gz
libADLMIDI-7e988eeb6b27c2001c401d7585e5030b48ee8bed.tar.bz2
libADLMIDI-7e988eeb6b27c2001c401d7585e5030b48ee8bed.zip
Also small refactoring
Diffstat (limited to 'src/adlmidi_private.hpp')
-rw-r--r--src/adlmidi_private.hpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/adlmidi_private.hpp b/src/adlmidi_private.hpp
index c4860a3..83eb151 100644
--- a/src/adlmidi_private.hpp
+++ b/src/adlmidi_private.hpp
@@ -276,6 +276,9 @@ public:
//! Run emulator at PCM rate if that possible. Reduces sounding accuracy, but decreases CPU usage on lower rates.
bool m_runAtPcmRate;
+ //! Just a padding. Reserved.
+ char ___padding2[3];
+
/**
* @brief Music playing mode
*/
@@ -291,9 +294,6 @@ public:
MODE_RSXX
} m_musicMode;
- //! Just a padding. Reserved.
- char ___padding2[3];
-
/**
* @brief Volume models enum
*/
@@ -389,14 +389,14 @@ public:
* @param volume Volume level (from 0 to 63)
* @param brightness CC74 Brightness level (from 0 to 127)
*/
- void touchNote(uint32_t c, uint8_t volume, uint8_t brightness = 127);
+ void touchNote(size_t c, uint8_t volume, uint8_t brightness = 127);
/**
* @brief Set the instrument into specified chip channel
* @param c Channel of chip (Emulated chip choosing by next formula: [c = ch + (chipId * 23)])
* @param instrument Instrument data to set into the chip channel
*/
- void setPatch(uint16_t c, const adldata &instrument);
+ void setPatch(size_t c, const adldata &instrument);
/**
* @brief Set panpot position
@@ -659,15 +659,15 @@ public:
struct activenoteiterator
{
- explicit activenoteiterator(NoteInfo *info = 0)
+ explicit activenoteiterator(NoteInfo *info = NULL)
: ptr(info) {}
activenoteiterator &operator++()
{
if(ptr->note == 127)
- ptr = 0;
+ ptr = NULL;
else
for(++ptr; ptr && !ptr->active;)
- ptr = (ptr->note == 127) ? 0 : (ptr + 1);
+ ptr = (ptr->note == 127) ? NULL : (ptr + 1);
return *this;
}
activenoteiterator operator++(int)
@@ -700,7 +700,7 @@ public:
{
assert(note < 128);
return activenoteiterator(
- activenotes[note].active ? &activenotes[note] : 0);
+ activenotes[note].active ? &activenotes[note] : NULL);
}
activenoteiterator activenotes_ensure_find(uint8_t note)