You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(10) |
Sep
|
Oct
|
Nov
|
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(1) |
Feb
(2) |
Mar
(3) |
Apr
(2) |
May
(10) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
2008 |
Jan
(6) |
Feb
(4) |
Mar
(5) |
Apr
(2) |
May
(1) |
Jun
(1) |
Jul
(4) |
Aug
(6) |
Sep
(2) |
Oct
(9) |
Nov
(1) |
Dec
(4) |
2009 |
Jan
(9) |
Feb
(2) |
Mar
(2) |
Apr
(2) |
May
(6) |
Jun
(18) |
Jul
(33) |
Aug
(39) |
Sep
(33) |
Oct
(24) |
Nov
(23) |
Dec
(22) |
2010 |
Jan
(29) |
Feb
(32) |
Mar
(51) |
Apr
(17) |
May
(31) |
Jun
(21) |
Jul
(32) |
Aug
(28) |
Sep
(35) |
Oct
(27) |
Nov
(11) |
Dec
(13) |
2011 |
Jan
(14) |
Feb
(13) |
Mar
(27) |
Apr
(27) |
May
(28) |
Jun
(20) |
Jul
(43) |
Aug
(52) |
Sep
(66) |
Oct
(61) |
Nov
(11) |
Dec
(8) |
2012 |
Jan
(20) |
Feb
(30) |
Mar
(38) |
Apr
(21) |
May
(33) |
Jun
(21) |
Jul
(25) |
Aug
(9) |
Sep
(24) |
Oct
(42) |
Nov
(27) |
Dec
(41) |
2013 |
Jan
(20) |
Feb
(35) |
Mar
(156) |
Apr
(298) |
May
(258) |
Jun
(201) |
Jul
(105) |
Aug
(60) |
Sep
(193) |
Oct
(245) |
Nov
(280) |
Dec
(194) |
2014 |
Jan
(63) |
Feb
(202) |
Mar
(200) |
Apr
(23) |
May
(53) |
Jun
(105) |
Jul
(18) |
Aug
(26) |
Sep
(110) |
Oct
(187) |
Nov
(97) |
Dec
(74) |
2015 |
Jan
(45) |
Feb
(55) |
Mar
(116) |
Apr
(116) |
May
(193) |
Jun
(164) |
Jul
(50) |
Aug
(111) |
Sep
(98) |
Oct
(71) |
Nov
(103) |
Dec
(63) |
2016 |
Jan
(33) |
Feb
(101) |
Mar
(182) |
Apr
(139) |
May
(140) |
Jun
(103) |
Jul
(165) |
Aug
(286) |
Sep
(208) |
Oct
(127) |
Nov
(97) |
Dec
(54) |
2017 |
Jan
(64) |
Feb
(335) |
Mar
(202) |
Apr
(212) |
May
(139) |
Jun
(127) |
Jul
(294) |
Aug
(154) |
Sep
(170) |
Oct
(152) |
Nov
(156) |
Dec
(62) |
2018 |
Jan
(168) |
Feb
(237) |
Mar
(196) |
Apr
(174) |
May
(174) |
Jun
(161) |
Jul
(127) |
Aug
(88) |
Sep
(149) |
Oct
(66) |
Nov
(52) |
Dec
(135) |
2019 |
Jan
(146) |
Feb
(126) |
Mar
(104) |
Apr
(58) |
May
(60) |
Jun
(28) |
Jul
(197) |
Aug
(129) |
Sep
(141) |
Oct
(148) |
Nov
(63) |
Dec
(100) |
2020 |
Jan
(74) |
Feb
(37) |
Mar
(59) |
Apr
(154) |
May
(194) |
Jun
(133) |
Jul
(313) |
Aug
(197) |
Sep
(49) |
Oct
(162) |
Nov
(143) |
Dec
(57) |
2021 |
Jan
(120) |
Feb
(107) |
Mar
(314) |
Apr
(157) |
May
(524) |
Jun
(169) |
Jul
(72) |
Aug
(133) |
Sep
(135) |
Oct
(146) |
Nov
(198) |
Dec
(325) |
2022 |
Jan
(409) |
Feb
(249) |
Mar
(138) |
Apr
(95) |
May
(102) |
Jun
(221) |
Jul
(66) |
Aug
(120) |
Sep
(192) |
Oct
(131) |
Nov
(53) |
Dec
(171) |
2023 |
Jan
(357) |
Feb
(82) |
Mar
(168) |
Apr
(218) |
May
(196) |
Jun
(86) |
Jul
(115) |
Aug
(49) |
Sep
(190) |
Oct
(102) |
Nov
(45) |
Dec
(76) |
2024 |
Jan
(86) |
Feb
(50) |
Mar
(324) |
Apr
(209) |
May
(197) |
Jun
(232) |
Jul
(194) |
Aug
(247) |
Sep
(219) |
Oct
(266) |
Nov
(328) |
Dec
(304) |
2025 |
Jan
(191) |
Feb
(115) |
Mar
(137) |
Apr
(32) |
May
(126) |
Jun
(403) |
Jul
(213) |
Aug
(182) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <sv...@op...> - 2024-06-08 10:24:48
|
Author: sagamusix Date: Sat Jun 8 12:24:36 2024 New Revision: 20953 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20953 Log: [Ref] Simplify workaround. We're not going to be able to use CSoundFile in a constexpr context anyway. Modified: trunk/OpenMPT/soundlib/Sndfile.h Modified: trunk/OpenMPT/soundlib/Sndfile.h ============================================================================== --- trunk/OpenMPT/soundlib/Sndfile.h Sat Jun 8 08:18:38 2024 (r20952) +++ trunk/OpenMPT/soundlib/Sndfile.h Sat Jun 8 12:24:36 2024 (r20953) @@ -705,11 +705,7 @@ constexpr SAMPLEINDEX GetNumSamples() const noexcept { return m_nSamples; } constexpr PATTERNINDEX GetCurrentPattern() const noexcept { return m_PlayState.m_nPattern; } constexpr ORDERINDEX GetCurrentOrder() const noexcept { return m_PlayState.m_nCurrentOrder; } -#ifndef MPT_LIBCXX_QUIRK_NO_CONSTEXPR_VECTOR - MPT_CONSTEXPR20_FUN CHANNELINDEX GetNumChannels() const noexcept { return static_cast<CHANNELINDEX>(ChnSettings.size()); } -#else MPT_FORCEINLINE CHANNELINDEX GetNumChannels() const noexcept { return static_cast<CHANNELINDEX>(ChnSettings.size()); } -#endif constexpr bool CanAddMoreSamples(SAMPLEINDEX amount = 1) const noexcept { return (amount < MAX_SAMPLES) && m_nSamples < (MAX_SAMPLES - amount); } constexpr bool CanAddMoreInstruments(INSTRUMENTINDEX amount = 1) const noexcept { return (amount < MAX_INSTRUMENTS) && m_nInstruments < (MAX_INSTRUMENTS - amount); } |
From: <sv...@op...> - 2024-06-08 06:18:50
|
Author: manx Date: Sat Jun 8 08:18:38 2024 New Revision: 20952 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20952 Log: [Fix] Work-around broken GCC 11 libstdc++ constexpr vector support. Modified: trunk/OpenMPT/soundlib/Sndfile.h Modified: trunk/OpenMPT/soundlib/Sndfile.h ============================================================================== --- trunk/OpenMPT/soundlib/Sndfile.h Sat Jun 8 08:17:43 2024 (r20951) +++ trunk/OpenMPT/soundlib/Sndfile.h Sat Jun 8 08:18:38 2024 (r20952) @@ -705,7 +705,11 @@ constexpr SAMPLEINDEX GetNumSamples() const noexcept { return m_nSamples; } constexpr PATTERNINDEX GetCurrentPattern() const noexcept { return m_PlayState.m_nPattern; } constexpr ORDERINDEX GetCurrentOrder() const noexcept { return m_PlayState.m_nCurrentOrder; } +#ifndef MPT_LIBCXX_QUIRK_NO_CONSTEXPR_VECTOR MPT_CONSTEXPR20_FUN CHANNELINDEX GetNumChannels() const noexcept { return static_cast<CHANNELINDEX>(ChnSettings.size()); } +#else + MPT_FORCEINLINE CHANNELINDEX GetNumChannels() const noexcept { return static_cast<CHANNELINDEX>(ChnSettings.size()); } +#endif constexpr bool CanAddMoreSamples(SAMPLEINDEX amount = 1) const noexcept { return (amount < MAX_SAMPLES) && m_nSamples < (MAX_SAMPLES - amount); } constexpr bool CanAddMoreInstruments(INSTRUMENTINDEX amount = 1) const noexcept { return (amount < MAX_INSTRUMENTS) && m_nInstruments < (MAX_INSTRUMENTS - amount); } |
From: <sv...@op...> - 2024-06-08 06:17:56
|
Author: manx Date: Sat Jun 8 08:17:43 2024 New Revision: 20951 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20951 Log: [Imp] mpt/base/detect_quirks.hpp: Detect libstdc++ and libc++ missing constexpr vector support. Modified: trunk/OpenMPT/src/mpt/base/detect_quirks.hpp Modified: trunk/OpenMPT/src/mpt/base/detect_quirks.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/base/detect_quirks.hpp Sat Jun 8 02:16:59 2024 (r20950) +++ trunk/OpenMPT/src/mpt/base/detect_quirks.hpp Sat Jun 8 08:17:43 2024 (r20951) @@ -258,6 +258,15 @@ #if MPT_CXX_AT_LEAST(20) +#if MPT_LIBCXX_GNU_BEFORE(12) || MPT_LIBCXX_LLVM_BEFORE(15) +#define MPT_LIBCXX_QUIRK_NO_CONSTEXPR_VECTOR +#define MPT_LIBCXX_QUIRK_NO_CONSTEXPR_STRING +#endif +#endif + + + +#if MPT_CXX_AT_LEAST(20) // Clang 14 is incompatible with libstdc++ 13 in C++20 mode #if MPT_CLANG_BEFORE(15, 0, 0) && MPT_LIBCXX_GNU_AT_LEAST(13) #define MPT_LIBCXX_QUIRK_NO_CHRONO |
From: <sv...@op...> - 2024-06-08 00:17:14
|
Author: sagamusix Date: Sat Jun 8 02:16:59 2024 New Revision: 20950 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20950 Log: [Ref] Remove CSoundFile::m_nChannels and turn CSoundFile::ChnSettings into a vector. The latter is now the source of truth for the channel count. Modified: trunk/OpenMPT/doc/module_formats.md trunk/OpenMPT/mptrack/CleanupSong.cpp trunk/OpenMPT/mptrack/Draw_pat.cpp trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/mptrack/Moddoc.h trunk/OpenMPT/mptrack/Modedit.cpp trunk/OpenMPT/mptrack/View_gen.cpp trunk/OpenMPT/soundlib/Load_667.cpp trunk/OpenMPT/soundlib/Load_amf.cpp trunk/OpenMPT/soundlib/Load_dbm.cpp trunk/OpenMPT/soundlib/Load_digi.cpp trunk/OpenMPT/soundlib/Load_dsm.cpp trunk/OpenMPT/soundlib/Load_dsym.cpp trunk/OpenMPT/soundlib/Load_ftm.cpp trunk/OpenMPT/soundlib/Load_gdm.cpp trunk/OpenMPT/soundlib/Load_gt2.cpp trunk/OpenMPT/soundlib/Load_imf.cpp trunk/OpenMPT/soundlib/Load_it.cpp trunk/OpenMPT/soundlib/Load_itp.cpp trunk/OpenMPT/soundlib/Load_mdl.cpp trunk/OpenMPT/soundlib/Load_med.cpp trunk/OpenMPT/soundlib/Load_mid.cpp trunk/OpenMPT/soundlib/Load_mo3.cpp trunk/OpenMPT/soundlib/Load_mod.cpp trunk/OpenMPT/soundlib/Load_mt2.cpp trunk/OpenMPT/soundlib/Load_okt.cpp trunk/OpenMPT/soundlib/Load_plm.cpp trunk/OpenMPT/soundlib/Load_psm.cpp trunk/OpenMPT/soundlib/Load_ptm.cpp trunk/OpenMPT/soundlib/Load_puma.cpp trunk/OpenMPT/soundlib/Load_rtm.cpp trunk/OpenMPT/soundlib/Load_s3m.cpp trunk/OpenMPT/soundlib/Load_stk.cpp trunk/OpenMPT/soundlib/Load_stp.cpp trunk/OpenMPT/soundlib/Load_symmod.cpp trunk/OpenMPT/soundlib/Load_ult.cpp trunk/OpenMPT/soundlib/Load_wav.cpp trunk/OpenMPT/soundlib/Load_xm.cpp trunk/OpenMPT/soundlib/Load_xmf.cpp trunk/OpenMPT/soundlib/MODTools.cpp trunk/OpenMPT/soundlib/MODTools.h trunk/OpenMPT/soundlib/ModSequence.cpp trunk/OpenMPT/soundlib/Snd_fx.cpp trunk/OpenMPT/soundlib/Sndfile.cpp trunk/OpenMPT/soundlib/Sndfile.h trunk/OpenMPT/soundlib/Sndmix.cpp trunk/OpenMPT/soundlib/load_j2b.cpp trunk/OpenMPT/test/test.cpp Modified: trunk/OpenMPT/doc/module_formats.md ============================================================================== --- trunk/OpenMPT/doc/module_formats.md Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/doc/module_formats.md Sat Jun 8 02:16:59 2024 (r20950) @@ -23,7 +23,7 @@ Entire structs containing integers with defined endianness can be read in one go if they are tagged with `MPT_BINARY_STRUCT` (see existing loaders for an example). -* `CSoundFile::m_nChannels` **MUST NOT** be changed after a pattern has been +* `CSoundFile::ChnSettings` **MUST NOT** be resized after a pattern has been created, as existing patterns will be interpreted incorrectly. For module formats that support per-pattern channel amounts, the maximum number of channels must be determined beforehand. Modified: trunk/OpenMPT/mptrack/CleanupSong.cpp ============================================================================== --- trunk/OpenMPT/mptrack/CleanupSong.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/mptrack/CleanupSong.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -1041,7 +1041,8 @@ for(CHANNELINDEX chn = 0; chn < sndFile.GetNumChannels(); chn++) { - sndFile.InitChannel(chn); + mpt::reconstruct(sndFile.ChnSettings[chn]); + modDoc.InitChannel(chn); } // reset samples Modified: trunk/OpenMPT/mptrack/Draw_pat.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Draw_pat.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/mptrack/Draw_pat.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -1265,7 +1265,7 @@ x2 += dx; y1 += dy; y2 += dy; - nChannels = pSndFile->m_nChannels; + nChannels = pSndFile->GetNumChannels(); nRows = pSndFile->Patterns[m_nPattern].GetNumRows(); if (x1 < GetXScrollPos()) drawLeft = false; if (x1 >= nChannels) x1 = nChannels - 1; Modified: trunk/OpenMPT/mptrack/MainFrm.cpp ============================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/mptrack/MainFrm.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -1686,7 +1686,7 @@ m_WaveFile.Order().SetDefaultTempoInt(125); m_WaveFile.Order().SetDefaultSpeed(6); m_WaveFile.m_nType = MOD_TYPE_MPT; - m_WaveFile.m_nChannels = 2; + m_WaveFile.ChnSettings.resize(2); m_WaveFile.m_nInstruments = 1; m_WaveFile.m_nTempoMode = TempoMode::Classic; m_WaveFile.Order().assign(1, 0); Modified: trunk/OpenMPT/mptrack/Moddoc.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Moddoc.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/mptrack/Moddoc.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -602,18 +602,18 @@ void CModDoc::InitializeMod() { // New module ? - if (!m_SndFile.m_nChannels) + if (!m_SndFile.GetNumChannels()) { switch(GetModType()) { case MOD_TYPE_MOD: - m_SndFile.m_nChannels = 4; + m_SndFile.ChnSettings.resize(4); break; case MOD_TYPE_S3M: - m_SndFile.m_nChannels = 16; + m_SndFile.ChnSettings.resize(16); break; default: - m_SndFile.m_nChannels = 32; + m_SndFile.ChnSettings.resize(32); break; } @@ -673,6 +673,17 @@ } +void CModDoc::InitChannel(CHANNELINDEX chn) +{ + if(chn >= GetNumChannels()) + return; + + SetChannelRecordGroup(chn, RecordGroup::NoGroup); + m_SndFile.m_PlayState.Chn[chn].Reset(ModChannel::resetTotal, m_SndFile, chn, CSoundFile::GetChannelMuteFlag()); + m_SndFile.m_bChannelMuteTogglePending[chn] = false; +} + + bool CModDoc::SetDefaultChannelColors(CHANNELINDEX minChannel, CHANNELINDEX maxChannel) { LimitMax(minChannel, GetNumChannels()); @@ -1187,7 +1198,7 @@ } const FlagSet<ChannelFlags> mask = (fade ? CHN_NOTEFADE : (CHN_NOTEFADE | CHN_KEYOFF)); - const CHANNELINDEX startChn = currentChn != CHANNELINDEX_INVALID ? currentChn : m_SndFile.m_nChannels; + const CHANNELINDEX startChn = currentChn != CHANNELINDEX_INVALID ? currentChn : m_SndFile.GetNumChannels(); const CHANNELINDEX endChn = currentChn != CHANNELINDEX_INVALID ? currentChn + 1 : MAX_CHANNELS; ModChannel *pChn = &m_SndFile.m_PlayState.Chn[startChn]; for(CHANNELINDEX i = startChn; i < endChn; i++, pChn++) @@ -1348,14 +1359,14 @@ bool CModDoc::IsChannelNoFx(CHANNELINDEX nChn) const { - if (nChn >= m_SndFile.m_nChannels) return true; + if (nChn >= m_SndFile.GetNumChannels()) return true; return m_SndFile.ChnSettings[nChn].dwFlags[CHN_NOFX]; } bool CModDoc::NoFxChannel(CHANNELINDEX nChn, bool bNoFx, bool updateMix) { - if (nChn >= m_SndFile.m_nChannels) return false; + if (nChn >= m_SndFile.GetNumChannels()) return false; m_SndFile.ChnSettings[nChn].dwFlags.set(CHN_NOFX, bNoFx); if(updateMix) m_SndFile.m_PlayState.Chn[nChn].dwFlags.set(CHN_NOFX, bNoFx); return true; Modified: trunk/OpenMPT/mptrack/Moddoc.h ============================================================================== --- trunk/OpenMPT/mptrack/Moddoc.h Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/mptrack/Moddoc.h Sat Jun 8 02:16:59 2024 (r20950) @@ -285,7 +285,7 @@ void ToggleChannelRecordGroup(CHANNELINDEX channel, RecordGroup recordGroup); void ReinitRecordState(bool unselect = true); - CHANNELINDEX GetNumChannels() const { return m_SndFile.m_nChannels; } + CHANNELINDEX GetNumChannels() const noexcept { return m_SndFile.GetNumChannels(); } UINT GetPatternSize(PATTERNINDEX nPat) const; bool IsChildSample(INSTRUMENTINDEX nIns, SAMPLEINDEX nSmp) const; INSTRUMENTINDEX FindSampleParent(SAMPLEINDEX sample) const; @@ -346,7 +346,9 @@ // Check whether an instrument is used (only for instrument mode). bool IsInstrumentUsed(INSTRUMENTINDEX instr, bool searchInMutedChannels = true) const; -// protected members + void InitChannel(CHANNELINDEX chn); + + // protected members protected: void InitializeMod(); Modified: trunk/OpenMPT/mptrack/Modedit.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Modedit.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/mptrack/Modedit.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -172,6 +172,7 @@ } CriticalSection cs; + const std::vector<ModChannelSettings> settings = m_SndFile.ChnSettings; if(oldNumChannels == newNumChannels) { // Optimization with no pattern re-allocation @@ -197,6 +198,7 @@ std::vector<std::vector<ModCommand>> newPatterns; try { + m_SndFile.ChnSettings.reserve(newNumChannels); newPatterns.resize(m_SndFile.Patterns.Size()); for(PATTERNINDEX i = 0; i < m_SndFile.Patterns.Size(); i++) { @@ -209,7 +211,7 @@ return oldNumChannels; } - m_SndFile.m_nChannels = newNumChannels; + m_SndFile.ChnSettings.resize(newNumChannels); for(PATTERNINDEX i = 0; i < m_SndFile.Patterns.Size(); i++) { CPattern &pat = m_SndFile.Patterns[i]; @@ -252,7 +254,6 @@ } std::vector<ModChannel> chns(m_SndFile.m_PlayState.Chn.begin(), m_SndFile.m_PlayState.Chn.begin() + oldNumChannels); - std::vector<ModChannelSettings> settings(std::begin(m_SndFile.ChnSettings), std::begin(m_SndFile.ChnSettings) + oldNumChannels); std::vector<RecordGroup> recordStates(oldNumChannels); auto chnMutePendings = m_SndFile.m_bChannelMuteTogglePending; for(CHANNELINDEX chn = 0; chn < oldNumChannels; chn++) @@ -274,7 +275,8 @@ m_SndFile.m_opl->MoveChannel(srcChn, chn); } else { - m_SndFile.InitChannel(chn); + mpt::reconstruct(m_SndFile.ChnSettings[chn]); + InitChannel(chn); SetDefaultChannelColors(chn); } } Modified: trunk/OpenMPT/mptrack/View_gen.cpp ============================================================================== --- trunk/OpenMPT/mptrack/View_gen.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/mptrack/View_gen.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -336,7 +336,7 @@ return; CString s; - nTabCount = (sndFile.m_nChannels + (CHANNELS_IN_TAB - 1)) / CHANNELS_IN_TAB; + nTabCount = (sndFile.GetNumChannels() + (CHANNELS_IN_TAB - 1)) / CHANNELS_IN_TAB; if (nTabCount != m_TabCtrl.GetItemCount()) { UINT nOldSel = m_TabCtrl.GetCurSel(); Modified: trunk/OpenMPT/soundlib/Load_667.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_667.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_667.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -137,14 +137,14 @@ { // Instrument auto instr = patData.ReadArray<uint8, 2>(); - if(instr[0] >= m_nChannels || instr[1] > 63) + if(instr[0] >= GetNumChannels() || instr[1] > 63) return false; rowData[instr[0]].instr = instr[1] + 1; } else if(b == 0xFD) { // Volume auto vol = patData.ReadArray<uint8, 2>(); - if(vol[0] >= m_nChannels || vol[1] > 63) + if(vol[0] >= GetNumChannels() || vol[1] > 63) return false; rowData[vol[0]].SetVolumeCommand(VOLCMD_VOLUME, 63u - vol[1]); } else if(b == 0xFC) @@ -156,7 +156,7 @@ { // Pattern break rowData[0].SetEffectCommand(CMD_PATTERNBREAK, 0); - } else if(b < m_nChannels) + } else if(b < GetNumChannels()) { // Note data uint8 note = patData.ReadUint8(); @@ -175,7 +175,7 @@ } if(leftChn && rightChn) { - for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) + for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { ChnSettings[chn].nPan = (chn % 2u) ? 256 : 0; } Modified: trunk/OpenMPT/soundlib/Load_amf.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_amf.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_amf.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -653,7 +653,7 @@ patternLength[ord] = file.ReadUint16LE(); } // Track positions will be read as needed. - file.Skip(m_nChannels * 2); + file.Skip(GetNumChannels() * 2); } // Read Sample Headers Modified: trunk/OpenMPT/soundlib/Load_dbm.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_dbm.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_dbm.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -563,7 +563,7 @@ if(hasEchoEnable) { // If there are any Vxx effects to dynamically enable / disable echo, use the CHN_NOFX flag. - for(CHANNELINDEX i = 0; i < m_nChannels; i++) + for(CHANNELINDEX i = 0; i < GetNumChannels(); i++) { ChnSettings[i].nMixPlugin = 1; ChnSettings[i].dwFlags.set(CHN_NOFX); @@ -580,7 +580,7 @@ for(uint16 i = 0; i < maskLen; i++) { bool enabled = (dspChunk.ReadUint8() == 0); - if(i < m_nChannels) + if(i < GetNumChannels()) { if(hasEchoEnable) { Modified: trunk/OpenMPT/soundlib/Load_digi.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_digi.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_digi.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -121,7 +121,7 @@ // Globals InitializeGlobals(MOD_TYPE_DIGI, fileHeader.numChannels); m_nSamples = 31; - m_nSamplePreAmp = 256 / m_nChannels; + m_nSamplePreAmp = 256 / GetNumChannels(); m_modFormat.formatName = U_("DigiBooster"); m_modFormat.type = U_("digi"); Modified: trunk/OpenMPT/soundlib/Load_dsm.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_dsm.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_dsm.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -218,7 +218,7 @@ m_nDefaultGlobalVolume = std::min(songHeader.globalVol.get(), uint8(64)) * 4u; if(!m_nDefaultGlobalVolume) m_nDefaultGlobalVolume = MAX_GLOBAL_VOLUME; if(songHeader.mastervol == 0x80) - m_nSamplePreAmp = std::min(256u / m_nChannels, 128u); + m_nSamplePreAmp = std::min(256u / GetNumChannels(), 128u); else m_nSamplePreAmp = songHeader.mastervol & 0x7F; @@ -407,7 +407,7 @@ m_songName = mpt::String::ReadBuf(mpt::String::spacePadded, fileHeader.title); m_songArtist = mpt::ToUnicode(mpt::Charset::CP437, mpt::String::ReadBuf(mpt::String::spacePadded, fileHeader.artist)); - for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) + for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { ChnSettings[chn].nPan = (file.ReadUint8() & 0x0F) * 0x11; } @@ -420,15 +420,15 @@ } numPatterns++; - if(!file.CanRead((numPatterns * m_nChannels * 8) + (m_nSamples * sizeof(DSmSampleHeader)) + (numPatterns * m_nChannels * 64 * 4))) + if(!file.CanRead((numPatterns * GetNumChannels() * 8) + (m_nSamples * sizeof(DSmSampleHeader)) + (numPatterns * GetNumChannels() * 64 * 4))) return false; // Track names for each pattern - we only read the track names of the first pattern - for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) + for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { ChnSettings[chn].szName = mpt::String::ReadBuf(mpt::String::spacePadded, file.ReadArray<char, 8>()); } - file.Skip((numPatterns - 1) * m_nChannels * 8); + file.Skip((numPatterns - 1) * GetNumChannels() * 8); for(SAMPLEINDEX smp = 1; smp <= m_nSamples; smp++) { @@ -443,7 +443,7 @@ { if(!(loadFlags & loadPatternData) || !Patterns.Insert(pat, 64)) { - file.Skip(m_nChannels * 64 * 4); + file.Skip(GetNumChannels() * 64 * 4); continue; } for(ModCommand &m : Patterns[pat]) Modified: trunk/OpenMPT/soundlib/Load_dsym.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_dsym.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_dsym.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -240,7 +240,7 @@ m_SongFlags.reset(SONG_ISAMIGA); m_nSamples = 63; - for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) + for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { ChnSettings[chn].nPan = (((chn & 3) == 1) || ((chn & 3) == 2)) ? 64 : 192; } @@ -289,14 +289,14 @@ if(!(loadFlags & loadPatternData) || !Patterns.Insert(pat, 64)) continue; - for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) + for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { - const uint16 track = sequence[pat * m_nChannels + chn]; + const uint16 track = sequence[pat * GetNumChannels() + chn]; if(track >= fileHeader.numTracks) continue; ModCommand *m = Patterns[pat].GetpModCommand(0, chn); - for(ROWINDEX row = 0; row < 64; row++, m += m_nChannels) + for(ROWINDEX row = 0; row < 64; row++, m += GetNumChannels()) { const auto data = tracks.subspan(track * 256 + row * 4, 4); m->note = data[0] & 0x3F; @@ -423,7 +423,7 @@ break; case 0x2B: // 2B xyy Line Jump m->command = CMD_PATTERNBREAK; - for(CHANNELINDEX brkChn = 0; brkChn < m_nChannels; brkChn++) + for(CHANNELINDEX brkChn = 0; brkChn < GetNumChannels(); brkChn++) { ModCommand &cmd = *(m - chn + brkChn); if(cmd.command != CMD_NONE) Modified: trunk/OpenMPT/soundlib/Load_ftm.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_ftm.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_ftm.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -364,7 +364,7 @@ bool operator<(const PatternLoopPoint other) const noexcept { return std::tie(order, row, channel) < std::tie(other.order, other.row, other.channel); } }; std::vector<PatternLoopPoint> loopPoints; - for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) + for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { const uint16 defaultSpacing = file.ReadUint16BE(); FileReader channelChunk = file.ReadChunk(file.ReadUint32BE()); Modified: trunk/OpenMPT/soundlib/Load_gdm.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_gdm.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_gdm.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -344,7 +344,7 @@ while((channelByte = chunk.ReadUint8()) != rowDone) { CHANNELINDEX channel = channelByte & channelMask; - if(channel >= m_nChannels) break; // Better safe than sorry! + if(channel >= GetNumChannels()) break; // Better safe than sorry! ModCommand &m = rowBase[channel]; Modified: trunk/OpenMPT/soundlib/Load_gt2.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_gt2.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_gt2.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -1217,14 +1217,14 @@ m_songName = mpt::String::ReadBuf(mpt::String::spacePadded, fileHeader.songName); m_nSamplePreAmp = 256; - m_nDefaultGlobalVolume = 384 / (3 + m_nChannels); // See documentation on command 5xxx: Default linear master volume is 12288 / (3 + number of channels) + m_nDefaultGlobalVolume = 384 / (3 + GetNumChannels()); // See documentation on command 5xxx: Default linear master volume is 12288 / (3 + number of channels) if(fileHeader.fileVersion <= 5) { Order().SetDefaultSpeed(std::max(fileHeader.speed.get(), uint16(1))); Order().SetDefaultTempoInt(std::max(fileHeader.tempo.get(), uint16(1))); m_nDefaultGlobalVolume = std::min(Util::muldivr_unsigned(fileHeader.masterVol, MAX_GLOBAL_VOLUME, 4095), uint32(MAX_GLOBAL_VOLUME)); - const CHANNELINDEX tracks = std::min(static_cast<CHANNELINDEX>(pannedTracks.size()), m_nChannels); + const CHANNELINDEX tracks = std::min(static_cast<CHANNELINDEX>(pannedTracks.size()), GetNumChannels()); for(CHANNELINDEX chn = 0; chn < tracks; chn++) { ChnSettings[chn].nPan = std::min(static_cast<uint16>(Util::muldivr_unsigned(pannedTracks[chn], 256, 4095)), uint16(256)); @@ -1550,7 +1550,7 @@ { GT2TrackName trackName; chunk.ReadStruct(trackName); - if(trackName.type == 0 && trackName.trackNumber < m_nChannels) + if(trackName.type == 0 && trackName.trackNumber < GetNumChannels()) { ChnSettings[trackName.trackNumber].szName = mpt::String::ReadBuf(mpt::String::spacePadded, trackName.name); } Modified: trunk/OpenMPT/soundlib/Load_imf.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_imf.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_imf.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -437,8 +437,8 @@ // Read channel configuration std::bitset<32> ignoreChannels; // bit set for each channel that's completely disabled - uint64 channelMuteStatus = 0xAAAA'AAAA << (m_nChannels * 2); - for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) + uint64 channelMuteStatus = 0xAAAA'AAAA << (GetNumChannels() * 2); + for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { ChnSettings[chn].nPan = static_cast<uint16>(fileHeader.channels[chn].panning * 256 / 255); ChnSettings[chn].szName = mpt::String::ReadBuf(mpt::String::nullTerminated, fileHeader.channels[chn].name); @@ -461,7 +461,7 @@ // mikmod refers to this as an Orpheus bug, but I haven't seen any other files like this, so maybe it's just an incorrectly saved file? if(channelMuteStatus == 0xAAAA'AAAA'5555'5554) { - for(CHANNELINDEX chn = 1; chn < m_nChannels; chn++) + for(CHANNELINDEX chn = 1; chn < GetNumChannels(); chn++) ChnSettings[chn].dwFlags.reset(CHN_MUTE); } Modified: trunk/OpenMPT/soundlib/Load_it.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_it.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_it.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -690,11 +690,11 @@ if(file.ReadMagic("CNAM")) { FileReader chnNames = file.ReadChunk(file.ReadUint32LE()); - m_nChannels = std::min(MAX_BASECHANNELS, static_cast<CHANNELINDEX>(chnNames.GetLength() / MAX_CHANNELNAME)); + ChnSettings.resize(std::min(MAX_BASECHANNELS, static_cast<CHANNELINDEX>(chnNames.GetLength() / MAX_CHANNELNAME))); hasModPlugExtensions = true; - for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) + for(auto &chn : ChnSettings) { - chnNames.ReadString<mpt::String::maybeNullTerminated>(ChnSettings[chn].szName, MAX_CHANNELNAME); + chnNames.ReadString<mpt::String::maybeNullTerminated>(chn.szName, MAX_CHANNELNAME); } } @@ -876,6 +876,7 @@ } // Checking for number of used channels, which is not explicitely specified in the file. + CHANNELINDEX numChannels = GetNumChannels(); for(PATTERNINDEX pat = 0; pat < numPats; pat++) { if(patPos[pat] == 0 || !file.Seek(patPos[pat])) @@ -891,7 +892,7 @@ FileReader patternData = file.ReadChunk(len); ROWINDEX row = 0; - std::vector<uint8> chnMask(GetNumChannels()); + std::vector<uint8> chnMask(numChannels); while(row < numRows && patternData.CanRead(1)) { @@ -920,9 +921,9 @@ // Channel used if(chnMask[ch] & 0x0F) // if this channel is used set m_nChannels { - if(ch >= GetNumChannels() && ch < MAX_BASECHANNELS) + if(ch >= numChannels && ch < MAX_BASECHANNELS) { - m_nChannels = ch + 1; + numChannels = ch + 1; } // Skip a number of bytes depending on note, instrument, volume, effect being present. @@ -932,6 +933,7 @@ } lastSampleOffset = std::max(lastSampleOffset, file.GetPosition()); } + ChnSettings.resize(numChannels); // Compute extra instruments settings position if(lastSampleOffset > 0) @@ -1051,7 +1053,7 @@ // Now we grab the data for this particular row/channel. ModCommand dummy{}; - ModCommand &m = ch < m_nChannels ? patData[ch] : dummy; + ModCommand &m = ch < GetNumChannels() ? patData[ch] : dummy; if(chnMask[ch] & 0x10) { @@ -1548,7 +1550,7 @@ memset(itHeader.chnpan, 0xA0, 64); memset(itHeader.chnvol, 64, 64); - for(CHANNELINDEX ich = 0; ich < std::min(m_nChannels, CHANNELINDEX(64)); ich++) // Header only has room for settings for 64 chans... + for(CHANNELINDEX ich = 0; ich < std::min(GetNumChannels(), CHANNELINDEX(64)); ich++) // Header only has room for settings for 64 chans... { itHeader.chnpan[ich] = (uint8)(ChnSettings[ich].nPan >> 2); if (ChnSettings[ich].dwFlags[CHN_SURROUND]) itHeader.chnpan[ich] = 100; @@ -1562,7 +1564,7 @@ // Channel names if(!compatibilityExport) { - for(CHANNELINDEX i = 0; i < m_nChannels; i++) + for(CHANNELINDEX i = 0; i < GetNumChannels(); i++) { if(ChnSettings[i].szName[0]) { @@ -2250,7 +2252,7 @@ if(GetType() != MOD_TYPE_XM) { - WRITEMODULAR(MagicBE("C..."), m_nChannels); + WRITEMODULAR(MagicBE("C..."), GetNumChannels()); } if((GetType() & (MOD_TYPE_IT | MOD_TYPE_MPT)) && GetNumChannels() > 64) @@ -2378,7 +2380,7 @@ // Channel colors { CHANNELINDEX numChannels = 0; - for(CHANNELINDEX i = 0; i < m_nChannels; i++) + for(CHANNELINDEX i = 0; i < GetNumChannels(); i++) { if(ChnSettings[i].color != ModChannelSettings::INVALID_COLOR) { @@ -2460,7 +2462,7 @@ case MagicBE("RPB."): ReadField(chunk, size, m_nDefaultRowsPerBeat); break; case MagicBE("RPM."): ReadField(chunk, size, m_nDefaultRowsPerMeasure); break; // FIXME: If there are only PC events on the last few channels in an MPTM MO3, they won't be imported! - case MagicBE("C..."): if(!ignoreChannelCount) { CHANNELINDEX chn = 0; ReadField(chunk, size, chn); m_nChannels = Clamp(chn, m_nChannels, MAX_BASECHANNELS); } break; + case MagicBE("C..."): if(!ignoreChannelCount) { CHANNELINDEX chn = 0; ReadField(chunk, size, chn); ChnSettings.resize(Clamp(chn, GetNumChannels(), MAX_BASECHANNELS)); } break; case MagicBE("TM.."): ReadFieldCast(chunk, size, m_nTempoMode); break; case MagicBE("PMM."): ReadFieldCast(chunk, size, m_nMixLevels); break; case MagicBE("CWV."): { uint32 ver = 0; ReadField(chunk, size, ver); m_dwCreatedWithVersion = Version(ver); break; } @@ -2500,11 +2502,12 @@ break; case MagicBE("ChnS"): // Channel settings for channels 65+ + static_assert(MAX_BASECHANNELS >= 64); if(size <= (MAX_BASECHANNELS - 64) * 2 && (size % 2u) == 0) { - static_assert(mpt::array_size<decltype(ChnSettings)>::size >= 64); - const CHANNELINDEX loopLimit = std::min(uint16(64 + size / 2), uint16(std::size(ChnSettings))); - + const CHANNELINDEX channelsInFile = mpt::saturate_cast<CHANNELINDEX>(64 + size / 2); + ChnSettings.resize(std::clamp(GetNumChannels(), channelsInFile, MAX_BASECHANNELS)); + const CHANNELINDEX loopLimit = std::min(channelsInFile, GetNumChannels()); for(CHANNELINDEX chn = 64; chn < loopLimit; chn++) { auto [pan, vol] = chunk.ReadArray<uint8, 2>(); Modified: trunk/OpenMPT/soundlib/Load_itp.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_itp.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_itp.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -200,15 +200,15 @@ // Channels' data uint32 size = songHeader.channelNameLength; - for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) + for(auto &chn : ChnSettings) { - ChnSettings[chn].nPan = std::min(static_cast<uint16>(file.ReadUint32LE()), uint16(256)); - ChnSettings[chn].dwFlags.reset(); + chn.nPan = std::min(static_cast<uint16>(file.ReadUint32LE()), uint16(256)); + chn.dwFlags.reset(); uint32 flags = file.ReadUint32LE(); - if(flags & 0x100) ChnSettings[chn].dwFlags.set(CHN_MUTE); - if(flags & 0x800) ChnSettings[chn].dwFlags.set(CHN_SURROUND); - ChnSettings[chn].nVolume = std::min(static_cast<uint8>(file.ReadUint32LE()), uint8(64)); - file.ReadString<mpt::String::maybeNullTerminated>(ChnSettings[chn].szName, size); + if(flags & 0x100) chn.dwFlags.set(CHN_MUTE); + if(flags & 0x800) chn.dwFlags.set(CHN_SURROUND); + chn.nVolume = std::min(static_cast<uint8>(file.ReadUint32LE()), uint8(64)); + file.ReadString<mpt::String::maybeNullTerminated>(chn.szName, size); } // Song mix plugins Modified: trunk/OpenMPT/soundlib/Load_mdl.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_mdl.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_mdl.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -736,7 +736,7 @@ for(CHANNELINDEX chn = 0; chn < numChans; chn++) { uint16 trkNum = chunk.ReadUint16LE(); - if(!trkNum || trkNum >= tracks.size() || chn >= m_nChannels) + if(!trkNum || trkNum >= tracks.size() || chn >= GetNumChannels()) continue; FileReader &track = tracks[trkNum]; @@ -761,7 +761,7 @@ do { *m = orig; - m += m_nChannels; + m += GetNumChannels(); row++; } while (row < numRows && x--); } Modified: trunk/OpenMPT/soundlib/Load_med.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_med.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_med.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -1309,7 +1309,7 @@ SetupMODPanning(true); // With MED SoundStudio 1.03 it's possible to create MMD1 files with more than 16 channels. - const CHANNELINDEX numChannelVols = std::min(m_nChannels, CHANNELINDEX(16)); + const CHANNELINDEX numChannelVols = std::min(GetNumChannels(), CHANNELINDEX(16)); for(CHANNELINDEX chn = 0; chn < numChannelVols; chn++) { ChnSettings[chn].nVolume = std::min<uint8>(songHeader.trackVol[chn], 64); @@ -1317,7 +1317,7 @@ } else { const MMD2Song header = songHeader.GetMMD2Song(); - if(header.numTracks < 1 || header.numTracks > 64 || m_nChannels > 64) + if(header.numTracks < 1 || header.numTracks > 64 || GetNumChannels() > 64) return false; const bool freePan = (header.flags3 & MMD2Song::FLAG3_FREEPAN); @@ -1328,14 +1328,14 @@ if(file.Seek(header.trackVolsOffset)) { - for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) + for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { ChnSettings[chn].nVolume = std::min<uint8>(file.ReadUint8(), 64); } } if(header.trackPanOffset && file.Seek(header.trackPanOffset)) { - for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) + for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { ChnSettings[chn].nPan = static_cast<uint16>((Clamp<int8, int8>(file.ReadInt8(), -16, 16) + 16) * 8); } @@ -1516,7 +1516,7 @@ // Track Names if(version >= 2 && expData.trackInfoOffset) { - for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) + for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { if(file.Seek(expData.trackInfoOffset + chn * 4) && file.Seek(file.ReadUint32BE())) @@ -1613,7 +1613,7 @@ CPattern &pattern = Patterns[basePattern + pat]; pattern.SetName(patName); - LimitMax(numTracks, m_nChannels); + LimitMax(numTracks, GetNumChannels()); TranslateMEDPatternContext context{transpose, numTracks, version, rowsPerBeat, hardwareMixSamples, is8Ch, bpmMode, volHex}; needInstruments |= TranslateMEDPattern(file, cmdExt, pattern, context, false); @@ -1653,7 +1653,7 @@ PATTERNINDEX firstPat = order.EnsureUnique(order.GetFirstValidIndex()); if(firstPat != PATTERNINDEX_INVALID) { - for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) + for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { Patterns[firstPat].WriteEffect(EffectWriter(CMD_CHANNELVOLUME, static_cast<ModCommand::PARAM>(ChnSettings[chn].nVolume)).Channel(chn).RetryNextRow()); Patterns[firstPat].WriteEffect(EffectWriter(CMD_PANNING8, mpt::saturate_cast<ModCommand::PARAM>(ChnSettings[chn].nPan)).Channel(chn).RetryNextRow()); @@ -1683,7 +1683,7 @@ const mpt::uchar *madeWithTracker = MPT_ULITERAL(""); switch(version) { - case 0: madeWithTracker = m_nChannels > 4 ? MPT_ULITERAL("OctaMED v2.10 (MMD0)") : MPT_ULITERAL("MED v2 (MMD0)"); break; + case 0: madeWithTracker = GetNumChannels() > 4 ? MPT_ULITERAL("OctaMED v2.10 (MMD0)") : MPT_ULITERAL("MED v2 (MMD0)"); break; case 1: madeWithTracker = MPT_ULITERAL("OctaMED v4 (MMD1)"); break; case 2: madeWithTracker = MPT_ULITERAL("OctaMED v5 (MMD2)"); break; case 3: madeWithTracker = MPT_ULITERAL("OctaMED Soundstudio (MMD3)"); break; Modified: trunk/OpenMPT/soundlib/Load_mid.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_mid.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_mid.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -666,10 +666,10 @@ Order().clear(); MidiChannelState midiChnStatus[16]; - const CHANNELINDEX tempoChannel = m_nChannels - 2, globalVolChannel = m_nChannels - 1; + const CHANNELINDEX tempoChannel = GetNumChannels() - 2, globalVolChannel = GetNumChannels() - 1; const uint16 numTracks = fileHeader.numTracks; std::vector<TrackState> tracks(numTracks); - std::vector<ModChannelState> modChnStatus(m_nChannels); + std::vector<ModChannelState> modChnStatus(GetNumChannels()); std::bitset<16> drumChns; drumChns.set(MIDI_DRUMCHANNEL - 1); @@ -1267,8 +1267,8 @@ Order.SetSequence(0); std::vector<CHANNELINDEX> channels; - channels.reserve(m_nChannels); - for(CHANNELINDEX i = 0; i < m_nChannels; i++) + channels.reserve(GetNumChannels()); + for(CHANNELINDEX i = 0; i < GetNumChannels(); i++) { if(modChnStatus[i].midiCh != ModChannelState::NOMIDI #ifdef MODPLUG_TRACKER Modified: trunk/OpenMPT/soundlib/Load_mo3.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_mo3.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_mo3.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -933,7 +933,7 @@ m_nSamplePreAmp = static_cast<uint32>(std::exp(fileHeader.sampleVolume * 3.1 / 20.0)) + 51; // Header only has room for 64 channels, like in IT - const CHANNELINDEX headerChannels = std::min(m_nChannels, CHANNELINDEX(64)); + const CHANNELINDEX headerChannels = std::min(GetNumChannels(), CHANNELINDEX(64)); for(CHANNELINDEX i = 0; i < headerChannels; i++) { if(m_nType == MOD_TYPE_IT) @@ -1381,9 +1381,9 @@ if(pluginFlags & 1) { // Channel plugins - for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) + for(auto &chn : ChnSettings) { - ChnSettings[chn].nMixPlugin = static_cast<PLUGINDEX>(musicChunk.ReadUint32LE()); + chn.nMixPlugin = static_cast<PLUGINDEX>(musicChunk.ReadUint32LE()); } } while(musicChunk.CanRead(1)) Modified: trunk/OpenMPT/soundlib/Load_mod.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_mod.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_mod.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -313,7 +313,7 @@ } // Startrekker 8 channel mod (needs special treatment, see below) - const bool isFLT8 = isStartrekker && m_nChannels == 8; + const bool isFLT8 = isStartrekker && GetNumChannels() == 8; const bool isMdKd = IsMagic(magic, "M.K."); // Adjust finetune values for modules saved with "His Master's Noisetracker" const bool isHMNT = IsMagic(magic, "M&K!") || IsMagic(magic, "FEST"); @@ -332,7 +332,7 @@ for(SAMPLEINDEX smp = 1; smp <= 31; smp++) { MODSampleHeader sampleHeader = ReadAndSwap<MODSampleHeader>(file, modMagicResult.swapBytes); - invalidBytes += ReadMODSample(sampleHeader, Samples[smp], m_szNames[smp], m_nChannels == 4); + invalidBytes += ReadMODSample(sampleHeader, Samples[smp], m_szNames[smp], GetNumChannels() == 4); totalSampleLen += Samples[smp].nLength; if(isHMNT) @@ -390,7 +390,7 @@ } // Get number of patterns (including some order list sanity checks) - PATTERNINDEX numPatterns = GetNumPatterns(file, Order(), realOrders, totalSampleLen, m_nChannels, wowSampleLen, false); + PATTERNINDEX numPatterns = GetNumPatterns(file, *this, realOrders, totalSampleLen, wowSampleLen, false); if(maybeWOW && GetNumChannels() == 8) { // M.K. with 8 channels = Mod's Grave @@ -418,7 +418,7 @@ // Files that have an order list longer than 0x78 with restart pos = 0x78: my_shoe_is_barking.mod, papermix.mod // - in both cases it does not appear like the restart position should be used. MPT_ASSERT(fileHeader.restartPos != 0x78 || fileHeader.restartPos + 1u >= realOrders); - if(fileHeader.restartPos > realOrders || (fileHeader.restartPos == 0x78 && m_nChannels == 4)) + if(fileHeader.restartPos > realOrders || (fileHeader.restartPos == 0x78 && GetNumChannels() == 4)) { Order().SetRestartPos(0); } @@ -430,7 +430,7 @@ // Prevent clipping based on number of channels... If all channels are playing at full volume, "256 / #channels" // is the maximum possible sample pre-amp without getting distortion (Compatible mix levels given). // The more channels we have, the less likely it is that all of them are used at the same time, though, so cap at 32... - m_nSamplePreAmp = Clamp(256 / m_nChannels, 32, 128); + m_nSamplePreAmp = Clamp(256 / GetNumChannels(), 32, 128); m_SongFlags.reset(); // SONG_ISAMIGA will be set conditionally // Setup channel pan positions and volume @@ -447,7 +447,7 @@ const uint8 ENABLE_MOD_PANNING_THRESHOLD = 0x30; if(!isNoiseTracker) { - const uint32 patternLength = m_nChannels * 64; + const uint32 patternLength = GetNumChannels() * 64; bool leftPanning = false, extendedPanning = false; // For detecting 800-880 panning isNoiseTracker = isMdKd && !hasEmptySampleWithVolume && !hasLongSamples; for(PATTERNINDEX pat = 0; pat < numPatterns; pat++) @@ -488,7 +488,7 @@ } file.Seek(modMagicResult.patternDataOffset); - const CHANNELINDEX readChannels = (isFLT8 ? 4 : m_nChannels); // 4 channels per pattern in FLT8 format. + const CHANNELINDEX readChannels = (isFLT8 ? 4 : GetNumChannels()); // 4 channels per pattern in FLT8 format. if(isFLT8) numPatterns++; // as one logical pattern consists of two real patterns in FLT8 format, the highest pattern number has to be increased by one. bool hasTempoCommands = false, definitelyCIA = hasLongSamples; // for detecting VBlank MODs @@ -529,7 +529,7 @@ std::vector<ModCommand::INSTR> lastInstrument(GetNumChannels(), 0); std::vector<uint8> instrWithoutNoteCount(GetNumChannels(), 0); - for(ROWINDEX row = 0; row < 64; row++, rowBase += m_nChannels) + for(ROWINDEX row = 0; row < 64; row++, rowBase += GetNumChannels()) { // If we have more than one Fxx command on this row and one can be interpreted as speed // and the other as tempo, we can be rather sure that it is not a VBlank mod. @@ -875,7 +875,7 @@ bool CSoundFile::SaveMod(std::ostream &f) const { - if(m_nChannels == 0) + if(GetNumChannels() == 0) { return false; } Modified: trunk/OpenMPT/soundlib/Load_mt2.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_mt2.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_mt2.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -476,11 +476,11 @@ FileReader drumData = file.ReadChunk(hasDrumChannels ? sizeof(MT2DrumsData) : 0); FileReader extraData = file.ReadChunk(file.ReadUint32LE()); - const CHANNELINDEX channelsWithoutDrums = m_nChannels; + const CHANNELINDEX channelsWithoutDrums = GetNumChannels(); static_assert(MAX_BASECHANNELS >= 64 + 8); if(hasDrumChannels) { - m_nChannels += 8; + ChnSettings.resize(GetNumChannels() + 8); } bool hasLegacyTempo = false; @@ -616,7 +616,7 @@ break; case MagicLE("TRKL"): - for(CHANNELINDEX i = 0; i < m_nChannels && chunk.CanRead(1); i++) + for(CHANNELINDEX i = 0; i < GetNumChannels() && chunk.CanRead(1); i++) { std::string name; chunk.ReadNullString(name); @@ -688,7 +688,7 @@ mixPlug.Info.szLibraryName = libraryName; mixPlug.Info.dwPluginId1 = Vst::kEffectMagic; mixPlug.Info.dwPluginId2 = vstHeader.fxID; - if(vstHeader.track >= m_nChannels) + if(vstHeader.track >= GetNumChannels()) { mixPlug.SetMasterEffect(true); } else @@ -841,7 +841,7 @@ const ROWINDEX numRows = static_cast<ROWINDEX>(chunk.GetLength() / 32u); for(ROWINDEX row = 0; row < Patterns[writePat].GetNumRows(); row++) { - ModCommand *m = Patterns[writePat].GetpModCommand(row, m_nChannels - 8); + ModCommand *m = Patterns[writePat].GetpModCommand(row, GetNumChannels() - 8); for(CHANNELINDEX chn = 0; chn < 8; chn++, m++) { *m = ModCommand{}; @@ -873,7 +873,7 @@ // Read automation envelopes if(fileHeader.flags & MT2FileHeader::automation) { - const uint32 numEnvelopes = ((fileHeader.flags & MT2FileHeader::drumsAutomation) ? m_nChannels : channelsWithoutDrums) + const uint32 numEnvelopes = ((fileHeader.flags & MT2FileHeader::drumsAutomation) ? GetNumChannels() : channelsWithoutDrums) + ((fileHeader.version >= 0x0250) ? numVST : 0) + ((fileHeader.flags & MT2FileHeader::masterAutomation) ? 1 : 0); Modified: trunk/OpenMPT/soundlib/Load_okt.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_okt.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_okt.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -367,20 +367,21 @@ { case OktIffChunk::idCMOD: // Channel setup table - if(m_nChannels == 0 && chunk.CanRead(8)) + if(GetNumChannels() == 0 && chunk.CanRead(8)) { const auto chnTable = chunk.ReadArray<uint16be, 4>(); + ChnSettings.reserve(8); + CHANNELINDEX realChn = 0; for(CHANNELINDEX chn = 0; chn < 4; chn++) { if(chnTable[chn]) { - pairedChn[m_nChannels] = 1; - pairedChn[m_nChannels + 1] = -1; - mpt::reconstruct(ChnSettings[m_nChannels]); - ChnSettings[m_nChannels++].nPan = (((chn & 3) == 1) || ((chn & 3) == 2)) ? 0xC0 : 0x40; + pairedChn[realChn++] = 1; + pairedChn[realChn] = -1; + ChnSettings.emplace_back().nPan = (((chn & 3) == 1) || ((chn & 3) == 2)) ? 0xC0 : 0x40; } - mpt::reconstruct(ChnSettings[m_nChannels]); - ChnSettings[m_nChannels++].nPan = (((chn & 3) == 1) || ((chn & 3) == 2)) ? 0xC0 : 0x40; + realChn++; + ChnSettings.emplace_back().nPan = (((chn & 3) == 1) || ((chn & 3) == 2)) ? 0xC0 : 0x40; } if(loadFlags == onlyVerifyHeader) @@ -443,7 +444,7 @@ } // If there wasn't even a CMOD chunk, we can't really load this. - if(m_nChannels == 0) + if(GetNumChannels() == 0) return false; Order().SetDefaultTempoInt(125); Modified: trunk/OpenMPT/soundlib/Load_plm.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_plm.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_plm.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -323,7 +323,7 @@ { uint16 target = order[m->param].x; m->param = static_cast<ModCommand::PARAM>(target / rowsPerPat); - ModCommand *mBreak = Patterns[pat].GetpModCommand(curRow, m_nChannels - 1); + ModCommand *mBreak = Patterns[pat].GetpModCommand(curRow, GetNumChannels() - 1); mBreak->command = CMD_PATTERNBREAK; mBreak->param = static_cast<ModCommand::PARAM>(target % rowsPerPat); } @@ -331,7 +331,7 @@ case 0x0C: // Jump to end of order { m->param = static_cast<ModCommand::PARAM>(patternEnd / rowsPerPat); - ModCommand *mBreak = Patterns[pat].GetpModCommand(curRow, m_nChannels - 1); + ModCommand *mBreak = Patterns[pat].GetpModCommand(curRow, GetNumChannels() - 1); mBreak->command = CMD_PATTERNBREAK; mBreak->param = static_cast<ModCommand::PARAM>(patternEnd % rowsPerPat); } Modified: trunk/OpenMPT/soundlib/Load_psm.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_psm.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_psm.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -500,8 +500,8 @@ case PSMChunk::idPPAN: // PPAN - Channel panning table (used in Sinaria) // In some Sinaria tunes, this is actually longer than 2 * channels... - MPT_ASSERT(subChunkHead.GetLength() >= m_nChannels * 2u); - for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) + MPT_ASSERT(subChunkHead.GetLength() >= GetNumChannels() * 2u); + for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { if(!subChunk.CanRead(2)) break; @@ -583,7 +583,7 @@ } // Make the default variables of the first subsong global - for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) + for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { ChnSettings[chn].nVolume = subsongs[0].channelVolume[chn]; ChnSettings[chn].nPan = subsongs[0].channelPanning[chn]; @@ -643,7 +643,7 @@ { const auto [flags, channel] = rowChunk.ReadArray<uint8, 2>(); // Point to the correct channel - ModCommand &m = rowBase[std::min(static_cast<CHANNELINDEX>(m_nChannels - 1), static_cast<CHANNELINDEX>(channel))]; + ModCommand &m = rowBase[std::min(static_cast<CHANNELINDEX>(GetNumChannels() - 1), static_cast<CHANNELINDEX>(channel))]; if(flags & noteFlag) { @@ -854,7 +854,7 @@ // Don't write channel volume for now, as there is no real-world module which needs it. if(subsongPanningDiffers) { - for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) + for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { if(subsong.channelSurround[chn]) Patterns[startPattern].WriteEffect(EffectWriter(CMD_S3MCMDEX, 0x91).Row(0).Channel(chn).RetryNextRow()); @@ -1155,7 +1155,7 @@ continue; } - ModCommand &m = *Patterns[pat].GetpModCommand(curRow, std::min(static_cast<CHANNELINDEX>(chnFlag & channelMask), static_cast<CHANNELINDEX>(m_nChannels - 1))); + ModCommand &m = *Patterns[pat].GetpModCommand(curRow, std::min(static_cast<CHANNELINDEX>(chnFlag & channelMask), static_cast<CHANNELINDEX>(GetNumChannels() - 1))); if(chnFlag & noteFlag) { Modified: trunk/OpenMPT/soundlib/Load_ptm.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_ptm.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_ptm.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -180,7 +180,7 @@ ReadOrderFromArray(Order(), fileHeader.orders, fileHeader.numOrders, 0xFF, 0xFE); // Reading channel panning - for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) + for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { ChnSettings[chn].nPan = ((fileHeader.chnPan[chn] & 0x0F) << 4) + 4; } @@ -227,7 +227,7 @@ if(b == 0) { row++; - rowBase += m_nChannels; + rowBase += GetNumChannels(); continue; } CHANNELINDEX chn = (b & 0x1F); Modified: trunk/OpenMPT/soundlib/Load_puma.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_puma.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_puma.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -265,7 +265,7 @@ else if(autoPorta != VOLCMD_NONE) m->volcmd = autoPorta; } - m += m_nChannels; + m += GetNumChannels(); } } if(orderData[ord].speed) Modified: trunk/OpenMPT/soundlib/Load_rtm.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_rtm.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_rtm.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -329,7 +329,7 @@ FileReader extraData = file.ReadChunk(songHeader.extraDataSize); ReadOrderFromFile<uint16le>(Order(), extraData, songHeader.numOrders); - for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) + for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { ChnSettings[chn].nPan = static_cast<uint16>((songHeader.panning[chn] + 64) * 2); if(songHeader.flags & RTMMHeader::songTrackNames) Modified: trunk/OpenMPT/soundlib/Load_s3m.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_s3m.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_s3m.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -497,7 +497,7 @@ hasChannelsWithoutPanning = true; } } - if(m_nChannels < 32 && m_dwLastSavedWithVersion == MPT_V("1.16")) + if(GetNumChannels() < 32 && m_dwLastSavedWithVersion == MPT_V("1.16")) { // MPT 1.0 alpha 6 up to 1.16.203 set ths panning bit for all channels, regardless of whether they are used or not. if(hasChannelsWithoutPanning) @@ -686,7 +686,7 @@ } } - if(pixPlayPanning && zxxCountLeft + zxxCountRight >= m_nChannels && (-zxxCountLeft + zxxCountRight) < static_cast<int>(m_nChannels)) + if(pixPlayPanning && zxxCountLeft + zxxCountRight >= GetNumChannels() && (-zxxCountLeft + zxxCountRight) < static_cast<int>(GetNumChannels())) { // There are enough Zxx commands, so let's assume this was made to be played with PixPlay Patterns.ForEachModCommand([](ModCommand &m) @@ -713,7 +713,7 @@ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, }; - if(m_nChannels == 0) + if(GetNumChannels() == 0) { return false; } Modified: trunk/OpenMPT/soundlib/Load_stk.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_stk.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_stk.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -185,7 +185,7 @@ MODFileHeader &fileHeader = fileHeaders.fileHeader; ReadOrderFromArray(Order(), fileHeader.orderList); - PATTERNINDEX numPatterns = GetNumPatterns(file, Order(), fileHeader.numOrders, totalSampleLen, m_nChannels, 0, true); + PATTERNINDEX numPatterns = GetNumPatterns(file, *this, fileHeader.numOrders, totalSampleLen, 0, true); // Most likely just a file with lots of NULs at the start if(fileHeader.restartPos == 0 && fileHeader.numOrders == 0 && numPatterns <= 1) Modified: trunk/OpenMPT/soundlib/Load_stp.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_stp.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_stp.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -376,7 +376,7 @@ channels = file.ReadUint16BE(); if(channels > MAX_BASECHANNELS) return false; - m_nChannels = std::max(m_nChannels, channels); + ChnSettings.resize(std::max(GetNumChannels(), channels)); file.Skip(channels * patternLength * 4u); } @@ -628,7 +628,7 @@ } // after we know how many channels there really are... - m_nSamplePreAmp = 256 / m_nChannels; + m_nSamplePreAmp = 256 / GetNumChannels(); // Setup channel pan positions and volume SetupMODPanning(true); Modified: trunk/OpenMPT/soundlib/Load_symmod.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_symmod.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_symmod.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -1011,7 +1011,7 @@ m_SongFlags.set(SONG_LINEARSLIDES | SONG_EXFILTERRANGE | SONG_IMPORTED); m_playBehaviour = GetDefaultPlaybackBehaviour(MOD_TYPE_IT); m_playBehaviour.reset(kITShortSampleRetrig); - m_nSamplePreAmp = Clamp(512 / m_nChannels, 16, 128); + m_nSamplePreAmp = Clamp(512 / GetNumChannels(), 16, 128); enum class ChunkType : int32 { @@ -1307,7 +1307,7 @@ std::map<SymEvent, uint8> macroMap; bool useDSP = false; - const uint32 patternSize = m_nChannels * trackLen; + const uint32 patternSize = GetNumChannels() * trackLen; const PATTERNINDEX numPatterns = mpt::saturate_cast<PATTERNINDEX>(patternData.size() / patternSize); Patterns.ResizeArray(numPatterns); @@ -1335,7 +1335,7 @@ uint16 retriggerRemain = 0; uint16 tonePortaRemain = 0; }; - std::vector<ChnState> chnStates(m_nChannels); + std::vector<ChnState> chnStates(GetNumChannels()); // In Symphonie, sequences represent the structure of a song, and not separate songs like in OpenMPT. Hence they will all be loaded into the same ModSequence. for(SymSequence &seq : sequences) @@ -1382,14 +1382,14 @@ uint8 patternSpeed = static_cast<uint8>(pos.speed); // This may intentionally read into the next pattern - auto srcEvent = patternData.cbegin() + (pos.pattern * patternSize) + (pos.start * m_nChannels); + auto srcEvent = patternData.cbegin() + (pos.pattern * patternSize) + (pos.start * GetNumChannels()); const SymEvent emptyEvent{}; ModCommand syncPlayCommand; for(ROWINDEX row = 0; row < pos.length; row++) { ModCommand *rowBase = Patterns[patternIndex].GetpModCommand(row, 0); bool applySyncPlay = false; - for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) + for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { ModCommand &m = rowBase[chn]; const SymEvent &event = (srcEvent != patternData.cend()) ? *srcEvent : emptyEvent; @@ -1539,7 +1539,7 @@ } // Key-On commands with stereo instruments are played on both channels - unless there's already some sort of event - if(event.note > 0 && (chn < m_nChannels - 1) && !(chn % 2u) + if(event.note > 0 && (chn < GetNumChannels() - 1) && !(chn % 2u) && origInst < instruments.size() && instruments[origInst].channel == SymInstrument::StereoL) { ModCommand &next = rowBase[chn + 1]; @@ -1689,7 +1689,7 @@ m.command = CMD_CHANNELVOLUME; m.param = chnState.calculatedVol = static_cast<uint8>(Util::muldivr_unsigned(chnState.lastVol, chnState.channelVol, 100)); } - if(event.note == 4 && chn < (m_nChannels - 1) && chnStates[chn + 1].channelVol != volR) + if(event.note == 4 && chn < (GetNumChannels() - 1) && chnStates[chn + 1].channelVol != volR) { chnStates[chn + 1].channelVol = volR; @@ -1902,7 +1902,7 @@ if(useDSP) { SNDMIXPLUGIN &plugin = m_MixPlugins[0]; - plugin.Destroy(); + mpt::reconstruct(plugin); memcpy(&plugin.Info.dwPluginId1, "SymM", 4); memcpy(&plugin.Info.dwPluginId2, "Echo", 4); plugin.Info.routingFlags = SNDMIXPLUGININFO::irAutoSuspend; Modified: trunk/OpenMPT/soundlib/Load_ult.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_ult.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_ult.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -347,7 +347,7 @@ ReadOrderFromFile<uint8>(Order(), file, 256, 0xFF, 0xFE); if(CHANNELINDEX numChannels = file.ReadUint8() + 1u; numChannels <= MAX_BASECHANNELS) - m_nChannels = numChannels; + ChnSettings.resize(numChannels); else return false; @@ -355,7 +355,6 @@ for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { - mpt::reconstruct(ChnSettings[chn]); if(fileHeader.version >= '3') ChnSettings[chn].nPan = ((file.ReadUint8() & 0x0F) << 4) + 8; else @@ -370,7 +369,7 @@ } bool postFixSpeedCommands = false; - for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) + for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { ModCommand evnote; for(PATTERNINDEX pat = 0; pat < numPats && file.CanRead(5); pat++) Modified: trunk/OpenMPT/soundlib/Load_wav.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_wav.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_wav.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -114,7 +114,7 @@ Order().SetDefaultTempoInt(125); m_SongFlags = SONG_LINEARSLIDES; - for(CHANNELINDEX channel = 0; channel < m_nChannels; channel++) + for(CHANNELINDEX channel = 0; channel < GetNumChannels(); channel++) { ChnSettings[channel].nPan = (channel % 2u) ? 256 : 0; } Modified: trunk/OpenMPT/soundlib/Load_xm.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_xm.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_xm.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -1152,8 +1152,8 @@ fileHeader.size = sizeof(XMFileHeader) - 60; // minus everything before this field fileHeader.restartPos = Order().GetRestartPos(); - fileHeader.channels = m_nChannels; - if((m_nChannels % 2u) && m_nChannels < 32) + fileHeader.channels = GetNumChannels(); + if((GetNumChannels() % 2u) && GetNumChannels() < 32) { // Avoid odd channel count for FT2 compatibility fileHeader.channels++; @@ -1243,10 +1243,10 @@ // Empty patterns are always loaded as 64-row patterns in FT2, regardless of their real size... bool emptyPattern = true; - for(size_t j = m_nChannels * numRows; j > 0; j--, p++) + for(size_t j = GetNumChannels() * numRows; j > 0; j--, p++) { // Don't write more than 32 channels - if(compatibilityExport && m_nChannels - ((j - 1) % m_nChannels) > 32) continue; + if(compatibilityExport && GetNumChannels() - ((j - 1) % GetNumChannels()) > 32) continue; uint8 note = p->note, command = 0, param = 0; ModSaveCommand(*p, command, param, true, compatibilityExport); @@ -1325,7 +1325,7 @@ if (b & 16) s[len++] = param; } - if(addChannel && (j % m_nChannels == 1 || m_nChannels == 1)) + if(addChannel && (j % GetNumChannels() == 1 || GetNumChannels() == 1)) { ASSERT_CAN_WRITE(1); s[len++] = 0x80; @@ -1489,7 +1489,7 @@ // Writing Channel Names { CHANNELINDEX numNamedChannels = 0; - for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) + for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { if (ChnSettings[chn].szName[0]) numNamedChannels = chn + 1; } Modified: trunk/OpenMPT/soundlib/Load_xmf.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_xmf.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/Load_xmf.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -189,10 +189,10 @@ file.Skip(1); // Channel count already read const PATTERNINDEX numPatterns = file.ReadUint8() + 1u; - if(!file.CanRead(m_nChannels + numPatterns * m_nChannels * 64 * 6)) + if(!file.CanRead(GetNumChannels() + numPatterns * GetNumChannels() * 64 * 6)) return false; - for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) + for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { ChnSettings[chn].nPan = file.ReadUint8() * 0x11; } @@ -202,7 +202,7 @@ { if(!(loadFlags & loadPatternData) || !Patterns.Insert(pat, 64)) { - file.Skip(m_nChannels * 64 * 6); + file.Skip(GetNumChannels() * 64 * 6); continue; } ModCommand dummy; Modified: trunk/OpenMPT/soundlib/MODTools.cpp ============================================================================== --- trunk/OpenMPT/soundlib/MODTools.cpp Sat Jun 8 01:19:39 2024 (r20949) +++ trunk/OpenMPT/soundlib/MODTools.cpp Sat Jun 8 02:16:59 2024 (r20950) @@ -381,8 +381,9 @@ // Parse the order list to determine how many patterns are used in the file. -PATTERNINDEX GetNumPatterns(FileReader &file, ModSequence &Order, ORDERINDEX numOrders, SmpLength totalSampleLen, CHANNELINDEX &numChannels, SmpLength wowSampleLen, bool validateHiddenPatterns) +PATTERNINDEX GetNumPatterns(FileReader &file, CSoundFile &sndFile, ORDERINDEX numOrders, SmpLength totalSampleLen, SmpLength wowSampleLen, bool validateHiddenPatterns) { + ModSequence &Order = sndFile.Order(); PATTERNINDEX numPatterns = 0; // Total number of patterns in file (determined by going through the whole order list) with pattern number < 128 PATTERNINDEX officialPatterns = 0; // Number of patterns only found in the "official" part of the order list (i.e. order positions < claimed order length) PATTERNINDEX numPatternsIllegal = 0; // Total number of patterns in file, also counting in "invalid" pattern indexes >= 128 @@ -409,7 +410,7 @@ const size_t patternStartOffset = file.GetPosition(); const size_t sizeWithoutPatterns = totalSampleLen + patternStartOffset; - const size_t sizeWithOfficialPatterns = sizeWithoutPatterns + officialPatterns * numChannels * 256; + const size_t sizeWithOfficialPatterns = sizeWithoutPatterns + officialPatterns * sndFile.GetNumChannels() * 256; if(wowSampleLen && (wowSampleLen + patternStartOffset) + numPatterns * 8 * 256 == (file.GetLength() & ~1)) { @@ -418,7 +419,7 @@ // (e.g. ponylips.mod, MD5 c039af363b1d99a492dafc5b5f9dd949, SHA1 1bee1941c47bc6f913735ce0cf1880b248b8fc93) file.Seek(patternStartOffset + numPatterns * 4 * 256); ... [truncated message content] |
From: <sv...@op...> - 2024-06-07 23:19:50
|
Author: sagamusix Date: Sat Jun 8 01:19:39 2024 New Revision: 20949 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20949 Log: [Ref] CSoundFile::InitializeGlobals now takes the channel count in addition to the format to initialize to. With almost all supported formats, we can determine the correct channel count very early on, making it easier to initialize the correct number of channel headers, and allowing us to remove CSoundFile::InitializeChannels completely. In a second step, the fixed-size ChnSettings array and m_nChannels can be merged into a ChnSettings vector. [Reg] SymMOD: Require first chunk to be number of channels to simplify initialization. In practice, all SymMOD files are structured like that. Modified: trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/mptrack/Undo.cpp trunk/OpenMPT/mptrack/View_gen.cpp trunk/OpenMPT/soundlib/Load_667.cpp trunk/OpenMPT/soundlib/Load_669.cpp trunk/OpenMPT/soundlib/Load_amf.cpp trunk/OpenMPT/soundlib/Load_ams.cpp trunk/OpenMPT/soundlib/Load_c67.cpp trunk/OpenMPT/soundlib/Load_dbm.cpp trunk/OpenMPT/soundlib/Load_digi.cpp trunk/OpenMPT/soundlib/Load_dmf.cpp trunk/OpenMPT/soundlib/Load_dsm.cpp trunk/OpenMPT/soundlib/Load_dsym.cpp trunk/OpenMPT/soundlib/Load_dtm.cpp trunk/OpenMPT/soundlib/Load_far.cpp trunk/OpenMPT/soundlib/Load_fmt.cpp trunk/OpenMPT/soundlib/Load_ftm.cpp trunk/OpenMPT/soundlib/Load_gdm.cpp trunk/OpenMPT/soundlib/Load_gmc.cpp trunk/OpenMPT/soundlib/Load_gt2.cpp trunk/OpenMPT/soundlib/Load_ice.cpp trunk/OpenMPT/soundlib/Load_imf.cpp trunk/OpenMPT/soundlib/Load_ims.cpp trunk/OpenMPT/soundlib/Load_it.cpp trunk/OpenMPT/soundlib/Load_itp.cpp trunk/OpenMPT/soundlib/Load_kris.cpp trunk/OpenMPT/soundlib/Load_mdl.cpp trunk/OpenMPT/soundlib/Load_med.cpp trunk/OpenMPT/soundlib/Load_mid.cpp trunk/OpenMPT/soundlib/Load_mo3.cpp trunk/OpenMPT/soundlib/Load_mod.cpp trunk/OpenMPT/soundlib/Load_mt2.cpp trunk/OpenMPT/soundlib/Load_mtm.cpp trunk/OpenMPT/soundlib/Load_mus_km.cpp trunk/OpenMPT/soundlib/Load_okt.cpp trunk/OpenMPT/soundlib/Load_plm.cpp trunk/OpenMPT/soundlib/Load_psm.cpp trunk/OpenMPT/soundlib/Load_ptm.cpp trunk/OpenMPT/soundlib/Load_puma.cpp trunk/OpenMPT/soundlib/Load_rtm.cpp trunk/OpenMPT/soundlib/Load_s3m.cpp trunk/OpenMPT/soundlib/Load_sfx.cpp trunk/OpenMPT/soundlib/Load_stk.cpp trunk/OpenMPT/soundlib/Load_stm.cpp trunk/OpenMPT/soundlib/Load_stp.cpp trunk/OpenMPT/soundlib/Load_symmod.cpp trunk/OpenMPT/soundlib/Load_uax.cpp trunk/OpenMPT/soundlib/Load_ult.cpp trunk/OpenMPT/soundlib/Load_wav.cpp trunk/OpenMPT/soundlib/Load_xm.cpp trunk/OpenMPT/soundlib/Load_xmf.cpp trunk/OpenMPT/soundlib/ModChannel.cpp trunk/OpenMPT/soundlib/ModChannel.h trunk/OpenMPT/soundlib/S3MTools.h trunk/OpenMPT/soundlib/Snd_fx.cpp trunk/OpenMPT/soundlib/Sndfile.cpp trunk/OpenMPT/soundlib/Sndfile.h trunk/OpenMPT/soundlib/load_j2b.cpp Modified: trunk/OpenMPT/mptrack/Moddoc.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Moddoc.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/mptrack/Moddoc.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -643,14 +643,6 @@ // Set up mix levels m_SndFile.m_PlayState.m_nGlobalVolume = m_SndFile.m_nDefaultGlobalVolume = MAX_GLOBAL_VOLUME; m_SndFile.m_nSamplePreAmp = m_SndFile.m_nVSTiVolume = 48; - - for (CHANNELINDEX nChn = 0; nChn < MAX_BASECHANNELS; nChn++) - { - m_SndFile.ChnSettings[nChn].dwFlags.reset(); - m_SndFile.ChnSettings[nChn].nVolume = 64; - m_SndFile.ChnSettings[nChn].nPan = 128; - m_SndFile.m_PlayState.Chn[nChn].nGlobalVol = 64; - } // Setup LRRL panning scheme for MODs m_SndFile.SetupMODPanning(); } @@ -1178,9 +1170,9 @@ { PLUGINDEX plug = pIns->nMixPlug; // First try intrument VST if((!plug || plug > MAX_MIXPLUGINS) // No good plug yet - && currentChn < MAX_BASECHANNELS) // Chan OK + && currentChn < m_SndFile.ChnSettings.size()) { - plug = m_SndFile.ChnSettings[currentChn].nMixPlugin;// Then try Channel VST + plug = m_SndFile.ChnSettings[currentChn].nMixPlugin; // Then try Channel VST } if(plug && plug <= MAX_MIXPLUGINS) Modified: trunk/OpenMPT/mptrack/Undo.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Undo.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/mptrack/Undo.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -152,7 +152,7 @@ if(storeChannelInfo) { - undo.channelInfo.assign(std::begin(sndFile.ChnSettings) + firstChn, std::begin(sndFile.ChnSettings) + firstChn + numChns); + undo.channelInfo.assign(sndFile.ChnSettings.begin() + firstChn, sndFile.ChnSettings.begin() + firstChn + numChns); } buffer.push_back(std::move(undo)); Modified: trunk/OpenMPT/mptrack/View_gen.cpp ============================================================================== --- trunk/OpenMPT/mptrack/View_gen.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/mptrack/View_gen.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -371,7 +371,7 @@ { const CHANNELINDEX nChn = m_nActiveTab * CHANNELS_IN_TAB + ichn; const BOOL bEnable = (nChn < sndFile.GetNumChannels()) ? TRUE : FALSE; - if(nChn < MAX_BASECHANNELS) + if(nChn < sndFile.GetNumChannels()) { const auto &chnSettings = sndFile.ChnSettings[nChn]; // Text @@ -605,7 +605,7 @@ const CSoundFile &sndFile = GetDocument()->GetSoundFile(); for(CHANNELINDEX ichn = 0; ichn < CHANNELS_IN_TAB; ichn++) { - if(const CHANNELINDEX nChn = m_nActiveTab * CHANNELS_IN_TAB + ichn; nChn < MAX_BASECHANNELS) + if(const CHANNELINDEX nChn = m_nActiveTab * CHANNELS_IN_TAB + ichn; nChn < sndFile.GetNumChannels()) { PLUGINDEX sel = sndFile.ChnSettings[nChn].nMixPlugin ? sndFile.ChnSettings[nChn].nMixPlugin - 1 : PLUGINDEX_INVALID; m_CbnEffects[ichn].Update(PluginComboBox::Config{PluginComboBox::ShowNoPlugin}.Hint(hint, pObj).CurrentSelection(sel), sndFile); Modified: trunk/OpenMPT/soundlib/Load_667.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_667.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_667.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -77,11 +77,10 @@ if(loadFlags == onlyVerifyHeader) return true; - InitializeGlobals(MOD_TYPE_S3M); + InitializeGlobals(MOD_TYPE_S3M, 18); m_SongFlags.set(SONG_IMPORTED); Order().SetDefaultTempoInt(150); Order().SetDefaultSpeed(fileHeader.speed); - m_nChannels = 18; m_nSamples = 64; ReadOrderFromFile<uint8>(Order(), file, fileHeader.numOrders); @@ -91,8 +90,6 @@ return false; } - InitializeChannels(); - for(SAMPLEINDEX smp = 1; smp <= m_nSamples; smp++) { // Reorder OPL patch bytes (interleave modulator and carrier) Modified: trunk/OpenMPT/soundlib/Load_669.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_669.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_669.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -135,12 +135,11 @@ return false; } - InitializeGlobals(MOD_TYPE_669); + InitializeGlobals(MOD_TYPE_669, 8); m_nMinPeriod = 28 << 2; m_nMaxPeriod = 1712 << 3; Order().SetDefaultTempoInt(78); Order().SetDefaultSpeed(4); - m_nChannels = 8; m_playBehaviour.set(kPeriodsAreHertz); m_SongFlags.set(SONG_FASTPORTAS | SONG_AUTO_TONEPORTA); #ifdef MODPLUG_TRACKER @@ -179,7 +178,6 @@ // Set up panning for(CHANNELINDEX chn = 0; chn < 8; chn++) { - ChnSettings[chn].Reset(); ChnSettings[chn].nPan = (chn & 1) ? 0xD0 : 0x30; } Modified: trunk/OpenMPT/soundlib/Load_amf.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_amf.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_amf.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -125,10 +125,8 @@ return true; } - InitializeGlobals(MOD_TYPE_AMF0); - InitializeChannels(); + InitializeGlobals(MOD_TYPE_AMF0, 8); SetupMODPanning(true); - m_nChannels = 8; Order().SetDefaultSpeed(fileHeader.defaultSpeed); Order().SetDefaultTempoInt(fileHeader.defaultTempo); m_nSamples = fileHeader.numSamples; @@ -573,8 +571,7 @@ if(loadFlags == onlyVerifyHeader) return true; - InitializeGlobals(MOD_TYPE_AMF); - InitializeChannels(); + InitializeGlobals(MOD_TYPE_AMF, (fileSignature.version < 9) ? 4 : fileHeader.numChannels); if(isDMF) { @@ -588,13 +585,11 @@ } m_modFormat.charset = mpt::Charset::CP437; - m_nChannels = fileHeader.numChannels; m_nSamples = fileHeader.numSamples; if(fileSignature.version < 9) { // Old format revisions are fixed to 4 channels - m_nChannels = 4; for(CHANNELINDEX chn = 0; chn < 4; chn++) { ChnSettings[chn].nPan = (chn & 1) ? 0xC0 : 0x40; Modified: trunk/OpenMPT/soundlib/Load_ams.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_ams.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_ams.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -400,11 +400,9 @@ return true; } - InitializeGlobals(MOD_TYPE_AMS); - InitializeChannels(); + InitializeGlobals(MOD_TYPE_AMS, (fileHeader.channelConfig & 0x1F) + 1); m_SongFlags = SONG_ITCOMPATGXX | SONG_ITOLDEFFECTS; - m_nChannels = (fileHeader.channelConfig & 0x1F) + 1; m_nSamples = fileHeader.numSamps; SetupMODPanning(true); @@ -774,12 +772,11 @@ return true; } - InitializeGlobals(MOD_TYPE_AMS); + InitializeGlobals(MOD_TYPE_AMS, 32); m_songName = std::move(songName); m_nInstruments = fileHeader.numIns; - m_nChannels = 32; SetupMODPanning(true); m_modFormat.formatName = U_("Velvet Studio"); @@ -912,7 +909,6 @@ // Channel names for(CHANNELINDEX chn = 0; chn < 32; chn++) { - ChnSettings[chn].Reset(); file.ReadSizedString<uint8le, mpt::String::spacePadded>(ChnSettings[chn].szName); } Modified: trunk/OpenMPT/soundlib/Load_c67.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_c67.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_c67.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -157,8 +157,7 @@ } } - InitializeGlobals(MOD_TYPE_S3M); - InitializeChannels(); + InitializeGlobals(MOD_TYPE_S3M, 4 + 9); m_modFormat.formatName = U_("CDFM"); m_modFormat.type = U_("c67"); @@ -169,7 +168,6 @@ Order().SetDefaultTempoInt(143); Order().SetRestartPos(fileHeader.restartPos); m_nSamples = 64; - m_nChannels = 4 + 9; m_playBehaviour.set(kOPLBeatingOscillators); m_SongFlags.set(SONG_IMPORTED); Modified: trunk/OpenMPT/soundlib/Load_dbm.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_dbm.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_dbm.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -347,10 +347,8 @@ return false; } - InitializeGlobals(MOD_TYPE_DBM); - InitializeChannels(); + InitializeGlobals(MOD_TYPE_DBM, Clamp<uint16, uint16>(infoData.channels, 1, MAX_BASECHANNELS)); // Note: MAX_BASECHANNELS is currently 127, but DBPro 2 supports up to 128 channels, DBPro 3 apparently up to 254. m_SongFlags = SONG_ITCOMPATGXX | SONG_ITOLDEFFECTS; - m_nChannels = Clamp<uint16, uint16>(infoData.channels, 1, MAX_BASECHANNELS); // note: MAX_BASECHANNELS is currently 127, but DBPro 2 supports up to 128 channels, DBPro 3 apparently up to 254. m_nInstruments = std::min(static_cast<INSTRUMENTINDEX>(infoData.instruments), static_cast<INSTRUMENTINDEX>(MAX_INSTRUMENTS - 1)); m_nSamples = std::min(static_cast<SAMPLEINDEX>(infoData.samples), static_cast<SAMPLEINDEX>(MAX_SAMPLES - 1)); m_playBehaviour.set(kSlidesAtSpeed1); Modified: trunk/OpenMPT/soundlib/Load_digi.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_digi.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_digi.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -119,10 +119,7 @@ } // Globals - InitializeGlobals(MOD_TYPE_DIGI); - InitializeChannels(); - - m_nChannels = fileHeader.numChannels; + InitializeGlobals(MOD_TYPE_DIGI, fileHeader.numChannels); m_nSamples = 31; m_nSamplePreAmp = 256 / m_nChannels; Modified: trunk/OpenMPT/soundlib/Load_dmf.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_dmf.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_dmf.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -901,23 +901,6 @@ return true; } - InitializeGlobals(MOD_TYPE_DMF); - - m_modFormat.formatName = MPT_UFORMAT("Delusion Digital Music Format v{}")(fileHeader.version); - m_modFormat.madeWithTracker = fileHeader.version == 10 ? UL_("X-Tracker 32") : UL_("X-Tracker"); - m_modFormat.type = U_("dmf"); - m_modFormat.charset = mpt::Charset::CP437; - - m_songName = mpt::String::ReadBuf(mpt::String::spacePadded, fileHeader.songname); - m_songArtist = mpt::ToUnicode(mpt::Charset::CP437, mpt::String::ReadBuf(mpt::String::spacePadded, fileHeader.composer)); - - FileHistory mptHistory; - mptHistory.loadDate.day = Clamp(fileHeader.creationDay, uint8(1), uint8(31)); - mptHistory.loadDate.month = Clamp(fileHeader.creationMonth, uint8(1), uint8(12)); - mptHistory.loadDate.year = 1900 + fileHeader.creationYear; - m_FileHistory.clear(); - m_FileHistory.push_back(mptHistory); - // Go through all chunks now... cannot use our standard IFF chunk reader here because early X-Tracker versions write some malformed chunk headers... fun code ahead! ChunkReader::ChunkList<DMFChunk> chunks; while(file.CanRead(sizeof(DMFChunk))) @@ -941,6 +924,47 @@ } FileReader chunk; + // Read pattern chunk first so that we know how many channels there are + chunk = chunks.GetChunk(DMFChunk::idPATT); + if(!chunk.IsValid()) + return false; + + DMFPatterns patHeader; + chunk.ReadStruct(patHeader); + // First, find out where all of our patterns are... + std::vector<FileReader> patternChunks; + if(loadFlags & loadPatternData) + { + patternChunks.resize(patHeader.numPatterns); + const uint8 headerSize = fileHeader.version < 3 ? 9 : 8; + for(auto &patternChunk : patternChunks) + { + chunk.Skip(headerSize - sizeof(uint32le)); + const uint32 patLength = chunk.ReadUint32LE(); + if(!chunk.CanRead(patLength)) + return false; + chunk.SkipBack(headerSize); + patternChunk = chunk.ReadChunk(headerSize + patLength); + } + } + + InitializeGlobals(MOD_TYPE_DMF, Clamp<uint8, uint8>(patHeader.numTracks, 1, 32) + 1); // + 1 for global track (used for tempo stuff) + + m_modFormat.formatName = MPT_UFORMAT("Delusion Digital Music Format v{}")(fileHeader.version); + m_modFormat.madeWithTracker = fileHeader.version == 10 ? UL_("X-Tracker 32") : UL_("X-Tracker"); + m_modFormat.type = U_("dmf"); + m_modFormat.charset = mpt::Charset::CP437; + + m_songName = mpt::String::ReadBuf(mpt::String::spacePadded, fileHeader.songname); + m_songArtist = mpt::ToUnicode(mpt::Charset::CP437, mpt::String::ReadBuf(mpt::String::spacePadded, fileHeader.composer)); + + FileHistory mptHistory; + mptHistory.loadDate.day = Clamp(fileHeader.creationDay, uint8(1), uint8(31)); + mptHistory.loadDate.month = Clamp(fileHeader.creationMonth, uint8(1), uint8(12)); + mptHistory.loadDate.year = 1900 + fileHeader.creationYear; + m_FileHistory.clear(); + m_FileHistory.push_back(mptHistory); + // Read order list chunk = chunks.GetChunk(DMFChunk::idSEQU); ORDERINDEX seqLoopStart = 0, seqLoopEnd = ORDERINDEX_MAX; @@ -956,27 +980,8 @@ LimitMax(seqLoopStart, Order().GetLastIndex()); LimitMax(seqLoopEnd, Order().GetLastIndex()); - // Read patterns - chunk = chunks.GetChunk(DMFChunk::idPATT); - if(chunk.IsValid() && (loadFlags & loadPatternData)) + if(loadFlags & loadPatternData) { - DMFPatterns patHeader; - chunk.ReadStruct(patHeader); - m_nChannels = Clamp<uint8, uint8>(patHeader.numTracks, 1, 32) + 1; // + 1 for global track (used for tempo stuff) - - // First, find out where all of our patterns are... - std::vector<FileReader> patternChunks(patHeader.numPatterns); - for(auto &patternChunk : patternChunks) - { - const uint8 headerSize = fileHeader.version < 3 ? 9 : 8; - chunk.Skip(headerSize - sizeof(uint32le)); - const uint32 patLength = chunk.ReadUint32LE(); - if(!chunk.CanRead(patLength)) - return false; - chunk.SkipBack(headerSize); - patternChunk = chunk.ReadChunk(headerSize + patLength); - } - // Now go through the order list and load them. DMFPatternSettings settings(GetNumChannels()); @@ -1042,7 +1047,6 @@ } } - InitializeChannels(); m_SongFlags = SONG_LINEARSLIDES | SONG_ITCOMPATGXX; // this will be converted to IT format by MPT. SONG_ITOLDEFFECTS is not set because of tremor and vibrato. Order().SetDefaultSpeed(6); Order().SetDefaultTempoInt(120); Modified: trunk/OpenMPT/soundlib/Load_dsm.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_dsm.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_dsm.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -206,14 +206,13 @@ return false; } - InitializeGlobals(MOD_TYPE_DSM); + InitializeGlobals(MOD_TYPE_DSM, std::max(songHeader.numChannels.get(), uint16(1))); m_modFormat.formatName = U_("DSIK Format"); m_modFormat.type = U_("dsm"); m_modFormat.charset = mpt::Charset::CP437; m_songName = mpt::String::ReadBuf(mpt::String::maybeNullTerminated, songHeader.songName); - m_nChannels = std::max(songHeader.numChannels.get(), uint16(1)); Order().SetDefaultSpeed(songHeader.speed); Order().SetDefaultTempoInt(songHeader.bpm); m_nDefaultGlobalVolume = std::min(songHeader.globalVol.get(), uint8(64)) * 4u; @@ -224,9 +223,8 @@ m_nSamplePreAmp = songHeader.mastervol & 0x7F; // Read channel panning - for(CHANNELINDEX chn = 0; chn < 16; chn++) + for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { - ChnSettings[chn].Reset(); if(songHeader.panPos[chn] <= 0x80) { ChnSettings[chn].nPan = songHeader.panPos[chn] * 2; @@ -400,9 +398,8 @@ if(loadFlags == onlyVerifyHeader) return true; - InitializeGlobals(MOD_TYPE_MOD); + InitializeGlobals(MOD_TYPE_MOD, fileHeader.numChannels); m_SongFlags = SONG_IMPORTED; - m_nChannels = fileHeader.numChannels; static_assert(MAX_BASECHANNELS >= 32 && MAX_SAMPLES > 255); m_nSamples = fileHeader.numSamples; m_nDefaultGlobalVolume = Util::muldivr_unsigned(fileHeader.globalVol, MAX_GLOBAL_VOLUME, 100); @@ -412,7 +409,6 @@ for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) { - ChnSettings[chn].Reset(); ChnSettings[chn].nPan = (file.ReadUint8() & 0x0F) * 0x11; } Modified: trunk/OpenMPT/soundlib/Load_dsym.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_dsym.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_dsym.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -235,15 +235,13 @@ if(loadFlags == onlyVerifyHeader) return true; - InitializeGlobals(MOD_TYPE_MOD); + InitializeGlobals(MOD_TYPE_MOD, fileHeader.numChannels); m_SongFlags.set(SONG_IMPORTED | SONG_AMIGALIMITS); m_SongFlags.reset(SONG_ISAMIGA); - m_nChannels = fileHeader.numChannels; m_nSamples = 63; for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) { - InitChannel(chn); ChnSettings[chn].nPan = (((chn & 3) == 1) || ((chn & 3) == 2)) ? 64 : 192; } Modified: trunk/OpenMPT/soundlib/Load_dtm.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_dtm.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_dtm.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -228,8 +228,30 @@ return true; } - InitializeGlobals(MOD_TYPE_DTM); - InitializeChannels(); + std::string songName; + file.ReadString<mpt::String::maybeNullTerminated>(songName, fileHeader.headerSize - (sizeof(fileHeader) - 8u)); + + auto chunks = ChunkReader(file).ReadChunks<DTMChunk>(1); + + // Read pattern properties + uint32 patternFormat; + if(FileReader chunk = chunks.GetChunk(DTMChunk::idPATT)) + { + const uint16 numChannels = chunk.ReadUint16BE(); + if(numChannels < 1 || numChannels > 32) + return false; + + InitializeGlobals(MOD_TYPE_DTM, numChannels); + + Patterns.ResizeArray(chunk.ReadUint16BE()); // Number of stored patterns, may be lower than highest pattern number + patternFormat = chunk.ReadUint32BE(); + if(patternFormat != DTM_PT_PATTERN_FORMAT && patternFormat != DTM_204_PATTERN_FORMAT && patternFormat != DTM_206_PATTERN_FORMAT) + return false; + } else + { + return false; + } + m_SongFlags.set(SONG_ITCOMPATGXX | SONG_ITOLDEFFECTS | SONG_FASTPORTAS); m_playBehaviour.reset(kPeriodsAreHertz); m_playBehaviour.reset(kITVibratoTremoloPanbrello); @@ -240,10 +262,7 @@ Order().SetDefaultSpeed(fileHeader.speed); if(fileHeader.stereoMode == 0) SetupMODPanning(true); - - file.ReadString<mpt::String::maybeNullTerminated>(m_songName, fileHeader.headerSize - (sizeof(fileHeader) - 8u)); - - auto chunks = ChunkReader(file).ReadChunks<DTMChunk>(1); + m_songName = std::move(songName); // Read order list if(FileReader chunk = chunks.GetChunk(DTMChunk::idS_Q_)) @@ -256,26 +275,6 @@ } else { return false; - } - - // Read pattern properties - uint32 patternFormat; - if(FileReader chunk = chunks.GetChunk(DTMChunk::idPATT)) - { - m_nChannels = chunk.ReadUint16BE(); - if(m_nChannels < 1 || m_nChannels > 32) - { - return false; - } - Patterns.ResizeArray(chunk.ReadUint16BE()); // Number of stored patterns, may be lower than highest pattern number - patternFormat = chunk.ReadUint32BE(); - if(patternFormat != DTM_PT_PATTERN_FORMAT && patternFormat != DTM_204_PATTERN_FORMAT && patternFormat != DTM_206_PATTERN_FORMAT) - { - return false; - } - } else - { - return false; } // Read global info Modified: trunk/OpenMPT/soundlib/Load_far.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_far.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_far.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -162,8 +162,7 @@ } // Globals - InitializeGlobals(MOD_TYPE_FAR); - m_nChannels = 16; + InitializeGlobals(MOD_TYPE_FAR, 16); m_nSamplePreAmp = 32; Order().SetDefaultSpeed(fileHeader.defaultSpeed); Order().SetDefaultTempoInt(80); @@ -180,7 +179,6 @@ // Read channel settings for(CHANNELINDEX chn = 0; chn < 16; chn++) { - ChnSettings[chn].Reset(); ChnSettings[chn].dwFlags = fileHeader.onOff[chn] ? ChannelFlags(0) : CHN_MUTE; ChnSettings[chn].nPan = ((fileHeader.chnPanning[chn] & 0x0F) << 4) + 8; } Modified: trunk/OpenMPT/soundlib/Load_fmt.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_fmt.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_fmt.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -85,9 +85,7 @@ if(loadFlags == onlyVerifyHeader) return true; - InitializeGlobals(MOD_TYPE_S3M); - InitializeChannels(); - m_nChannels = 8; + InitializeGlobals(MOD_TYPE_S3M, 8); m_nSamples = 8; Order().SetDefaultTempo(TEMPO(45.5)); // 18.2 Hz timer m_playBehaviour.set(kOPLNoteStopWith0Hz); Modified: trunk/OpenMPT/soundlib/Load_ftm.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_ftm.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_ftm.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -102,9 +102,7 @@ else if(loadFlags == onlyVerifyHeader) return true; - InitializeGlobals(MOD_TYPE_MOD); - m_nChannels = 8; - InitializeChannels(); + InitializeGlobals(MOD_TYPE_MOD, 8); for(CHANNELINDEX chn = 0; chn < 8; chn++) { ChnSettings[chn].nPan = (chn < 2 || chn > 5) ? 64 : 192; Modified: trunk/OpenMPT/soundlib/Load_gdm.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_gdm.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_gdm.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -34,7 +34,7 @@ uint16le trackerID; // Composing Tracker ID code (00 = 2GDM) uint8le trackerMajorVer; // Tracker's major version uint8le trackerMinorVer; // Tracker's minor version - uint8le panMap[32]; // 0-Left to 15-Right, 255-N/U + uint8le panMap[32]; // 0-Left to 15-Right, 16=Surround, 255-N/U uint8le masterVol; // Range: 0...64 uint8le tempo; // Initial music tempo (6) uint8le bpm; // Initial music BPM (125) @@ -57,6 +57,11 @@ uint16le scrollyScriptLength; uint32le textGraphicOffset; // Offset of text graphic (huh?) uint16le textGraphicLength; + + uint8 GetNumChannels() const + { + return static_cast<uint8>(std::distance(std::begin(panMap), std::find(std::begin(panMap), std::end(panMap), uint8_max))); + } }; MPT_BINARY_STRUCT(GDMFileHeader, 157) @@ -120,7 +125,8 @@ || std::memcmp(fileHeader.magic2, "GMFS", 4) || fileHeader.formatMajorVer != 1 || fileHeader.formatMinorVer != 0 || fileHeader.originalFormat >= std::size(gdmFormatOrigin) - || fileHeader.originalFormat == 0) + || fileHeader.originalFormat == 0 + || !fileHeader.GetNumChannels()) { return false; } @@ -162,7 +168,7 @@ return true; } - InitializeGlobals(gdmFormatOrigin[fileHeader.originalFormat]); + InitializeGlobals(gdmFormatOrigin[fileHeader.originalFormat], fileHeader.GetNumChannels()); m_SongFlags.set(SONG_IMPORTED); m_modFormat.formatName = U_("General Digital Music"); @@ -185,10 +191,8 @@ } // Read channel pan map... 0...15 = channel panning, 16 = surround channel, 255 = channel does not exist - m_nChannels = 32; - for(CHANNELINDEX i = 0; i < 32; i++) + for(CHANNELINDEX i = 0; i < GetNumChannels(); i++) { - ChnSettings[i].Reset(); if(fileHeader.panMap[i] < 16) { ChnSettings[i].nPan = static_cast<uint16>(std::min((fileHeader.panMap[i] * 16) + 8, 256)); @@ -196,16 +200,8 @@ { ChnSettings[i].nPan = 128; ChnSettings[i].dwFlags = CHN_SURROUND; - } else if(fileHeader.panMap[i] == 0xFF) - { - m_nChannels = i; - break; } } - if(m_nChannels < 1) - { - return false; - } m_nDefaultGlobalVolume = std::min(fileHeader.masterVol * 4u, 256u); Order().SetDefaultSpeed(fileHeader.tempo); Modified: trunk/OpenMPT/soundlib/Load_gmc.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_gmc.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_gmc.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -110,8 +110,7 @@ else if(loadFlags == onlyVerifyHeader) return true; - InitializeGlobals(MOD_TYPE_MOD); - m_nChannels = 4; + InitializeGlobals(MOD_TYPE_MOD, 4); m_nSamples = 15; m_nMinPeriod = 113 * 4; m_nMaxPeriod = 856 * 4; Modified: trunk/OpenMPT/soundlib/Load_gt2.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_gt2.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_gt2.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -532,12 +532,10 @@ return true; // Globals - InitializeGlobals(MOD_TYPE_MPT); - InitializeChannels(); + InitializeGlobals(MOD_TYPE_MPT, fileHeader.numChannels); m_SongFlags.set(SONG_IMPORTED); m_playBehaviour = GetDefaultPlaybackBehaviour(MOD_TYPE_IT); m_playBehaviour.set(kApplyOffsetWithoutNote); - m_nChannels = fileHeader.numChannels; SetupMODPanning(true); m_modFormat.madeWithTracker = U_("Graoumf Tracker"); @@ -1182,9 +1180,24 @@ if(loadFlags == onlyVerifyHeader) return true; + std::vector<uint16be> pannedTracks; + file.ReadVector(pannedTracks, fileHeader.numPannedTracks); + + ChunkReader chunkFile(file); + auto chunks = chunkFile.ReadChunksUntil<GT2Chunk>(1, GT2Chunk::idENDC); + + if(auto chunk = chunks.GetChunk(GT2Chunk::idPATS); chunk.CanRead(2)) + { + if(uint16 channels = chunk.ReadUint16BE(); channels >= 1 && channels <= MAX_BASECHANNELS) + InitializeGlobals(MOD_TYPE_MPT, channels); + else + return false; + } else + { + return false; + } + // Globals - InitializeGlobals(MOD_TYPE_MPT); - InitializeChannels(); m_SongFlags.set(SONG_IMPORTED | SONG_EXFILTERRANGE); m_playBehaviour = GetDefaultPlaybackBehaviour(MOD_TYPE_IT); m_playBehaviour.set(kFT2ST3OffsetOutOfRange, fileHeader.fileVersion >= 6); @@ -1196,7 +1209,6 @@ mptHistory.loadDate.year = fileHeader.year; m_FileHistory.push_back(mptHistory); - m_nChannels = 32; m_modFormat.madeWithTracker = mpt::ToUnicode(mpt::Charset::ASCII, mpt::String::ReadBuf(mpt::String::spacePadded, fileHeader.trackerName)); m_modFormat.formatName = (fileHeader.fileVersion <= 5 ? MPT_UFORMAT("Graoumf Tracker v{}") : MPT_UFORMAT("Graoumf Tracker 2 v{}"))(fileHeader.fileVersion); m_modFormat.type = U_("gt2"); @@ -1205,36 +1217,21 @@ m_songName = mpt::String::ReadBuf(mpt::String::spacePadded, fileHeader.songName); m_nSamplePreAmp = 256; - m_nDefaultGlobalVolume = 384 / (3 + m_nChannels); // See documentation on command 5xxx + m_nDefaultGlobalVolume = 384 / (3 + m_nChannels); // See documentation on command 5xxx: Default linear master volume is 12288 / (3 + number of channels) if(fileHeader.fileVersion <= 5) { Order().SetDefaultSpeed(std::max(fileHeader.speed.get(), uint16(1))); Order().SetDefaultTempoInt(std::max(fileHeader.tempo.get(), uint16(1))); m_nDefaultGlobalVolume = std::min(Util::muldivr_unsigned(fileHeader.masterVol, MAX_GLOBAL_VOLUME, 4095), uint32(MAX_GLOBAL_VOLUME)); - uint16 tracks = fileHeader.numPannedTracks; - LimitMax(tracks, MAX_BASECHANNELS); + const CHANNELINDEX tracks = std::min(static_cast<CHANNELINDEX>(pannedTracks.size()), m_nChannels); for(CHANNELINDEX chn = 0; chn < tracks; chn++) { - ChnSettings[chn].nPan = std::min(static_cast<uint16>(Util::muldivr_unsigned(file.ReadUint16BE(), 256, 4095)), uint16(256)); + ChnSettings[chn].nPan = std::min(static_cast<uint16>(Util::muldivr_unsigned(pannedTracks[chn], 256, 4095)), uint16(256)); } } file.Seek(fileHeader.headerSize); - ChunkReader chunkFile(file); - auto chunks = chunkFile.ReadChunksUntil<GT2Chunk>(1, GT2Chunk::idENDC); - - if(auto chunk = chunks.GetChunk(GT2Chunk::idPATS); chunk.CanRead(2)) - { - if(uint16 channels = chunk.ReadUint16BE(); channels >= 1 && channels <= MAX_BASECHANNELS) - m_nChannels = channels; - else - return false; - } else - { - return false; - } - if(auto chunk = chunks.GetChunk(GT2Chunk::idSONG); chunk.CanRead(2)) { ORDERINDEX numOrders = chunk.ReadUint16BE(); Modified: trunk/OpenMPT/soundlib/Load_ice.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_ice.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_ice.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -63,14 +63,14 @@ if(IsMagic(magic, "MTN\0")) { - InitializeGlobals(MOD_TYPE_MOD); + InitializeGlobals(MOD_TYPE_MOD, 4); m_modFormat.formatName = U_("MnemoTroN SoundTracker"); m_modFormat.type = U_("st26"); m_modFormat.madeWithTracker = U_("SoundTracker 2.6"); m_modFormat.charset = mpt::Charset::Amiga_no_C1; } else if(IsMagic(magic, "IT10")) { - InitializeGlobals(MOD_TYPE_MOD); + InitializeGlobals(MOD_TYPE_MOD, 4); m_modFormat.formatName = U_("Ice Tracker"); m_modFormat.type = U_("ice"); m_modFormat.madeWithTracker = U_("Ice Tracker 1.0 / 1.1"); @@ -112,7 +112,6 @@ return true; // Now we can be pretty sure that this is a valid ICE file. Set up default song settings. - m_nChannels = 4; SetupMODPanning(true); Order().SetDefaultSpeed(6); Order().SetDefaultTempoInt(125); Modified: trunk/OpenMPT/soundlib/Load_imf.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_imf.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_imf.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -45,6 +45,19 @@ uint8le unused2[8]; char im10[4]; // 'IM10' IMFChannel channels[32]; // Channel settings + + CHANNELINDEX GetNumChannels() const + { + uint8 detectedChannels = 0; + for(uint8 chn = 0; chn < 32; chn++) + { + if(channels[chn].status < 2) + detectedChannels = chn + 1; + else if(channels[chn].status > 2) + return 0; + } + return detectedChannels; + } }; MPT_BINARY_STRUCT(IMFFileHeader, 576) @@ -365,29 +378,8 @@ || fileHeader.bpm < 32 || fileHeader.master > 64 || fileHeader.amp < 4 - || fileHeader.amp > 127) - { - return false; - } - bool channelFound = false; - for(const auto &chn : fileHeader.channels) - { - switch(chn.status) - { - case 0: // enabled; don't worry about it - channelFound = true; - break; - case 1: // mute - channelFound = true; - break; - case 2: // disabled - // nothing - break; - default: // uhhhh.... freak out - return false; - } - } - if(!channelFound) + || fileHeader.amp > 127 + || !fileHeader.GetNumChannels()) { return false; } @@ -437,52 +429,40 @@ return true; } + InitializeGlobals(MOD_TYPE_IMF, fileHeader.GetNumChannels()); + + m_modFormat.formatName = U_("Imago Orpheus"); + m_modFormat.type = U_("imf"); + m_modFormat.charset = mpt::Charset::CP437; + // Read channel configuration - std::bitset<32> ignoreChannels; // bit set for each channel that's completely disabled - uint8 detectedChannels = 0; - for(uint8 chn = 0; chn < 32; chn++) + std::bitset<32> ignoreChannels; // bit set for each channel that's completely disabled + uint64 channelMuteStatus = 0xAAAA'AAAA << (m_nChannels * 2); + for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) { - ChnSettings[chn].Reset(); ChnSettings[chn].nPan = static_cast<uint16>(fileHeader.channels[chn].panning * 256 / 255); - ChnSettings[chn].szName = mpt::String::ReadBuf(mpt::String::nullTerminated, fileHeader.channels[chn].name); - + channelMuteStatus |= fileHeader.channels[chn].status << (chn * 2); // TODO: reverb/chorus? switch(fileHeader.channels[chn].status) { - case 0: // enabled; don't worry about it - detectedChannels = chn + 1; + case 0: // enabled; don't worry about it break; - case 1: // mute + case 1: // mute ChnSettings[chn].dwFlags = CHN_MUTE; - detectedChannels = chn + 1; break; - case 2: // disabled + case 2: // disabled ChnSettings[chn].dwFlags = CHN_MUTE; ignoreChannels[chn] = true; break; - default: // uhhhh.... freak out - return false; } } - - InitializeGlobals(MOD_TYPE_IMF); - m_nChannels = detectedChannels; - - m_modFormat.formatName = U_("Imago Orpheus"); - m_modFormat.type = U_("imf"); - m_modFormat.charset = mpt::Charset::CP437; - - //From mikmod: work around an Orpheus bug - if(fileHeader.channels[0].status == 0) + // BEHIND.IMF: All channels but the first are muted + // mikmod refers to this as an Orpheus bug, but I haven't seen any other files like this, so maybe it's just an incorrectly saved file? + if(channelMuteStatus == 0xAAAA'AAAA'5555'5554) { - CHANNELINDEX chn; - for(chn = 1; chn < 16; chn++) - if(fileHeader.channels[chn].status != 1) - break; - if(chn == 16) - for(chn = 1; chn < 16; chn++) - ChnSettings[chn].dwFlags.reset(CHN_MUTE); + for(CHANNELINDEX chn = 1; chn < m_nChannels; chn++) + ChnSettings[chn].dwFlags.reset(CHN_MUTE); } // Song Name Modified: trunk/OpenMPT/soundlib/Load_ims.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_ims.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_ims.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -89,19 +89,17 @@ if(loadFlags == onlyVerifyHeader) return true; - InitializeGlobals(MOD_TYPE_MOD); + InitializeGlobals(MOD_TYPE_MOD, 4); m_SongFlags.set(SONG_IMPORTED); Order().SetDefaultTempoInt(125); Order().SetDefaultSpeed(6); Order().SetRestartPos(fileHeader.order.restartPos); m_nMinPeriod = 113 * 4; m_nMaxPeriod = 1712 * 4; - m_nChannels = 4; m_nSamples = 31; m_songName = mpt::String::ReadBuf(mpt::String::maybeNullTerminated, fileHeader.songName); ReadOrderFromArray(Order(), fileHeader.order.orderList, fileHeader.order.numOrders); - InitializeChannels(); file.Seek(20); for(SAMPLEINDEX smp = 1; smp <= m_nSamples; smp++) Modified: trunk/OpenMPT/soundlib/Load_it.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_it.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_it.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -430,7 +430,7 @@ return true; } - InitializeGlobals(MOD_TYPE_IT); + InitializeGlobals(MOD_TYPE_IT, 0); bool interpretModPlugMade = false; mpt::ustring madeWithTracker; @@ -537,17 +537,6 @@ Order().SetDefaultTempoInt(std::max(uint8(31), static_cast<uint8>(fileHeader.tempo))); m_nSamplePreAmp = std::min(static_cast<uint8>(fileHeader.mv), uint8(128)); - // Reading Channels Pan Positions - for(CHANNELINDEX i = 0; i < 64; i++) if(fileHeader.chnpan[i] != 0xFF) - { - ChnSettings[i].Reset(); - ChnSettings[i].nVolume = Clamp<uint8, uint8>(fileHeader.chnvol[i], 0, 64); - if(fileHeader.chnpan[i] & 0x80) ChnSettings[i].dwFlags.set(CHN_MUTE); - uint8 n = fileHeader.chnpan[i] & 0x7F; - if(n <= 64) ChnSettings[i].nPan = n * 4; - if(n == 100) ChnSettings[i].dwFlags.set(CHN_SURROUND); - } - // Reading orders file.Seek(sizeof(ITFileHeader)); if(GetType() == MOD_TYPE_MPT && fileHeader.cwtv > 0x88A && fileHeader.cwtv <= 0x88D) @@ -697,18 +686,15 @@ hasModPlugExtensions = true; } - m_nChannels = 1; // Read channel names: "CNAM" if(file.ReadMagic("CNAM")) { FileReader chnNames = file.ReadChunk(file.ReadUint32LE()); - const CHANNELINDEX readChns = std::min(MAX_BASECHANNELS, static_cast<CHANNELINDEX>(chnNames.GetLength() / MAX_CHANNELNAME)); - m_nChannels = readChns; + m_nChannels = std::min(MAX_BASECHANNELS, static_cast<CHANNELINDEX>(chnNames.GetLength() / MAX_CHANNELNAME)); hasModPlugExtensions = true; - - for(CHANNELINDEX i = 0; i < readChns; i++) + for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { - chnNames.ReadString<mpt::String::maybeNullTerminated>(ChnSettings[i].szName, MAX_CHANNELNAME); + chnNames.ReadString<mpt::String::maybeNullTerminated>(ChnSettings[chn].szName, MAX_CHANNELNAME); } } @@ -984,6 +970,22 @@ // Need to do this before reading the patterns because m_nChannels might be modified by LoadExtendedSongProperties. *sigh* const bool hasExtendedSongProperties = LoadExtendedSongProperties(file, false, &interpretModPlugMade); + // Reading Channels Pan Positions + const CHANNELINDEX headerChannels = std::min(GetNumChannels(), CHANNELINDEX(64)); + for(CHANNELINDEX i = 0; i < headerChannels; i++) + { + if(fileHeader.chnpan[i] == 0xFF) + continue; + ChnSettings[i].nVolume = Clamp<uint8, uint8>(fileHeader.chnvol[i], 0, 64); + if(fileHeader.chnpan[i] & 0x80) + ChnSettings[i].dwFlags.set(CHN_MUTE); + uint8 n = fileHeader.chnpan[i] & 0x7F; + if(n <= 64) + ChnSettings[i].nPan = n * 4; + if(n == 100) + ChnSettings[i].dwFlags.set(CHN_SURROUND); + } + // Reading Patterns Patterns.ResizeArray(numPats); for(PATTERNINDEX pat = 0; pat < numPats; pat++) Modified: trunk/OpenMPT/soundlib/Load_itp.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_itp.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_itp.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -86,43 +86,63 @@ { uint32le magic; uint32le version; + + bool IsValid() const + { + return magic == MagicBE(".itp") + && version >= 0x00000100 && version <= 0x00000103; + } + + uint32 GetHeaderMinimumAdditionalSize() const + { + return 76 + (version <= 0x102 ? 4 : 0); + } }; MPT_BINARY_STRUCT(ITPHeader, 8) -static bool ValidateHeader(const ITPHeader &hdr) +struct ITPSongHeader { - if(hdr.magic != MagicBE(".itp")) - { - return false; - } - if(hdr.version < 0x00000100 || hdr.version > 0x00000103) + enum SongFlags { - return false; - } - return true; -} + ITP_EMBEDMIDICFG = 0x00001, // Embed macros in file + ITP_ITOLDEFFECTS = 0x00004, // Old Impulse Tracker effect implementations + ITP_ITCOMPATGXX = 0x00008, // IT "Compatible Gxx" (IT's flag to behave more like other trackers w/r/t portamento effects) + ITP_LINEARSLIDES = 0x00010, // Linear slides vs. Amiga slides + ITP_EXFILTERRANGE = 0x08000, // Cutoff Filter has double frequency range (up to ~10Khz) + ITP_ITPROJECT = 0x20000, // Is a project file + ITP_ITPEMBEDIH = 0x40000, // Embed instrument headers in project file + }; + uint32le flags; // See SongFlangs + uint32le globalVolume; + uint32le samplePreAmp; + uint32le speed; + uint32le tempo; + uint32le numChannels; + uint32le channelNameLength; + + bool IsValid() const + { + return (flags & ITP_ITPROJECT) != 0 + && speed >= 1 + && tempo >= 32 + && numChannels >= 1 && numChannels <= MAX_BASECHANNELS; + } +}; -static uint64 GetHeaderMinimumAdditionalSize(const ITPHeader &hdr) -{ - return 76 + (hdr.version <= 0x102 ? 4 : 0); -} +MPT_BINARY_STRUCT(ITPSongHeader, 28) CSoundFile::ProbeResult CSoundFile::ProbeFileHeaderITP(MemoryFileReader file, const uint64 *pfilesize) { ITPHeader hdr; if(!file.ReadStruct(hdr)) - { return ProbeWantMoreData; - } - if(!ValidateHeader(hdr)) - { + if(!hdr.IsValid()) return ProbeFailure; - } - return ProbeAdditionalSize(file, pfilesize, GetHeaderMinimumAdditionalSize(hdr)); + return ProbeAdditionalSize(file, pfilesize, hdr.GetHeaderMinimumAdditionalSize()); } @@ -135,76 +155,51 @@ return false; #else // !MPT_EXTERNAL_SAMPLES && !MPT_FUZZ_TRACKER - enum ITPSongFlags - { - ITP_EMBEDMIDICFG = 0x00001, // Embed macros in file - ITP_ITOLDEFFECTS = 0x00004, // Old Impulse Tracker effect implementations - ITP_ITCOMPATGXX = 0x00008, // IT "Compatible Gxx" (IT's flag to behave more like other trackers w/r/t portamento effects) - ITP_LINEARSLIDES = 0x00010, // Linear slides vs. Amiga slides - ITP_EXFILTERRANGE = 0x08000, // Cutoff Filter has double frequency range (up to ~10Khz) - ITP_ITPROJECT = 0x20000, // Is a project file - ITP_ITPEMBEDIH = 0x40000, // Embed instrument headers in project file - }; - file.Rewind(); ITPHeader hdr; if(!file.ReadStruct(hdr)) - { return false; - } - if(!ValidateHeader(hdr)) - { + if(!hdr.IsValid()) return false; - } - if(!file.CanRead(mpt::saturate_cast<FileReader::pos_type>(GetHeaderMinimumAdditionalSize(hdr)))) - { + if(!file.CanRead(hdr.GetHeaderMinimumAdditionalSize())) return false; - } if(loadFlags == onlyVerifyHeader) - { return true; - } const uint32 version = hdr.version; - InitializeGlobals(MOD_TYPE_IT); - m_playBehaviour.reset(); - file.ReadSizedString<uint32le, mpt::String::maybeNullTerminated>(m_songName); - - // Song comments - m_songMessage.Read(file, file.ReadUint32LE(), SongMessage::leCR); + std::string songName, songMessage; + file.ReadSizedString<uint32le, mpt::String::maybeNullTerminated>(songName); + file.ReadSizedString<uint32le, mpt::String::maybeNullTerminated>(songMessage); - // Song global config - const uint32 songFlags = file.ReadUint32LE(); - if(!(songFlags & ITP_ITPROJECT)) - { + ITPSongHeader songHeader; + if(!file.ReadStruct(songHeader) || !songHeader.IsValid()) return false; - } + + InitializeGlobals(MOD_TYPE_IT, static_cast<CHANNELINDEX>(songHeader.numChannels)); + m_playBehaviour.reset(); + m_SongFlags.set(SONG_IMPORTED); - if(songFlags & ITP_ITOLDEFFECTS) + if(songHeader.flags & ITPSongHeader::ITP_ITOLDEFFECTS) m_SongFlags.set(SONG_ITOLDEFFECTS); - if(songFlags & ITP_ITCOMPATGXX) + if(songHeader.flags & ITPSongHeader::ITP_ITCOMPATGXX) m_SongFlags.set(SONG_ITCOMPATGXX); - if(songFlags & ITP_LINEARSLIDES) + if(songHeader.flags & ITPSongHeader::ITP_LINEARSLIDES) m_SongFlags.set(SONG_LINEARSLIDES); - if(songFlags & ITP_EXFILTERRANGE) + if(songHeader.flags & ITPSongHeader::ITP_EXFILTERRANGE) m_SongFlags.set(SONG_EXFILTERRANGE); - m_nDefaultGlobalVolume = file.ReadUint32LE(); - m_nSamplePreAmp = file.ReadUint32LE(); - Order().SetDefaultSpeed(std::max(uint32(1), file.ReadUint32LE())); - Order().SetDefaultTempoInt(std::max(uint32(32), file.ReadUint32LE())); - m_nChannels = static_cast<CHANNELINDEX>(file.ReadUint32LE()); - if(m_nChannels == 0 || m_nChannels > MAX_BASECHANNELS) - { - return false; - } + m_nDefaultGlobalVolume = songHeader.globalVolume; + m_nSamplePreAmp = songHeader.samplePreAmp; + Order().SetDefaultSpeed(songHeader.speed); + Order().SetDefaultTempoInt(songHeader.tempo); - // channel name string length (=MAX_CHANNELNAME) - uint32 size = file.ReadUint32LE(); + m_songName = std::move(songName); + m_songMessage.SetRaw(std::move(songMessage)); // Channels' data + uint32 size = songHeader.channelNameLength; for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) { ChnSettings[chn].nPan = std::min(static_cast<uint16>(file.ReadUint32LE()), uint16(256)); @@ -378,7 +373,7 @@ uint32 code = file.ReadUint32LE(); // Embed instruments' header [v1.01] - if(version >= 0x101 && (songFlags & ITP_ITPEMBEDIH) && code == MagicBE("EBIH")) + if(version >= 0x101 && (songHeader.flags & ITPSongHeader::ITP_ITPEMBEDIH) && code == MagicBE("EBIH")) { code = file.ReadUint32LE(); @@ -417,7 +412,7 @@ m_nMinPeriod = 8; // Before OpenMPT 1.20.01.09, the MIDI macros were always read from the file, even if the "embed" flag was not set. - if(m_dwLastSavedWithVersion >= MPT_V("1.20.01.09") && !(songFlags & ITP_EMBEDMIDICFG)) + if(m_dwLastSavedWithVersion >= MPT_V("1.20.01.09") && !(songHeader.flags & ITPSongHeader::ITP_EMBEDMIDICFG)) { m_MidiCfg.Reset(); } Modified: trunk/OpenMPT/soundlib/Load_kris.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_kris.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_kris.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -58,7 +58,7 @@ return false; uint32 tracksOffset = 1984; - InitializeGlobals(MOD_TYPE_MOD); + InitializeGlobals(MOD_TYPE_MOD, 4); file.Seek(0); file.ReadString<mpt::String::spacePadded>(m_songName, 22); @@ -91,7 +91,6 @@ if(loadFlags == onlyVerifyHeader) return true; - m_nChannels = 4; SetupMODPanning(true); Order().SetDefaultSpeed(6); Order().SetDefaultTempoInt(125); Modified: trunk/OpenMPT/soundlib/Load_mdl.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_mdl.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_mdl.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -65,10 +65,21 @@ char composer[20]; uint16le numOrders; uint16le restartPos; - uint8le globalVol; // 1...255 - uint8le speed; // 1...255 - uint8le tempo; // 4...255 + uint8le globalVol; // 1...255 + uint8le speed; // 1...255 + uint8le tempo; // 4...255 uint8le chnSetup[32]; + + uint8 GetNumChannels() const + { + uint8 numChannels = 0; + for(uint8 c = 0; c < 32; c++) + { + if(!(chnSetup[c] & 0x80)) + numChannels = c + 1; + } + return numChannels; + } }; MPT_BINARY_STRUCT(MDLInfoBlock, 91) @@ -418,6 +429,28 @@ } +static uint8 GetMDLPatternChannelCount(FileReader chunk, uint8 numChannels, const uint8 fileVersion) +{ + const uint8 numPats = chunk.ReadUint8(); + for(uint8 pat = 0; pat < numPats && numChannels < 32; pat++) + { + uint8 readChans = 32; + if(fileVersion >= 0x10) + { + MDLPatternHeader patHead; + chunk.ReadStruct(patHead); + readChans = patHead.channels; + } + for(uint8 chn = 0; chn < readChans; chn++) + { + if(chunk.ReadUint16LE() > 0 && chn >= numChannels && chn < 32) + numChannels = chn + 1; + } + } + return numChannels; +} + + static bool ValidateHeader(const MDLFileHeader &fileHeader) { if(std::memcmp(fileHeader.id, "DMDL", 4) @@ -473,7 +506,9 @@ return false; } - InitializeGlobals(MOD_TYPE_MDL); + // In case any muted channels contain data, be sure that we import them as well. + const uint8 numChannels = std::max(GetMDLPatternChannelCount(chunks.GetChunk(MDLChunk::idPats), info.GetNumChannels(), fileHeader.version), uint8(1)); + InitializeGlobals(MOD_TYPE_MDL, numChannels); m_SongFlags = SONG_ITCOMPATGXX; m_playBehaviour.set(kPerChannelGlobalVolSlide); m_playBehaviour.set(kApplyOffsetWithoutNote); @@ -500,17 +535,13 @@ ReadOrderFromFile<uint8>(Order(), chunk, info.numOrders); Order().SetRestartPos(info.restartPos); - m_nChannels = 0; - for(CHANNELINDEX c = 0; c < 32; c++) + for(CHANNELINDEX c = 0; c < GetNumChannels(); c++) { - ChnSettings[c].Reset(); ChnSettings[c].nPan = (info.chnSetup[c] & 0x7F) * 2u; if(ChnSettings[c].nPan == 254) ChnSettings[c].nPan = 256; if(info.chnSetup[c] & 0x80) ChnSettings[c].dwFlags.set(CHN_MUTE); - else - m_nChannels = c + 1; chunk.ReadString<mpt::String::spacePadded>(ChnSettings[c].szName, 8); } @@ -680,27 +711,6 @@ if((loadFlags & loadPatternData) && (chunk = chunks.GetChunk(MDLChunk::idPats)).IsValid()) { PATTERNINDEX numPats = chunk.ReadUint8(); - - // In case any muted channels contain data, be sure that we import them as well. - for(PATTERNINDEX pat = 0; pat < numPats; pat++) - { - CHANNELINDEX numChans = 32; - if(fileHeader.version >= 0x10) - { - MDLPatternHeader patHead; - chunk.ReadStruct(patHead); - if(patHead.channels > m_nChannels && patHead.channels <= 32) - m_nChannels = patHead.channels; - numChans = patHead.channels; - } - for(CHANNELINDEX chn = 0; chn < numChans; chn++) - { - if(chunk.ReadUint16LE() > 0 && chn >= m_nChannels && chn < 32) - m_nChannels = chn + 1; - } - } - chunk.Seek(1); - Patterns.ResizeArray(numPats); for(PATTERNINDEX pat = 0; pat < numPats; pat++) { Modified: trunk/OpenMPT/soundlib/Load_med.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_med.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_med.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -873,10 +873,6 @@ if(loadFlags == onlyVerifyHeader) return true; - InitializeGlobals(MOD_TYPE_MED); - InitializeChannels(); - const uint8 version = fileHeader.version - '0'; - file.Seek(fileHeader.songOffset); FileReader sampleHeaderChunk = file.ReadChunk(63 * sizeof(MMD0Sample)); @@ -886,16 +882,12 @@ if(songHeader.numSamples > 63 || songHeader.numBlocks > 0x7FFF) return false; - MMD0Exp expData{}; - if(fileHeader.expDataOffset && file.Seek(fileHeader.expDataOffset)) - { - file.ReadStruct(expData); - } - + const uint8 version = fileHeader.version - '0'; const auto [numChannels, numSongs] = MEDScanNumChannels(file, version); if(numChannels < 1 || numChannels > MAX_BASECHANNELS) return false; - m_nChannels = numChannels; + + InitializeGlobals(MOD_TYPE_MED, numChannels); // Start with the instruments, as those are shared between songs @@ -910,6 +902,12 @@ } m_nInstruments = m_nSamples = songHeader.numSamples; + MMD0Exp expData{}; + if(fileHeader.expDataOffset && file.Seek(fileHeader.expDataOffset)) + { + file.ReadStruct(expData); + } + FileReader expDataChunk; if(expData.instrExtOffset != 0 && file.Seek(expData.instrExtOffset)) { Modified: trunk/OpenMPT/soundlib/Load_mid.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_mid.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_mid.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -621,8 +621,7 @@ return true; } - InitializeGlobals(MOD_TYPE_MID); - InitializeChannels(); + InitializeGlobals(MOD_TYPE_MID, MAX_BASECHANNELS); #ifdef MODPLUG_TRACKER const uint32 quantize = Clamp(TrackerSettings::Instance().midiImportQuantize.Get(), 4u, 256u); @@ -652,7 +651,6 @@ TEMPO tempo{120, 0}; Order().SetDefaultTempo(tempo); Order().SetDefaultSpeed(ticksPerRow); - m_nChannels = MAX_BASECHANNELS; m_nDefaultRowsPerBeat = quantize / 4; m_nDefaultRowsPerMeasure = 4 * m_nDefaultRowsPerBeat; m_nSamplePreAmp = m_nVSTiVolume = 32; Modified: trunk/OpenMPT/soundlib/Load_mo3.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_mo3.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_mo3.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -873,11 +873,9 @@ mpt::IO::FileCursor<mpt::IO::FileCursorTraitsFileData, mpt::IO::FileCursorFilenameTraits<mpt::PathString>> fileCursor{musicChunkData, std::move(filenamePtr)}; FileReader musicChunk{fileCursor}; - InitializeGlobals(); - InitializeChannels(); - - musicChunk.ReadNullString(m_songName); - musicChunk.ReadNullString(m_songMessage); + std::string songName, songMessage; + musicChunk.ReadNullString(songName); + musicChunk.ReadNullString(songMessage); MO3FileHeader fileHeader; if(!musicChunk.ReadStruct(fileHeader) @@ -889,23 +887,24 @@ return false; } - m_nChannels = fileHeader.numChannels; + MODTYPE modType = MOD_TYPE_XM; + if(fileHeader.flags & MO3FileHeader::isIT) + modType = MOD_TYPE_IT; + else if(fileHeader.flags & MO3FileHeader::isS3M) + modType = MOD_TYPE_S3M; + else if(fileHeader.flags & MO3FileHeader::isMOD) + modType = MOD_TYPE_MOD; + else if(fileHeader.flags & MO3FileHeader::isMTM) + modType = MOD_TYPE_MTM; + + InitializeGlobals(modType, fileHeader.numChannels); Order().SetRestartPos(fileHeader.restartPos); m_nInstruments = fileHeader.numInstruments; m_nSamples = fileHeader.numSamples; Order().SetDefaultSpeed(fileHeader.defaultSpeed ? fileHeader.defaultSpeed : 6); Order().SetDefaultTempoInt(fileHeader.defaultTempo ? fileHeader.defaultTempo : 125); - - if(fileHeader.flags & MO3FileHeader::isIT) - SetType(MOD_TYPE_IT); - else if(fileHeader.flags & MO3FileHeader::isS3M) - SetType(MOD_TYPE_S3M); - else if(fileHeader.flags & MO3FileHeader::isMOD) - SetType(MOD_TYPE_MOD); - else if(fileHeader.flags & MO3FileHeader::isMTM) - SetType(MOD_TYPE_MTM); - else - SetType(MOD_TYPE_XM); + m_songName = std::move(songName); + m_songMessage.SetRaw(std::move(songMessage)); m_SongFlags.set(SONG_IMPORTED); if(fileHeader.flags & MO3FileHeader::linearSlides) Modified: trunk/OpenMPT/soundlib/Load_mod.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_mod.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_mod.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -297,8 +297,7 @@ return true; } - InitializeGlobals(MOD_TYPE_MOD); - m_nChannels = modMagicResult.numChannels; + InitializeGlobals(MOD_TYPE_MOD, modMagicResult.numChannels); bool isNoiseTracker = modMagicResult.isNoiseTracker; bool isStartrekker = modMagicResult.isStartrekker; Modified: trunk/OpenMPT/soundlib/Load_mt2.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_mt2.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_mt2.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -447,8 +447,7 @@ return true; } - InitializeGlobals(MOD_TYPE_MT2); - InitializeChannels(); + InitializeGlobals(MOD_TYPE_MT2, fileHeader.numChannels); m_modFormat.formatName = MPT_UFORMAT("MadTracker {}.{}")(fileHeader.version >> 8, mpt::ufmt::hex0<2>(fileHeader.version & 0xFF)); m_modFormat.type = U_("mt2"); @@ -456,7 +455,6 @@ m_modFormat.charset = mpt::Charset::Windows1252; m_songName = mpt::String::ReadBuf(mpt::String::maybeNullTerminated, fileHeader.songName); - m_nChannels = fileHeader.numChannels; Order().SetDefaultSpeed(Clamp<uint8, uint8>(fileHeader.ticksPerLine, 1, 31)); Order().SetDefaultTempoInt(125); m_SongFlags = SONG_LINEARSLIDES | SONG_ITCOMPATGXX | SONG_EXFILTERRANGE; Modified: trunk/OpenMPT/soundlib/Load_mtm.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_mtm.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_mtm.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -135,10 +135,9 @@ return true; } - InitializeGlobals(MOD_TYPE_MTM); + InitializeGlobals(MOD_TYPE_MTM, fileHeader.numChannels); m_songName = mpt::String::ReadBuf(mpt::String::maybeNullTerminated, fileHeader.songName); m_nSamples = fileHeader.numSamples; - m_nChannels = fileHeader.numChannels; m_modFormat.formatName = U_("MultiTracker"); m_modFormat.type = U_("mtm"); @@ -157,7 +156,6 @@ // Setting Channel Pan Position for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { - ChnSettings[chn].Reset(); ChnSettings[chn].nPan = ((fileHeader.panPos[chn] & 0x0F) << 4) + 8; } Modified: trunk/OpenMPT/soundlib/Load_mus_km.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_mus_km.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_mus_km.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -169,10 +169,8 @@ if(songChunks.empty() || sampleChunks.empty()) return false; - InitializeGlobals(MOD_TYPE_MOD); - InitializeChannels(); + InitializeGlobals(MOD_TYPE_MOD, 4); m_SongFlags = SONG_AMIGALIMITS | SONG_IMPORTED | SONG_ISAMIGA; // Yes, those were not Amiga games but the format fully conforms to Amiga limits, so allow the Amiga Resampler to be used. - m_nChannels = 4; m_nSamples = 0; static constexpr uint16 MUS_SAMPLE_UNUSED = 255; // Sentinel value to check if a sample needs to be duplicated Modified: trunk/OpenMPT/soundlib/Load_okt.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_okt.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_okt.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -346,7 +346,7 @@ std::array<int8, 8> pairedChn{{}}; ORDERINDEX numOrders = 0; - InitializeGlobals(MOD_TYPE_OKT); + InitializeGlobals(MOD_TYPE_OKT, 0); m_modFormat.formatName = U_("Oktalyzer"); m_modFormat.type = U_("okt"); @@ -367,7 +367,7 @@ { case OktIffChunk::idCMOD: // Channel setup table - if(m_nChannels == 0 && chunk.GetLength() >= 8) + if(m_nChannels == 0 && chunk.CanRead(8)) { const auto chnTable = chunk.ReadArray<uint16be, 4>(); for(CHANNELINDEX chn = 0; chn < 4; chn++) @@ -376,10 +376,10 @@ { pairedChn[m_nChannels] = 1; pairedChn[m_nChannels + 1] = -1; - ChnSettings[m_nChannels].Reset(); + mpt::reconstruct(ChnSettings[m_nChannels]); ChnSettings[m_nChannels++].nPan = (((chn & 3) == 1) || ((chn & 3) == 2)) ? 0xC0 : 0x40; } - ChnSettings[m_nChannels].Reset(); + mpt::reconstruct(ChnSettings[m_nChannels]); ChnSettings[m_nChannels++].nPan = (((chn & 3) == 1) || ((chn & 3) == 2)) ? 0xC0 : 0x40; } Modified: trunk/OpenMPT/soundlib/Load_plm.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_plm.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_plm.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -145,8 +145,7 @@ return false; } - InitializeGlobals(MOD_TYPE_PLM); - InitializeChannels(); + InitializeGlobals(MOD_TYPE_PLM, fileHeader.numChannels + 1); // Additional channel for writing pattern breaks m_SongFlags = SONG_ITOLDEFFECTS; m_playBehaviour.set(kApplyOffsetWithoutNote); @@ -156,7 +155,6 @@ // Some PLMs use ASCIIZ, some space-padding strings...weird. Oh, and the file browser stops at 0 bytes in the name, the main GUI doesn't. m_songName = mpt::String::ReadBuf(mpt::String::spacePadded, fileHeader.songName); - m_nChannels = fileHeader.numChannels + 1; // Additional channel for writing pattern breaks m_nSamplePreAmp = fileHeader.amplify; Order().SetDefaultTempoInt(fileHeader.tempo); Order().SetDefaultSpeed(fileHeader.speed); Modified: trunk/OpenMPT/soundlib/Load_psm.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_psm.cpp Fri Jun 7 19:29:11 2024 (r20948) +++ trunk/OpenMPT/soundlib/Load_psm.cpp Sat Jun 8 01:19:39 2024 (r20949) @@ -311,8 +311,21 @@ else if(loadFlags == onlyVerifyHeader) return true; + auto songChunks = chunks.GetAllChunks(PSMChunk::idSONG); + CHANNELINDEX numChannels = 0; + for(FileReader chunk : songChunks) + { + PSMSongHeader songHeader; + if(!chunk.ReadStruct(songHeader) || songHeader.compression != 0x0... [truncated message content] |
From: <sv...@op...> - 2024-06-07 17:29:36
|
Author: sagamusix Date: Fri Jun 7 19:29:11 2024 New Revision: 20948 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20948 Log: Merged revision(s) 20947 from trunk/OpenMPT: [Fix] STM/STX: Don't import channels with panning. ST2 only outputs mono sound. The SoundBlaster Pro was only released around the same time as the last ST2 release, so stereo support was just not possible (tx cs127). ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/soundlib/Load_stm.cpp Modified: branches/OpenMPT-1.31/soundlib/Load_stm.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/Load_stm.cpp Fri Jun 7 19:28:20 2024 (r20947) +++ branches/OpenMPT-1.31/soundlib/Load_stm.cpp Fri Jun 7 19:29:11 2024 (r20948) @@ -230,6 +230,7 @@ return true; InitializeGlobals(MOD_TYPE_STM); + InitializeChannels(); m_songName = mpt::String::ReadBuf(mpt::String::maybeNullTerminated, fileHeader.songname); @@ -258,13 +259,6 @@ if(fileHeader.verMinor > 10) m_nDefaultGlobalVolume = std::min(fileHeader.globalVolume, uint8(64)) * 4u; - // Setting up channels - for(CHANNELINDEX chn = 0; chn < 4; chn++) - { - ChnSettings[chn].Reset(); - ChnSettings[chn].nPan = (chn & 1) ? 0x40 : 0xC0; - } - // Read samples uint16 sampleOffsets[31]; for(SAMPLEINDEX smp = 1; smp <= 31; smp++) @@ -461,6 +455,7 @@ return true; InitializeGlobals(MOD_TYPE_STM); + InitializeChannels(); m_songName = mpt::String::ReadBuf(mpt::String::maybeNullTerminated, fileHeader.songName); @@ -479,13 +474,6 @@ m_nDefaultSpeed = initTempo >> 4; m_nDefaultGlobalVolume = std::min(fileHeader.globalVolume, uint8(64)) * 4u; - // Setting up channels - for(CHANNELINDEX chn = 0; chn < 4; chn++) - { - ChnSettings[chn].Reset(); - ChnSettings[chn].nPan = (chn & 1) ? 0x40 : 0xC0; - } - std::vector<uint16le> patternOffsets, sampleOffsets; file.Seek(fileHeader.patTableOffset << 4); file.ReadVector(patternOffsets, fileHeader.numPatterns); |
From: <sv...@op...> - 2024-06-07 17:28:45
|
Author: sagamusix Revision: 20947 Property Name: svn:log Action: modified Property diff: --- old property value +++ new property value @@ -1 +1 @@ -[Fix] STM/STX: Don't import channels with panning. ST2 only outputs mono sound. The SoundBlaster Pro was only released around the same time as the last ST2 release, so stereo support was just not possible. \ No newline at end of file +[Fix] STM/STX: Don't import channels with panning. ST2 only outputs mono sound. The SoundBlaster Pro was only released around the same time as the last ST2 release, so stereo support was just not possible (tx cs127). \ No newline at end of file |
From: <sv...@op...> - 2024-06-07 17:28:27
|
Author: sagamusix Date: Fri Jun 7 19:28:20 2024 New Revision: 20947 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20947 Log: [Fix] STM/STX: Don't import channels with panning. ST2 only outputs mono sound. The SoundBlaster Pro was only released around the same time as the last ST2 release, so stereo support was just not possible. Modified: trunk/OpenMPT/soundlib/Load_stm.cpp Modified: trunk/OpenMPT/soundlib/Load_stm.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_stm.cpp Fri Jun 7 19:00:02 2024 (r20946) +++ trunk/OpenMPT/soundlib/Load_stm.cpp Fri Jun 7 19:28:20 2024 (r20947) @@ -230,6 +230,7 @@ return true; InitializeGlobals(MOD_TYPE_STM); + InitializeChannels(); m_songName = mpt::String::ReadBuf(mpt::String::maybeNullTerminated, fileHeader.songname); @@ -258,13 +259,6 @@ if(fileHeader.verMinor > 10) m_nDefaultGlobalVolume = std::min(fileHeader.globalVolume, uint8(64)) * 4u; - // Setting up channels - for(CHANNELINDEX chn = 0; chn < 4; chn++) - { - ChnSettings[chn].Reset(); - ChnSettings[chn].nPan = (chn & 1) ? 0x40 : 0xC0; - } - // Read samples uint16 sampleOffsets[31]; for(SAMPLEINDEX smp = 1; smp <= 31; smp++) @@ -461,6 +455,7 @@ return true; InitializeGlobals(MOD_TYPE_STM); + InitializeChannels(); m_songName = mpt::String::ReadBuf(mpt::String::maybeNullTerminated, fileHeader.songName); @@ -479,13 +474,6 @@ Order().SetDefaultSpeed(initTempo >> 4); m_nDefaultGlobalVolume = std::min(fileHeader.globalVolume, uint8(64)) * 4u; - // Setting up channels - for(CHANNELINDEX chn = 0; chn < 4; chn++) - { - ChnSettings[chn].Reset(); - ChnSettings[chn].nPan = (chn & 1) ? 0x40 : 0xC0; - } - std::vector<uint16le> patternOffsets, sampleOffsets; file.Seek(fileHeader.patTableOffset << 4); file.ReadVector(patternOffsets, fileHeader.numPatterns); |
From: <sv...@op...> - 2024-06-07 17:00:14
|
Author: sagamusix Date: Fri Jun 7 19:00:02 2024 New Revision: 20946 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20946 Log: Merged revision(s) 20945 from trunk/OpenMPT: [Var] ancient: Update to v2.2.0 (2023-06-07). ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/include/ancient/LICENSE branches/OpenMPT-1.31/include/ancient/OpenMPT.txt branches/OpenMPT-1.31/include/ancient/src/PPDecompressor.cpp branches/OpenMPT-1.31/include/ancient/src/PPDecompressor.hpp Modified: branches/OpenMPT-1.31/include/ancient/LICENSE ============================================================================== --- branches/OpenMPT-1.31/include/ancient/LICENSE Fri Jun 7 18:59:35 2024 (r20945) +++ branches/OpenMPT-1.31/include/ancient/LICENSE Fri Jun 7 19:00:02 2024 (r20946) @@ -1,6 +1,6 @@ BSD 2-Clause License -Copyright (c) 2017-2023, Teemu Suutari +Copyright (c) 2017-2024, Teemu Suutari All rights reserved. Redistribution and use in source and binary forms, with or without Modified: branches/OpenMPT-1.31/include/ancient/OpenMPT.txt ============================================================================== --- branches/OpenMPT-1.31/include/ancient/OpenMPT.txt Fri Jun 7 18:59:35 2024 (r20945) +++ branches/OpenMPT-1.31/include/ancient/OpenMPT.txt Fri Jun 7 19:00:02 2024 (r20946) @@ -1,3 +1,2 @@ - * ancient <https://github.com/temisu/ancient> commit - bdff39426d0460a6b114712b14da6cb40ccadb77 (2024-06-05) + * ancient <https://github.com/temisu/ancient> v2.2.0 (2024-06-07) * Unnecssary files have been removed. Modified: branches/OpenMPT-1.31/include/ancient/src/PPDecompressor.cpp ============================================================================== --- branches/OpenMPT-1.31/include/ancient/src/PPDecompressor.cpp Fri Jun 7 18:59:35 2024 (r20945) +++ branches/OpenMPT-1.31/include/ancient/src/PPDecompressor.cpp Fri Jun 7 19:00:02 2024 (r20946) @@ -233,7 +233,7 @@ In any case this should serve as a warning to anyone trying to create their own crypto. */ -void PPDecompressor::findKeyRound(BackwardInputStream &inputStream,LSBBitReader<BackwardInputStream> &bitReader,uint32_t keyBits,uint32_t keyMask,uint32_t outputPosition) +void PPDecompressor::findKeyRound(BackwardInputStream &inputStream,LSBBitReader<BackwardInputStream> &bitReader,uint32_t keyBits,uint32_t keyMask,uint32_t outputPosition,uint32_t &iterCount) { uint32_t inputOffset; @@ -268,7 +268,7 @@ // try 0 inputStream.setOffset(inputOffset); bitReader.reset(bufContent,bufLength); - findKeyRound(inputStream,bitReader,keyBits,keyMask|(1U<<bitPos),savedOutputPosition); + findKeyRound(inputStream,bitReader,keyBits,keyMask|(1U<<bitPos),savedOutputPosition,iterCount); // try 1 inputStream.setOffset(tmpInputOffset); @@ -318,9 +318,8 @@ bitReader.readBitsBE32(count); }; - uint32_t foundIter=0; // TODO: Random constant. For decompression/keyfinding bombs - while (foundIter<1024) + while (iterCount<1048576) { // this is the checkpoint. Hardly ideal, but best we can do without co-routines inputOffset=uint32_t(inputStream.getOffset()); @@ -371,7 +370,7 @@ if (failed) break; outputPosition-=count; - if (keyMask==0xffff'ffffU) foundIter++; + iterCount++; } if (failed) return; // If not all bits are resolved, that is bad @@ -386,7 +385,8 @@ bitReader.readBitsBE32(_startShift); - findKeyRound(inputStream,bitReader,keyBits,keyMask,uint32_t(_rawSize)); + uint32_t iterCount=0; + findKeyRound(inputStream,bitReader,keyBits,keyMask,uint32_t(_rawSize),iterCount); } void PPDecompressor::decompressImpl(Buffer &rawData,bool verify) Modified: branches/OpenMPT-1.31/include/ancient/src/PPDecompressor.hpp ============================================================================== --- branches/OpenMPT-1.31/include/ancient/src/PPDecompressor.hpp Fri Jun 7 18:59:35 2024 (r20945) +++ branches/OpenMPT-1.31/include/ancient/src/PPDecompressor.hpp Fri Jun 7 19:00:02 2024 (r20946) @@ -57,7 +57,7 @@ uint32_t _key; }; - void findKeyRound(BackwardInputStream &inputStream,LSBBitReader<BackwardInputStream> &bitReader,uint32_t keyBits,uint32_t keyMask,uint32_t outputPosition); + void findKeyRound(BackwardInputStream &inputStream,LSBBitReader<BackwardInputStream> &bitReader,uint32_t keyBits,uint32_t keyMask,uint32_t outputPosition,uint32_t &iterCount); void findKey(uint32_t keyBits,uint32_t keyMask); const Buffer &_packedData; |
From: <sv...@op...> - 2024-06-07 16:59:42
|
Author: sagamusix Date: Fri Jun 7 18:59:35 2024 New Revision: 20945 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20945 Log: [Var] ancient: Update to v2.2.0 (2023-06-07). Modified: trunk/OpenMPT/include/ancient/LICENSE trunk/OpenMPT/include/ancient/OpenMPT.txt trunk/OpenMPT/include/ancient/src/PPDecompressor.cpp trunk/OpenMPT/include/ancient/src/PPDecompressor.hpp Modified: trunk/OpenMPT/include/ancient/LICENSE ============================================================================== --- trunk/OpenMPT/include/ancient/LICENSE Fri Jun 7 08:37:29 2024 (r20944) +++ trunk/OpenMPT/include/ancient/LICENSE Fri Jun 7 18:59:35 2024 (r20945) @@ -1,6 +1,6 @@ BSD 2-Clause License -Copyright (c) 2017-2023, Teemu Suutari +Copyright (c) 2017-2024, Teemu Suutari All rights reserved. Redistribution and use in source and binary forms, with or without Modified: trunk/OpenMPT/include/ancient/OpenMPT.txt ============================================================================== --- trunk/OpenMPT/include/ancient/OpenMPT.txt Fri Jun 7 08:37:29 2024 (r20944) +++ trunk/OpenMPT/include/ancient/OpenMPT.txt Fri Jun 7 18:59:35 2024 (r20945) @@ -1,3 +1,2 @@ - * ancient <https://github.com/temisu/ancient> commit - bdff39426d0460a6b114712b14da6cb40ccadb77 (2024-06-05) + * ancient <https://github.com/temisu/ancient> v2.2.0 (2024-06-07) * Unnecssary files have been removed. Modified: trunk/OpenMPT/include/ancient/src/PPDecompressor.cpp ============================================================================== --- trunk/OpenMPT/include/ancient/src/PPDecompressor.cpp Fri Jun 7 08:37:29 2024 (r20944) +++ trunk/OpenMPT/include/ancient/src/PPDecompressor.cpp Fri Jun 7 18:59:35 2024 (r20945) @@ -233,7 +233,7 @@ In any case this should serve as a warning to anyone trying to create their own crypto. */ -void PPDecompressor::findKeyRound(BackwardInputStream &inputStream,LSBBitReader<BackwardInputStream> &bitReader,uint32_t keyBits,uint32_t keyMask,uint32_t outputPosition) +void PPDecompressor::findKeyRound(BackwardInputStream &inputStream,LSBBitReader<BackwardInputStream> &bitReader,uint32_t keyBits,uint32_t keyMask,uint32_t outputPosition,uint32_t &iterCount) { uint32_t inputOffset; @@ -268,7 +268,7 @@ // try 0 inputStream.setOffset(inputOffset); bitReader.reset(bufContent,bufLength); - findKeyRound(inputStream,bitReader,keyBits,keyMask|(1U<<bitPos),savedOutputPosition); + findKeyRound(inputStream,bitReader,keyBits,keyMask|(1U<<bitPos),savedOutputPosition,iterCount); // try 1 inputStream.setOffset(tmpInputOffset); @@ -318,9 +318,8 @@ bitReader.readBitsBE32(count); }; - uint32_t foundIter=0; // TODO: Random constant. For decompression/keyfinding bombs - while (foundIter<1024) + while (iterCount<1048576) { // this is the checkpoint. Hardly ideal, but best we can do without co-routines inputOffset=uint32_t(inputStream.getOffset()); @@ -371,7 +370,7 @@ if (failed) break; outputPosition-=count; - if (keyMask==0xffff'ffffU) foundIter++; + iterCount++; } if (failed) return; // If not all bits are resolved, that is bad @@ -386,7 +385,8 @@ bitReader.readBitsBE32(_startShift); - findKeyRound(inputStream,bitReader,keyBits,keyMask,uint32_t(_rawSize)); + uint32_t iterCount=0; + findKeyRound(inputStream,bitReader,keyBits,keyMask,uint32_t(_rawSize),iterCount); } void PPDecompressor::decompressImpl(Buffer &rawData,bool verify) Modified: trunk/OpenMPT/include/ancient/src/PPDecompressor.hpp ============================================================================== --- trunk/OpenMPT/include/ancient/src/PPDecompressor.hpp Fri Jun 7 08:37:29 2024 (r20944) +++ trunk/OpenMPT/include/ancient/src/PPDecompressor.hpp Fri Jun 7 18:59:35 2024 (r20945) @@ -57,7 +57,7 @@ uint32_t _key; }; - void findKeyRound(BackwardInputStream &inputStream,LSBBitReader<BackwardInputStream> &bitReader,uint32_t keyBits,uint32_t keyMask,uint32_t outputPosition); + void findKeyRound(BackwardInputStream &inputStream,LSBBitReader<BackwardInputStream> &bitReader,uint32_t keyBits,uint32_t keyMask,uint32_t outputPosition,uint32_t &iterCount); void findKey(uint32_t keyBits,uint32_t keyMask); const Buffer &_packedData; |
From: <sv...@op...> - 2024-06-07 06:37:41
|
Author: manx Date: Fri Jun 7 08:37:29 2024 New Revision: 20944 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20944 Log: Merged revision(s) 20943 from trunk/OpenMPT: [Var] python: Update to v3.12.4. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/build/download_externals.cmd Modified: branches/OpenMPT-1.31/build/download_externals.cmd ============================================================================== --- branches/OpenMPT-1.31/build/download_externals.cmd Fri Jun 7 08:34:01 2024 (r20943) +++ branches/OpenMPT-1.31/build/download_externals.cmd Fri Jun 7 08:37:29 2024 (r20944) @@ -44,7 +44,7 @@ call build\scriptlib\download.cmd %MPT_DOWNLOAD% x%1 "https://web.archive.org/web/20200918004813if_/http://download.microsoft.com/download/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe" "build\externals\htmlhelp.exe" d91371244ea98c691b4674ee266c4a2496a296800c176adae069d21f5c52c0763b21cc7859cfffa865b89e50171a2c99a6d14620c32f7d72c0ef04045348f856 3509072 || goto error -call build\scriptlib\download.cmd %MPT_DOWNLOAD% x%1 "https://www.python.org/ftp/python/3.12.3/python-3.12.3-embed-amd64.zip" "build\externals\python-3.12.3-embed-amd64.zip" b09fb48e9e17117d0e370e4a9934296c1211556594933ecaed4438daaa5e55fe673bb40e9ee0bc1bf7a038fa0711fbcc853422c84f3862703085cf891fae4298 11055461 || goto error +call build\scriptlib\download.cmd %MPT_DOWNLOAD% x%1 "https://www.python.org/ftp/python/3.12.4/python-3.12.4-embed-amd64.zip" "build\externals\python-3.12.4-embed-amd64.zip" f07be8d84645f2411d061262b378d783498f23a961a9eb3dc3cf5c785af75de551cd4f413c385f47219601d2b09fa6ae88242226b1e31cf009929d3ff5d6673e 11065736 || goto error call build\scriptlib\download.cmd %MPT_DOWNLOAD% x%1 "https://netcologne.dl.sourceforge.net/project/innounp/innounp/innounp%%%%200.50/innounp050.rar" "build\externals\innounp050.rar" dbbc809308267a866db9d6b751fdeda6d179e1a65d8ddb14bb51984431ae91493f9a76105e1789b245732043a2c696c869ed10964b48cf59f81e55bd52f85330 141621 || goto error @@ -73,7 +73,7 @@ call build\scriptlib\unpack.cmd "include\winamp" "build\externals\WA5.55_SDK.exe" "." || goto error call build\scriptlib\unpack.cmd "include\xmplay" "build\externals\xmp-sdk.zip" "." || goto error -call build\scriptlib\unpack.cmd "build\tools\python3" "build\externals\python-3.12.3-embed-amd64.zip" "." || goto error +call build\scriptlib\unpack.cmd "build\tools\python3" "build\externals\python-3.12.4-embed-amd64.zip" "." || goto error call :killdir "build\tools\innounp" || goto error call :killdir "build\tools\innosetup" || goto error |
From: <sv...@op...> - 2024-06-07 06:34:13
|
Author: manx Date: Fri Jun 7 08:34:01 2024 New Revision: 20943 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20943 Log: [Var] python: Update to v3.12.4. Modified: trunk/OpenMPT/build/download_externals.cmd trunk/OpenMPT/build/download_externals.txt Modified: trunk/OpenMPT/build/download_externals.cmd ============================================================================== --- trunk/OpenMPT/build/download_externals.cmd Thu Jun 6 22:31:37 2024 (r20942) +++ trunk/OpenMPT/build/download_externals.cmd Fri Jun 7 08:34:01 2024 (r20943) @@ -47,7 +47,7 @@ call build\scriptlib\unpack.cmd "include\winamp" "build\externals\WA5.55_SDK.exe" "." || goto error call build\scriptlib\unpack.cmd "include\xmplay" "build\externals\xmp-sdk.zip" "." || goto error -call build\scriptlib\unpack.cmd "build\tools\python3" "build\externals\python-3.12.3-embed-amd64.zip" "." || goto error +call build\scriptlib\unpack.cmd "build\tools\python3" "build\externals\python-3.12.4-embed-amd64.zip" "." || goto error call :killdir "build\tools\innounp" || goto error call :killdir "build\tools\innosetup" || goto error Modified: trunk/OpenMPT/build/download_externals.txt ============================================================================== --- trunk/OpenMPT/build/download_externals.txt Thu Jun 6 22:31:37 2024 (r20942) +++ trunk/OpenMPT/build/download_externals.txt Fri Jun 7 08:34:01 2024 (r20943) @@ -4,7 +4,7 @@ "build/externals/WA5.55_SDK.exe" 336166 394375db8a16bf155b5de9376f6290488ab339e503dbdfdc4e2f5bede967799e625c559cca363bc988324f1a8e86e5fd28a9f697422abd7bb3dcde4a766607b5 "https://download.nullsoft.com/winamp/plugin-dev/WA5.55_SDK.exe" "http://download.nullsoft.com/winamp/plugin-dev/WA5.55_SDK.exe" "https://web.archive.org/web/20131217072017/http://download.nullsoft.com/winamp/plugin-dev/WA5.55_SDK.exe" "build/externals/xmp-sdk.zip" 322744 62c442d656d4bb380360368a0f5f01da11b4ed54333d7f54f875a9a5ec390b08921e00bd08e62cd7a0a5fe642e3377023f20a950cc2a42898ff4cda9ab88fc91 "https://www.un4seen.com/files/xmp-sdk.zip" "build/externals/htmlhelp.exe" 3509072 d91371244ea98c691b4674ee266c4a2496a296800c176adae069d21f5c52c0763b21cc7859cfffa865b89e50171a2c99a6d14620c32f7d72c0ef04045348f856 "https://web.archive.org/web/20200918004813/https://download.microsoft.com/download/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe" "https://web.archive.org/web/20200918004813/http://download.microsoft.com/download/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe" -"build/externals/python-3.12.3-embed-amd64.zip" 11055461 b09fb48e9e17117d0e370e4a9934296c1211556594933ecaed4438daaa5e55fe673bb40e9ee0bc1bf7a038fa0711fbcc853422c84f3862703085cf891fae4298 "https://www.python.org/ftp/python/3.12.3/python-3.12.3-embed-amd64.zip" +"build/externals/python-3.12.4-embed-amd64.zip" 11065736 f07be8d84645f2411d061262b378d783498f23a961a9eb3dc3cf5c785af75de551cd4f413c385f47219601d2b09fa6ae88242226b1e31cf009929d3ff5d6673e "https://www.python.org/ftp/python/3.12.4/python-3.12.4-embed-amd64.zip" "build/externals/innounp050.rar" 141621 dbbc809308267a866db9d6b751fdeda6d179e1a65d8ddb14bb51984431ae91493f9a76105e1789b245732043a2c696c869ed10964b48cf59f81e55bd52f85330 "https://netcologne.dl.sourceforge.net/project/innounp/innounp/innounp 0.50/innounp050.rar" "https://deac-fra.dl.sourceforge.net/project/innounp/innounp/innounp 0.50/innounp050.rar" "build/externals/innosetup-6.2.2.exe" 4722512 496375b1ce9c0d2f8eb3930ebd8366f5c4c938bc1eda47aed415e3f02bd8651a84a770a15f2825bf3c8ed9dbefa355b9eb805dd76bc782f6d8c8096d80443099 "https://files.jrsoftware.org/is/6/innosetup-6.2.2.exe" "build/externals/isetup-5.5.8-unicode.exe" 2342456 da7e27d85caec85b4194c7b1412c5a64c0ae12f22d903b94f2f4ee9ea0cb99c91b2d1dbb49262eefae8129e6b91f5c46f26f353011076e77e75f9c955fc5e1cb "https://files.jrsoftware.org/is/5/isetup-5.5.8-unicode.exe" |
From: <sv...@op...> - 2024-06-06 20:31:43
|
Author: sagamusix Date: Thu Jun 6 22:31:37 2024 New Revision: 20942 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20942 Log: Merged revision(s) 20941 from trunk/OpenMPT: [Imp] MED: Better translation of echo length. ........ 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 Thu Jun 6 22:15:57 2024 (r20941) +++ branches/OpenMPT-1.31/soundlib/Load_med.cpp Thu Jun 6 22:31:37 2024 (r20942) @@ -1171,6 +1171,7 @@ const float feedback = 1.0f / (1 << std::max(header.mixEchoDepth, uint8(1))); // The feedback we want const float initialFeedback = std::sqrt(1.0f - (feedback * feedback)); // Actual strength of first delay's feedback const float wetFactor = feedback / initialFeedback; // Factor to compensate for this + const float delay = (std::max(header.mixEchoLength.get(), uint16(1)) - 1) / 1999.0f; SNDMIXPLUGIN &mixPlug = m_MixPlugins[numPlugins]; mpt::reconstruct(mixPlug); memcpy(&mixPlug.Info.dwPluginId1, "OMXD", 4); @@ -1184,8 +1185,8 @@ std::array<float32le, 6> params{}; params[1] = 1.0f; // WetDryMix params[2] = feedback; // Feedback - params[3] = header.mixEchoLength / 2000.0f; // LeftDelay - params[4] = params[3]; // RightDelay + params[3] = delay; // LeftDelay + params[4] = delay; // RightDelay params[5] = header.mixEchoType == 2 ? 1.0f : 0.0f; // PanDelay mixPlug.pluginData.resize(sizeof(params)); memcpy(mixPlug.pluginData.data(), params.data(), sizeof(params)); |
From: <sv...@op...> - 2024-06-06 20:16:09
|
Author: sagamusix Date: Thu Jun 6 22:15:57 2024 New Revision: 20941 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20941 Log: [Imp] MED: Better translation of echo length. Modified: trunk/OpenMPT/soundlib/Load_med.cpp Modified: trunk/OpenMPT/soundlib/Load_med.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_med.cpp Thu Jun 6 22:02:00 2024 (r20940) +++ trunk/OpenMPT/soundlib/Load_med.cpp Thu Jun 6 22:15:57 2024 (r20941) @@ -1353,6 +1353,7 @@ const float feedback = 1.0f / (1 << std::max(header.mixEchoDepth, uint8(1))); // The feedback we want const float initialFeedback = std::sqrt(1.0f - (feedback * feedback)); // Actual strength of first delay's feedback const float wetFactor = feedback / initialFeedback; // Factor to compensate for this + const float delay = (std::max(header.mixEchoLength.get(), uint16(1)) - 1) / 1999.0f; SNDMIXPLUGIN &mixPlug = m_MixPlugins[numPlugins]; mpt::reconstruct(mixPlug); memcpy(&mixPlug.Info.dwPluginId1, "OMXD", 4); @@ -1366,8 +1367,8 @@ std::array<float32le, 6> params{}; params[1] = 1.0f; // WetDryMix params[2] = feedback; // Feedback - params[3] = header.mixEchoLength / 2000.0f; // LeftDelay - params[4] = params[3]; // RightDelay + params[3] = delay; // LeftDelay + params[4] = delay; // RightDelay params[5] = header.mixEchoType == 2 ? 1.0f : 0.0f; // PanDelay mixPlug.pluginData.resize(sizeof(params)); memcpy(mixPlug.pluginData.data(), params.data(), sizeof(params)); |
From: <sv...@op...> - 2024-06-06 20:02:07
|
Author: sagamusix Date: Thu Jun 6 22:02:00 2024 New Revision: 20940 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20940 Log: Merged revision(s) 20939 from trunk/OpenMPT: [Fix] Compile fix for libopenmpt builds. ........ 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 Thu Jun 6 22:00:56 2024 (r20939) +++ branches/OpenMPT-1.31/soundlib/Load_med.cpp Thu Jun 6 22:02:00 2024 (r20940) @@ -797,9 +797,9 @@ bool needInstruments = false; bool anySynthInstrs = false; -#ifdef MPT_WITH_VST +#ifndef NO_PLUGINS PLUGINDEX numPlugins = 0; -#endif // MPT_WITH_VST +#endif // !NO_PLUGINS for(SAMPLEINDEX ins = 1, smp = 1; ins <= m_nInstruments; ins++) { if(!AllocateInstrument(ins, smp)) |
From: <sv...@op...> - 2024-06-06 20:01:08
|
Author: sagamusix Date: Thu Jun 6 22:00:56 2024 New Revision: 20939 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20939 Log: [Fix] Compile fix for libopenmpt builds. Modified: trunk/OpenMPT/soundlib/Load_med.cpp Modified: trunk/OpenMPT/soundlib/Load_med.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_med.cpp Thu Jun 6 21:55:31 2024 (r20938) +++ trunk/OpenMPT/soundlib/Load_med.cpp Thu Jun 6 22:00:56 2024 (r20939) @@ -930,9 +930,9 @@ const bool hardwareMixSamples = (version < 2) || (version >= 2 && !(songHeader.flags2 & MMDSong::FLAG2_MIX)); bool needInstruments = false; -#ifdef MPT_WITH_VST +#ifndef NO_PLUGINS PLUGINDEX numPlugins = 0; -#endif // MPT_WITH_VST +#endif // !NO_PLUGINS for(SAMPLEINDEX ins = 1, smp = 1; ins <= m_nInstruments; ins++) { if(!AllocateInstrument(ins, smp)) |
From: <sv...@op...> - 2024-06-06 19:55:38
|
Author: sagamusix Date: Thu Jun 6 21:55:31 2024 New Revision: 20938 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20938 Log: Merged revision(s) 20936-20937 from trunk/OpenMPT: [Imp] MED: Further improvements to effect juggling to potentially keep X-param if the other effect can be moved to the volume colum instead. ........ [Imp] MED: Emulate echo DSP through DMO Echo plugin (https://www.un4seen.com/forum/?topic=15448.msg143034#msg143034). ........ 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 Thu Jun 6 21:55:09 2024 (r20937) +++ branches/OpenMPT-1.31/soundlib/Load_med.cpp Thu Jun 6 21:55:31 2024 (r20938) @@ -84,10 +84,10 @@ uint32be flags3; uint16be volAdjust; // Volume adjust (%) uint16be mixChannels; // Mixing channels, 0 means 4 - uint8be mixEchoType; // 0 = nothing, 1 = normal, 2 = cross - uint8be mixEchoDepth; // 1 - 6, 0 = default + uint8 mixEchoType; // 0 = nothing, 1 = normal, 2 = cross + uint8 mixEchoDepth; // 1 - 6, 0 = default uint16be mixEchoLength; // Echo length in milliseconds - int8be mixStereoSep; // Stereo separation + int8 mixStereoSep; // Stereo separation char pad0[223]; }; @@ -616,11 +616,11 @@ if(oldCmd.first != CMD_NONE && m->command != oldCmd.first) { - // Restore effect from previous page, or reset X-Param to 8-bit value if this cell was overwritten with a "useful" effect - if(row > 0 && oldCmd.first == CMD_XPARAM) - pattern.GetpModCommand(row - 1, chn)->param = Util::MaxValueOfType(m->param); - else if(!ModCommand::CombineEffects(m->command, m->param, oldCmd.first, oldCmd.second) && m->volcmd == VOLCMD_NONE) + if(!ModCommand::CombineEffects(m->command, m->param, oldCmd.first, oldCmd.second) && m->volcmd == VOLCMD_NONE) m->FillInTwoCommands(m->command, m->param, oldCmd.first, oldCmd.second); + // Reset X-Param to 8-bit value if this cell was overwritten with a "useful" effect + if(row > 0 && oldCmd.first == CMD_XPARAM && m->command != CMD_XPARAM) + pattern.GetpModCommand(row - 1, chn)->param = Util::MaxValueOfType(m->param); } if(extraCmd.first != CMD_NONE) { @@ -829,7 +829,7 @@ if(type == L"VST") { auto &mixPlug = m_MixPlugins[numPlugins]; - mixPlug = {}; + mpt::reconstruct(mixPlug); mixPlug.Info.dwPluginId1 = Vst::kEffectMagic; mixPlug.Info.gain = 10; mixPlug.Info.szName = mpt::ToCharset(mpt::Charset::Locale, name); @@ -1164,6 +1164,34 @@ SetupMODPanning(true); } +#ifndef NO_PLUGINS + if((header.mixEchoType == 1 || header.mixEchoType == 2) && numPlugins < MAX_MIXPLUGINS) + { + // Emulating MED echo using the DMO echo requires to compensate for the differences in initial feedback in the latter. + const float feedback = 1.0f / (1 << std::max(header.mixEchoDepth, uint8(1))); // The feedback we want + const float initialFeedback = std::sqrt(1.0f - (feedback * feedback)); // Actual strength of first delay's feedback + const float wetFactor = feedback / initialFeedback; // Factor to compensate for this + SNDMIXPLUGIN &mixPlug = m_MixPlugins[numPlugins]; + mpt::reconstruct(mixPlug); + memcpy(&mixPlug.Info.dwPluginId1, "OMXD", 4); + memcpy(&mixPlug.Info.dwPluginId2, "\x2C\x93\x3E\xEF", 4); + mixPlug.Info.routingFlags = SNDMIXPLUGININFO::irApplyToMaster | SNDMIXPLUGININFO::irAutoSuspend; + mixPlug.fDryRatio = 1.0f - wetFactor / (wetFactor + 1.0f); + mixPlug.Info.gain = 10; + mixPlug.Info.szName = "Echo"; + mixPlug.Info.szLibraryName = "Echo"; + + std::array<float32le, 6> params{}; + params[1] = 1.0f; // WetDryMix + params[2] = feedback; // Feedback + params[3] = header.mixEchoLength / 2000.0f; // LeftDelay + params[4] = params[3]; // RightDelay + params[5] = header.mixEchoType == 2 ? 1.0f : 0.0f; // PanDelay + mixPlug.pluginData.resize(sizeof(params)); + memcpy(mixPlug.pluginData.data(), params.data(), sizeof(params)); + } +#endif + std::vector<uint16be> sections; if(!file.Seek(header.sectionTableOffset) || !file.CanRead(songHeader.songLength * 2) |
From: <sv...@op...> - 2024-06-06 19:55:23
|
Author: sagamusix Date: Thu Jun 6 21:55:09 2024 New Revision: 20937 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20937 Log: [Imp] MED: Emulate echo DSP through DMO Echo plugin (https://www.un4seen.com/forum/?topic=15448.msg143034#msg143034). Modified: trunk/OpenMPT/soundlib/Load_med.cpp Modified: trunk/OpenMPT/soundlib/Load_med.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_med.cpp Thu Jun 6 21:50:52 2024 (r20936) +++ trunk/OpenMPT/soundlib/Load_med.cpp Thu Jun 6 21:55:09 2024 (r20937) @@ -84,10 +84,10 @@ uint32be flags3; uint16be volAdjust; // Volume adjust (%) uint16be mixChannels; // Mixing channels, 0 means 4 - uint8be mixEchoType; // 0 = nothing, 1 = normal, 2 = cross - uint8be mixEchoDepth; // 1 - 6, 0 = default + uint8 mixEchoType; // 0 = nothing, 1 = normal, 2 = cross + uint8 mixEchoDepth; // 1 - 6, 0 = default uint16be mixEchoLength; // Echo length in milliseconds - int8be mixStereoSep; // Stereo separation + int8 mixStereoSep; // Stereo separation char pad0[223]; }; @@ -966,7 +966,7 @@ if(type == L"VST") { auto &mixPlug = m_MixPlugins[numPlugins]; - mixPlug = {}; + mpt::reconstruct(mixPlug); mixPlug.Info.dwPluginId1 = Vst::kEffectMagic; mixPlug.Info.gain = 10; mixPlug.Info.szName = mpt::ToCharset(mpt::Charset::Locale, name); @@ -1346,6 +1346,34 @@ SetupMODPanning(true); } +#ifndef NO_PLUGINS + if((header.mixEchoType == 1 || header.mixEchoType == 2) && numPlugins < MAX_MIXPLUGINS) + { + // Emulating MED echo using the DMO echo requires to compensate for the differences in initial feedback in the latter. + const float feedback = 1.0f / (1 << std::max(header.mixEchoDepth, uint8(1))); // The feedback we want + const float initialFeedback = std::sqrt(1.0f - (feedback * feedback)); // Actual strength of first delay's feedback + const float wetFactor = feedback / initialFeedback; // Factor to compensate for this + SNDMIXPLUGIN &mixPlug = m_MixPlugins[numPlugins]; + mpt::reconstruct(mixPlug); + memcpy(&mixPlug.Info.dwPluginId1, "OMXD", 4); + memcpy(&mixPlug.Info.dwPluginId2, "\x2C\x93\x3E\xEF", 4); + mixPlug.Info.routingFlags = SNDMIXPLUGININFO::irApplyToMaster | SNDMIXPLUGININFO::irAutoSuspend; + mixPlug.fDryRatio = 1.0f - wetFactor / (wetFactor + 1.0f); + mixPlug.Info.gain = 10; + mixPlug.Info.szName = "Echo"; + mixPlug.Info.szLibraryName = "Echo"; + + std::array<float32le, 6> params{}; + params[1] = 1.0f; // WetDryMix + params[2] = feedback; // Feedback + params[3] = header.mixEchoLength / 2000.0f; // LeftDelay + params[4] = params[3]; // RightDelay + params[5] = header.mixEchoType == 2 ? 1.0f : 0.0f; // PanDelay + mixPlug.pluginData.resize(sizeof(params)); + memcpy(mixPlug.pluginData.data(), params.data(), sizeof(params)); + } +#endif + std::vector<uint16be> sections; if(!file.Seek(header.sectionTableOffset) || !file.CanRead(songHeader.songLength * 2) |
From: <sv...@op...> - 2024-06-06 19:51:00
|
Author: sagamusix Date: Thu Jun 6 21:50:52 2024 New Revision: 20936 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20936 Log: [Imp] MED: Further improvements to effect juggling to potentially keep X-param if the other effect can be moved to the volume colum instead. Modified: trunk/OpenMPT/soundlib/Load_med.cpp Modified: trunk/OpenMPT/soundlib/Load_med.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_med.cpp Thu Jun 6 15:17:00 2024 (r20935) +++ trunk/OpenMPT/soundlib/Load_med.cpp Thu Jun 6 21:50:52 2024 (r20936) @@ -639,11 +639,11 @@ if(oldCmd.first != CMD_NONE && m->command != oldCmd.first) { - // Restore effect from previous page, or reset X-Param to 8-bit value if this cell was overwritten with a "useful" effect - if(row > 0 && oldCmd.first == CMD_XPARAM) - pattern.GetpModCommand(row - 1, chn)->param = Util::MaxValueOfType(m->param); - else if(!ModCommand::CombineEffects(m->command, m->param, oldCmd.first, oldCmd.second) && m->volcmd == VOLCMD_NONE) + if(!ModCommand::CombineEffects(m->command, m->param, oldCmd.first, oldCmd.second) && m->volcmd == VOLCMD_NONE) m->FillInTwoCommands(m->command, m->param, oldCmd.first, oldCmd.second); + // Reset X-Param to 8-bit value if this cell was overwritten with a "useful" effect + if(row > 0 && oldCmd.first == CMD_XPARAM && m->command != CMD_XPARAM) + pattern.GetpModCommand(row - 1, chn)->param = Util::MaxValueOfType(m->param); } if(extraCmd.first != CMD_NONE) { |
From: <sv...@op...> - 2024-06-06 13:17:13
|
Author: sagamusix Date: Thu Jun 6 15:17:00 2024 New Revision: 20935 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20935 Log: [Ref] Silence warnings. Modified: trunk/OpenMPT/soundlib/Load_rtm.cpp Modified: trunk/OpenMPT/soundlib/Load_rtm.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_rtm.cpp Wed Jun 5 23:28:49 2024 (r20934) +++ trunk/OpenMPT/soundlib/Load_rtm.cpp Thu Jun 6 15:17:00 2024 (r20935) @@ -228,7 +228,7 @@ mptSmp.uFlags.set(CHN_SUSTAINLOOP, loopType == 2); mptSmp.nC5Speed = sampleRate; mptSmp.Transpose((48 - baseNote) / 12.0); - mptSmp.nPan = (panning + 64) * 2; + mptSmp.nPan = static_cast<uint16>((panning + 64) * 2); mptSmp.nVibType = static_cast<VibratoType>(insHeader.vibratoType); mptSmp.nVibDepth = insHeader.vibratoDepth * 2; @@ -333,7 +333,7 @@ ReadOrderFromFile<uint16le>(Order(), extraData, songHeader.numOrders); for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) { - ChnSettings[chn].nPan = (songHeader.panning[chn] + 64) * 2; + ChnSettings[chn].nPan = static_cast<uint16>((songHeader.panning[chn] + 64) * 2); if(songHeader.flags & RTMMHeader::songTrackNames) extraData.ReadString<mpt::String::maybeNullTerminated>(ChnSettings[chn].szName, 16); } |
From: <sv...@op...> - 2024-06-05 21:29:02
|
Author: sagamusix Date: Wed Jun 5 23:28:49 2024 New Revision: 20934 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20934 Log: Merged revision(s) 20933 from trunk/OpenMPT: [Fix] X-Param handling broke when implemeting command pages. ........ 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 Wed Jun 5 23:28:17 2024 (r20933) +++ branches/OpenMPT-1.31/soundlib/Load_med.cpp Wed Jun 5 23:28:49 2024 (r20934) @@ -609,14 +609,15 @@ if(note >= NOTE_MIN && note <= NOTE_MAX) m->note = static_cast<ModCommand::NOTE>(note); + + if(!cmd && !param1) + continue; const auto extraCmd = ConvertMEDEffect(*m, cmd, param1, param2, ctx); - if(oldCmd.first != CMD_NONE) + if(oldCmd.first != CMD_NONE && m->command != oldCmd.first) { - // Restore effect from previous page or X-Param if it was overwritten by an empty effect, or restrict to 8-bit value if this cell was overwritten with a "useful" effect - if(m->command == CMD_NONE) - m->SetEffectCommand(oldCmd); - else if(row > 0 && oldCmd.first == CMD_XPARAM) + // Restore effect from previous page, or reset X-Param to 8-bit value if this cell was overwritten with a "useful" effect + if(row > 0 && oldCmd.first == CMD_XPARAM) pattern.GetpModCommand(row - 1, chn)->param = Util::MaxValueOfType(m->param); else if(!ModCommand::CombineEffects(m->command, m->param, oldCmd.first, oldCmd.second) && m->volcmd == VOLCMD_NONE) m->FillInTwoCommands(m->command, m->param, oldCmd.first, oldCmd.second); @@ -915,7 +916,7 @@ if(!isSynth) { auto &mixPlug = m_MixPlugins[numPlugins]; - mixPlug = {}; + mpt::reconstruct(mixPlug); mixPlug.Info.dwPluginId1 = PLUGMAGIC('V', 's', 't', 'P'); mixPlug.Info.dwPluginId2 = PLUGMAGIC('M', 'M', 'I', 'D'); mixPlug.Info.gain = 10; |
From: <sv...@op...> - 2024-06-05 21:28:28
|
Author: sagamusix Date: Wed Jun 5 23:28:17 2024 New Revision: 20933 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20933 Log: [Fix] X-Param handling broke when implemeting command pages. Modified: trunk/OpenMPT/soundlib/Load_med.cpp Modified: trunk/OpenMPT/soundlib/Load_med.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_med.cpp Wed Jun 5 21:56:27 2024 (r20932) +++ trunk/OpenMPT/soundlib/Load_med.cpp Wed Jun 5 23:28:17 2024 (r20933) @@ -632,14 +632,15 @@ if(note >= NOTE_MIN && note <= NOTE_MAX) m->note = static_cast<ModCommand::NOTE>(note); + + if(!cmd && !param1) + continue; const auto extraCmd = ConvertMEDEffect(*m, cmd, param1, param2, ctx); - if(oldCmd.first != CMD_NONE) + if(oldCmd.first != CMD_NONE && m->command != oldCmd.first) { - // Restore effect from previous page or X-Param if it was overwritten by an empty effect, or restrict to 8-bit value if this cell was overwritten with a "useful" effect - if(m->command == CMD_NONE) - m->SetEffectCommand(oldCmd); - else if(row > 0 && oldCmd.first == CMD_XPARAM) + // Restore effect from previous page, or reset X-Param to 8-bit value if this cell was overwritten with a "useful" effect + if(row > 0 && oldCmd.first == CMD_XPARAM) pattern.GetpModCommand(row - 1, chn)->param = Util::MaxValueOfType(m->param); else if(!ModCommand::CombineEffects(m->command, m->param, oldCmd.first, oldCmd.second) && m->volcmd == VOLCMD_NONE) m->FillInTwoCommands(m->command, m->param, oldCmd.first, oldCmd.second); @@ -1076,7 +1077,7 @@ if(!isSynth) { auto &mixPlug = m_MixPlugins[numPlugins]; - mixPlug = {}; + mpt::reconstruct(mixPlug); mixPlug.Info.dwPluginId1 = PLUGMAGIC('V', 's', 't', 'P'); mixPlug.Info.dwPluginId2 = PLUGMAGIC('M', 'M', 'I', 'D'); mixPlug.Info.gain = 10; |
From: <sv...@op...> - 2024-06-05 19:56:39
|
Author: sagamusix Date: Wed Jun 5 21:56:27 2024 New Revision: 20932 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20932 Log: [Fix] Remove sanity check covered by type limits. Instrument count is sanitized further down below anyway. Modified: trunk/OpenMPT/soundlib/Load_rtm.cpp Modified: trunk/OpenMPT/soundlib/Load_rtm.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_rtm.cpp Wed Jun 5 21:44:08 2024 (r20931) +++ trunk/OpenMPT/soundlib/Load_rtm.cpp Wed Jun 5 21:56:27 2024 (r20932) @@ -59,7 +59,6 @@ bool IsValid() const { return numChannels > 0 && numChannels <= 32 - && numInstruments < MAX_INSTRUMENTS && numOrders <= 999 && numPatterns <= 999 && speed != 0 |
Author: sagamusix Date: Wed Jun 5 21:44:08 2024 New Revision: 20931 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20931 Log: [New] Can now read Real Tracker 2 (RTM) files. [Mod] OpenMPT: Version is now 1.32.00.17 Added: trunk/OpenMPT/soundlib/Load_rtm.cpp (contents, props changed) Modified: trunk/OpenMPT/build/android_ndk/Android.mk trunk/OpenMPT/build/autotools/Makefile.am trunk/OpenMPT/build/vs2017winxp/OpenMPT-ANSI.vcxproj trunk/OpenMPT/build/vs2017winxp/OpenMPT-ANSI.vcxproj.filters trunk/OpenMPT/build/vs2017winxp/OpenMPT-UTF8.vcxproj trunk/OpenMPT/build/vs2017winxp/OpenMPT-UTF8.vcxproj.filters trunk/OpenMPT/build/vs2017winxp/OpenMPT.vcxproj trunk/OpenMPT/build/vs2017winxp/OpenMPT.vcxproj.filters trunk/OpenMPT/build/vs2017winxp/libopenmpt-small.vcxproj trunk/OpenMPT/build/vs2017winxp/libopenmpt-small.vcxproj.filters trunk/OpenMPT/build/vs2017winxp/libopenmpt.vcxproj trunk/OpenMPT/build/vs2017winxp/libopenmpt.vcxproj.filters trunk/OpenMPT/build/vs2017winxp/libopenmpt_test.vcxproj trunk/OpenMPT/build/vs2017winxp/libopenmpt_test.vcxproj.filters trunk/OpenMPT/build/vs2017winxpansi/OpenMPT-ANSI.vcxproj trunk/OpenMPT/build/vs2017winxpansi/OpenMPT-ANSI.vcxproj.filters trunk/OpenMPT/build/vs2017winxpansi/OpenMPT-UTF8.vcxproj trunk/OpenMPT/build/vs2017winxpansi/OpenMPT-UTF8.vcxproj.filters trunk/OpenMPT/build/vs2017winxpansi/OpenMPT.vcxproj trunk/OpenMPT/build/vs2017winxpansi/OpenMPT.vcxproj.filters trunk/OpenMPT/build/vs2017winxpansi/libopenmpt-small.vcxproj trunk/OpenMPT/build/vs2017winxpansi/libopenmpt-small.vcxproj.filters trunk/OpenMPT/build/vs2017winxpansi/libopenmpt.vcxproj trunk/OpenMPT/build/vs2017winxpansi/libopenmpt.vcxproj.filters trunk/OpenMPT/build/vs2017winxpansi/libopenmpt_test.vcxproj trunk/OpenMPT/build/vs2017winxpansi/libopenmpt_test.vcxproj.filters trunk/OpenMPT/build/vs2019win10/OpenMPT-ANSI.vcxproj trunk/OpenMPT/build/vs2019win10/OpenMPT-ANSI.vcxproj.filters trunk/OpenMPT/build/vs2019win10/OpenMPT-UTF8.vcxproj trunk/OpenMPT/build/vs2019win10/OpenMPT-UTF8.vcxproj.filters trunk/OpenMPT/build/vs2019win10/OpenMPT.vcxproj trunk/OpenMPT/build/vs2019win10/OpenMPT.vcxproj.filters trunk/OpenMPT/build/vs2019win10/libopenmpt-small.vcxproj trunk/OpenMPT/build/vs2019win10/libopenmpt-small.vcxproj.filters trunk/OpenMPT/build/vs2019win10/libopenmpt.vcxproj trunk/OpenMPT/build/vs2019win10/libopenmpt.vcxproj.filters trunk/OpenMPT/build/vs2019win10/libopenmpt_test.vcxproj trunk/OpenMPT/build/vs2019win10/libopenmpt_test.vcxproj.filters trunk/OpenMPT/build/vs2019win10uwp/libopenmpt-small.vcxproj trunk/OpenMPT/build/vs2019win10uwp/libopenmpt-small.vcxproj.filters trunk/OpenMPT/build/vs2019win10uwp/libopenmpt.vcxproj trunk/OpenMPT/build/vs2019win10uwp/libopenmpt.vcxproj.filters trunk/OpenMPT/build/vs2019win7/OpenMPT-ANSI.vcxproj trunk/OpenMPT/build/vs2019win7/OpenMPT-ANSI.vcxproj.filters trunk/OpenMPT/build/vs2019win7/OpenMPT-UTF8.vcxproj trunk/OpenMPT/build/vs2019win7/OpenMPT-UTF8.vcxproj.filters trunk/OpenMPT/build/vs2019win7/OpenMPT.vcxproj trunk/OpenMPT/build/vs2019win7/OpenMPT.vcxproj.filters trunk/OpenMPT/build/vs2019win7/libopenmpt-small.vcxproj trunk/OpenMPT/build/vs2019win7/libopenmpt-small.vcxproj.filters trunk/OpenMPT/build/vs2019win7/libopenmpt.vcxproj trunk/OpenMPT/build/vs2019win7/libopenmpt.vcxproj.filters trunk/OpenMPT/build/vs2019win7/libopenmpt_test.vcxproj trunk/OpenMPT/build/vs2019win7/libopenmpt_test.vcxproj.filters trunk/OpenMPT/build/vs2019win81/OpenMPT-ANSI.vcxproj trunk/OpenMPT/build/vs2019win81/OpenMPT-ANSI.vcxproj.filters trunk/OpenMPT/build/vs2019win81/OpenMPT-UTF8.vcxproj trunk/OpenMPT/build/vs2019win81/OpenMPT-UTF8.vcxproj.filters trunk/OpenMPT/build/vs2019win81/OpenMPT.vcxproj trunk/OpenMPT/build/vs2019win81/OpenMPT.vcxproj.filters trunk/OpenMPT/build/vs2019win81/libopenmpt-small.vcxproj trunk/OpenMPT/build/vs2019win81/libopenmpt-small.vcxproj.filters trunk/OpenMPT/build/vs2019win81/libopenmpt.vcxproj trunk/OpenMPT/build/vs2019win81/libopenmpt.vcxproj.filters trunk/OpenMPT/build/vs2019win81/libopenmpt_test.vcxproj trunk/OpenMPT/build/vs2019win81/libopenmpt_test.vcxproj.filters trunk/OpenMPT/build/vs2022win10/OpenMPT-ANSI.vcxproj trunk/OpenMPT/build/vs2022win10/OpenMPT-ANSI.vcxproj.filters trunk/OpenMPT/build/vs2022win10/OpenMPT-UTF8.vcxproj trunk/OpenMPT/build/vs2022win10/OpenMPT-UTF8.vcxproj.filters trunk/OpenMPT/build/vs2022win10/OpenMPT.vcxproj trunk/OpenMPT/build/vs2022win10/OpenMPT.vcxproj.filters trunk/OpenMPT/build/vs2022win10/libopenmpt-small.vcxproj trunk/OpenMPT/build/vs2022win10/libopenmpt-small.vcxproj.filters trunk/OpenMPT/build/vs2022win10/libopenmpt.vcxproj trunk/OpenMPT/build/vs2022win10/libopenmpt.vcxproj.filters trunk/OpenMPT/build/vs2022win10/libopenmpt_test.vcxproj trunk/OpenMPT/build/vs2022win10/libopenmpt_test.vcxproj.filters trunk/OpenMPT/build/vs2022win10clang/OpenMPT-ANSI.vcxproj trunk/OpenMPT/build/vs2022win10clang/OpenMPT-ANSI.vcxproj.filters trunk/OpenMPT/build/vs2022win10clang/OpenMPT-UTF8.vcxproj trunk/OpenMPT/build/vs2022win10clang/OpenMPT-UTF8.vcxproj.filters trunk/OpenMPT/build/vs2022win10clang/OpenMPT.vcxproj trunk/OpenMPT/build/vs2022win10clang/OpenMPT.vcxproj.filters trunk/OpenMPT/build/vs2022win10clang/libopenmpt-small.vcxproj trunk/OpenMPT/build/vs2022win10clang/libopenmpt-small.vcxproj.filters trunk/OpenMPT/build/vs2022win10clang/libopenmpt.vcxproj trunk/OpenMPT/build/vs2022win10clang/libopenmpt.vcxproj.filters trunk/OpenMPT/build/vs2022win10clang/libopenmpt_test.vcxproj trunk/OpenMPT/build/vs2022win10clang/libopenmpt_test.vcxproj.filters trunk/OpenMPT/build/vs2022win10uwp/libopenmpt-small.vcxproj trunk/OpenMPT/build/vs2022win10uwp/libopenmpt-small.vcxproj.filters trunk/OpenMPT/build/vs2022win10uwp/libopenmpt.vcxproj trunk/OpenMPT/build/vs2022win10uwp/libopenmpt.vcxproj.filters trunk/OpenMPT/build/vs2022win7/OpenMPT-ANSI.vcxproj trunk/OpenMPT/build/vs2022win7/OpenMPT-ANSI.vcxproj.filters trunk/OpenMPT/build/vs2022win7/OpenMPT-UTF8.vcxproj trunk/OpenMPT/build/vs2022win7/OpenMPT-UTF8.vcxproj.filters trunk/OpenMPT/build/vs2022win7/OpenMPT.vcxproj trunk/OpenMPT/build/vs2022win7/OpenMPT.vcxproj.filters trunk/OpenMPT/build/vs2022win7/libopenmpt-small.vcxproj trunk/OpenMPT/build/vs2022win7/libopenmpt-small.vcxproj.filters trunk/OpenMPT/build/vs2022win7/libopenmpt.vcxproj trunk/OpenMPT/build/vs2022win7/libopenmpt.vcxproj.filters trunk/OpenMPT/build/vs2022win7/libopenmpt_test.vcxproj trunk/OpenMPT/build/vs2022win7/libopenmpt_test.vcxproj.filters trunk/OpenMPT/build/vs2022win81/OpenMPT-ANSI.vcxproj trunk/OpenMPT/build/vs2022win81/OpenMPT-ANSI.vcxproj.filters trunk/OpenMPT/build/vs2022win81/OpenMPT-UTF8.vcxproj trunk/OpenMPT/build/vs2022win81/OpenMPT-UTF8.vcxproj.filters trunk/OpenMPT/build/vs2022win81/OpenMPT.vcxproj trunk/OpenMPT/build/vs2022win81/OpenMPT.vcxproj.filters trunk/OpenMPT/build/vs2022win81/libopenmpt-small.vcxproj trunk/OpenMPT/build/vs2022win81/libopenmpt-small.vcxproj.filters trunk/OpenMPT/build/vs2022win81/libopenmpt.vcxproj trunk/OpenMPT/build/vs2022win81/libopenmpt.vcxproj.filters trunk/OpenMPT/build/vs2022win81/libopenmpt_test.vcxproj trunk/OpenMPT/build/vs2022win81/libopenmpt_test.vcxproj.filters trunk/OpenMPT/build/xcode-ios/libopenmpt.xcodeproj/project.pbxproj trunk/OpenMPT/build/xcode-macosx/libopenmpt.xcodeproj/project.pbxproj trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/contrib/fuzzing/all_formats.dict trunk/OpenMPT/installer/filetypes-multi-arch-per-arch-retro.iss trunk/OpenMPT/installer/filetypes-multi-arch-per-arch.iss trunk/OpenMPT/installer/filetypes-multi-arch-retro.iss trunk/OpenMPT/installer/filetypes-multi-arch.iss trunk/OpenMPT/soundlib/Sndfile.cpp trunk/OpenMPT/soundlib/Sndfile.h trunk/OpenMPT/soundlib/Tables.cpp Modified: trunk/OpenMPT/build/android_ndk/Android.mk ============================================================================== --- trunk/OpenMPT/build/android_ndk/Android.mk Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/android_ndk/Android.mk Wed Jun 5 21:44:08 2024 (r20931) @@ -150,6 +150,7 @@ soundlib/Load_pt36.cpp \ soundlib/Load_ptm.cpp \ soundlib/Load_puma.cpp \ + soundlib/Load_rtm.cpp \ soundlib/Load_s3m.cpp \ soundlib/Load_sfx.cpp \ soundlib/Load_stk.cpp \ Modified: trunk/OpenMPT/build/autotools/Makefile.am ============================================================================== --- trunk/OpenMPT/build/autotools/Makefile.am Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/autotools/Makefile.am Wed Jun 5 21:44:08 2024 (r20931) @@ -415,6 +415,7 @@ MPT_FILES_SOUNDLIB += soundlib/Load_pt36.cpp MPT_FILES_SOUNDLIB += soundlib/Load_ptm.cpp MPT_FILES_SOUNDLIB += soundlib/Load_puma.cpp +MPT_FILES_SOUNDLIB += soundlib/Load_rtm.cpp MPT_FILES_SOUNDLIB += soundlib/Load_s3m.cpp MPT_FILES_SOUNDLIB += soundlib/Load_sfx.cpp MPT_FILES_SOUNDLIB += soundlib/Load_stk.cpp Modified: trunk/OpenMPT/build/vs2017winxp/OpenMPT-ANSI.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2017winxp/OpenMPT-ANSI.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2017winxp/OpenMPT-ANSI.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1387,6 +1387,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2017winxp/OpenMPT-ANSI.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2017winxp/OpenMPT-ANSI.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2017winxp/OpenMPT-ANSI.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -2108,6 +2108,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2017winxp/OpenMPT-UTF8.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2017winxp/OpenMPT-UTF8.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2017winxp/OpenMPT-UTF8.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1387,6 +1387,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2017winxp/OpenMPT-UTF8.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2017winxp/OpenMPT-UTF8.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2017winxp/OpenMPT-UTF8.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -2108,6 +2108,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2017winxp/OpenMPT.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2017winxp/OpenMPT.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2017winxp/OpenMPT.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1387,6 +1387,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2017winxp/OpenMPT.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2017winxp/OpenMPT.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2017winxp/OpenMPT.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -2108,6 +2108,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2017winxp/libopenmpt-small.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2017winxp/libopenmpt-small.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2017winxp/libopenmpt-small.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1014,6 +1014,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2017winxp/libopenmpt-small.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2017winxp/libopenmpt-small.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2017winxp/libopenmpt-small.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -1271,6 +1271,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2017winxp/libopenmpt.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2017winxp/libopenmpt.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2017winxp/libopenmpt.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1014,6 +1014,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2017winxp/libopenmpt.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2017winxp/libopenmpt.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2017winxp/libopenmpt.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -1271,6 +1271,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2017winxp/libopenmpt_test.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2017winxp/libopenmpt_test.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2017winxp/libopenmpt_test.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1054,6 +1054,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2017winxp/libopenmpt_test.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2017winxp/libopenmpt_test.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2017winxp/libopenmpt_test.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -1313,6 +1313,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2017winxpansi/OpenMPT-ANSI.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2017winxpansi/OpenMPT-ANSI.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2017winxpansi/OpenMPT-ANSI.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1387,6 +1387,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2017winxpansi/OpenMPT-ANSI.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2017winxpansi/OpenMPT-ANSI.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2017winxpansi/OpenMPT-ANSI.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -2108,6 +2108,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2017winxpansi/OpenMPT-UTF8.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2017winxpansi/OpenMPT-UTF8.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2017winxpansi/OpenMPT-UTF8.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1387,6 +1387,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2017winxpansi/OpenMPT-UTF8.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2017winxpansi/OpenMPT-UTF8.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2017winxpansi/OpenMPT-UTF8.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -2108,6 +2108,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2017winxpansi/OpenMPT.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2017winxpansi/OpenMPT.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2017winxpansi/OpenMPT.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1387,6 +1387,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2017winxpansi/OpenMPT.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2017winxpansi/OpenMPT.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2017winxpansi/OpenMPT.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -2108,6 +2108,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2017winxpansi/libopenmpt-small.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2017winxpansi/libopenmpt-small.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2017winxpansi/libopenmpt-small.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1014,6 +1014,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2017winxpansi/libopenmpt-small.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2017winxpansi/libopenmpt-small.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2017winxpansi/libopenmpt-small.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -1271,6 +1271,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2017winxpansi/libopenmpt.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2017winxpansi/libopenmpt.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2017winxpansi/libopenmpt.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1014,6 +1014,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2017winxpansi/libopenmpt.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2017winxpansi/libopenmpt.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2017winxpansi/libopenmpt.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -1271,6 +1271,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2017winxpansi/libopenmpt_test.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2017winxpansi/libopenmpt_test.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2017winxpansi/libopenmpt_test.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1054,6 +1054,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2017winxpansi/libopenmpt_test.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2017winxpansi/libopenmpt_test.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2017winxpansi/libopenmpt_test.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -1313,6 +1313,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2019win10/OpenMPT-ANSI.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2019win10/OpenMPT-ANSI.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win10/OpenMPT-ANSI.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -2162,6 +2162,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2019win10/OpenMPT-ANSI.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2019win10/OpenMPT-ANSI.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win10/OpenMPT-ANSI.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -2150,6 +2150,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2019win10/OpenMPT-UTF8.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2019win10/OpenMPT-UTF8.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win10/OpenMPT-UTF8.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -2162,6 +2162,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2019win10/OpenMPT-UTF8.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2019win10/OpenMPT-UTF8.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win10/OpenMPT-UTF8.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -2150,6 +2150,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2019win10/OpenMPT.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2019win10/OpenMPT.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win10/OpenMPT.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -2162,6 +2162,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2019win10/OpenMPT.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2019win10/OpenMPT.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win10/OpenMPT.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -2150,6 +2150,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2019win10/libopenmpt-small.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2019win10/libopenmpt-small.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win10/libopenmpt-small.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1641,6 +1641,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2019win10/libopenmpt-small.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2019win10/libopenmpt-small.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win10/libopenmpt-small.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -1271,6 +1271,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2019win10/libopenmpt.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2019win10/libopenmpt.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win10/libopenmpt.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1641,6 +1641,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2019win10/libopenmpt.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2019win10/libopenmpt.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win10/libopenmpt.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -1271,6 +1271,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2019win10/libopenmpt_test.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2019win10/libopenmpt_test.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win10/libopenmpt_test.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1711,6 +1711,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2019win10/libopenmpt_test.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2019win10/libopenmpt_test.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win10/libopenmpt_test.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -1319,6 +1319,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2019win10uwp/libopenmpt-small.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2019win10uwp/libopenmpt-small.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win10uwp/libopenmpt-small.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1671,6 +1671,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2019win10uwp/libopenmpt-small.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2019win10uwp/libopenmpt-small.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win10uwp/libopenmpt-small.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -1271,6 +1271,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2019win10uwp/libopenmpt.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2019win10uwp/libopenmpt.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win10uwp/libopenmpt.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1671,6 +1671,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2019win10uwp/libopenmpt.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2019win10uwp/libopenmpt.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win10uwp/libopenmpt.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -1271,6 +1271,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2019win7/OpenMPT-ANSI.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2019win7/OpenMPT-ANSI.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win7/OpenMPT-ANSI.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1406,6 +1406,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2019win7/OpenMPT-ANSI.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2019win7/OpenMPT-ANSI.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win7/OpenMPT-ANSI.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -2150,6 +2150,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2019win7/OpenMPT-UTF8.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2019win7/OpenMPT-UTF8.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win7/OpenMPT-UTF8.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1406,6 +1406,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2019win7/OpenMPT-UTF8.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2019win7/OpenMPT-UTF8.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win7/OpenMPT-UTF8.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -2150,6 +2150,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2019win7/OpenMPT.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2019win7/OpenMPT.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win7/OpenMPT.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1406,6 +1406,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2019win7/OpenMPT.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2019win7/OpenMPT.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win7/OpenMPT.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -2150,6 +2150,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2019win7/libopenmpt-small.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2019win7/libopenmpt-small.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win7/libopenmpt-small.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1011,6 +1011,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2019win7/libopenmpt-small.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2019win7/libopenmpt-small.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win7/libopenmpt-small.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -1271,6 +1271,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2019win7/libopenmpt.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2019win7/libopenmpt.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win7/libopenmpt.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1011,6 +1011,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2019win7/libopenmpt.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2019win7/libopenmpt.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win7/libopenmpt.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -1271,6 +1271,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2019win7/libopenmpt_test.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2019win7/libopenmpt_test.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win7/libopenmpt_test.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1051,6 +1051,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2019win7/libopenmpt_test.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2019win7/libopenmpt_test.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win7/libopenmpt_test.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -1319,6 +1319,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2019win81/OpenMPT-ANSI.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2019win81/OpenMPT-ANSI.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win81/OpenMPT-ANSI.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1406,6 +1406,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2019win81/OpenMPT-ANSI.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2019win81/OpenMPT-ANSI.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win81/OpenMPT-ANSI.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -2150,6 +2150,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2019win81/OpenMPT-UTF8.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2019win81/OpenMPT-UTF8.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win81/OpenMPT-UTF8.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1406,6 +1406,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2019win81/OpenMPT-UTF8.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2019win81/OpenMPT-UTF8.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win81/OpenMPT-UTF8.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -2150,6 +2150,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2019win81/OpenMPT.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2019win81/OpenMPT.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win81/OpenMPT.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1406,6 +1406,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2019win81/OpenMPT.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2019win81/OpenMPT.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win81/OpenMPT.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -2150,6 +2150,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2019win81/libopenmpt-small.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2019win81/libopenmpt-small.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win81/libopenmpt-small.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1011,6 +1011,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2019win81/libopenmpt-small.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2019win81/libopenmpt-small.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win81/libopenmpt-small.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -1271,6 +1271,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2019win81/libopenmpt.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2019win81/libopenmpt.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win81/libopenmpt.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1011,6 +1011,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2019win81/libopenmpt.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2019win81/libopenmpt.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win81/libopenmpt.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -1271,6 +1271,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2019win81/libopenmpt_test.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2019win81/libopenmpt_test.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win81/libopenmpt_test.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1051,6 +1051,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2019win81/libopenmpt_test.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2019win81/libopenmpt_test.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2019win81/libopenmpt_test.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -1319,6 +1319,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2022win10/OpenMPT-ANSI.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2022win10/OpenMPT-ANSI.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2022win10/OpenMPT-ANSI.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -2202,6 +2202,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2022win10/OpenMPT-ANSI.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2022win10/OpenMPT-ANSI.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2022win10/OpenMPT-ANSI.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -2150,6 +2150,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2022win10/OpenMPT-UTF8.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2022win10/OpenMPT-UTF8.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2022win10/OpenMPT-UTF8.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -2202,6 +2202,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2022win10/OpenMPT-UTF8.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2022win10/OpenMPT-UTF8.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2022win10/OpenMPT-UTF8.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -2150,6 +2150,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2022win10/OpenMPT.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2022win10/OpenMPT.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2022win10/OpenMPT.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -2202,6 +2202,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2022win10/OpenMPT.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2022win10/OpenMPT.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2022win10/OpenMPT.vcxproj.filters Wed Jun 5 21:44:08 2024 (r20931) @@ -2150,6 +2150,9 @@ <ClCompile Include="..\..\soundlib\Load_puma.cpp"> <Filter>soundlib</Filter> </ClCompile> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp"> + <Filter>soundlib</Filter> + </ClCompile> <ClCompile Include="..\..\soundlib\Load_s3m.cpp"> <Filter>soundlib</Filter> </ClCompile> Modified: trunk/OpenMPT/build/vs2022win10/libopenmpt-small.vcxproj ============================================================================== --- trunk/OpenMPT/build/vs2022win10/libopenmpt-small.vcxproj Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2022win10/libopenmpt-small.vcxproj Wed Jun 5 21:44:08 2024 (r20931) @@ -1681,6 +1681,7 @@ <ClCompile Include="..\..\soundlib\Load_pt36.cpp" /> <ClCompile Include="..\..\soundlib\Load_ptm.cpp" /> <ClCompile Include="..\..\soundlib\Load_puma.cpp" /> + <ClCompile Include="..\..\soundlib\Load_rtm.cpp" /> <ClCompile Include="..\..\soundlib\Load_s3m.cpp" /> <ClCompile Include="..\..\soundlib\Load_sfx.cpp" /> <ClCompile Include="..\..\soundlib\Load_stk.cpp" /> Modified: trunk/OpenMPT/build/vs2022win10/libopenmpt-small.vcxproj.filters ============================================================================== --- trunk/OpenMPT/build/vs2022win10/libopenmpt-small.vcxproj.filters Wed Jun 5 19:22:40 2024 (r20930) +++ trunk/OpenMPT/build/vs2022win10/libopenmpt-smal... [truncated message content] |
From: <sv...@op...> - 2024-06-05 17:22:52
|
Author: manx Date: Wed Jun 5 19:22:40 2024 New Revision: 20930 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20930 Log: [Imp] build: download_externals: Provide more alternate download URLs for some files. Modified: trunk/OpenMPT/build/download_externals.txt Modified: trunk/OpenMPT/build/download_externals.txt ============================================================================== --- trunk/OpenMPT/build/download_externals.txt Wed Jun 5 18:42:53 2024 (r20929) +++ trunk/OpenMPT/build/download_externals.txt Wed Jun 5 19:22:40 2024 (r20930) @@ -1,14 +1,14 @@ -"build/externals/7za920.zip" 384846 84e830c91a0e8ae499cc4814080da6569d8a6acbddc585c8b62abc86c809793aeb669b0a741063a379fd281ade85f120bc27efeb67d63bf961be893eec8bc3b3 "https://7-zip.org/a/7za920.zip" -"build/externals/7z2406-extra.7z" 1610111 6b88a761f7cc8b8affc074b24750bcdc65cc3ab18d127c8bfdd1eca953d43e21558eb1137c4b934689990564d7d24cf14e249a773dc1e5ddb7316b10d73682f8 "https://7-zip.org/a/7z2406-extra.7z" -"build/externals/7z2406-x64.exe" 1619556 b635b449f49aac29234f677e662be35f72a059401ea0786d956485d07134f9dd10ed284338503f08ff7aad16833cf034eb955ca34e1faf35a8177ccad1f20c75 "https://7-zip.org/a/7z2406-x64.exe" -"build/externals/WA5.55_SDK.exe" 336166 394375db8a16bf155b5de9376f6290488ab339e503dbdfdc4e2f5bede967799e625c559cca363bc988324f1a8e86e5fd28a9f697422abd7bb3dcde4a766607b5 "http://download.nullsoft.com/winamp/plugin-dev/WA5.55_SDK.exe" "https://web.archive.org/web/20131217072017if_/http://download.nullsoft.com/winamp/plugin-dev/WA5.55_SDK.exe" +"build/externals/7za920.zip" 384846 84e830c91a0e8ae499cc4814080da6569d8a6acbddc585c8b62abc86c809793aeb669b0a741063a379fd281ade85f120bc27efeb67d63bf961be893eec8bc3b3 "https://7-zip.org/a/7za920.zip" "https://netcologne.dl.sourceforge.net/project/sevenzip/7-Zip/9.20/7za920.zip" +"build/externals/7z2406-extra.7z" 1610111 6b88a761f7cc8b8affc074b24750bcdc65cc3ab18d127c8bfdd1eca953d43e21558eb1137c4b934689990564d7d24cf14e249a773dc1e5ddb7316b10d73682f8 "https://7-zip.org/a/7z2406-extra.7z" "https://netcologne.dl.sourceforge.net/project/sevenzip/7-Zip/24.06/7z2406-extra.7z" +"build/externals/7z2406-x64.exe" 1619556 b635b449f49aac29234f677e662be35f72a059401ea0786d956485d07134f9dd10ed284338503f08ff7aad16833cf034eb955ca34e1faf35a8177ccad1f20c75 "https://7-zip.org/a/7z2406-x64.exe" "https://netcologne.dl.sourceforge.net/project/sevenzip/7-Zip/24.06/7z2406-x64.exe" +"build/externals/WA5.55_SDK.exe" 336166 394375db8a16bf155b5de9376f6290488ab339e503dbdfdc4e2f5bede967799e625c559cca363bc988324f1a8e86e5fd28a9f697422abd7bb3dcde4a766607b5 "https://download.nullsoft.com/winamp/plugin-dev/WA5.55_SDK.exe" "http://download.nullsoft.com/winamp/plugin-dev/WA5.55_SDK.exe" "https://web.archive.org/web/20131217072017/http://download.nullsoft.com/winamp/plugin-dev/WA5.55_SDK.exe" "build/externals/xmp-sdk.zip" 322744 62c442d656d4bb380360368a0f5f01da11b4ed54333d7f54f875a9a5ec390b08921e00bd08e62cd7a0a5fe642e3377023f20a950cc2a42898ff4cda9ab88fc91 "https://www.un4seen.com/files/xmp-sdk.zip" -"build/externals/htmlhelp.exe" 3509072 d91371244ea98c691b4674ee266c4a2496a296800c176adae069d21f5c52c0763b21cc7859cfffa865b89e50171a2c99a6d14620c32f7d72c0ef04045348f856 "https://web.archive.org/web/20200918004813if_/http://download.microsoft.com/download/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe" +"build/externals/htmlhelp.exe" 3509072 d91371244ea98c691b4674ee266c4a2496a296800c176adae069d21f5c52c0763b21cc7859cfffa865b89e50171a2c99a6d14620c32f7d72c0ef04045348f856 "https://web.archive.org/web/20200918004813/https://download.microsoft.com/download/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe" "https://web.archive.org/web/20200918004813/http://download.microsoft.com/download/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe" "build/externals/python-3.12.3-embed-amd64.zip" 11055461 b09fb48e9e17117d0e370e4a9934296c1211556594933ecaed4438daaa5e55fe673bb40e9ee0bc1bf7a038fa0711fbcc853422c84f3862703085cf891fae4298 "https://www.python.org/ftp/python/3.12.3/python-3.12.3-embed-amd64.zip" -"build/externals/innounp050.rar" 141621 dbbc809308267a866db9d6b751fdeda6d179e1a65d8ddb14bb51984431ae91493f9a76105e1789b245732043a2c696c869ed10964b48cf59f81e55bd52f85330 "https://netcologne.dl.sourceforge.net/project/innounp/innounp/innounp 0.50/innounp050.rar" +"build/externals/innounp050.rar" 141621 dbbc809308267a866db9d6b751fdeda6d179e1a65d8ddb14bb51984431ae91493f9a76105e1789b245732043a2c696c869ed10964b48cf59f81e55bd52f85330 "https://netcologne.dl.sourceforge.net/project/innounp/innounp/innounp 0.50/innounp050.rar" "https://deac-fra.dl.sourceforge.net/project/innounp/innounp/innounp 0.50/innounp050.rar" "build/externals/innosetup-6.2.2.exe" 4722512 496375b1ce9c0d2f8eb3930ebd8366f5c4c938bc1eda47aed415e3f02bd8651a84a770a15f2825bf3c8ed9dbefa355b9eb805dd76bc782f6d8c8096d80443099 "https://files.jrsoftware.org/is/6/innosetup-6.2.2.exe" "build/externals/isetup-5.5.8-unicode.exe" 2342456 da7e27d85caec85b4194c7b1412c5a64c0ae12f22d903b94f2f4ee9ea0cb99c91b2d1dbb49262eefae8129e6b91f5c46f26f353011076e77e75f9c955fc5e1cb "https://files.jrsoftware.org/is/5/isetup-5.5.8-unicode.exe" "build/externals/example_songs_ompt_1_30.7z" 4881392 bfecf7f97fd71bd52bcfb38307ccb98c751e6a0fa0c1f31208b22b9392f03ea3da8f9271327df2de4fc2e463e0c13c6a24107fbe18caf8f446b7e7cf93073fa5 "https://download.openmpt.org/resources/modules/example_songs_ompt_1_30.7z" -"build/externals/allegro-4.2.3.1-hg.8+r8500.zip" 3872466 46cd8d4d7138b795dbc66994e953d0abc578c6d3c00615e3580237458529d33d7ad9d269a9778918d4b3719d75750d5cca74ff6bf38ad357a766472799ee9e7b "https://lib.openmpt.org/files/libopenmpt/contrib/allegro/allegro-4.2.3.1-hg.8+r8500.zip" -"build/externals/csdpmi7b.zip" 71339 58c24691d27cead1cec92d334af551f37a3ba31de25a687d99399c28d822ec9f6ffccc9332bfce35e65dae4dd1210b54e54b223a4de17f5adcb11e2da004b834 "https://lib.openmpt.org/files/libopenmpt/contrib/djgpp/cwsdpmi/csdpmi7b.zip" "https://djgpp.mirror.garr.it/current/v2misc/csdpmi7b.zip" -"build/externals/csdpmi7s.zip" 89872 ea5652d31850d8eb0d15a919de0b51849f58efea0d16ad2aa4687fac4abd223d0ca34a2d1b616b02fafe84651dbef3e506df9262cfb399eb6d9909bffc89bfd3 "https://lib.openmpt.org/files/libopenmpt/contrib/djgpp/cwsdpmi/csdpmi7s.zip" "https://djgpp.mirror.garr.it/current/v2misc/csdpmi7s.zip" +"build/externals/allegro-4.2.3.1-hg.8+r8500.zip" 3872466 46cd8d4d7138b795dbc66994e953d0abc578c6d3c00615e3580237458529d33d7ad9d269a9778918d4b3719d75750d5cca74ff6bf38ad357a766472799ee9e7b "https://lib.openmpt.org/files/libopenmpt/contrib/allegro/allegro-4.2.3.1-hg.8+r8500.zip" "https://mercury.sexy/members/manx/liballegro-4.2/allegro-4.2.3.1-hg.8+r8500.zip" +"build/externals/csdpmi7b.zip" 71339 58c24691d27cead1cec92d334af551f37a3ba31de25a687d99399c28d822ec9f6ffccc9332bfce35e65dae4dd1210b54e54b223a4de17f5adcb11e2da004b834 "https://lib.openmpt.org/files/libopenmpt/contrib/djgpp/cwsdpmi/csdpmi7b.zip" "https://www.mirrorservice.org/sites/ftp.delorie.com/pub/djgpp/current/v2misc/csdpmi7b.zip" "https://djgpp.mirror.garr.it/current/v2misc/csdpmi7b.zip" +"build/externals/csdpmi7s.zip" 89872 ea5652d31850d8eb0d15a919de0b51849f58efea0d16ad2aa4687fac4abd223d0ca34a2d1b616b02fafe84651dbef3e506df9262cfb399eb6d9909bffc89bfd3 "https://lib.openmpt.org/files/libopenmpt/contrib/djgpp/cwsdpmi/csdpmi7s.zip" "https://www.mirrorservice.org/sites/ftp.delorie.com/pub/djgpp/current/v2misc/csdpmi7s.zip" "https://djgpp.mirror.garr.it/current/v2misc/csdpmi7s.zip" |