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
(191) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <sv...@op...> - 2024-02-05 17:46:53
|
Author: sagamusix Date: Mon Feb 5 18:46:39 2024 New Revision: 20111 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20111 Log: Merged revision(s) 20109 from trunk/OpenMPT: [Fix] IT: MIDI macros were reset in IT 2.14 / 2.15 files that declared to be compatible with older IT versions (fixes spx-visionsofthepast.it, https://bugs.openmpt.org/view.php?id=1745). ........ Modified: branches/OpenMPT-1.30/ (props changed) branches/OpenMPT-1.30/soundlib/Load_it.cpp Modified: branches/OpenMPT-1.30/soundlib/Load_it.cpp ============================================================================== --- branches/OpenMPT-1.30/soundlib/Load_it.cpp Mon Feb 5 18:45:54 2024 (r20110) +++ branches/OpenMPT-1.30/soundlib/Load_it.cpp Mon Feb 5 18:46:39 2024 (r20111) @@ -703,7 +703,9 @@ } // Ignore MIDI data. Fixes some files like denonde.it that were made with old versions of Impulse Tracker (which didn't support Zxx filters) and have Zxx effects in the patterns. - if(fileHeader.cwtv < 0x0214) + // Example: denonde.it by Mystical + // Note: Do not compare against cwtv value, as IT 2.14 and 2.15 may write lower values there (see spx-visionsofthepast.it). + if(fileHeader.cmwt < 0x0214) { m_MidiCfg.ClearZxxMacros(); } |
From: <sv...@op...> - 2024-02-05 17:46:06
|
Author: sagamusix Date: Mon Feb 5 18:45:54 2024 New Revision: 20110 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20110 Log: Merged revision(s) 20109 from trunk/OpenMPT: [Fix] IT: MIDI macros were reset in IT 2.14 / 2.15 files that declared to be compatible with older IT versions (fixes spx-visionsofthepast.it, https://bugs.openmpt.org/view.php?id=1745). ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/soundlib/Load_it.cpp Modified: branches/OpenMPT-1.31/soundlib/Load_it.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/Load_it.cpp Mon Feb 5 18:45:23 2024 (r20109) +++ branches/OpenMPT-1.31/soundlib/Load_it.cpp Mon Feb 5 18:45:54 2024 (r20110) @@ -688,7 +688,9 @@ } // Ignore MIDI data. Fixes some files like denonde.it that were made with old versions of Impulse Tracker (which didn't support Zxx filters) and have Zxx effects in the patterns. - if(fileHeader.cwtv < 0x0214) + // Example: denonde.it by Mystical + // Note: Do not compare against cwtv value, as IT 2.14 and 2.15 may write lower values there (see spx-visionsofthepast.it). + if(fileHeader.cmwt < 0x0214) { m_MidiCfg.ClearZxxMacros(); } |
From: <sv...@op...> - 2024-02-05 17:45:36
|
Author: sagamusix Date: Mon Feb 5 18:45:23 2024 New Revision: 20109 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20109 Log: [Fix] IT: MIDI macros were reset in IT 2.14 / 2.15 files that declared to be compatible with older IT versions (fixes spx-visionsofthepast.it, https://bugs.openmpt.org/view.php?id=1745). Modified: trunk/OpenMPT/soundlib/Load_it.cpp Modified: trunk/OpenMPT/soundlib/Load_it.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_it.cpp Fri Jan 19 10:39:58 2024 (r20108) +++ trunk/OpenMPT/soundlib/Load_it.cpp Mon Feb 5 18:45:23 2024 (r20109) @@ -688,7 +688,9 @@ } // Ignore MIDI data. Fixes some files like denonde.it that were made with old versions of Impulse Tracker (which didn't support Zxx filters) and have Zxx effects in the patterns. - if(fileHeader.cwtv < 0x0214) + // Example: denonde.it by Mystical + // Note: Do not compare against cwtv value, as IT 2.14 and 2.15 may write lower values there (see spx-visionsofthepast.it). + if(fileHeader.cmwt < 0x0214) { m_MidiCfg.ClearZxxMacros(); } |
From: <sv...@op...> - 2024-01-19 09:40:13
|
Author: manx Date: Fri Jan 19 10:39:58 2024 New Revision: 20108 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20108 Log: Merged revision(s) 20106-20107 from trunk/OpenMPT: [Ref] Tuning: Avoid const_cast. ........ [Ref] Tuning: Rename FindTuning() to FindIdenticalTuning(), as tunings normally addressed by name and this case is somewhat different, so make the name more explicit. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/soundlib/SampleFormats.cpp branches/OpenMPT-1.31/soundlib/tuningCollection.cpp branches/OpenMPT-1.31/soundlib/tuningcollection.h Modified: branches/OpenMPT-1.31/soundlib/SampleFormats.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/SampleFormats.cpp Fri Jan 19 10:37:15 2024 (r20107) +++ branches/OpenMPT-1.31/soundlib/SampleFormats.cpp Fri Jan 19 10:39:58 2024 (r20108) @@ -282,7 +282,7 @@ if(pIns->pTuning && this != &srcSong) { - CTuning *existingTuning = m_pTuningsTuneSpecific->FindTuning(*pIns->pTuning); + CTuning *existingTuning = m_pTuningsTuneSpecific->FindIdenticalTuning(*pIns->pTuning); if(existingTuning) pIns->pTuning = existingTuning; else Modified: branches/OpenMPT-1.31/soundlib/tuningCollection.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/tuningCollection.cpp Fri Jan 19 10:37:15 2024 (r20107) +++ branches/OpenMPT-1.31/soundlib/tuningCollection.cpp Fri Jan 19 10:39:58 2024 (r20108) @@ -83,22 +83,23 @@ } -const CTuning* CTuningCollection::FindTuning(const CTuning &tuning) const +const CTuning* CTuningCollection::FindIdenticalTuning(const CTuning &tuning) const { auto result = std::find_if(m_Tunings.begin(), m_Tunings.end(), [&tuning](const std::unique_ptr<CTuning> &other) { return other && tuning == *other; }); - if(result != m_Tunings.end()) - return result->get(); - else - return nullptr; + return (result != m_Tunings.end()) ? result->get() : nullptr; } -CTuning* CTuningCollection::FindTuning(const CTuning &tuning) +CTuning* CTuningCollection::FindIdenticalTuning(const CTuning &tuning) { - return const_cast<CTuning *>(static_cast<const CTuningCollection *>(this)->FindTuning(tuning)); + auto result = std::find_if(m_Tunings.begin(), m_Tunings.end(), [&tuning](const std::unique_ptr<CTuning> &other) + { + return other && tuning == *other; + }); + return (result != m_Tunings.end()) ? result->get() : nullptr; } Modified: branches/OpenMPT-1.31/soundlib/tuningcollection.h ============================================================================== --- branches/OpenMPT-1.31/soundlib/tuningcollection.h Fri Jan 19 10:37:15 2024 (r20107) +++ branches/OpenMPT-1.31/soundlib/tuningcollection.h Fri Jan 19 10:39:58 2024 (r20108) @@ -76,8 +76,8 @@ CTuning* GetTuning(const mpt::ustring &name); const CTuning* GetTuning(const mpt::ustring &name) const; - CTuning* FindTuning(const CTuning &tuning); - const CTuning* FindTuning(const CTuning& tuning) const; + CTuning* FindIdenticalTuning(const CTuning &tuning); + const CTuning* FindIdenticalTuning(const CTuning& tuning) const; Tuning::SerializationResult Serialize(std::ostream &oStrm, const mpt::ustring &name) const; Tuning::SerializationResult Deserialize(std::istream &iStrm, mpt::ustring &name, mpt::Charset defaultCharset); |
From: <sv...@op...> - 2024-01-19 09:37:30
|
Author: manx Date: Fri Jan 19 10:37:15 2024 New Revision: 20107 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20107 Log: [Ref] Tuning: Rename FindTuning() to FindIdenticalTuning(), as tunings normally addressed by name and this case is somewhat different, so make the name more explicit. Modified: trunk/OpenMPT/soundlib/SampleFormats.cpp trunk/OpenMPT/soundlib/tuningCollection.cpp trunk/OpenMPT/soundlib/tuningcollection.h Modified: trunk/OpenMPT/soundlib/SampleFormats.cpp ============================================================================== --- trunk/OpenMPT/soundlib/SampleFormats.cpp Fri Jan 19 10:33:53 2024 (r20106) +++ trunk/OpenMPT/soundlib/SampleFormats.cpp Fri Jan 19 10:37:15 2024 (r20107) @@ -282,7 +282,7 @@ if(pIns->pTuning && this != &srcSong) { - CTuning *existingTuning = m_pTuningsTuneSpecific->FindTuning(*pIns->pTuning); + CTuning *existingTuning = m_pTuningsTuneSpecific->FindIdenticalTuning(*pIns->pTuning); if(existingTuning) pIns->pTuning = existingTuning; else Modified: trunk/OpenMPT/soundlib/tuningCollection.cpp ============================================================================== --- trunk/OpenMPT/soundlib/tuningCollection.cpp Fri Jan 19 10:33:53 2024 (r20106) +++ trunk/OpenMPT/soundlib/tuningCollection.cpp Fri Jan 19 10:37:15 2024 (r20107) @@ -83,7 +83,7 @@ } -const CTuning* CTuningCollection::FindTuning(const CTuning &tuning) const +const CTuning* CTuningCollection::FindIdenticalTuning(const CTuning &tuning) const { auto result = std::find_if(m_Tunings.begin(), m_Tunings.end(), [&tuning](const std::unique_ptr<CTuning> &other) { @@ -93,7 +93,7 @@ } -CTuning* CTuningCollection::FindTuning(const CTuning &tuning) +CTuning* CTuningCollection::FindIdenticalTuning(const CTuning &tuning) { auto result = std::find_if(m_Tunings.begin(), m_Tunings.end(), [&tuning](const std::unique_ptr<CTuning> &other) { Modified: trunk/OpenMPT/soundlib/tuningcollection.h ============================================================================== --- trunk/OpenMPT/soundlib/tuningcollection.h Fri Jan 19 10:33:53 2024 (r20106) +++ trunk/OpenMPT/soundlib/tuningcollection.h Fri Jan 19 10:37:15 2024 (r20107) @@ -76,8 +76,8 @@ CTuning* GetTuning(const mpt::ustring &name); const CTuning* GetTuning(const mpt::ustring &name) const; - CTuning* FindTuning(const CTuning &tuning); - const CTuning* FindTuning(const CTuning& tuning) const; + CTuning* FindIdenticalTuning(const CTuning &tuning); + const CTuning* FindIdenticalTuning(const CTuning& tuning) const; Tuning::SerializationResult Serialize(std::ostream &oStrm, const mpt::ustring &name) const; Tuning::SerializationResult Deserialize(std::istream &iStrm, mpt::ustring &name, mpt::Charset defaultCharset); |
From: <sv...@op...> - 2024-01-19 09:34:11
|
Author: manx Date: Fri Jan 19 10:33:53 2024 New Revision: 20106 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20106 Log: [Ref] Tuning: Avoid const_cast. Modified: trunk/OpenMPT/soundlib/tuningCollection.cpp Modified: trunk/OpenMPT/soundlib/tuningCollection.cpp ============================================================================== --- trunk/OpenMPT/soundlib/tuningCollection.cpp Sun Jan 14 14:21:02 2024 (r20105) +++ trunk/OpenMPT/soundlib/tuningCollection.cpp Fri Jan 19 10:33:53 2024 (r20106) @@ -89,16 +89,17 @@ { return other && tuning == *other; }); - if(result != m_Tunings.end()) - return result->get(); - else - return nullptr; + return (result != m_Tunings.end()) ? result->get() : nullptr; } CTuning* CTuningCollection::FindTuning(const CTuning &tuning) { - return const_cast<CTuning *>(static_cast<const CTuningCollection *>(this)->FindTuning(tuning)); + auto result = std::find_if(m_Tunings.begin(), m_Tunings.end(), [&tuning](const std::unique_ptr<CTuning> &other) + { + return other && tuning == *other; + }); + return (result != m_Tunings.end()) ? result->get() : nullptr; } |
From: <sv...@op...> - 2024-01-14 13:21:16
|
Author: sagamusix Date: Sun Jan 14 14:21:02 2024 New Revision: 20105 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20105 Log: Merged revision(s) 20104 from trunk/OpenMPT: [Fix] Default comparisons are a C++20 feature. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/soundlib/tuning.cpp branches/OpenMPT-1.31/soundlib/tuning.h Modified: branches/OpenMPT-1.31/soundlib/tuning.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/tuning.cpp Sun Jan 14 14:20:40 2024 (r20104) +++ branches/OpenMPT-1.31/soundlib/tuning.cpp Sun Jan 14 14:21:02 2024 (r20105) @@ -69,11 +69,7 @@ CTuning::CTuning() - : m_TuningType(Type::GENERAL) - , m_FineStepCount(0) { - m_RatioTable.clear(); - m_NoteMin = s_NoteMinDefault; #if MPT_GCC_AT_LEAST(12, 0, 0) && MPT_GCC_BEFORE(13, 1, 0) // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109455 #pragma GCC diagnostic push @@ -83,9 +79,20 @@ #if MPT_GCC_AT_LEAST(12, 0, 0) && MPT_GCC_BEFORE(13, 1, 0) #pragma GCC diagnostic pop #endif - m_GroupSize = 0; - m_GroupRatio = 0; - m_RatioTableFine.clear(); +} + + +bool CTuning::operator==(const CTuning &other) const noexcept +{ + return m_TuningType == other.m_TuningType + && m_NoteMin == other.m_NoteMin + && m_GroupSize == other.m_GroupSize + && m_GroupRatio == other.m_GroupRatio + && m_FineStepCount == other.m_FineStepCount + && m_RatioTable == other.m_RatioTable + && m_RatioTableFine == other.m_RatioTableFine + && m_TuningName == other.m_TuningName + && m_NoteNameMap == other.m_NoteNameMap; } Modified: branches/OpenMPT-1.31/soundlib/tuning.h ============================================================================== --- branches/OpenMPT-1.31/soundlib/tuning.h Sun Jan 14 14:20:40 2024 (r20104) +++ branches/OpenMPT-1.31/soundlib/tuning.h Sun Jan 14 14:21:02 2024 (r20105) @@ -39,8 +39,11 @@ CTuning(CTuning &) = default; CTuning(CTuning &&) noexcept = default; - bool operator==(const CTuning &other) const noexcept = default; - bool operator!=(const CTuning &other) const noexcept = default; + bool operator==(const CTuning &other) const noexcept; + bool operator!=(const CTuning &other) const noexcept + { + return !(*this == other); + } // To return ratio of certain note. RATIOTYPE GetRatio(const NOTEINDEXTYPE note) const; @@ -226,7 +229,7 @@ private: - Tuning::Type m_TuningType; + Tuning::Type m_TuningType = Type::GENERAL; //Noteratios std::vector<RATIOTYPE> m_RatioTable; @@ -235,14 +238,14 @@ std::vector<RATIOTYPE> m_RatioTableFine; // The lowest index of note in the table - NOTEINDEXTYPE m_NoteMin; + NOTEINDEXTYPE m_NoteMin = s_NoteMinDefault; //For groupgeometric tunings, tells the 'group size' and 'group ratio' //m_GroupSize should always be >= 0. - NOTEINDEXTYPE m_GroupSize; - RATIOTYPE m_GroupRatio; + NOTEINDEXTYPE m_GroupSize = 0; + RATIOTYPE m_GroupRatio = 0; - USTEPINDEXTYPE m_FineStepCount; // invariant: 0 <= m_FineStepCount <= FINESTEPCOUNT_MAX + USTEPINDEXTYPE m_FineStepCount = 0; // invariant: 0 <= m_FineStepCount <= FINESTEPCOUNT_MAX mpt::ustring m_TuningName; |
From: <sv...@op...> - 2024-01-14 13:20:50
|
Author: sagamusix Date: Sun Jan 14 14:20:40 2024 New Revision: 20104 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20104 Log: [Fix] Default comparisons are a C++20 feature. Modified: trunk/OpenMPT/soundlib/tuning.cpp trunk/OpenMPT/soundlib/tuning.h Modified: trunk/OpenMPT/soundlib/tuning.cpp ============================================================================== --- trunk/OpenMPT/soundlib/tuning.cpp Sun Jan 14 14:06:18 2024 (r20103) +++ trunk/OpenMPT/soundlib/tuning.cpp Sun Jan 14 14:20:40 2024 (r20104) @@ -69,11 +69,7 @@ CTuning::CTuning() - : m_TuningType(Type::GENERAL) - , m_FineStepCount(0) { - m_RatioTable.clear(); - m_NoteMin = s_NoteMinDefault; #if MPT_GCC_AT_LEAST(12, 0, 0) && MPT_GCC_BEFORE(13, 1, 0) // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109455 #pragma GCC diagnostic push @@ -83,9 +79,20 @@ #if MPT_GCC_AT_LEAST(12, 0, 0) && MPT_GCC_BEFORE(13, 1, 0) #pragma GCC diagnostic pop #endif - m_GroupSize = 0; - m_GroupRatio = 0; - m_RatioTableFine.clear(); +} + + +bool CTuning::operator==(const CTuning &other) const noexcept +{ + return m_TuningType == other.m_TuningType + && m_NoteMin == other.m_NoteMin + && m_GroupSize == other.m_GroupSize + && m_GroupRatio == other.m_GroupRatio + && m_FineStepCount == other.m_FineStepCount + && m_RatioTable == other.m_RatioTable + && m_RatioTableFine == other.m_RatioTableFine + && m_TuningName == other.m_TuningName + && m_NoteNameMap == other.m_NoteNameMap; } Modified: trunk/OpenMPT/soundlib/tuning.h ============================================================================== --- trunk/OpenMPT/soundlib/tuning.h Sun Jan 14 14:06:18 2024 (r20103) +++ trunk/OpenMPT/soundlib/tuning.h Sun Jan 14 14:20:40 2024 (r20104) @@ -39,8 +39,11 @@ CTuning(CTuning &) = default; CTuning(CTuning &&) noexcept = default; - bool operator==(const CTuning &other) const noexcept = default; - bool operator!=(const CTuning &other) const noexcept = default; + bool operator==(const CTuning &other) const noexcept; + bool operator!=(const CTuning &other) const noexcept + { + return !(*this == other); + } // To return ratio of certain note. RATIOTYPE GetRatio(const NOTEINDEXTYPE note) const; @@ -226,7 +229,7 @@ private: - Tuning::Type m_TuningType; + Tuning::Type m_TuningType = Type::GENERAL; //Noteratios std::vector<RATIOTYPE> m_RatioTable; @@ -235,14 +238,14 @@ std::vector<RATIOTYPE> m_RatioTableFine; // The lowest index of note in the table - NOTEINDEXTYPE m_NoteMin; + NOTEINDEXTYPE m_NoteMin = s_NoteMinDefault; //For groupgeometric tunings, tells the 'group size' and 'group ratio' //m_GroupSize should always be >= 0. - NOTEINDEXTYPE m_GroupSize; - RATIOTYPE m_GroupRatio; + NOTEINDEXTYPE m_GroupSize = 0; + RATIOTYPE m_GroupRatio = 0; - USTEPINDEXTYPE m_FineStepCount; // invariant: 0 <= m_FineStepCount <= FINESTEPCOUNT_MAX + USTEPINDEXTYPE m_FineStepCount = 0; // invariant: 0 <= m_FineStepCount <= FINESTEPCOUNT_MAX mpt::ustring m_TuningName; |
From: <sv...@op...> - 2024-01-14 13:06:27
|
Author: sagamusix Date: Sun Jan 14 14:06:18 2024 New Revision: 20103 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20103 Log: Merged revision(s) 20102 from trunk/OpenMPT: [Imp] Avoid importing duplicate tunings from another module. [Fix] Instrument tab: Adding tuning by importing instruments from another module didn't update the tuning dropdown list. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/mptrack/Ctrl_ins.cpp branches/OpenMPT-1.31/mptrack/View_tre.cpp branches/OpenMPT-1.31/soundlib/SampleFormats.cpp branches/OpenMPT-1.31/soundlib/tuning.h branches/OpenMPT-1.31/soundlib/tuningCollection.cpp branches/OpenMPT-1.31/soundlib/tuningcollection.h Modified: branches/OpenMPT-1.31/mptrack/Ctrl_ins.cpp ============================================================================== --- branches/OpenMPT-1.31/mptrack/Ctrl_ins.cpp Sun Jan 14 14:05:14 2024 (r20102) +++ branches/OpenMPT-1.31/mptrack/Ctrl_ins.cpp Sun Jan 14 14:06:18 2024 (r20103) @@ -1303,7 +1303,7 @@ { UpdatePluginList(); } - if(hint.ToType<GeneralHint>().GetType()[HINT_TUNINGS]) + if(hint.ToType<GeneralHint>().GetType()[HINT_TUNINGS | HINT_MODTYPE]) { BuildTuningComboBox(); } @@ -1702,6 +1702,9 @@ cs.Leave(); + if (m_sndFile.Instruments[m_nInstrument] && m_sndFile.Instruments[m_nInstrument]->pTuning) + BuildTuningComboBox(); + { InstrumentHint hint = InstrumentHint().Info().Envelope().Names(); if (first) hint.ModType(); Modified: branches/OpenMPT-1.31/mptrack/View_tre.cpp ============================================================================== --- branches/OpenMPT-1.31/mptrack/View_tre.cpp Sun Jan 14 14:05:14 2024 (r20102) +++ branches/OpenMPT-1.31/mptrack/View_tre.cpp Sun Jan 14 14:06:18 2024 (r20103) @@ -2699,7 +2699,11 @@ } else { // Load instrument into other module - sndFile->ReadInstrumentFromSong(static_cast<INSTRUMENTINDEX>(modItemDropID), infoDrag->modDoc.GetSoundFile(), static_cast<INSTRUMENTINDEX>(modItemDragID)); + if(sndFile->ReadInstrumentFromSong(static_cast<INSTRUMENTINDEX>(modItemDropID), infoDrag->modDoc.GetSoundFile(), static_cast<INSTRUMENTINDEX>(modItemDragID))) + { + if(sndFile->Instruments[modItemDropID] && sndFile->Instruments[modItemDropID]->pTuning) + modDoc->UpdateAllViews(nullptr, GeneralHint().Tunings()); + } } modDoc->UpdateAllViews(nullptr, InstrumentHint().Info().Envelope().Names()); modDoc->UpdateAllViews(nullptr, PatternHint().Data()); Modified: branches/OpenMPT-1.31/soundlib/SampleFormats.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/SampleFormats.cpp Sun Jan 14 14:05:14 2024 (r20102) +++ branches/OpenMPT-1.31/soundlib/SampleFormats.cpp Sun Jan 14 14:06:18 2024 (r20103) @@ -281,7 +281,13 @@ pIns->Convert(srcSong.GetType(), GetType()); if(pIns->pTuning && this != &srcSong) - pIns->pTuning= m_pTuningsTuneSpecific->AddTuning(std::make_unique<CTuning>(*pIns->pTuning)); + { + CTuning *existingTuning = m_pTuningsTuneSpecific->FindTuning(*pIns->pTuning); + if(existingTuning) + pIns->pTuning = existingTuning; + else + pIns->pTuning = m_pTuningsTuneSpecific->AddTuning(std::make_unique<CTuning>(*pIns->pTuning)); + } // Copy all referenced samples over for(size_t i = 0; i < targetSample.size(); i++) Modified: branches/OpenMPT-1.31/soundlib/tuning.h ============================================================================== --- branches/OpenMPT-1.31/soundlib/tuning.h Sun Jan 14 14:05:14 2024 (r20102) +++ branches/OpenMPT-1.31/soundlib/tuning.h Sun Jan 14 14:06:18 2024 (r20103) @@ -39,6 +39,9 @@ CTuning(CTuning &) = default; CTuning(CTuning &&) noexcept = default; + bool operator==(const CTuning &other) const noexcept = default; + bool operator!=(const CTuning &other) const noexcept = default; + // To return ratio of certain note. RATIOTYPE GetRatio(const NOTEINDEXTYPE note) const; Modified: branches/OpenMPT-1.31/soundlib/tuningCollection.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/tuningCollection.cpp Sun Jan 14 14:05:14 2024 (r20102) +++ branches/OpenMPT-1.31/soundlib/tuningCollection.cpp Sun Jan 14 14:06:18 2024 (r20103) @@ -83,6 +83,25 @@ } +const CTuning* CTuningCollection::FindTuning(const CTuning &tuning) const +{ + auto result = std::find_if(m_Tunings.begin(), m_Tunings.end(), [&tuning](const std::unique_ptr<CTuning> &other) + { + return other && tuning == *other; + }); + if(result != m_Tunings.end()) + return result->get(); + else + return nullptr; +} + + +CTuning* CTuningCollection::FindTuning(const CTuning &tuning) +{ + return const_cast<CTuning *>(static_cast<const CTuningCollection *>(this)->FindTuning(tuning)); +} + + Tuning::SerializationResult CTuningCollection::Serialize(std::ostream& oStrm, const mpt::ustring &name) const { srlztn::SsbWrite ssb(oStrm); Modified: branches/OpenMPT-1.31/soundlib/tuningcollection.h ============================================================================== --- branches/OpenMPT-1.31/soundlib/tuningcollection.h Sun Jan 14 14:05:14 2024 (r20102) +++ branches/OpenMPT-1.31/soundlib/tuningcollection.h Sun Jan 14 14:06:18 2024 (r20103) @@ -75,7 +75,9 @@ CTuning* GetTuning(const mpt::ustring &name); const CTuning* GetTuning(const mpt::ustring &name) const; - + + CTuning* FindTuning(const CTuning &tuning); + const CTuning* FindTuning(const CTuning& tuning) const; Tuning::SerializationResult Serialize(std::ostream &oStrm, const mpt::ustring &name) const; Tuning::SerializationResult Deserialize(std::istream &iStrm, mpt::ustring &name, mpt::Charset defaultCharset); |
From: <sv...@op...> - 2024-01-14 13:05:31
|
Author: sagamusix Date: Sun Jan 14 14:05:14 2024 New Revision: 20102 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20102 Log: [Imp] Avoid importing duplicate tunings from another module. [Fix] Instrument tab: Adding tuning by importing instruments from another module didn't update the tuning dropdown list. Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp trunk/OpenMPT/mptrack/View_tre.cpp trunk/OpenMPT/soundlib/SampleFormats.cpp trunk/OpenMPT/soundlib/tuning.h trunk/OpenMPT/soundlib/tuningCollection.cpp trunk/OpenMPT/soundlib/tuningcollection.h Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Ctrl_ins.cpp Sat Jan 13 21:32:59 2024 (r20101) +++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp Sun Jan 14 14:05:14 2024 (r20102) @@ -1309,7 +1309,7 @@ { UpdatePluginList(); } - if(hint.ToType<GeneralHint>().GetType()[HINT_TUNINGS]) + if(hint.ToType<GeneralHint>().GetType()[HINT_TUNINGS | HINT_MODTYPE]) { BuildTuningComboBox(); } @@ -1708,6 +1708,9 @@ cs.Leave(); + if (m_sndFile.Instruments[m_nInstrument] && m_sndFile.Instruments[m_nInstrument]->pTuning) + BuildTuningComboBox(); + { InstrumentHint hint = InstrumentHint().Info().Envelope().Names(); if (first) hint.ModType(); Modified: trunk/OpenMPT/mptrack/View_tre.cpp ============================================================================== --- trunk/OpenMPT/mptrack/View_tre.cpp Sat Jan 13 21:32:59 2024 (r20101) +++ trunk/OpenMPT/mptrack/View_tre.cpp Sun Jan 14 14:05:14 2024 (r20102) @@ -2739,7 +2739,11 @@ } else { // Load instrument into other module - sndFile->ReadInstrumentFromSong(static_cast<INSTRUMENTINDEX>(modItemDropID), infoDrag->modDoc.GetSoundFile(), static_cast<INSTRUMENTINDEX>(modItemDragID)); + if(sndFile->ReadInstrumentFromSong(static_cast<INSTRUMENTINDEX>(modItemDropID), infoDrag->modDoc.GetSoundFile(), static_cast<INSTRUMENTINDEX>(modItemDragID))) + { + if(sndFile->Instruments[modItemDropID] && sndFile->Instruments[modItemDropID]->pTuning) + modDoc->UpdateAllViews(nullptr, GeneralHint().Tunings()); + } } modDoc->UpdateAllViews(nullptr, InstrumentHint().Info().Envelope().Names()); modDoc->UpdateAllViews(nullptr, PatternHint().Data()); Modified: trunk/OpenMPT/soundlib/SampleFormats.cpp ============================================================================== --- trunk/OpenMPT/soundlib/SampleFormats.cpp Sat Jan 13 21:32:59 2024 (r20101) +++ trunk/OpenMPT/soundlib/SampleFormats.cpp Sun Jan 14 14:05:14 2024 (r20102) @@ -281,7 +281,13 @@ pIns->Convert(srcSong.GetType(), GetType()); if(pIns->pTuning && this != &srcSong) - pIns->pTuning= m_pTuningsTuneSpecific->AddTuning(std::make_unique<CTuning>(*pIns->pTuning)); + { + CTuning *existingTuning = m_pTuningsTuneSpecific->FindTuning(*pIns->pTuning); + if(existingTuning) + pIns->pTuning = existingTuning; + else + pIns->pTuning = m_pTuningsTuneSpecific->AddTuning(std::make_unique<CTuning>(*pIns->pTuning)); + } // Copy all referenced samples over for(size_t i = 0; i < targetSample.size(); i++) Modified: trunk/OpenMPT/soundlib/tuning.h ============================================================================== --- trunk/OpenMPT/soundlib/tuning.h Sat Jan 13 21:32:59 2024 (r20101) +++ trunk/OpenMPT/soundlib/tuning.h Sun Jan 14 14:05:14 2024 (r20102) @@ -39,6 +39,9 @@ CTuning(CTuning &) = default; CTuning(CTuning &&) noexcept = default; + bool operator==(const CTuning &other) const noexcept = default; + bool operator!=(const CTuning &other) const noexcept = default; + // To return ratio of certain note. RATIOTYPE GetRatio(const NOTEINDEXTYPE note) const; Modified: trunk/OpenMPT/soundlib/tuningCollection.cpp ============================================================================== --- trunk/OpenMPT/soundlib/tuningCollection.cpp Sat Jan 13 21:32:59 2024 (r20101) +++ trunk/OpenMPT/soundlib/tuningCollection.cpp Sun Jan 14 14:05:14 2024 (r20102) @@ -83,6 +83,25 @@ } +const CTuning* CTuningCollection::FindTuning(const CTuning &tuning) const +{ + auto result = std::find_if(m_Tunings.begin(), m_Tunings.end(), [&tuning](const std::unique_ptr<CTuning> &other) + { + return other && tuning == *other; + }); + if(result != m_Tunings.end()) + return result->get(); + else + return nullptr; +} + + +CTuning* CTuningCollection::FindTuning(const CTuning &tuning) +{ + return const_cast<CTuning *>(static_cast<const CTuningCollection *>(this)->FindTuning(tuning)); +} + + Tuning::SerializationResult CTuningCollection::Serialize(std::ostream& oStrm, const mpt::ustring &name) const { srlztn::SsbWrite ssb(oStrm); Modified: trunk/OpenMPT/soundlib/tuningcollection.h ============================================================================== --- trunk/OpenMPT/soundlib/tuningcollection.h Sat Jan 13 21:32:59 2024 (r20101) +++ trunk/OpenMPT/soundlib/tuningcollection.h Sun Jan 14 14:05:14 2024 (r20102) @@ -75,7 +75,9 @@ CTuning* GetTuning(const mpt::ustring &name); const CTuning* GetTuning(const mpt::ustring &name) const; - + + CTuning* FindTuning(const CTuning &tuning); + const CTuning* FindTuning(const CTuning& tuning) const; Tuning::SerializationResult Serialize(std::ostream &oStrm, const mpt::ustring &name) const; Tuning::SerializationResult Deserialize(std::istream &iStrm, mpt::ustring &name, mpt::Charset defaultCharset); |
From: <sv...@op...> - 2024-01-13 20:33:14
|
Author: sagamusix Date: Sat Jan 13 21:32:59 2024 New Revision: 20101 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20101 Log: [Mod] MOD: Change VBlank timing heuristic to always assume CIA timing when long samples (= unsupported by original ProTracker) are found. Modified: trunk/OpenMPT/soundlib/Load_mod.cpp Modified: trunk/OpenMPT/soundlib/Load_mod.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_mod.cpp Sat Jan 13 16:30:18 2024 (r20100) +++ trunk/OpenMPT/soundlib/Load_mod.cpp Sat Jan 13 21:32:59 2024 (r20101) @@ -885,6 +885,7 @@ SmpLength totalSampleLen = 0, wowSampleLen = 0; m_nSamples = 31; uint32 invalidBytes = 0; + bool hasLongSamples = false; for(SAMPLEINDEX smp = 1; smp <= 31; smp++) { MODSampleHeader sampleHeader = ReadAndSwap<MODSampleHeader>(file, modMagicResult.swapBytes); @@ -892,9 +893,13 @@ totalSampleLen += Samples[smp].nLength; if(isHMNT) + { Samples[smp].nFineTune = -static_cast<int8>(sampleHeader.finetune << 3); - else if(Samples[smp].nLength > 65535) + } else if(Samples[smp].nLength > 65535) + { isNoiseTracker = false; + hasLongSamples = true; + } if(sampleHeader.length && !sampleHeader.loopLength) hasRepLen0 = true; @@ -1044,9 +1049,10 @@ } file.Seek(modMagicResult.patternDataOffset); - const CHANNELINDEX readChannels = (isFLT8 ? 4 : m_nChannels); // 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 = false; // for detecting VBlank MODs + const CHANNELINDEX readChannels = (isFLT8 ? 4 : m_nChannels); // 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 // Heuristic for rejecting E0x commands that are most likely not intended to actually toggle the Amiga LED filter, like in naen_leijasi_ptk.mod by ilmarque bool filterState = false; int filterTransitions = 0; @@ -1361,8 +1367,7 @@ // Check if a name string is valid (i.e. doesn't contain binary garbage data) -template <size_t N> -static uint32 CountInvalidChars(const char (&name)[N]) +static uint32 CountInvalidChars(const mpt::span<const char> name) { uint32 invalidChars = 0; for(int8 c : name) // char can be signed or unsigned |
From: <sv...@op...> - 2024-01-13 15:30:33
|
Author: sagamusix Date: Sat Jan 13 16:30:18 2024 New Revision: 20100 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20100 Log: Merged revision(s) 20099 from trunk/OpenMPT: [Fix] Tree view: Keep applying search filter when the file browser is being refreshed. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/mptrack/View_tre.cpp Modified: branches/OpenMPT-1.31/mptrack/View_tre.cpp ============================================================================== --- branches/OpenMPT-1.31/mptrack/View_tre.cpp Sat Jan 13 16:29:54 2024 (r20099) +++ branches/OpenMPT-1.31/mptrack/View_tre.cpp Sat Jan 13 16:30:18 2024 (r20100) @@ -2071,7 +2071,7 @@ } SortInstrumentLibrary(); - FilterInstrumentLibrary({}, selectedItem); + FilterInstrumentLibrary(m_filterString, selectedItem); UnlockRedraw(); |
From: <sv...@op...> - 2024-01-13 15:30:04
|
Author: sagamusix Date: Sat Jan 13 16:29:54 2024 New Revision: 20099 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20099 Log: [Fix] Tree view: Keep applying search filter when the file browser is being refreshed. Modified: trunk/OpenMPT/mptrack/View_tre.cpp Modified: trunk/OpenMPT/mptrack/View_tre.cpp ============================================================================== --- trunk/OpenMPT/mptrack/View_tre.cpp Sat Jan 13 16:20:43 2024 (r20098) +++ trunk/OpenMPT/mptrack/View_tre.cpp Sat Jan 13 16:29:54 2024 (r20099) @@ -2100,7 +2100,7 @@ } SortInstrumentLibrary(); - FilterInstrumentLibrary({}, selectedItem); + FilterInstrumentLibrary(m_filterString, selectedItem); UnlockRedraw(); |
From: <sv...@op...> - 2024-01-13 15:20:55
|
Author: sagamusix Date: Sat Jan 13 16:20:43 2024 New Revision: 20098 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20098 Log: Merged revision(s) 20097 from trunk/OpenMPT: [Fix] Reset sample reverse flag when loading new samples or converting between formats. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/soundlib/ModSample.cpp Modified: branches/OpenMPT-1.31/soundlib/ModSample.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/ModSample.cpp Sat Jan 13 16:20:23 2024 (r20097) +++ branches/OpenMPT-1.31/soundlib/ModSample.cpp Sat Jan 13 16:20:43 2024 (r20098) @@ -23,6 +23,8 @@ // Translate sample properties between two given formats. void ModSample::Convert(MODTYPE fromType, MODTYPE toType) { + uFlags.reset(CHN_REVERSE); // Not supported by any native formats yet + // Convert between frequency and transpose values if necessary. if((!(toType & (MOD_TYPE_MOD | MOD_TYPE_XM))) && (fromType & (MOD_TYPE_MOD | MOD_TYPE_XM))) { @@ -134,7 +136,7 @@ nPan = 128; nVolume = 256; nGlobalVol = 64; - uFlags.reset(CHN_PANNING | CHN_SUSTAINLOOP | CHN_LOOP | CHN_PINGPONGLOOP | CHN_PINGPONGSUSTAIN | CHN_ADLIB | SMP_MODIFIED | SMP_KEEPONDISK); + uFlags.reset(CHN_PANNING | CHN_SUSTAINLOOP | CHN_LOOP | CHN_PINGPONGLOOP | CHN_PINGPONGSUSTAIN | CHN_REVERSE | CHN_ADLIB | SMP_MODIFIED | SMP_KEEPONDISK); if(type == MOD_TYPE_XM) { uFlags.set(CHN_PANNING); |
From: <sv...@op...> - 2024-01-13 15:20:39
|
Author: sagamusix Date: Sat Jan 13 16:20:23 2024 New Revision: 20097 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20097 Log: [Fix] Reset sample reverse flag when loading new samples or converting between formats. Modified: trunk/OpenMPT/soundlib/ModSample.cpp Modified: trunk/OpenMPT/soundlib/ModSample.cpp ============================================================================== --- trunk/OpenMPT/soundlib/ModSample.cpp Fri Jan 12 22:38:12 2024 (r20096) +++ trunk/OpenMPT/soundlib/ModSample.cpp Sat Jan 13 16:20:23 2024 (r20097) @@ -24,6 +24,8 @@ // Translate sample properties between two given formats. void ModSample::Convert(MODTYPE fromType, MODTYPE toType) { + uFlags.reset(CHN_REVERSE); // Not supported by any native formats yet + // Convert between frequency and transpose values if necessary. if((!(toType & (MOD_TYPE_MOD | MOD_TYPE_XM))) && (fromType & (MOD_TYPE_MOD | MOD_TYPE_XM))) { @@ -135,7 +137,7 @@ nPan = 128; nVolume = 256; nGlobalVol = 64; - uFlags.reset(CHN_PANNING | CHN_SUSTAINLOOP | CHN_LOOP | CHN_PINGPONGLOOP | CHN_PINGPONGSUSTAIN | CHN_ADLIB | SMP_MODIFIED | SMP_KEEPONDISK); + uFlags.reset(CHN_PANNING | CHN_SUSTAINLOOP | CHN_LOOP | CHN_PINGPONGLOOP | CHN_PINGPONGSUSTAIN | CHN_REVERSE | CHN_ADLIB | SMP_MODIFIED | SMP_KEEPONDISK); if(type == MOD_TYPE_XM) { uFlags.set(CHN_PANNING); |
From: <sv...@op...> - 2024-01-12 21:38:24
|
Author: sagamusix Date: Fri Jan 12 22:38:12 2024 New Revision: 20096 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20096 Log: Merged revision(s) 20095 from trunk/OpenMPT: [Fix] Allow end-of-tune optimizations for XM F00 command to also work with MIDI / OPL export (https://bugs.openmpt.org/view.php?id=1741). ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/mptrack/mod2midi.cpp branches/OpenMPT-1.31/soundlib/Sndmix.cpp Modified: branches/OpenMPT-1.31/mptrack/mod2midi.cpp ============================================================================== --- branches/OpenMPT-1.31/mptrack/mod2midi.cpp Fri Jan 12 22:37:43 2024 (r20095) +++ branches/OpenMPT-1.31/mptrack/mod2midi.cpp Fri Jan 12 22:38:12 2024 (r20096) @@ -866,6 +866,7 @@ const auto fmt = MPT_TFORMAT("Rendering file... ({}mn{}s, {}mn{}s remaining)"); while(m_sndFile.Read(MIXBUFFERSIZE, target) > 0) { + m_sndFile.ResetMixStat(); auto currentTime = timeGetTime(); if(currentTime - prevTime >= 16) { Modified: branches/OpenMPT-1.31/soundlib/Sndmix.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/Sndmix.cpp Fri Jan 12 22:37:43 2024 (r20095) +++ branches/OpenMPT-1.31/soundlib/Sndmix.cpp Fri Jan 12 22:38:12 2024 (r20096) @@ -200,6 +200,7 @@ { const auto origMaxMixChannels = m_MixerSettings.m_nMaxMixChannels; m_MixerSettings.m_nMaxMixChannels = 0; + ResetMixStat(); while(m_PlayState.m_nBufferCount) { auto framesToRender = std::min(m_PlayState.m_nBufferCount, samplecount_t(MIXBUFFERSIZE)); |
From: <sv...@op...> - 2024-01-12 21:38:01
|
Author: sagamusix Date: Fri Jan 12 22:37:43 2024 New Revision: 20095 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20095 Log: [Fix] Allow end-of-tune optimizations for XM F00 command to also work with MIDI / OPL export (https://bugs.openmpt.org/view.php?id=1741). Modified: trunk/OpenMPT/mptrack/mod2midi.cpp trunk/OpenMPT/soundlib/Sndmix.cpp Modified: trunk/OpenMPT/mptrack/mod2midi.cpp ============================================================================== --- trunk/OpenMPT/mptrack/mod2midi.cpp Thu Jan 11 14:14:21 2024 (r20094) +++ trunk/OpenMPT/mptrack/mod2midi.cpp Fri Jan 12 22:37:43 2024 (r20095) @@ -869,6 +869,7 @@ const auto fmt = MPT_TFORMAT("Rendering file... ({}mn{}s, {}mn{}s remaining)"); while(m_sndFile.Read(MIXBUFFERSIZE, target) > 0) { + m_sndFile.ResetMixStat(); auto currentTime = timeGetTime(); if(currentTime - prevTime >= 16) { Modified: trunk/OpenMPT/soundlib/Sndmix.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Sndmix.cpp Thu Jan 11 14:14:21 2024 (r20094) +++ trunk/OpenMPT/soundlib/Sndmix.cpp Fri Jan 12 22:37:43 2024 (r20095) @@ -200,6 +200,7 @@ { const auto origMaxMixChannels = m_MixerSettings.m_nMaxMixChannels; m_MixerSettings.m_nMaxMixChannels = 0; + ResetMixStat(); while(m_PlayState.m_nBufferCount) { auto framesToRender = std::min(m_PlayState.m_nBufferCount, samplecount_t(MIXBUFFERSIZE)); |
From: <sv...@op...> - 2024-01-11 13:14:37
|
Author: manx Date: Thu Jan 11 14:14:21 2024 New Revision: 20094 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20094 Log: [Mod] build: CI: GitHub: Update OpenBSD CPA to commit a5ba8d3c7ac68cb1e860aa0769a25647481ade50. See <https://github.com/cross-platform-actions/action/commit/a5ba8d3c7ac68cb1e860aa0769a25647481ade50>. [Mod] build: CI: GitHub: Use QEMU for OpenBSD. Modified: trunk/OpenMPT/.github/workflows/OpenBSD-7.4-Makefile.yml Modified: trunk/OpenMPT/.github/workflows/OpenBSD-7.4-Makefile.yml ============================================================================== --- trunk/OpenMPT/.github/workflows/OpenBSD-7.4-Makefile.yml Wed Jan 10 21:39:56 2024 (r20093) +++ trunk/OpenMPT/.github/workflows/OpenBSD-7.4-Makefile.yml Thu Jan 11 14:14:21 2024 (r20094) @@ -19,10 +19,10 @@ - name: Checkout uses: actions/checkout@v4 - name: Startup VM - uses: cross-platform-actions/action@v0.22.0 + uses: cross-platform-actions/action@a5ba8d3c7ac68cb1e860aa0769a25647481ade50 with: architecture: x86_64 - hypervisor: xhyve + hypervisor: qemu memory: 4G operating_system: openbsd version: '7.4' @@ -31,10 +31,10 @@ shutdown_vm: false run: true - name: Install dependencies - uses: cross-platform-actions/action@v0.22.0 + uses: cross-platform-actions/action@a5ba8d3c7ac68cb1e860aa0769a25647481ade50 with: architecture: x86_64 - hypervisor: xhyve + hypervisor: qemu memory: 4G operating_system: openbsd version: '7.4' @@ -44,10 +44,10 @@ run: | sudo pkg_add subversion p5-XML-XPath git mawk gmake pkgconf autoconf autoconf-archive automake libtool libltdl help2man doxygen mpg123 libogg libvorbis flac libsndfile pulseaudio portaudio-svn sdl2 - name: Build - uses: cross-platform-actions/action@v0.22.0 + uses: cross-platform-actions/action@a5ba8d3c7ac68cb1e860aa0769a25647481ade50 with: architecture: x86_64 - hypervisor: xhyve + hypervisor: qemu memory: 4G operating_system: openbsd version: '7.4' @@ -57,10 +57,10 @@ run: | gmake -j$(sysctl -n hw.ncpu) STRICT=1 VERBOSE=1 AUTO_DEPS=1 - name: Test - uses: cross-platform-actions/action@v0.22.0 + uses: cross-platform-actions/action@a5ba8d3c7ac68cb1e860aa0769a25647481ade50 with: architecture: x86_64 - hypervisor: xhyve + hypervisor: qemu memory: 4G operating_system: openbsd version: '7.4' @@ -70,10 +70,10 @@ run: | gmake -j$(sysctl -n hw.ncpu) STRICT=1 VERBOSE=1 AUTO_DEPS=1 check - name: Shutdown VM - uses: cross-platform-actions/action@v0.22.0 + uses: cross-platform-actions/action@a5ba8d3c7ac68cb1e860aa0769a25647481ade50 with: architecture: x86_64 - hypervisor: xhyve + hypervisor: qemu memory: 4G operating_system: openbsd version: '7.4' |
From: <sv...@op...> - 2024-01-10 20:40:08
|
Author: sagamusix Date: Wed Jan 10 21:39:56 2024 New Revision: 20093 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20093 Log: Merged revision(s) 19968-19971, 20005 from trunk/OpenMPT: [Fix] Pattern tab: Data Entry could insert volume column commands even in MOD format when turning "virtual" default volume commands into real commands. This feature of Data Entry is now disabled for MOD files, as the alternative - moving the newly-added command to the effect column - would be counter-intuitive (https://bugs.openmpt.org/view.php?id=1738). ........ [New] Sample tab: Can now convert sustain loops to normal loops and vice versa. If both loop types are set, the commands swap the two loops. ........ [Ref] Silence warning. ........ [Fix] Fix compilation. ........ [Fix] When opening a .lnk file, the OPENFILENAME struct contains inconsistent information - filename and extension offsets are in terms of the .lnk file, but the filename we retrieve is actually the resolved filename, leading to invalid string access if the location of the resolved filename is shorter, and just incorrect results if it's at least as long as the .lnk location. Do not trust nFileOffset/nFileExtension and just split the string ourselves, as we do in other places (https://bugs.openmpt.org/view.php?id=1739). ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/mptrack/CommandSet.cpp branches/OpenMPT-1.31/mptrack/CommandSet.h branches/OpenMPT-1.31/mptrack/FileDialog.cpp branches/OpenMPT-1.31/mptrack/View_pat.cpp branches/OpenMPT-1.31/mptrack/View_smp.cpp branches/OpenMPT-1.31/mptrack/View_smp.h branches/OpenMPT-1.31/mptrack/resource.h Modified: branches/OpenMPT-1.31/mptrack/CommandSet.cpp ============================================================================== --- branches/OpenMPT-1.31/mptrack/CommandSet.cpp Wed Jan 10 21:39:03 2024 (r20092) +++ branches/OpenMPT-1.31/mptrack/CommandSet.cpp Wed Jan 10 21:39:56 2024 (r20093) @@ -1263,6 +1263,8 @@ {KeyCommand::Hidden, kcDataEntryDownStop, _T("Stop Data Entry -1")}, {KeyCommand::Hidden, kcDataEntryUpCoarseStop, _T("Stop Data Entry Up (Coarse)")}, {KeyCommand::Hidden, kcDataEntryDownCoarseStop, _T("Stop Data Entry Down (Coarse)")}, + {2068, kcSampleConvertNormalLoopToSustain, _T("Convert Normal Loop to Sustain Loop")}, + {2069, kcSampleConvertSustainLoopToNormal, _T("Convert Sustain Loop to Normal Loop")}, }; // Get command descriptions etc.. loaded up. Modified: branches/OpenMPT-1.31/mptrack/CommandSet.h ============================================================================== --- branches/OpenMPT-1.31/mptrack/CommandSet.h Wed Jan 10 21:39:03 2024 (r20092) +++ branches/OpenMPT-1.31/mptrack/CommandSet.h Wed Jan 10 21:39:56 2024 (r20093) @@ -787,6 +787,8 @@ kcSampleCenterSustainEnd, kcSampleConvertPingPongLoop, kcSampleConvertPingPongSustain, + kcSampleConvertNormalLoopToSustain, + kcSampleConvertSustainLoopToNormal, kcSample8Bit, kcSampleMonoMix, kcSampleMonoLeft, Modified: branches/OpenMPT-1.31/mptrack/FileDialog.cpp ============================================================================== --- branches/OpenMPT-1.31/mptrack/FileDialog.cpp Wed Jan 10 21:39:03 2024 (r20092) +++ branches/OpenMPT-1.31/mptrack/FileDialog.cpp Wed Jan 10 21:39:56 2024 (r20093) @@ -183,8 +183,10 @@ return false; } - m_workingDirectory = m_filenames.front().AsNative().substr(0, ofn.nFileOffset); - m_extension = m_filenames.front().AsNative().substr(ofn.nFileExtension); + // Don't rely on nFileOffset / nFileExtension - it was observed on Windows 10 / 11 that when opening a .lnk file, + // those offsets are in terms of the .lnk file, while lpstrFile contains the resolved target of that link. + m_workingDirectory = m_filenames.front().GetDirectoryWithDrive(); + m_extension = m_filenames.front().GetFilenameExtension(); return true; } Modified: branches/OpenMPT-1.31/mptrack/View_pat.cpp ============================================================================== --- branches/OpenMPT-1.31/mptrack/View_pat.cpp Wed Jan 10 21:39:03 2024 (r20092) +++ branches/OpenMPT-1.31/mptrack/View_pat.cpp Wed Jan 10 21:39:56 2024 (r20093) @@ -2862,8 +2862,9 @@ const PatternCursor::Columns column = m_Selection.GetStartColumn(); // Don't allow notes outside our supported note range. - const ModCommand::NOTE noteMin = pSndFile->GetModSpecifications().noteMin; - const ModCommand::NOTE noteMax = pSndFile->GetModSpecifications().noteMax; + const auto &modSpecs = pSndFile->GetModSpecifications(); + const ModCommand::NOTE noteMin = modSpecs.noteMin; + const ModCommand::NOTE noteMax = modSpecs.noteMax; const int instrMax = std::min(static_cast<int>(Util::MaxValueOfType(ModCommand::INSTR())), static_cast<int>(pSndFile->GetNumInstruments() ? pSndFile->GetNumInstruments() : pSndFile->GetNumSamples())); const EffectInfo effectInfo(*pSndFile); const int offset = up ? 1 : -1; @@ -2947,12 +2948,12 @@ m.SetValueVolCol(static_cast<uint16>(val)); } else { - int vol = m.vol + offset * (coarse ? 10 : 1); - if(m.volcmd == VOLCMD_NONE && m.IsNote() && m.instr) + if(m.volcmd == VOLCMD_NONE && m.IsNote() && m.instr && modSpecs.HasVolCommand(VOLCMD_VOLUME)) { m.volcmd = VOLCMD_VOLUME; - vol = GetDefaultVolume(m); + m.vol = static_cast<ModCommand::VOL>(GetDefaultVolume(m)); } + int vol = m.vol + offset * (coarse ? 10 : 1); ModCommand::VOL minValue = 0, maxValue = 64; effectInfo.GetVolCmdInfo(effectInfo.GetIndexFromVolCmd(m.volcmd), nullptr, &minValue, &maxValue); Limit(vol, (int)minValue, (int)maxValue); Modified: branches/OpenMPT-1.31/mptrack/View_smp.cpp ============================================================================== --- branches/OpenMPT-1.31/mptrack/View_smp.cpp Wed Jan 10 21:39:03 2024 (r20092) +++ branches/OpenMPT-1.31/mptrack/View_smp.cpp Wed Jan 10 21:39:56 2024 (r20093) @@ -130,9 +130,11 @@ ON_COMMAND(ID_SAMPLE_SETLOOPSTART, &CViewSample::OnSetLoopStart) ON_COMMAND(ID_SAMPLE_SETLOOPEND, &CViewSample::OnSetLoopEnd) ON_COMMAND(ID_CONVERT_PINGPONG_LOOP, &CViewSample::OnConvertPingPongLoop) + ON_COMMAND(ID_CONVERT_NORMAL_TO_SUSTAIN, &CViewSample::OnConvertNormalLoopToSustain) ON_COMMAND(ID_SAMPLE_SETSUSTAINSTART, &CViewSample::OnSetSustainStart) ON_COMMAND(ID_SAMPLE_SETSUSTAINEND, &CViewSample::OnSetSustainEnd) ON_COMMAND(ID_CONVERT_PINGPONG_SUSTAIN, &CViewSample::OnConvertPingPongSustain) + ON_COMMAND(ID_CONVERT_SUSTAIN_TO_NORMAL, &CViewSample::OnConvertSustainLoopToNormal) ON_COMMAND(ID_SAMPLE_ZOOMUP, &CViewSample::OnZoomUp) ON_COMMAND(ID_SAMPLE_ZOOMDOWN, &CViewSample::OnZoomDown) ON_COMMAND(ID_SAMPLE_DRAW, &CViewSample::OnDrawingToggle) @@ -2222,6 +2224,8 @@ ID_SAMPLE_SETLOOPEND, s); if(sample.HasPingPongLoop()) ::AppendMenu(hMenu, MF_STRING, ID_CONVERT_PINGPONG_LOOP, ih->GetKeyTextFromCommand(kcSampleConvertPingPongLoop, _T("Convert to Unidirectional Loop"))); + if(sample.HasLoop() && (sndFile.GetType() & (MOD_TYPE_IT | MOD_TYPE_MPT))) + ::AppendMenu(hMenu, MF_STRING, ID_CONVERT_NORMAL_TO_SUSTAIN, ih->GetKeyTextFromCommand(kcSampleConvertNormalLoopToSustain, _T("Convert to Sustain Loop"))); if (sndFile.GetType() & (MOD_TYPE_IT|MOD_TYPE_MPT)) { @@ -2236,6 +2240,8 @@ ID_SAMPLE_SETSUSTAINEND, s); if(sample.HasPingPongSustainLoop()) ::AppendMenu(hMenu, MF_STRING, ID_CONVERT_PINGPONG_SUSTAIN, ih->GetKeyTextFromCommand(kcSampleConvertPingPongSustain, _T("Convert to Unidirectional Sustain Loop"))); + if(sample.HasSustainLoop()) + ::AppendMenu(hMenu, MF_STRING, ID_CONVERT_SUSTAIN_TO_NORMAL, ih->GetKeyTextFromCommand(kcSampleConvertSustainLoopToNormal, _T("Convert to Normal Loop"))); } //if(sndFile.GetModSpecifications().HasVolCommand(VOLCMD_OFFSET)) @@ -3325,6 +3331,29 @@ } +void CViewSample::OnConvertNormalLoopToSustain() +{ + CModDoc *pModDoc = GetDocument(); + if(!pModDoc) + return; + + CSoundFile &sndFile = pModDoc->GetSoundFile(); + ModSample &sample = sndFile.GetSample(m_nSample); + if(!sample.HasLoop()) + return; + pModDoc->GetSampleUndo().PrepareUndo(m_nSample, sundo_replace, "Convert Normal Loop To Sustain"); + const auto origStart = sample.nLoopStart, origEnd = sample.nLoopEnd; + const bool origPingPong = sample.uFlags[CHN_PINGPONGLOOP]; + // Swap them + if(sample.HasSustainLoop()) + sample.SetLoop(sample.nSustainStart, sample.nSustainEnd, true, sample.uFlags[CHN_PINGPONGSUSTAIN], sndFile); + else + sample.uFlags.reset(CHN_LOOP | CHN_PINGPONGLOOP); + sample.SetSustainLoop(origStart, origEnd, true, origPingPong, sndFile); + SetModified(SampleHint().Info().Data(), true, true); +} + + void CViewSample::OnSetSustainStart() { CModDoc *pModDoc = GetDocument(); @@ -3379,6 +3408,29 @@ } +void CViewSample::OnConvertSustainLoopToNormal() +{ + CModDoc *pModDoc = GetDocument(); + if(!pModDoc) + return; + + CSoundFile &sndFile = pModDoc->GetSoundFile(); + ModSample &sample = sndFile.GetSample(m_nSample); + if(!sample.HasSustainLoop()) + return; + pModDoc->GetSampleUndo().PrepareUndo(m_nSample, sundo_replace, "Convert Sustain Loop To Normal"); + const auto origStart = sample.nSustainStart, origEnd = sample.nSustainEnd; + const bool origPingPong = sample.uFlags[CHN_PINGPONGSUSTAIN]; + // Swap them + if(sample.HasLoop()) + sample.SetSustainLoop(sample.nLoopStart, sample.nLoopEnd, true, sample.uFlags[CHN_PINGPONGLOOP], sndFile); + else + sample.uFlags.reset(CHN_SUSTAINLOOP | CHN_PINGPONGSUSTAIN); + sample.SetLoop(origStart, origEnd, true, origPingPong, sndFile); + SetModified(SampleHint().Info().Data(), true, true); +} + + void CViewSample::OnSetCuePoint(UINT nID) { nID -= ID_SAMPLE_CUE_1; Modified: branches/OpenMPT-1.31/mptrack/View_smp.h ============================================================================== --- branches/OpenMPT-1.31/mptrack/View_smp.h Wed Jan 10 21:39:03 2024 (r20092) +++ branches/OpenMPT-1.31/mptrack/View_smp.h Wed Jan 10 21:39:56 2024 (r20093) @@ -212,9 +212,11 @@ afx_msg void OnSetLoopStart(); afx_msg void OnSetLoopEnd(); afx_msg void OnConvertPingPongLoop(); + afx_msg void OnConvertNormalLoopToSustain(); afx_msg void OnSetSustainStart(); afx_msg void OnSetSustainEnd(); afx_msg void OnConvertPingPongSustain(); + afx_msg void OnConvertSustainLoopToNormal(); afx_msg void OnSetCuePoint(UINT nID); afx_msg void OnZoomUp(); afx_msg void OnZoomDown(); Modified: branches/OpenMPT-1.31/mptrack/resource.h ============================================================================== --- branches/OpenMPT-1.31/mptrack/resource.h Wed Jan 10 21:39:03 2024 (r20092) +++ branches/OpenMPT-1.31/mptrack/resource.h Wed Jan 10 21:39:56 2024 (r20093) @@ -1301,6 +1301,8 @@ #define ID_CONVERT_PINGPONG_SUSTAIN 44652 #define ID_RENAME_PLUGIN 44653 #define ID_FILE_SAVEOPL 44654 +#define ID_CONVERT_NORMAL_TO_SUSTAIN 44655 +#define ID_CONVERT_SUSTAIN_TO_NORMAL 44656 // Next default values for new objects // @@ -1308,7 +1310,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_3D_CONTROLS 1 #define _APS_NEXT_RESOURCE_VALUE 543 -#define _APS_NEXT_COMMAND_VALUE 44655 +#define _APS_NEXT_COMMAND_VALUE 44657 #define _APS_NEXT_CONTROL_VALUE 2518 #define _APS_NEXT_SYMED_VALUE 901 #endif |
From: <sv...@op...> - 2024-01-10 20:39:13
|
Author: sagamusix Date: Wed Jan 10 21:39:03 2024 New Revision: 20092 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20092 Log: Merged revision(s) 19901 from trunk/OpenMPT: [Fix] IMF: Ignore magic bytes in sample header. "Leaving All Behind" by Karsten Koch has different magic bytes, Orpheus ignores them just like the instrument header magic bytes. ........ Modified: branches/OpenMPT-1.28/ (props changed) branches/OpenMPT-1.28/soundlib/Load_imf.cpp Modified: branches/OpenMPT-1.28/soundlib/Load_imf.cpp ============================================================================== --- branches/OpenMPT-1.28/soundlib/Load_imf.cpp Wed Jan 10 21:38:27 2024 (r20091) +++ branches/OpenMPT-1.28/soundlib/Load_imf.cpp Wed Jan 10 21:39:03 2024 (r20092) @@ -171,7 +171,7 @@ uint8le unused3[5]; uint16le ems; // Reserved for internal usage uint32le dram; // Reserved for internal usage - char is10[4]; // 'IS10' + char is10[4]; // 'IS10' or 'IW10' (not verified by Orpheus) // Convert an IMFSample to OpenMPT's internal sample representation. void ConvertToMPT(ModSample &mptSmp) const @@ -633,8 +633,9 @@ file.ReadStruct(sampleHeader); const SAMPLEINDEX smpID = firstSample + smp; - if(memcmp(sampleHeader.is10, "IS10", 4) || smpID >= MAX_SAMPLES) + if(smpID >= MAX_SAMPLES) { + file.Skip(sampleHeader.length); continue; } |
From: <sv...@op...> - 2024-01-10 20:38:42
|
Author: sagamusix Date: Wed Jan 10 21:38:27 2024 New Revision: 20091 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20091 Log: [Fix] Fix compilation. Modified: branches/OpenMPT-1.28/soundlib/Load_it.cpp Modified: branches/OpenMPT-1.28/soundlib/Load_it.cpp ============================================================================== --- branches/OpenMPT-1.28/soundlib/Load_it.cpp Wed Jan 10 21:37:15 2024 (r20090) +++ branches/OpenMPT-1.28/soundlib/Load_it.cpp Wed Jan 10 21:38:27 2024 (r20091) @@ -1215,14 +1215,14 @@ if(fileHeader.cwtv < SchismVersionFromDate<2016, 05, 13>::Version()) m_playBehaviour.reset(kITShortSampleRetrig); // 2023-10-16: kITEnvelopePositionHandling https://github.com/schismtracker/schismtracker/commit/bc81f605d927ca931a886417641da29fc89283b8 - if(schismDateVersion < SchismVersionFromDate<2023, 10, 19>::date) + if(fileHeader.cwtv < SchismVersionFromDate<2023, 10, 19>::Version()) { // Panbrello sample & hold random waveform: Added 2023-10-19, https://github.com/schismtracker/schismtracker/commit/411ec16b190ba1a486d8b0907ad8d74f8fdc2840 m_playBehaviour.reset(kITPanbrelloHold); // Don't apply any portamento if no previous note is playing: Added 2023-10-19, https://github.com/schismtracker/schismtracker/commit/8ff0a86a715efb50c89770fb9095d4c4089ff187 m_playBehaviour.reset(kITPortaNoNote); } - if(schismDateVersion < SchismVersionFromDate<2023, 10, 22>::date) + if(fileHeader.cwtv < SchismVersionFromDate<2023, 10, 22>::Version()) { // Note delay delays first-tick behaviour for slides: Added 2023-10-22, https://github.com/schismtracker/schismtracker/commit/b9609e4f827e1b6ce9ebe6573b85e69388ca0ea0 m_playBehaviour.reset(kITFirstTickHandling); |
From: <sv...@op...> - 2024-01-10 20:37:30
|
Author: sagamusix Date: Wed Jan 10 21:37:15 2024 New Revision: 20090 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20090 Log: Merged revision(s) 19901 from trunk/OpenMPT: [Fix] IMF: Ignore magic bytes in sample header. "Leaving All Behind" by Karsten Koch has different magic bytes, Orpheus ignores them just like the instrument header magic bytes. ........ Modified: branches/OpenMPT-1.29/ (props changed) branches/OpenMPT-1.29/soundlib/Load_imf.cpp Modified: branches/OpenMPT-1.29/soundlib/Load_imf.cpp ============================================================================== --- branches/OpenMPT-1.29/soundlib/Load_imf.cpp Wed Jan 10 21:36:45 2024 (r20089) +++ branches/OpenMPT-1.29/soundlib/Load_imf.cpp Wed Jan 10 21:37:15 2024 (r20090) @@ -171,7 +171,7 @@ uint8le unused3[5]; uint16le ems; // Reserved for internal usage uint32le dram; // Reserved for internal usage - char is10[4]; // 'IS10' + char is10[4]; // 'IS10' or 'IW10' (not verified by Orpheus) // Convert an IMFSample to OpenMPT's internal sample representation. void ConvertToMPT(ModSample &mptSmp) const @@ -632,8 +632,9 @@ file.ReadStruct(sampleHeader); const SAMPLEINDEX smpID = firstSample + smp; - if(memcmp(sampleHeader.is10, "IS10", 4) || smpID >= MAX_SAMPLES) + if(smpID >= MAX_SAMPLES) { + file.Skip(sampleHeader.length); continue; } |
From: <sv...@op...> - 2024-01-10 20:36:57
|
Author: sagamusix Date: Wed Jan 10 21:36:45 2024 New Revision: 20089 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20089 Log: Merged revision(s) 19901 from trunk/OpenMPT: [Fix] IMF: Ignore magic bytes in sample header. "Leaving All Behind" by Karsten Koch has different magic bytes, Orpheus ignores them just like the instrument header magic bytes. ........ Modified: branches/OpenMPT-1.30/ (props changed) branches/OpenMPT-1.30/soundlib/Load_imf.cpp Modified: branches/OpenMPT-1.30/soundlib/Load_imf.cpp ============================================================================== --- branches/OpenMPT-1.30/soundlib/Load_imf.cpp Wed Jan 10 21:36:22 2024 (r20088) +++ branches/OpenMPT-1.30/soundlib/Load_imf.cpp Wed Jan 10 21:36:45 2024 (r20089) @@ -172,7 +172,7 @@ uint8le unused3[5]; uint16le ems; // Reserved for internal usage uint32le dram; // Reserved for internal usage - char is10[4]; // 'IS10' + char is10[4]; // 'IS10' or 'IW10' (not verified by Orpheus) // Convert an IMFSample to OpenMPT's internal sample representation. void ConvertToMPT(ModSample &mptSmp) const @@ -632,8 +632,9 @@ file.ReadStruct(sampleHeader); const SAMPLEINDEX smpID = firstSample + smp; - if(memcmp(sampleHeader.is10, "IS10", 4) || smpID >= MAX_SAMPLES) + if(smpID >= MAX_SAMPLES) { + file.Skip(sampleHeader.length); continue; } |
From: <sv...@op...> - 2024-01-10 20:36:39
|
Author: sagamusix Date: Wed Jan 10 21:36:22 2024 New Revision: 20088 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20088 Log: Merged revision(s) 19901 from trunk/OpenMPT: [Fix] IMF: Ignore magic bytes in sample header. "Leaving All Behind" by Karsten Koch has different magic bytes, Orpheus ignores them just like the instrument header magic bytes. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/soundlib/Load_imf.cpp Modified: branches/OpenMPT-1.31/soundlib/Load_imf.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/Load_imf.cpp Wed Jan 10 21:35:30 2024 (r20087) +++ branches/OpenMPT-1.31/soundlib/Load_imf.cpp Wed Jan 10 21:36:22 2024 (r20088) @@ -172,7 +172,7 @@ uint8le unused3[5]; uint16le ems; // Reserved for internal usage uint32le dram; // Reserved for internal usage - char is10[4]; // 'IS10' + char is10[4]; // 'IS10' or 'IW10' (not verified by Orpheus) // Convert an IMFSample to OpenMPT's internal sample representation. void ConvertToMPT(ModSample &mptSmp) const @@ -596,8 +596,9 @@ file.ReadStruct(sampleHeader); const SAMPLEINDEX smpID = firstSample + smp; - if(memcmp(sampleHeader.is10, "IS10", 4) || smpID >= MAX_SAMPLES) + if(smpID >= MAX_SAMPLES) { + file.Skip(sampleHeader.length); continue; } |
From: <sv...@op...> - 2024-01-10 20:35:46
|
Author: sagamusix Date: Wed Jan 10 21:35:30 2024 New Revision: 20087 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20087 Log: Merged revision(s) 19873, 19900 from trunk/OpenMPT: [Ref] Small cleanups. ........ [Fix] Moving a plugin didn't update its MIDI mapping directives. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/mptrack/Globals.cpp branches/OpenMPT-1.31/mptrack/MIDIMapping.cpp branches/OpenMPT-1.31/mptrack/MIDIMapping.h branches/OpenMPT-1.31/mptrack/View_gen.cpp branches/OpenMPT-1.31/soundlib/plugins/SymMODEcho.cpp Modified: branches/OpenMPT-1.31/mptrack/Globals.cpp ============================================================================== --- branches/OpenMPT-1.31/mptrack/Globals.cpp Wed Jan 10 21:34:52 2024 (r20086) +++ branches/OpenMPT-1.31/mptrack/Globals.cpp Wed Jan 10 21:35:30 2024 (r20087) @@ -658,7 +658,7 @@ return; } - if (OnScrollBy(CSize(zDelta * m_lineDev.cx / WHEEL_DELTA, 0), TRUE)) + if(OnScrollBy(CSize(zDelta * m_lineDev.cx / WHEEL_DELTA, 0), TRUE)) UpdateWindow(); } Modified: branches/OpenMPT-1.31/mptrack/MIDIMapping.cpp ============================================================================== --- branches/OpenMPT-1.31/mptrack/MIDIMapping.cpp Wed Jan 10 21:34:52 2024 (r20086) +++ branches/OpenMPT-1.31/mptrack/MIDIMapping.cpp Wed Jan 10 21:35:30 2024 (r20087) @@ -169,4 +169,14 @@ } +void CMIDIMapper::MovePlugin(PLUGINDEX from, PLUGINDEX to) +{ + for (auto &d : m_Directives) + { + if(d.GetPlugIndex() == from + 1u) + d.SetPlugIndex(to + 1u); + } +} + + OPENMPT_NAMESPACE_END Modified: branches/OpenMPT-1.31/mptrack/MIDIMapping.h ============================================================================== --- branches/OpenMPT-1.31/mptrack/MIDIMapping.h Wed Jan 10 21:34:52 2024 (r20086) +++ branches/OpenMPT-1.31/mptrack/MIDIMapping.h Wed Jan 10 21:35:30 2024 (r20087) @@ -114,6 +114,7 @@ bool AreOrderEqual(const size_t a, const size_t b) const { return !(m_Directives[a] < m_Directives[b] || m_Directives[b] < m_Directives[a]); } + void MovePlugin(PLUGINDEX from, PLUGINDEX to); private: void Sort() { std::stable_sort(m_Directives.begin(), m_Directives.end()); } Modified: branches/OpenMPT-1.31/mptrack/View_gen.cpp ============================================================================== --- branches/OpenMPT-1.31/mptrack/View_gen.cpp Wed Jan 10 21:34:52 2024 (r20086) +++ branches/OpenMPT-1.31/mptrack/View_gen.cpp Wed Jan 10 21:35:30 2024 (r20087) @@ -1512,7 +1512,9 @@ // Move plug data sndFile.m_MixPlugins[dest] = std::move(sndFile.m_MixPlugins[src]); - sndFile.m_MixPlugins[src] = SNDMIXPLUGIN(); + mpt::reconstruct(sndFile.m_MixPlugins[src]); + + sndFile.GetMIDIMapper().MovePlugin(src, dest); // Prevent plug from pointing backwards. if(!sndFile.m_MixPlugins[dest].IsOutputToMaster()) @@ -1699,7 +1701,8 @@ m_CbnPlugin.SetCurSel(dlg.GetSlot()); OnPluginChanged(); PopulateChannelPlugins(); - GetDocument()->UpdateAllViews(this, PluginHint().Names(), this); + CView *sender = dlg.DoMoveChain() ? nullptr : this; + GetDocument()->UpdateAllViews(sender, PluginHint().Names(), sender); SetPluginModified(); } Modified: branches/OpenMPT-1.31/soundlib/plugins/SymMODEcho.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/plugins/SymMODEcho.cpp Wed Jan 10 21:34:52 2024 (r20086) +++ branches/OpenMPT-1.31/soundlib/plugins/SymMODEcho.cpp Wed Jan 10 21:35:30 2024 (r20087) @@ -70,7 +70,7 @@ { case DSPType::Off: break; - case DSPType::Normal: // Normal + case DSPType::Normal: lOut = (lDelay + lDry) * m_feedback; rOut = (rDelay + rDry) * m_feedback; break; |