diff options
author | JP Cimalando <jpcima@users.noreply.github.com> | 2018-06-19 16:12:27 +0200 |
---|---|---|
committer | JP Cimalando <jpcima@users.noreply.github.com> | 2018-06-19 16:25:36 +0200 |
commit | 3013fbb93b06e8d30b6b54c324340d6dccad7f3b (patch) | |
tree | 8ffbd8d896849ffd418bccf5d429f74e7f63c6d2 /src/adlmidi_private.hpp | |
parent | 70c83caace9911dc5d8b80c1653c96b073f88e4a (diff) | |
download | libADLMIDI-3013fbb93b06e8d30b6b54c324340d6dccad7f3b.tar.gz libADLMIDI-3013fbb93b06e8d30b6b54c324340d6dccad7f3b.tar.bz2 libADLMIDI-3013fbb93b06e8d30b6b54c324340d6dccad7f3b.zip |
get chip base on level with OPNMIDI
Diffstat (limited to 'src/adlmidi_private.hpp')
-rw-r--r-- | src/adlmidi_private.hpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/adlmidi_private.hpp b/src/adlmidi_private.hpp index 2499bad..0614c7b 100644 --- a/src/adlmidi_private.hpp +++ b/src/adlmidi_private.hpp @@ -245,6 +245,8 @@ public: bool AdlPercussionMode; //! Carriers-only are scaled by default by volume level. This flag will tell to scale modulators too. bool ScaleModulators; + //! Run emulator at PCM rate if that possible. Reduces sounding accuracy, but decreases CPU usage on lower rates. + bool runAtPcmRate; // ! Required to play CMF files. Can be turned on by using of "CMF" volume model //bool LogarithmicVolumes; //[REPLACED WITH "m_volumeScale == VOLUME_NATIVE", DEPRECATED!!!] // ! Required to play EA-MUS files [REPLACED WITH "m_musicMode", DEPRECATED!!!] @@ -294,7 +296,7 @@ public: #ifndef ADLMIDI_HW_OPL void ClearChips(); #endif - void Reset(int emulator, unsigned long PCM_RATE); + void Reset(int emulator, unsigned long PCM_RATE, void *audioTickHandler); }; @@ -933,6 +935,7 @@ public: struct Setup { int emulator; + bool runAtPcmRate; unsigned int AdlBank; unsigned int NumFourOps; unsigned int NumCards; @@ -984,6 +987,9 @@ private: //! Counter of arpeggio processing size_t m_arpeggioCounter; + //! Audio tick counter + uint32_t m_audioTickCounter; + #ifndef ADLMIDI_DISABLE_MIDI_SEQUENCER std::vector<std::vector<uint8_t> > TrackData; @@ -1181,6 +1187,9 @@ public: void realTime_panic(); + // Audio rate tick handler + void AudioTick(uint32_t chipId, uint32_t rate); + private: enum { @@ -1249,6 +1258,11 @@ struct FourChars }; */ +#if !defined(ADLMIDI_AUDIO_TICK_HANDLER) +#error The audio tick handler must be enabled! +#endif + +extern void adl_audioTickHandler(void *instance, uint32_t chipId, uint32_t rate); extern int adlRefreshNumCards(ADL_MIDIPlayer *device); |