aboutsummaryrefslogtreecommitdiff
path: root/src/adlmidi_private.hpp
diff options
context:
space:
mode:
authorVitaly Novichkov <admin@wohlnet.ru>2018-09-30 04:57:56 +0300
committerVitaly Novichkov <admin@wohlnet.ru>2018-09-30 04:57:56 +0300
commitc971992278519b29768be349dd3962bbd93dbb22 (patch)
treeee1ece6c4c28a7784c02cc2d9a8aaecc4808fd29 /src/adlmidi_private.hpp
parent4cf3a53ed36e56985753a9d0ec5ba564d6043460 (diff)
downloadlibADLMIDI-c971992278519b29768be349dd3962bbd93dbb22.tar.gz
libADLMIDI-c971992278519b29768be349dd3962bbd93dbb22.tar.bz2
libADLMIDI-c971992278519b29768be349dd3962bbd93dbb22.zip
Lock settings for CMF and IMF playing to don't destroy them
For now, all settings are in safe, except of custom bank that getting be dropped away by CMF file that does passing of own custom instruments.
Diffstat (limited to 'src/adlmidi_private.hpp')
-rw-r--r--src/adlmidi_private.hpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/adlmidi_private.hpp b/src/adlmidi_private.hpp
index 43986c5..c3d65c0 100644
--- a/src/adlmidi_private.hpp
+++ b/src/adlmidi_private.hpp
@@ -211,6 +211,7 @@ inline int32_t adl_cvtU32(int32_t x)
}
struct ADL_MIDIPlayer;
+class MIDIplay;
/**
* @brief OPL3 Chip management class
*/
@@ -218,7 +219,7 @@ class OPL3
{
friend class MIDIplay;
friend class AdlInstrumentTester;
- friend int adlRefreshNumCards(ADL_MIDIPlayer *device);
+ friend int adlCalculateFourOpChannels(MIDIplay *play, bool silent);
public:
enum
{
@@ -363,6 +364,12 @@ public:
OPL3();
/**
+ * @brief Checks are setup locked to be changed on the fly or not
+ * @return true when setup on the fly is locked
+ */
+ bool setupLocked();
+
+ /**
* @brief Choose one of embedded banks
* @param bank ID of the bank
*/
@@ -951,7 +958,7 @@ public:
int emulator;
bool runAtPcmRate;
unsigned int bankId;
- unsigned int numFourOps;
+ int numFourOps;
unsigned int numChips;
int deepTremoloMode;
int deepVibratoMode;
@@ -1485,9 +1492,10 @@ extern void adl_audioTickHandler(void *instance, uint32_t chipId, uint32_t rate)
/**
* @brief Automatically calculate and enable necessary count of 4-op channels on emulated chips
* @param device Library context
+ * @param silent Don't re-count channel categories
* @return Always 0
*/
-extern int adlRefreshNumCards(ADL_MIDIPlayer *device);
+extern int adlCalculateFourOpChannels(MIDIplay *play, bool silent = false);
/**
* @brief Check emulator availability