From: <sv...@op...> - 2024-07-15 20:55:52
|
Author: sagamusix Date: Mon Jul 15 22:55:45 2024 New Revision: 21190 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21190 Log: Merged revision(s) 21188-21189 from trunk/OpenMPT: [Fix] MED: Command 0F was not imported properly. ........ [Fix] MED: Apply more suitable lower period limits. Should fix Silly.med. The limit for software mixing may not be accurate. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/soundlib/Load_med.cpp Modified: branches/OpenMPT-1.31/soundlib/Load_med.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/Load_med.cpp Mon Jul 15 22:54:58 2024 (r21189) +++ branches/OpenMPT-1.31/soundlib/Load_med.cpp Mon Jul 15 22:55:45 2024 (r21190) @@ -458,7 +458,7 @@ if(m.param < 0x20) m.param = 0x20; #endif // MODPLUG_TRACKER - } else switch(command) + } else switch(param) { case 0xF1: // Play note twice m.SetEffectCommand(CMD_MODCMDEX, 0x93); @@ -603,7 +603,7 @@ cmd = command; param1 = param; } - // Octave wrapping for 4-channel modules (TODO: this should not be set because of synth instruments) + // Octave wrapping for 4-channel modules if(ctx.hardwareMixSamples && note >= NOTE_MIDDLEC + 2 * 12) needInstruments = true; @@ -794,6 +794,7 @@ // - starkelsesirap.mmd0 (synth instruments) on the other hand don't need it // In MMD2 / MMD3, the mix flag is used instead. const bool hardwareMixSamples = (version < 2) || (version >= 2 && !(songHeader.flags2 & MMDSong::FLAG2_MIX)); + m_nMinPeriod = hardwareMixSamples ? (113 * 4) : (55 * 4); bool needInstruments = false; bool anySynthInstrs = false; |