aboutsummaryrefslogtreecommitdiff
path: root/src/adlmidi_private.hpp
diff options
context:
space:
mode:
authorVitaly Novichkov <admin@wohlnet.ru>2018-04-16 23:22:49 +0300
committerVitaly Novichkov <admin@wohlnet.ru>2018-04-16 23:22:49 +0300
commit09bb3bc4d31ac925a13f51f8fc4944330da158bb (patch)
treec087018b7fcd9eb18306a4cc52732f690a1d5861 /src/adlmidi_private.hpp
parentf87aa4d29c638d77501ec9474d213262238b9d1d (diff)
downloadlibADLMIDI-09bb3bc4d31ac925a13f51f8fc4944330da158bb.tar.gz
libADLMIDI-09bb3bc4d31ac925a13f51f8fc4944330da158bb.tar.bz2
libADLMIDI-09bb3bc4d31ac925a13f51f8fc4944330da158bb.zip
`NoteInfo` and it's parent `MIDIchannel` no more contains dynamic stuff
Everything now are a simple types and fixed arrays.
Diffstat (limited to 'src/adlmidi_private.hpp')
-rw-r--r--src/adlmidi_private.hpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/adlmidi_private.hpp b/src/adlmidi_private.hpp
index 08c22c0..6391f2a 100644
--- a/src/adlmidi_private.hpp
+++ b/src/adlmidi_private.hpp
@@ -618,8 +618,14 @@ public:
size_t midiins;
// Index to physical adlib data structure, adlins[]
size_t insmeta;
+ enum
+ {
+ MaxNumPhysChans = 2
+ };
struct Phys
{
+ //! Destinition chip channel
+ uint16_t chip_chan;
//! ins, inde to adl[]
size_t insId;
//! Is this voice must be detunable?
@@ -634,9 +640,10 @@ public:
return !operator==(oth);
}
};
- typedef std::map<uint16_t, Phys> PhysMap;
- // List of OPL3 channels it is currently occupying.
- std::map<uint16_t /*adlchn*/, Phys> phys;
+ //! List of OPL3 channels it is currently occupying.
+ Phys chip_channels[MaxNumPhysChans];
+ //! Count of used channels.
+ size_t chip_channels_max;
};
char ____padding2[5];
NoteInfo activenotes[128];