diff options
author | Vitaly Novichkov <admin@wohlnet.ru> | 2018-09-30 20:43:22 +0300 |
---|---|---|
committer | Vitaly Novichkov <admin@wohlnet.ru> | 2018-09-30 20:43:22 +0300 |
commit | 299f4614cf77862c3f20b6b95c56c91102d1e27a (patch) | |
tree | 82e77298d966a3295c88479ac3ae1abc5a1f84f8 /src/adlmidi_private.hpp | |
parent | 204c483dee24a3053ba220e0cafb6e065a215813 (diff) | |
parent | 77e8b86be524edf42a7070e2b7a1f6f67d7cfaa8 (diff) | |
download | libADLMIDI-299f4614cf77862c3f20b6b95c56c91102d1e27a.tar.gz libADLMIDI-299f4614cf77862c3f20b6b95c56c91102d1e27a.tar.bz2 libADLMIDI-299f4614cf77862c3f20b6b95c56c91102d1e27a.zip |
Merge branch 'master' into stable
Diffstat (limited to 'src/adlmidi_private.hpp')
-rw-r--r-- | src/adlmidi_private.hpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/adlmidi_private.hpp b/src/adlmidi_private.hpp index 43986c5..59ba555 100644 --- a/src/adlmidi_private.hpp +++ b/src/adlmidi_private.hpp @@ -161,6 +161,14 @@ typedef BW_MidiSequencer MidiSequencer; #define OPL_PANNING_RIGHT 0x20 #define OPL_PANNING_BOTH 0x30 +#ifdef ADLMIDI_HW_OPL +#define ADL_MAX_CHIPS 1 +#define ADL_MAX_CHIPS_STR "1" //Why not just "#MaxCards" ? Watcom fails to pass this with "syntax error" :-P +#else +#define ADL_MAX_CHIPS 100 +#define ADL_MAX_CHIPS_STR "100" +#endif + extern std::string ADLMIDI_ErrorString; /* @@ -211,6 +219,7 @@ inline int32_t adl_cvtU32(int32_t x) } struct ADL_MIDIPlayer; +class MIDIplay; /** * @brief OPL3 Chip management class */ @@ -218,7 +227,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 +372,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 +966,7 @@ public: int emulator; bool runAtPcmRate; unsigned int bankId; - unsigned int numFourOps; + int numFourOps; unsigned int numChips; int deepTremoloMode; int deepVibratoMode; @@ -1485,9 +1500,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 |