diff options
author | Wohlstand <admin@wohlnet.ru> | 2018-10-01 12:38:32 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2018-10-01 12:38:32 +0300 |
commit | 75daca694c01156dc447993060b1b285f3db3056 (patch) | |
tree | 0e70115d0e506d64b1e5d6abab054019c7e78bbb /src/adlmidi_load.cpp | |
parent | d9e1a993d5b8cbeae4f2db5bce81147c3dc42fa7 (diff) | |
parent | 314cde9fccb603bbd2b36b58dc9b3020c160ac4b (diff) | |
download | libADLMIDI-75daca694c01156dc447993060b1b285f3db3056.tar.gz libADLMIDI-75daca694c01156dc447993060b1b285f3db3056.tar.bz2 libADLMIDI-75daca694c01156dc447993060b1b285f3db3056.zip |
Merge branch 'master' of github.com:Wohlstand/libADLMIDI into stable
Diffstat (limited to 'src/adlmidi_load.cpp')
-rw-r--r-- | src/adlmidi_load.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/adlmidi_load.cpp b/src/adlmidi_load.cpp index 915b587..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> @@ -203,7 +203,7 @@ bool MIDIplay::LoadMIDI_post() adlins.adl[0] = adl; adlins.adl[1] = adl; adlins.ms_sound_kon = 1000; - adlins.ms_sound_koff = 0; + adlins.ms_sound_koff = 500; adlins.tone = 0; adlins.flags = 0; adlins.voice2_fine_tune = 0.0; @@ -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(); |