diff options
author | Wohlstand <admin@wohlnet.ru> | 2024-05-11 00:00:33 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2024-05-11 00:00:33 +0300 |
commit | 63141d11132fedfd63860fc42e16de1f48312e01 (patch) | |
tree | 1f264994af81ece8bb1d78c5313d7818c64ff883 /src/adlmidi_opl3.hpp | |
parent | 759de2665f6cfecffc074c48b5caa56b7a1d1deb (diff) | |
download | libADLMIDI-63141d11132fedfd63860fc42e16de1f48312e01.tar.gz libADLMIDI-63141d11132fedfd63860fc42e16de1f48312e01.tar.bz2 libADLMIDI-63141d11132fedfd63860fc42e16de1f48312e01.zip |
Initial implementation of Serial support
+ refactor of the MIDI play, making separated loop functions instead the mess of everything in one single loop function.
Diffstat (limited to 'src/adlmidi_opl3.hpp')
-rw-r--r-- | src/adlmidi_opl3.hpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/adlmidi_opl3.hpp b/src/adlmidi_opl3.hpp index ca35157..abdc20d 100644 --- a/src/adlmidi_opl3.hpp +++ b/src/adlmidi_opl3.hpp @@ -74,6 +74,13 @@ private: //! Cached BD registry value (flags register: DeepTremolo, DeepVibrato, and RhythmMode) std::vector<uint32_t> m_regBD; +#ifdef ADLMIDI_ENABLE_HW_SERIAL + bool m_serial; + std::string m_serialName; + unsigned m_serialBaud; + unsigned m_serialProtocol; +#endif + public: /** * @brief MIDI bank entry @@ -321,12 +328,12 @@ public: */ ADLMIDI_VolumeModels getVolumeScaleModel(); - #ifndef ADLMIDI_HW_OPL +#ifndef ADLMIDI_HW_OPL /** * @brief Clean up all running emulated chip instances */ void clearChips(); - #endif +#endif /** * @brief Reset chip properties and initialize them @@ -335,6 +342,18 @@ public: * @param audioTickHandler PCM-accurate clock hook */ void reset(int emulator, unsigned long PCM_RATE, void *audioTickHandler); + + void initChip(size_t chip); + +#ifdef ADLMIDI_ENABLE_HW_SERIAL + /** + * @brief Reset chip properties for hardware use + * @param emulator + * @param PCM_RATE + * @param audioTickHandler + */ + void resetSerial(const std::string &serialName, unsigned int baud, unsigned int protocol); +#endif }; /** |