diff options
author | Vitaly Novichkov <admin@wohlnet.ru> | 2018-09-30 20:43:22 +0300 |
---|---|---|
committer | Vitaly Novichkov <admin@wohlnet.ru> | 2018-09-30 20:43:22 +0300 |
commit | 299f4614cf77862c3f20b6b95c56c91102d1e27a (patch) | |
tree | 82e77298d966a3295c88479ac3ae1abc5a1f84f8 /src/adlmidi_load.cpp | |
parent | 204c483dee24a3053ba220e0cafb6e065a215813 (diff) | |
parent | 77e8b86be524edf42a7070e2b7a1f6f67d7cfaa8 (diff) | |
download | libADLMIDI-299f4614cf77862c3f20b6b95c56c91102d1e27a.tar.gz libADLMIDI-299f4614cf77862c3f20b6b95c56c91102d1e27a.tar.bz2 libADLMIDI-299f4614cf77862c3f20b6b95c56c91102d1e27a.zip |
Merge branch 'master' into stable
Diffstat (limited to 'src/adlmidi_load.cpp')
-rw-r--r-- | src/adlmidi_load.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/adlmidi_load.cpp b/src/adlmidi_load.cpp index e86f23e..07ad875 100644 --- a/src/adlmidi_load.cpp +++ b/src/adlmidi_load.cpp @@ -1,4 +1,4 @@ -/* +/* * libADLMIDI is a free MIDI to WAV conversion library with OPL3 emulation * * Original ADLMIDI code: Copyright (c) 2010-2014 Joel Yliluoma <bisqwit@iki.fi> @@ -214,20 +214,36 @@ bool MIDIplay::LoadMIDI_post() m_synth.m_rhythmMode = true; m_synth.m_musicMode = OPL3::MODE_CMF; m_synth.m_volumeScale = OPL3::VOLUME_NATIVE; + + m_synth.m_numChips = 1; + m_synth.m_numFourOps = 0; } else if(format == MidiSequencer::Format_RSXX) { //opl.CartoonersVolumes = true; m_synth.m_musicMode = OPL3::MODE_RSXX; m_synth.m_volumeScale = OPL3::VOLUME_NATIVE; + + m_synth.m_numChips = 1; + m_synth.m_numFourOps = 0; } else if(format == MidiSequencer::Format_IMF) { //std::fprintf(stderr, "Done reading IMF file\n"); m_synth.m_numFourOps = 0; //Don't use 4-operator channels for IMF playing! m_synth.m_musicMode = OPL3::MODE_IMF; + + m_synth.m_numChips = 1; + m_synth.m_numFourOps = 0; + } + else + { + m_synth.m_numChips = m_setup.numChips; + if(m_setup.numFourOps < 0) + adlCalculateFourOpChannels(this, true); } + m_setup.tick_skip_samples_delay = 0; m_synth.reset(m_setup.emulator, m_setup.PCM_RATE, this); // Reset OPL3 chip //opl.Reset(); // ...twice (just in case someone misprogrammed OPL3 previously) m_chipChannels.clear(); |