aboutsummaryrefslogtreecommitdiff
path: root/src/adlmidi.cpp
diff options
context:
space:
mode:
authorJP Cimalando <jpcima@users.noreply.github.com>2018-08-30 07:49:14 +0200
committerJP Cimalando <jpcima@users.noreply.github.com>2018-08-30 07:49:14 +0200
commit0d9bc6794e57526af28ce45a57d91ec78e39b354 (patch)
tree9be1e4ffe01796c20f1708358a269674886727d5 /src/adlmidi.cpp
parent49614671cd7486645b01b63c54298352ee6b5eff (diff)
downloadlibADLMIDI-0d9bc6794e57526af28ce45a57d91ec78e39b354.tar.gz
libADLMIDI-0d9bc6794e57526af28ce45a57d91ec78e39b354.tar.bz2
libADLMIDI-0d9bc6794e57526af28ce45a57d91ec78e39b354.zip
API to return 4op channels to the original count
Diffstat (limited to 'src/adlmidi.cpp')
-rw-r--r--src/adlmidi.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/adlmidi.cpp b/src/adlmidi.cpp
index c7c5cf3..26a21e4 100644
--- a/src/adlmidi.cpp
+++ b/src/adlmidi.cpp
@@ -351,6 +351,10 @@ ADLMIDI_EXPORT int adl_setNumFourOpsChn(ADL_MIDIPlayer *device, int ops4)
{
if(!device)
return -1;
+
+ if(ops4 == -1)
+ return adlRefreshNumCards(device);
+
MidiPlayer *play = GET_MIDI_PLAYER(device);
if((unsigned int)ops4 > 6 * play->m_setup.numChips)
{
@@ -364,7 +368,7 @@ ADLMIDI_EXPORT int adl_setNumFourOpsChn(ADL_MIDIPlayer *device, int ops4)
play->m_synth.m_numFourOps = play->m_setup.numFourOps;
play->m_synth.updateChannelCategories();
- return 0; //adlRefreshNumCards(device);
+ return 0;
}
ADLMIDI_EXPORT int adl_getNumFourOpsChn(struct ADL_MIDIPlayer *device)