aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/adlmidi.cpp24
-rw-r--r--src/adlmidi_opl3.cpp18
-rw-r--r--src/adlmidi_private.hpp5
3 files changed, 47 insertions, 0 deletions
diff --git a/src/adlmidi.cpp b/src/adlmidi.cpp
index 26a21e4..2d7b672 100644
--- a/src/adlmidi.cpp
+++ b/src/adlmidi.cpp
@@ -403,6 +403,13 @@ ADLMIDI_EXPORT void adl_setHVibrato(ADL_MIDIPlayer *device, int hvibro)
play->m_synth.commitDeepFlags();
}
+ADLMIDI_EXPORT int adl_getHVibrato(struct ADL_MIDIPlayer *device)
+{
+ if(!device) return -1;
+ MidiPlayer *play = GET_MIDI_PLAYER(device);
+ return play->m_synth.m_deepVibratoMode;
+}
+
ADLMIDI_EXPORT void adl_setHTremolo(ADL_MIDIPlayer *device, int htremo)
{
if(!device) return;
@@ -414,6 +421,13 @@ ADLMIDI_EXPORT void adl_setHTremolo(ADL_MIDIPlayer *device, int htremo)
play->m_synth.commitDeepFlags();
}
+ADLMIDI_EXPORT int adl_getHTremolo(struct ADL_MIDIPlayer *device)
+{
+ if(!device) return -1;
+ MidiPlayer *play = GET_MIDI_PLAYER(device);
+ return play->m_synth.m_deepTremoloMode;
+}
+
ADLMIDI_EXPORT void adl_setScaleModulators(ADL_MIDIPlayer *device, int smod)
{
if(!device)
@@ -490,6 +504,16 @@ ADLMIDI_EXPORT void adl_setVolumeRangeModel(struct ADL_MIDIPlayer *device, int v
play->m_synth.setVolumeScaleModel(static_cast<ADLMIDI_VolumeModels>(volumeModel));
}
+ADLMIDI_EXPORT int adl_getVolumeRangeModel(struct ADL_MIDIPlayer *device)
+{
+ if(!device)
+ return -1;
+ MidiPlayer *play = GET_MIDI_PLAYER(device);
+ if(!play)
+ return -1;
+ return play->m_synth.getVolumeScaleModel();
+}
+
ADLMIDI_EXPORT int adl_openBankFile(struct ADL_MIDIPlayer *device, const char *filePath)
{
if(device && device->adl_midiPlayer)
diff --git a/src/adlmidi_opl3.cpp b/src/adlmidi_opl3.cpp
index aff879a..e486dd6 100644
--- a/src/adlmidi_opl3.cpp
+++ b/src/adlmidi_opl3.cpp
@@ -631,6 +631,24 @@ void OPL3::setVolumeScaleModel(ADLMIDI_VolumeModels volumeModel)
}
}
+ADLMIDI_VolumeModels OPL3::getVolumeScaleModel()
+{
+ switch(m_volumeScale)
+ {
+ default:
+ case OPL3::VOLUME_Generic:
+ return ADLMIDI_VolumeModel_Generic;
+ case OPL3::VOLUME_NATIVE:
+ return ADLMIDI_VolumeModel_NativeOPL3;
+ case OPL3::VOLUME_DMX:
+ return ADLMIDI_VolumeModel_DMX;
+ case OPL3::VOLUME_APOGEE:
+ return ADLMIDI_VolumeModel_APOGEE;
+ case OPL3::VOLUME_9X:
+ return ADLMIDI_VolumeModel_9X;
+ }
+}
+
#ifndef ADLMIDI_HW_OPL
void OPL3::clearChips()
{
diff --git a/src/adlmidi_private.hpp b/src/adlmidi_private.hpp
index 2fc12a4..d179d72 100644
--- a/src/adlmidi_private.hpp
+++ b/src/adlmidi_private.hpp
@@ -448,6 +448,11 @@ public:
*/
void setVolumeScaleModel(ADLMIDI_VolumeModels volumeModel);
+ /**
+ * @brief Get the volume scaling model
+ */
+ ADLMIDI_VolumeModels getVolumeScaleModel();
+
#ifndef ADLMIDI_HW_OPL
/**
* @brief Clean up all running emulated chip instances