aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWohlstand <admin@wohlnet.ru>2025-03-29 00:44:52 +0300
committerWohlstand <admin@wohlnet.ru>2025-03-29 00:44:52 +0300
commite92a4d7285197ab2868aa36f975d73ceee915bea (patch)
treeb5e3af6e6c58145a62ec6394a40e9e65d26a5fcf /include
parent7afda0483ab0af9db624052321b42c3d2a245e75 (diff)
downloadlibADLMIDI-e92a4d7285197ab2868aa36f975d73ceee915bea.tar.gz
libADLMIDI-e92a4d7285197ab2868aa36f975d73ceee915bea.tar.bz2
libADLMIDI-e92a4d7285197ab2868aa36f975d73ceee915bea.zip
Refactored DOS support
Diffstat (limited to 'include')
-rw-r--r--include/adlmidi.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/adlmidi.h b/include/adlmidi.h
index 13e39d9..27239e0 100644
--- a/include/adlmidi.h
+++ b/include/adlmidi.h
@@ -769,6 +769,27 @@ extern ADLMIDI_DECLSPEC int adl_switchSerialHW(struct ADL_MIDIPlayer *device,
unsigned baud,
unsigned protocol);
+
+/**
+ * \brief The list of possible chip types for DOS hardware interface
+ */
+enum ADL_DOS_ChipType
+{
+ ADLMIDI_DOS_ChipAuto = 0,
+ ADLMIDI_DOS_ChipOPL2,
+ ADLMIDI_DOS_ChipOPL3
+};
+
+/**
+ * @brief Specify the chip type and the base address before initialization.
+ * This function has no effect if library didn't built for DOS with hardware OPL mode
+ * Important: Run this BEFORE creating the instance of the library.
+ * @param chipType
+ * @param baseAddress
+ * @return 0 on success, <0 when any error has occurred
+ */
+extern ADLMIDI_DECLSPEC int adl_switchDOSHW(int chipType, ADL_UInt16 baseAddress);
+
/**
* @brief Set 4-bit device identifier. Used by the SysEx processor.
* @param device Instance of the library