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
(202) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sv...@op...> - 2024-12-02 20:13:06
|
Author: sagamusix Date: Mon Dec 2 21:12:58 2024 New Revision: 22454 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22454 Log: Merged revision(s) 22453 from trunk/OpenMPT: [Fix] When rows per beat are unset, avoid reporting infinity for BPM or fractional PPQ position. Assume a default of 4 rows per beat instead. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/mptrack/Moddoc.cpp branches/OpenMPT-1.31/soundlib/Snd_defs.h branches/OpenMPT-1.31/soundlib/Sndfile.cpp Modified: branches/OpenMPT-1.31/mptrack/Moddoc.cpp ============================================================================== --- branches/OpenMPT-1.31/mptrack/Moddoc.cpp Mon Dec 2 21:10:52 2024 (r22453) +++ branches/OpenMPT-1.31/mptrack/Moddoc.cpp Mon Dec 2 21:12:58 2024 (r22454) @@ -2417,13 +2417,14 @@ } m_SndFile.RecalculateSamplesPerTick(); const double bpm = m_SndFile.GetCurrentBPM(); + const ROWINDEX rowsPerBeat = m_SndFile.m_PlayState.m_nCurrentRowsPerBeat ? m_SndFile.m_PlayState.m_nCurrentRowsPerBeat : DEFAULT_ROWS_PER_BEAT; CString s; switch(m_SndFile.m_nTempoMode) { case TempoMode::Alternative: s.Format(_T("Using alternative tempo interpretation.\n\nAssuming:\n. %.8g ticks per second\n. %u ticks per row\n. %u rows per beat\nthe tempo is approximately: %.8g BPM"), - m_SndFile.m_PlayState.m_nMusicTempo.ToDouble(), m_SndFile.m_PlayState.m_nMusicSpeed, m_SndFile.m_PlayState.m_nCurrentRowsPerBeat, bpm); + m_SndFile.m_PlayState.m_nMusicTempo.ToDouble(), m_SndFile.m_PlayState.m_nMusicSpeed, rowsPerBeat, bpm); break; case TempoMode::Modern: @@ -2433,7 +2434,7 @@ case TempoMode::Classic: default: s.Format(_T("Using standard tempo interpretation.\n\nAssuming:\n. A mod tempo (tick duration factor) of %.8g\n. %u ticks per row\n. %u rows per beat\nthe tempo is approximately: %.8g BPM"), - m_SndFile.m_PlayState.m_nMusicTempo.ToDouble(), m_SndFile.m_PlayState.m_nMusicSpeed, m_SndFile.m_PlayState.m_nCurrentRowsPerBeat, bpm); + m_SndFile.m_PlayState.m_nMusicTempo.ToDouble(), m_SndFile.m_PlayState.m_nMusicSpeed, rowsPerBeat, bpm); break; } Modified: branches/OpenMPT-1.31/soundlib/Snd_defs.h ============================================================================== --- branches/OpenMPT-1.31/soundlib/Snd_defs.h Mon Dec 2 21:10:52 2024 (r22453) +++ branches/OpenMPT-1.31/soundlib/Snd_defs.h Mon Dec 2 21:12:58 2024 (r22454) @@ -42,8 +42,12 @@ inline constexpr SmpLength MAX_SAMPLE_LENGTH = 0x10000000; // Sample length in frames. Sample size in bytes can be more than this (= 256 MB). +inline constexpr ROWINDEX MAX_ROWS_PER_MEASURE = 65536; +inline constexpr ROWINDEX MAX_ROWS_PER_BEAT = 65536; +inline constexpr ROWINDEX DEFAULT_ROWS_PER_BEAT = 4; +inline constexpr ROWINDEX DEFAULT_ROWS_PER_MEASURE = 16; + inline constexpr ROWINDEX MAX_PATTERN_ROWS = 1024; -inline constexpr ROWINDEX MAX_ROWS_PER_BEAT = 65536; inline constexpr ORDERINDEX MAX_ORDERS = ORDERINDEX_MAX + 1; inline constexpr PATTERNINDEX MAX_PATTERNS = 4000; inline constexpr SAMPLEINDEX MAX_SAMPLES = 4000; Modified: branches/OpenMPT-1.31/soundlib/Sndfile.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/Sndfile.cpp Mon Dec 2 21:10:52 2024 (r22453) +++ branches/OpenMPT-1.31/soundlib/Sndfile.cpp Mon Dec 2 21:12:58 2024 (r22454) @@ -136,11 +136,11 @@ #ifdef MODPLUG_TRACKER m_bChannelMuteTogglePending.reset(); - m_nDefaultRowsPerBeat = m_PlayState.m_nCurrentRowsPerBeat = (TrackerSettings::Instance().m_nRowHighlightBeats) ? TrackerSettings::Instance().m_nRowHighlightBeats : 4; + m_nDefaultRowsPerBeat = m_PlayState.m_nCurrentRowsPerBeat = (TrackerSettings::Instance().m_nRowHighlightBeats) ? TrackerSettings::Instance().m_nRowHighlightBeats : DEFAULT_ROWS_PER_BEAT; m_nDefaultRowsPerMeasure = m_PlayState.m_nCurrentRowsPerMeasure = (TrackerSettings::Instance().m_nRowHighlightMeasures >= m_nDefaultRowsPerBeat) ? TrackerSettings::Instance().m_nRowHighlightMeasures : m_nDefaultRowsPerBeat * 4; #else - m_nDefaultRowsPerBeat = m_PlayState.m_nCurrentRowsPerBeat = 4; - m_nDefaultRowsPerMeasure = m_PlayState.m_nCurrentRowsPerMeasure = 16; + m_nDefaultRowsPerBeat = m_PlayState.m_nCurrentRowsPerBeat = DEFAULT_ROWS_PER_BEAT; + m_nDefaultRowsPerMeasure = m_PlayState.m_nCurrentRowsPerMeasure = DEFAULT_ROWS_PER_MEASURE; #endif // MODPLUG_TRACKER MemsetZero(Instruments); @@ -880,11 +880,12 @@ bpm = m_PlayState.m_nMusicTempo.ToDouble(); } else { - //with other modes, we calculate it: - double ticksPerBeat = m_PlayState.m_nMusicSpeed * m_PlayState.m_nCurrentRowsPerBeat; //ticks/beat = ticks/row * rows/beat - double samplesPerBeat = m_PlayState.m_nSamplesPerTick * ticksPerBeat; //samps/beat = samps/tick * ticks/beat - bpm = m_MixerSettings.gdwMixingFreq / samplesPerBeat * 60; //beats/sec = samps/sec / samps/beat - } //beats/min = beats/sec * 60 + // With other modes, we calculate it: + ROWINDEX rowsPerBeat = m_PlayState.m_nCurrentRowsPerBeat ? m_PlayState.m_nCurrentRowsPerBeat : DEFAULT_ROWS_PER_BEAT; + double ticksPerBeat = m_PlayState.m_nMusicSpeed * rowsPerBeat; // Ticks/beat = ticks/row * rows/beat + double samplesPerBeat = m_PlayState.m_nSamplesPerTick * ticksPerBeat; // Samps/beat = samps/tick * ticks/beat + bpm = m_MixerSettings.gdwMixingFreq / samplesPerBeat * 60; // Beats/sec = samps/sec / samps/beat + } // Beats/min = beats/sec * 60 return bpm; } |
From: <sv...@op...> - 2024-12-02 20:10:59
|
Author: sagamusix Date: Mon Dec 2 21:10:52 2024 New Revision: 22453 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22453 Log: [Fix] When rows per beat are unset, avoid reporting infinity for BPM or fractional PPQ position. Assume a default of 4 rows per beat instead. Modified: trunk/OpenMPT/mptrack/ColorConfigDlg.cpp trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/soundlib/PlayState.cpp trunk/OpenMPT/soundlib/Snd_defs.h trunk/OpenMPT/soundlib/Snd_fx.cpp trunk/OpenMPT/soundlib/Sndfile.cpp trunk/OpenMPT/soundlib/Sndmix.cpp Modified: trunk/OpenMPT/mptrack/ColorConfigDlg.cpp ============================================================================== --- trunk/OpenMPT/mptrack/ColorConfigDlg.cpp Mon Dec 2 20:12:42 2024 (r22452) +++ trunk/OpenMPT/mptrack/ColorConfigDlg.cpp Mon Dec 2 21:10:52 2024 (r22453) @@ -193,8 +193,8 @@ SetDlgItemInt(IDC_PRIMARYHILITE, TrackerSettings::Instance().m_nRowHighlightMeasures); SetDlgItemInt(IDC_SECONDARYHILITE, TrackerSettings::Instance().m_nRowHighlightBeats); - m_spinRowsPerMeasure.SetRange32(0, int32_max); - m_spinRowsPerBeat.SetRange32(0, int32_max); + m_spinRowsPerMeasure.SetRange32(0, MAX_ROWS_PER_MEASURE); + m_spinRowsPerBeat.SetRange32(0, MAX_ROWS_PER_BEAT); patternFont = TrackerSettings::Instance().patternFont; m_ComboFont.SetRedraw(FALSE); Modified: trunk/OpenMPT/mptrack/Moddoc.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Moddoc.cpp Mon Dec 2 20:12:42 2024 (r22452) +++ trunk/OpenMPT/mptrack/Moddoc.cpp Mon Dec 2 21:10:52 2024 (r22453) @@ -2406,13 +2406,14 @@ } m_SndFile.RecalculateSamplesPerTick(); const double bpm = m_SndFile.GetCurrentBPM(); + const ROWINDEX rowsPerBeat = m_SndFile.m_PlayState.m_nCurrentRowsPerBeat ? m_SndFile.m_PlayState.m_nCurrentRowsPerBeat : DEFAULT_ROWS_PER_BEAT; CString s; switch(m_SndFile.m_nTempoMode) { case TempoMode::Alternative: s.Format(_T("Using alternative tempo interpretation.\n\nAssuming:\n. %.8g ticks per second\n. %u ticks per row\n. %u rows per beat\nthe tempo is approximately: %.8g BPM"), - m_SndFile.m_PlayState.m_nMusicTempo.ToDouble(), m_SndFile.m_PlayState.m_nMusicSpeed, m_SndFile.m_PlayState.m_nCurrentRowsPerBeat, bpm); + m_SndFile.m_PlayState.m_nMusicTempo.ToDouble(), m_SndFile.m_PlayState.m_nMusicSpeed, rowsPerBeat, bpm); break; case TempoMode::Modern: @@ -2422,7 +2423,7 @@ case TempoMode::Classic: default: s.Format(_T("Using standard tempo interpretation.\n\nAssuming:\n. A mod tempo (tick duration factor) of %.8g\n. %u ticks per row\n. %u rows per beat\nthe tempo is approximately: %.8g BPM"), - m_SndFile.m_PlayState.m_nMusicTempo.ToDouble(), m_SndFile.m_PlayState.m_nMusicSpeed, m_SndFile.m_PlayState.m_nCurrentRowsPerBeat, bpm); + m_SndFile.m_PlayState.m_nMusicTempo.ToDouble(), m_SndFile.m_PlayState.m_nMusicSpeed, rowsPerBeat, bpm); break; } Modified: trunk/OpenMPT/soundlib/PlayState.cpp ============================================================================== --- trunk/OpenMPT/soundlib/PlayState.cpp Mon Dec 2 20:12:42 2024 (r22452) +++ trunk/OpenMPT/soundlib/PlayState.cpp Mon Dec 2 21:10:52 2024 (r22453) @@ -50,8 +50,8 @@ void PlayState::UpdatePPQ(bool patternTransition) noexcept { - ROWINDEX rpm = m_nCurrentRowsPerMeasure ? m_nCurrentRowsPerMeasure : 4; - ROWINDEX rpb = m_nCurrentRowsPerBeat ? m_nCurrentRowsPerBeat : 1; + ROWINDEX rpm = m_nCurrentRowsPerMeasure ? m_nCurrentRowsPerMeasure : DEFAULT_ROWS_PER_MEASURE; + ROWINDEX rpb = m_nCurrentRowsPerBeat ? m_nCurrentRowsPerBeat : DEFAULT_ROWS_PER_BEAT; if(m_lTotalSampleCount > 0 && (patternTransition || !(m_nRow % rpm))) { // Pattern end = end of measure, so round up PPQ to the next full measure Modified: trunk/OpenMPT/soundlib/Snd_defs.h ============================================================================== --- trunk/OpenMPT/soundlib/Snd_defs.h Mon Dec 2 20:12:42 2024 (r22452) +++ trunk/OpenMPT/soundlib/Snd_defs.h Mon Dec 2 21:10:52 2024 (r22453) @@ -43,8 +43,12 @@ inline constexpr SmpLength MAX_SAMPLE_LENGTH = 0x10000000; // Sample length in frames. Sample size in bytes can be more than this (= 256 MB). +inline constexpr ROWINDEX MAX_ROWS_PER_MEASURE = 65536; +inline constexpr ROWINDEX MAX_ROWS_PER_BEAT = 65536; +inline constexpr ROWINDEX DEFAULT_ROWS_PER_BEAT = 4; +inline constexpr ROWINDEX DEFAULT_ROWS_PER_MEASURE = 16; + inline constexpr ROWINDEX MAX_PATTERN_ROWS = 4096; -inline constexpr ROWINDEX MAX_ROWS_PER_BEAT = 65536; inline constexpr ORDERINDEX MAX_ORDERS = ORDERINDEX_MAX + 1; inline constexpr PATTERNINDEX MAX_PATTERNS = 4000; inline constexpr SAMPLEINDEX MAX_SAMPLES = 4000; Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp Mon Dec 2 20:12:42 2024 (r22452) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp Mon Dec 2 21:10:52 2024 (r22453) @@ -1072,7 +1072,8 @@ const uint32 rowDuration = tickDuration * numTicks; memory.elapsedTime += static_cast<double>(rowDuration) / static_cast<double>(m_MixerSettings.gdwMixingFreq); playState.m_lTotalSampleCount += rowDuration; - playState.m_ppqPosFract += 1.0 / playState.m_nCurrentRowsPerBeat; + const ROWINDEX rowsPerBeat = playState.m_nCurrentRowsPerBeat ? playState.m_nCurrentRowsPerBeat : DEFAULT_ROWS_PER_BEAT; + playState.m_ppqPosFract += 1.0 / rowsPerBeat; if(adjustSamplePos) { Modified: trunk/OpenMPT/soundlib/Sndfile.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Sndfile.cpp Mon Dec 2 20:12:42 2024 (r22452) +++ trunk/OpenMPT/soundlib/Sndfile.cpp Mon Dec 2 21:10:52 2024 (r22453) @@ -131,11 +131,11 @@ #ifdef MODPLUG_TRACKER m_bChannelMuteTogglePending.reset(); - m_nDefaultRowsPerBeat = m_PlayState.m_nCurrentRowsPerBeat = (TrackerSettings::Instance().m_nRowHighlightBeats) ? TrackerSettings::Instance().m_nRowHighlightBeats : 4; + m_nDefaultRowsPerBeat = m_PlayState.m_nCurrentRowsPerBeat = (TrackerSettings::Instance().m_nRowHighlightBeats) ? TrackerSettings::Instance().m_nRowHighlightBeats : DEFAULT_ROWS_PER_BEAT; m_nDefaultRowsPerMeasure = m_PlayState.m_nCurrentRowsPerMeasure = (TrackerSettings::Instance().m_nRowHighlightMeasures >= m_nDefaultRowsPerBeat) ? TrackerSettings::Instance().m_nRowHighlightMeasures : m_nDefaultRowsPerBeat * 4; #else - m_nDefaultRowsPerBeat = m_PlayState.m_nCurrentRowsPerBeat = 4; - m_nDefaultRowsPerMeasure = m_PlayState.m_nCurrentRowsPerMeasure = 16; + m_nDefaultRowsPerBeat = m_PlayState.m_nCurrentRowsPerBeat = DEFAULT_ROWS_PER_BEAT; + m_nDefaultRowsPerMeasure = m_PlayState.m_nCurrentRowsPerMeasure = DEFAULT_ROWS_PER_MEASURE; #endif // MODPLUG_TRACKER MemsetZero(Instruments); @@ -897,11 +897,12 @@ bpm = m_PlayState.m_nMusicTempo.ToDouble(); } else { - //with other modes, we calculate it: - double ticksPerBeat = m_PlayState.m_nMusicSpeed * m_PlayState.m_nCurrentRowsPerBeat; //ticks/beat = ticks/row * rows/beat - double samplesPerBeat = m_PlayState.m_nSamplesPerTick * ticksPerBeat; //samps/beat = samps/tick * ticks/beat - bpm = m_MixerSettings.gdwMixingFreq / samplesPerBeat * 60; //beats/sec = samps/sec / samps/beat - } //beats/min = beats/sec * 60 + // With other modes, we calculate it: + ROWINDEX rowsPerBeat = m_PlayState.m_nCurrentRowsPerBeat ? m_PlayState.m_nCurrentRowsPerBeat : DEFAULT_ROWS_PER_BEAT; + double ticksPerBeat = m_PlayState.m_nMusicSpeed * rowsPerBeat; // Ticks/beat = ticks/row * rows/beat + double samplesPerBeat = m_PlayState.m_nSamplesPerTick * ticksPerBeat; // Samps/beat = samps/tick * ticks/beat + bpm = m_MixerSettings.gdwMixingFreq / samplesPerBeat * 60; // Beats/sec = samps/sec / samps/beat + } // Beats/min = beats/sec * 60 return bpm; } Modified: trunk/OpenMPT/soundlib/Sndmix.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Sndmix.cpp Mon Dec 2 20:12:42 2024 (r22452) +++ trunk/OpenMPT/soundlib/Sndmix.cpp Mon Dec 2 21:10:52 2024 (r22453) @@ -356,8 +356,9 @@ countToRender -= countChunk; m_PlayState.m_nBufferCount -= countChunk; m_PlayState.m_lTotalSampleCount += countChunk; + const ROWINDEX rowsPerBeat = m_PlayState.m_nCurrentRowsPerBeat ? m_PlayState.m_nCurrentRowsPerBeat : DEFAULT_ROWS_PER_BEAT; if(!m_PlayState.m_nBufferCount && !m_PlayState.m_flags[SONG_PAUSED]) - m_PlayState.m_ppqPosFract += 1.0 / (m_PlayState.m_nCurrentRowsPerBeat * m_PlayState.TicksOnRow()); + m_PlayState.m_ppqPosFract += 1.0 / (rowsPerBeat * m_PlayState.TicksOnRow()); #ifdef MODPLUG_TRACKER if(IsRenderingToDisc()) |
From: <sv...@op...> - 2024-12-02 19:12:49
|
Author: sagamusix Date: Mon Dec 2 20:12:42 2024 New Revision: 22452 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22452 Log: [Imp] Disable "always use default highlights" if no highlights are enabled. Small improvements to Display settings UI. Modified: trunk/OpenMPT/mptrack/ColorConfigDlg.cpp trunk/OpenMPT/mptrack/ColorConfigDlg.h trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/mptrack.rc Modified: trunk/OpenMPT/mptrack/ColorConfigDlg.cpp ============================================================================== --- trunk/OpenMPT/mptrack/ColorConfigDlg.cpp Mon Dec 2 19:09:28 2024 (r22451) +++ trunk/OpenMPT/mptrack/ColorConfigDlg.cpp Mon Dec 2 20:12:42 2024 (r22452) @@ -88,10 +88,10 @@ ON_COMMAND(IDC_BUTTON11, &COptionsColors::OnClearWindowCache) ON_COMMAND(IDC_LOAD_COLORSCHEME, &COptionsColors::OnLoadColorScheme) ON_COMMAND(IDC_SAVE_COLORSCHEME, &COptionsColors::OnSaveColorScheme) - ON_COMMAND(IDC_CHECK1, &COptionsColors::OnSettingsChanged) + ON_COMMAND(IDC_CHECK1, &COptionsColors::OnHighlightsChanged) ON_COMMAND(IDC_CHECK2, &COptionsColors::OnPreviewChanged) ON_COMMAND(IDC_CHECK3, &COptionsColors::OnSettingsChanged) - ON_COMMAND(IDC_CHECK4, &COptionsColors::OnPreviewChanged) + ON_COMMAND(IDC_CHECK4, &COptionsColors::OnHighlightsChanged) ON_COMMAND(IDC_CHECK5, &COptionsColors::OnSettingsChanged) ON_COMMAND(IDC_RADIO1, &COptionsColors::OnSettingsChanged) ON_COMMAND(IDC_RADIO2, &COptionsColors::OnSettingsChanged) @@ -109,11 +109,16 @@ DDX_Control(pDX, IDC_COMBO2, m_ComboFont); DDX_Control(pDX, IDC_COMBO3, m_ComboPreset); DDX_Control(pDX, IDC_COMBO4, m_ComboDPIAwareness); + DDX_Control(pDX, IDC_BUTTON1, m_BtnColor[0]); + DDX_Control(pDX, IDC_BUTTON2, m_BtnColor[1]); + DDX_Control(pDX, IDC_BUTTON3, m_BtnColor[2]); DDX_Control(pDX, IDC_BUTTON4, m_BtnPreview); DDX_Control(pDX, IDC_TEXT1, m_TxtColor[0]); DDX_Control(pDX, IDC_TEXT2, m_TxtColor[1]); DDX_Control(pDX, IDC_TEXT3, m_TxtColor[2]); DDX_Control(pDX, IDC_SPIN1, m_ColorSpin); + DDX_Control(pDX, IDC_SPIN2, m_spinRowsPerMeasure); + DDX_Control(pDX, IDC_SPIN3, m_spinRowsPerBeat); DDX_Control(pDX, IDC_PRIMARYHILITE, m_rpmEdit); DDX_Control(pDX, IDC_SECONDARYHILITE, m_rpbEdit); //}}AFX_DATA_MAP @@ -173,10 +178,6 @@ m_ComboItem.SetRedraw(TRUE); m_ComboItem.SetCurSel(0); - m_BtnColor[0].SubclassDlgItem(IDC_BUTTON1, this); - m_BtnColor[1].SubclassDlgItem(IDC_BUTTON2, this); - m_BtnColor[2].SubclassDlgItem(IDC_BUTTON3, this); - m_BtnPreview.SetWindowPos(nullptr, 0, 0, HighDPISupport::ScalePixels(PREVIEWBMP_WIDTH * 2, m_hWnd) + 2, HighDPISupport::ScalePixels(PREVIEWBMP_HEIGHT * 2, m_hWnd) + 2, @@ -186,10 +187,14 @@ if (TrackerSettings::Instance().m_dwPatternSetup & PATTERN_2NDHIGHLIGHT) CheckDlgButton(IDC_CHECK4, BST_CHECKED); CheckDlgButton(IDC_CHECK3, TrackerSettings::Instance().patternIgnoreSongTimeSignature ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(IDC_CHECK5, TrackerSettings::Instance().rememberSongWindows ? BST_CHECKED : BST_UNCHECKED); - SetDlgItemInt(IDC_PRIMARYHILITE, TrackerSettings::Instance().m_nRowHighlightMeasures); - SetDlgItemInt(IDC_SECONDARYHILITE, TrackerSettings::Instance().m_nRowHighlightBeats); CheckRadioButton(IDC_RADIO1, IDC_RADIO2, TrackerSettings::Instance().accidentalFlats ? IDC_RADIO2 : IDC_RADIO1); CheckRadioButton(IDC_RADIO3, IDC_RADIO5, IDC_RADIO3 + static_cast<int>(TrackerSettings::Instance().defaultRainbowChannelColors.Get())); + GetDlgItem(IDC_CHECK3)->EnableWindow((IsDlgButtonChecked(IDC_CHECK1) || IsDlgButtonChecked(IDC_CHECK4)) ? TRUE : FALSE); + + SetDlgItemInt(IDC_PRIMARYHILITE, TrackerSettings::Instance().m_nRowHighlightMeasures); + SetDlgItemInt(IDC_SECONDARYHILITE, TrackerSettings::Instance().m_nRowHighlightBeats); + m_spinRowsPerMeasure.SetRange32(0, int32_max); + m_spinRowsPerBeat.SetRange32(0, int32_max); patternFont = TrackerSettings::Instance().patternFont; m_ComboFont.SetRedraw(FALSE); @@ -531,6 +536,14 @@ } } + +void COptionsColors::OnHighlightsChanged() +{ + GetDlgItem(IDC_CHECK3)->EnableWindow((IsDlgButtonChecked(IDC_CHECK1) || IsDlgButtonChecked(IDC_CHECK4)) ? TRUE : FALSE); + OnSettingsChanged(); +} + + void COptionsColors::OnSettingsChanged() { SetModified(TRUE); Modified: trunk/OpenMPT/mptrack/ColorConfigDlg.h ============================================================================== --- trunk/OpenMPT/mptrack/ColorConfigDlg.h Mon Dec 2 19:09:28 2024 (r22451) +++ trunk/OpenMPT/mptrack/ColorConfigDlg.h Mon Dec 2 20:12:42 2024 (r22452) @@ -26,7 +26,7 @@ CComboBox m_ComboDPIAwareness, m_ComboItem, m_ComboFont, m_ComboPreset; ColorPickerButton m_BtnColor[3]; CButton m_BtnPreview; - CSpinButtonCtrl m_ColorSpin; + CSpinButtonCtrl m_ColorSpin, m_spinRowsPerBeat, m_spinRowsPerMeasure; AccessibleEdit m_rpbEdit, m_rpmEdit; CStatic m_TxtColor[3]; MODPLUGDIB *m_pPreviewDib = nullptr; @@ -52,6 +52,7 @@ afx_msg void OnUpdateDialog(); afx_msg void OnDrawItem(int nIdCtl, LPDRAWITEMSTRUCT lpdis); afx_msg void OnColorSelChanged(); + afx_msg void OnHighlightsChanged(); afx_msg void OnSettingsChanged(); afx_msg void OnSelectColor1() { SelectColor(0); } afx_msg void OnSelectColor2() { SelectColor(1); } Modified: trunk/OpenMPT/mptrack/Mptrack.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp Mon Dec 2 19:09:28 2024 (r22451) +++ trunk/OpenMPT/mptrack/Mptrack.cpp Mon Dec 2 20:12:42 2024 (r22452) @@ -1310,7 +1310,9 @@ HighDPISupport::SetDPIAwareness(HighDPISupport::Mode::HighDpiPerMonitor); break; default: - MPT_ASSERT_NOTREACHED(); + // Malformed entry in INI file + TrackerSettings::Instance().dpiAwareness = DPIAwarenessMode::PerMonitorDPIAware; + HighDPISupport::SetDPIAwareness(HighDPISupport::Mode::HighDpiPerMonitor); break; } Modified: trunk/OpenMPT/mptrack/mptrack.rc ============================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc Mon Dec 2 19:09:28 2024 (r22451) +++ trunk/OpenMPT/mptrack/mptrack.rc Mon Dec 2 20:12:42 2024 (r22452) @@ -1327,24 +1327,26 @@ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,121,168,10 PUSHBUTTON "Clear Song Cac&he",IDC_BUTTON11,186,119,78,12 CONTROL "&Primary highlight",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,137,84,10 - EDITTEXT IDC_PRIMARYHILITE,102,137,24,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "Rows per measure (default)",IDC_STATIC,132,140,144,8 + EDITTEXT IDC_PRIMARYHILITE,102,137,36,12,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,122,137,10,14 + LTEXT "Rows per measure (default)",IDC_STATIC,144,140,132,8 CONTROL "Secondar&y highlight",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,156,80,10 - EDITTEXT IDC_SECONDARYHILITE,102,156,24,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "Rows per beat (default)",IDC_STATIC,132,159,144,8 + EDITTEXT IDC_SECONDARYHILITE,102,156,36,12,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN3,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,120,156,11,14 + LTEXT "Rows per beat (default)",IDC_STATIC,144,159,132,8 CONTROL "Always use default highlight &values instead of songs' time signatures",IDC_CHECK3, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,174,258,10 GROUPBOX "Colours",IDC_STATIC,6,204,312,102 LTEXT "Select colo&ur for:",IDC_STATIC,18,218,63,8 - CONTROL "",IDC_SPIN1,"msctls_updown32",UDS_ARROWKEYS,84,216,11,12 COMBOBOX IDC_COMBO1,96,216,156,109,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "",IDC_SPIN1,"msctls_updown32",UDS_ARROWKEYS | WS_TABSTOP,84,216,11,12 CONTROL "",IDC_BUTTON4,"Button",BS_OWNERDRAW | BS_FLAT,18,234,120,48 - LTEXT "C1",IDC_TEXT1,144,237,108,8 - CONTROL "Change &1",IDC_BUTTON1,"Button",BS_OWNERDRAW,258,234,51,12 - LTEXT "C2",IDC_TEXT2,144,254,108,8 - CONTROL "Change &2",IDC_BUTTON2,"Button",BS_OWNERDRAW,258,252,51,12 - LTEXT "C3",IDC_TEXT3,144,272,108,8 - CONTROL "Change &3",IDC_BUTTON3,"Button",BS_OWNERDRAW,258,270,51,12 + RTEXT "C1",IDC_TEXT1,144,237,108,8 + CONTROL "Change &1",IDC_BUTTON1,"Button",BS_OWNERDRAW | WS_TABSTOP,258,234,51,12 + RTEXT "C2",IDC_TEXT2,144,254,108,8 + CONTROL "Change &2",IDC_BUTTON2,"Button",BS_OWNERDRAW | WS_TABSTOP,258,252,51,12 + RTEXT "C3",IDC_TEXT3,144,272,108,8 + CONTROL "Change &3",IDC_BUTTON3,"Button",BS_OWNERDRAW | WS_TABSTOP,258,270,51,12 LTEXT "Presets:",IDC_STATIC,18,291,36,8 PUSHBUTTON "&Load...",IDC_LOAD_COLORSCHEME,54,288,42,15 PUSHBUTTON "S&ave...",IDC_SAVE_COLORSCHEME,102,288,42,15 |
From: <sv...@op...> - 2024-12-02 18:09:34
|
Author: sagamusix Date: Mon Dec 2 19:09:28 2024 New Revision: 22451 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22451 Log: [Mod] Extend IT sample compression test to also cover lower bit widths. Modified: trunk/OpenMPT/test/test.cpp Modified: trunk/OpenMPT/test/test.cpp ============================================================================== --- trunk/OpenMPT/test/test.cpp Mon Dec 2 11:40:25 2024 (r22450) +++ trunk/OpenMPT/test/test.cpp Mon Dec 2 19:09:28 2024 (r22451) @@ -3987,12 +3987,22 @@ static MPT_NOINLINE void TestITCompression() { // Test loading / saving of IT-compressed samples - const int sampleDataSize = 65536; + constexpr int sampleDataSize = 131072; std::vector<int8> sampleData(sampleDataSize, 0); for(int i = 0; i < sampleDataSize; i++) { sampleData[i] = mpt::random<int8>(*s_PRNG); } + // Fade in the first half of the sample so that we test lower bit widths as well + for(int i = 0; i < sampleDataSize / 2; i++) + { + sampleData[i] = static_cast<int8>(Util::muldivr(sampleData[i], i, sampleDataSize / 2)); + } + // Add a few irregularities to the signal to provoke temporary switches to higher bit width + for(int i = 99; i < sampleDataSize / 2; i += 100) + { + sampleData[i] ^= 99; + } // Run each compression test with IT215 compression and without. for(int i = 0; i < 2; i++) |
From: <sv...@op...> - 2024-12-02 10:40:37
|
Author: manx Date: Mon Dec 2 11:40:25 2024 New Revision: 22450 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22450 Log: [Ref] Test: Remove bogus srand() call. Modified: trunk/OpenMPT/test/test.cpp Modified: trunk/OpenMPT/test/test.cpp ============================================================================== --- trunk/OpenMPT/test/test.cpp Mon Dec 2 11:32:06 2024 (r22449) +++ trunk/OpenMPT/test/test.cpp Mon Dec 2 11:40:25 2024 (r22450) @@ -3989,7 +3989,6 @@ // Test loading / saving of IT-compressed samples const int sampleDataSize = 65536; std::vector<int8> sampleData(sampleDataSize, 0); - std::srand(0); for(int i = 0; i < sampleDataSize; i++) { sampleData[i] = mpt::random<int8>(*s_PRNG); |
From: <sv...@op...> - 2024-12-02 10:32:24
|
Author: manx Date: Mon Dec 2 11:32:06 2024 New Revision: 22449 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22449 Log: Merged revision(s) 22447 from trunk/OpenMPT: [Ref] IT Compression: Make clang static analyzer happy. ........ Modified: branches/OpenMPT-1.30/ (props changed) branches/OpenMPT-1.30/soundlib/ITCompression.cpp Modified: branches/OpenMPT-1.30/soundlib/ITCompression.cpp ============================================================================== --- branches/OpenMPT-1.30/soundlib/ITCompression.cpp Mon Dec 2 11:31:43 2024 (r22448) +++ branches/OpenMPT-1.30/soundlib/ITCompression.cpp Mon Dec 2 11:32:06 2024 (r22449) @@ -154,10 +154,11 @@ { if(bwt[i] != width) { + MPT_ASSERT(width >= 0); if(width <= 6) { // Mode A: 1 to 6 bits - MPT_ASSERT(width); + MPT_ASSERT(width != 0); WriteBits(width, (1 << (width - 1))); WriteBits(Properties::fetchA, ConvertWidth(width, bwt[i])); } else if(width < Properties::defWidth) |
From: <sv...@op...> - 2024-12-02 10:31:55
|
Author: manx Date: Mon Dec 2 11:31:43 2024 New Revision: 22448 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22448 Log: Merged revision(s) 22447 from trunk/OpenMPT: [Ref] IT Compression: Make clang static analyzer happy. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/soundlib/ITCompression.cpp Modified: branches/OpenMPT-1.31/soundlib/ITCompression.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/ITCompression.cpp Mon Dec 2 11:21:28 2024 (r22447) +++ branches/OpenMPT-1.31/soundlib/ITCompression.cpp Mon Dec 2 11:31:43 2024 (r22448) @@ -154,10 +154,11 @@ { if(bwt[i] != width) { + MPT_ASSERT(width >= 0); if(width <= 6) { // Mode A: 1 to 6 bits - MPT_ASSERT(width); + MPT_ASSERT(width != 0); WriteBits(width, (1 << (width - 1))); WriteBits(Properties::fetchA, ConvertWidth(width, bwt[i])); } else if(width < Properties::defWidth) |
From: <sv...@op...> - 2024-12-02 10:21:34
|
Author: manx Date: Mon Dec 2 11:21:28 2024 New Revision: 22447 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22447 Log: [Ref] IT Compression: Make clang static analyzer happy. Modified: trunk/OpenMPT/soundlib/ITCompression.cpp Modified: trunk/OpenMPT/soundlib/ITCompression.cpp ============================================================================== --- trunk/OpenMPT/soundlib/ITCompression.cpp Mon Dec 2 10:51:07 2024 (r22446) +++ trunk/OpenMPT/soundlib/ITCompression.cpp Mon Dec 2 11:21:28 2024 (r22447) @@ -155,10 +155,11 @@ { if(bwt[i] != width) { + MPT_ASSERT(width >= 0); if(width <= 6) { // Mode A: 1 to 6 bits - MPT_ASSERT(width); + MPT_ASSERT(width != 0); WriteBits(width, (1 << (width - 1))); WriteBits(Properties::fetchA, ConvertWidth(width, bwt[i])); } else if(width < Properties::defWidth) |
From: <sv...@op...> - 2024-12-02 09:51:19
|
Author: manx Date: Mon Dec 2 10:51:07 2024 New Revision: 22446 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22446 Log: Merged revision(s) 22445 from branches/OpenMPT-1.29: [Mod] build: Makefile: Remove -ffast-math in order to avoid warnings with modern Clang. See r15720. ........ Modified: branches/OpenMPT-1.28/ (props changed) branches/OpenMPT-1.28/Makefile Modified: branches/OpenMPT-1.28/Makefile ============================================================================== --- branches/OpenMPT-1.28/Makefile Mon Dec 2 10:49:12 2024 (r22445) +++ branches/OpenMPT-1.28/Makefile Mon Dec 2 10:51:07 2024 (r22446) @@ -346,8 +346,8 @@ CFLAGS += -O0 -g -fno-omit-frame-pointer else ifeq ($(OPTIMIZE_SIZE),1) -CXXFLAGS += -Os -ffast-math -CFLAGS += -Os -ffast-math -fno-strict-aliasing +CXXFLAGS += -Os +CFLAGS += -Os -fno-strict-aliasing LDFLAGS += ifeq ($(MPT_COMPILER_NOGCSECTIONS),1) else @@ -357,8 +357,8 @@ endif else ifeq ($(OPTIMIZE),1) -CXXFLAGS += -O3 -ffast-math -CFLAGS += -O3 -ffast-math -fno-strict-aliasing +CXXFLAGS += -O3 +CFLAGS += -O3 -fno-strict-aliasing endif endif endif |
From: <sv...@op...> - 2024-12-02 09:49:30
|
Author: manx Date: Mon Dec 2 10:49:12 2024 New Revision: 22445 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22445 Log: [Mod] build: Makefile: Remove -ffast-math in order to avoid warnings with modern Clang. See r15720. Modified: branches/OpenMPT-1.29/Makefile Modified: branches/OpenMPT-1.29/Makefile ============================================================================== --- branches/OpenMPT-1.29/Makefile Mon Dec 2 10:42:45 2024 (r22444) +++ branches/OpenMPT-1.29/Makefile Mon Dec 2 10:49:12 2024 (r22445) @@ -347,8 +347,8 @@ CFLAGS += -O0 -g -fno-omit-frame-pointer else ifeq ($(OPTIMIZE_SIZE),1) -CXXFLAGS += -Os -ffast-math -CFLAGS += -Os -ffast-math -fno-strict-aliasing +CXXFLAGS += -Os +CFLAGS += -Os -fno-strict-aliasing LDFLAGS += ifeq ($(MPT_COMPILER_NOGCSECTIONS),1) else @@ -358,8 +358,8 @@ endif else ifeq ($(OPTIMIZE),1) -CXXFLAGS += -O3 -ffast-math -CFLAGS += -O3 -ffast-math -fno-strict-aliasing +CXXFLAGS += -O3 +CFLAGS += -O3 -fno-strict-aliasing endif endif endif |
From: <sv...@op...> - 2024-12-02 09:42:58
|
Author: manx Date: Mon Dec 2 10:42:45 2024 New Revision: 22444 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22444 Log: [Ref] Silence Clang warnings. Modified: trunk/OpenMPT/mptrack/mod2midi.cpp trunk/OpenMPT/mptrack/plugins/MidiInOutEditor.cpp Modified: trunk/OpenMPT/mptrack/mod2midi.cpp ============================================================================== --- trunk/OpenMPT/mptrack/mod2midi.cpp Sun Dec 1 23:21:05 2024 (r22443) +++ trunk/OpenMPT/mptrack/mod2midi.cpp Mon Dec 2 10:42:45 2024 (r22444) @@ -132,9 +132,9 @@ , m_sndFile{sndFile} , m_subsongInfo{subsongInfo} , m_tempoTrack{tempoTrack} + , m_originalPlugin{originalPlugin} , m_sampleRate{sndFile.GetSampleRate()} , m_overlappingInstruments{overlappingInstruments} - , m_originalPlugin{originalPlugin} { // Write instrument / song name WriteString(kTrackName, name); Modified: trunk/OpenMPT/mptrack/plugins/MidiInOutEditor.cpp ============================================================================== --- trunk/OpenMPT/mptrack/plugins/MidiInOutEditor.cpp Sun Dec 1 23:21:05 2024 (r22443) +++ trunk/OpenMPT/mptrack/plugins/MidiInOutEditor.cpp Mon Dec 2 10:42:45 2024 (r22444) @@ -75,7 +75,7 @@ CheckDlgButton(IDC_CHECK2, plugin.m_alwaysSendInitialDump ? BST_UNCHECKED : BST_CHECKED); UpdateMidiDump(); m_paramCombo.SetRedraw(FALSE); - for(int i = MidiInOut::kMacroParamMin; i <= MidiInOut::kMacroParamMax; i++) + for(unsigned int i = MidiInOut::kMacroParamMin; i <= MidiInOut::kMacroParamMax; i++) { m_paramCombo.AddString(MPT_CFORMAT("Parameter {}")(i)); } |
From: <sv...@op...> - 2024-12-01 22:21:11
|
Author: sagamusix Date: Sun Dec 1 23:21:05 2024 New Revision: 22443 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22443 Log: [Mod] Rearrange Keyboard settings UI a bit. Modified: trunk/OpenMPT/mptrack/mptrack.rc Modified: trunk/OpenMPT/mptrack/mptrack.rc ============================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc Sun Dec 1 23:17:02 2024 (r22442) +++ trunk/OpenMPT/mptrack/mptrack.rc Sun Dec 1 23:21:05 2024 (r22443) @@ -1284,14 +1284,14 @@ PUSHBUTTON "C&lear",IDC_BUTTON3,276,180,44,12 GROUPBOX "&Key setup for selected command",IDC_GROUPBOX_KEYSETUP,6,198,312,66 COMBOBOX IDC_CHOICECOMBO,12,210,84,51,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Key:",IDC_STATIC,102,212,16,8 - EDITTEXT IDC_CUSTHOTKEY,120,210,72,13,ES_AUTOHSCROLL | ES_READONLY - PUSHBUTTON "&Set",IDC_BUTTON1,198,210,37,13 - PUSHBUTTON "&Restore",IDC_RESTORE,240,210,37,13 - PUSHBUTTON "&Delete Choice",IDC_DELETE,198,228,79,13 + LTEXT "Keys:",IDC_STATIC,102,212,19,8 + EDITTEXT IDC_CUSTHOTKEY,126,210,90,13,ES_AUTOHSCROLL | ES_READONLY + PUSHBUTTON "&Set",IDC_BUTTON1,222,210,43,13 + PUSHBUTTON "&Restore",IDC_RESTORE,270,210,43,13 + PUSHBUTTON "&Delete Choice",IDC_DELETE,222,228,91,13 CONTROL "On Key Down",IDC_CHECKKEYDOWN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,230,66,8 - CONTROL "On Key Hold",IDC_CHECKKEYHOLD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,78,230,60,8 - CONTROL "On Key Up",IDC_CHECKKEYUP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,230,54,8 + CONTROL "On Key Hold",IDC_CHECKKEYHOLD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,84,230,60,8 + CONTROL "On Key Up",IDC_CHECKKEYUP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,150,230,60,8 ICON "",IDC_STATIC1,12,247,20,20,SS_CENTERIMAGE | SS_REALSIZEIMAGE | NOT WS_VISIBLE LTEXT "No conflicts found.",IDC_KEYREPORT,26,248,286,13 CONTROL "Repeat Note Keys on Hold",IDC_NOTESREPEAT,"Button",BS_3STATE | WS_TABSTOP,6,270,144,12 |
From: <sv...@op...> - 2024-12-01 22:17:14
|
Author: sagamusix Date: Sun Dec 1 23:17:02 2024 New Revision: 22442 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22442 Log: [Mod] Add mnemonics for newly-added options. Modified: trunk/OpenMPT/mptrack/mptrack.rc Modified: trunk/OpenMPT/mptrack/mptrack.rc ============================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc Sun Dec 1 23:13:00 2024 (r22441) +++ trunk/OpenMPT/mptrack/mptrack.rc Sun Dec 1 23:17:02 2024 (r22442) @@ -1295,7 +1295,7 @@ ICON "",IDC_STATIC1,12,247,20,20,SS_CENTERIMAGE | SS_REALSIZEIMAGE | NOT WS_VISIBLE LTEXT "No conflicts found.",IDC_KEYREPORT,26,248,286,13 CONTROL "Repeat Note Keys on Hold",IDC_NOTESREPEAT,"Button",BS_3STATE | WS_TABSTOP,6,270,144,12 - LTEXT "Chord detect interval (ms):",IDC_STATIC,156,272,126,8 + LTEXT "Chord detect interval (ms):",IDC_STATIC,186,272,96,8 EDITTEXT IDC_CHORDDETECTWAITTIME,288,270,30,12,ES_AUTOHSCROLL | ES_NUMBER PUSHBUTTON "&Import Key Map...",IDC_LOAD,6,288,84,16 PUSHBUTTON "&Export Key Map...",IDC_SAVE,96,288,84,16 @@ -1308,7 +1308,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "",IDC_STATIC,6,6,312,192 - LTEXT "DPI Awareness:",IDC_STATIC,18,20,54,8 + LTEXT "DP&I Awareness:",IDC_STATIC,18,20,54,8 COMBOBOX IDC_COMBO4,78,18,174,66,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Pattern &Font:",IDC_STATIC,18,39,54,8 COMBOBOX IDC_COMBO2,78,36,174,66,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP @@ -1332,7 +1332,7 @@ CONTROL "Secondar&y highlight",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,156,80,10 EDITTEXT IDC_SECONDARYHILITE,102,156,24,12,ES_AUTOHSCROLL | ES_NUMBER LTEXT "Rows per beat (default)",IDC_STATIC,132,159,144,8 - CONTROL "Always use default highlight values instead of songs' time signatures",IDC_CHECK3, + CONTROL "Always use default highlight &values instead of songs' time signatures",IDC_CHECK3, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,174,258,10 GROUPBOX "Colours",IDC_STATIC,6,204,312,102 LTEXT "Select colo&ur for:",IDC_STATIC,18,218,63,8 |
From: <sv...@op...> - 2024-12-01 22:13:07
|
Author: sagamusix Date: Sun Dec 1 23:13:00 2024 New Revision: 22441 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22441 Log: [Mod] Turn Pattern Editor.IgnoreSongTimeSignature into an official setting editable via the Display settings. Modified: trunk/OpenMPT/mptrack/ColorConfigDlg.cpp trunk/OpenMPT/mptrack/mptrack.rc Modified: trunk/OpenMPT/mptrack/ColorConfigDlg.cpp ============================================================================== --- trunk/OpenMPT/mptrack/ColorConfigDlg.cpp Sun Dec 1 23:06:51 2024 (r22440) +++ trunk/OpenMPT/mptrack/ColorConfigDlg.cpp Sun Dec 1 23:13:00 2024 (r22441) @@ -184,6 +184,7 @@ if (TrackerSettings::Instance().m_dwPatternSetup & PATTERN_STDHIGHLIGHT) CheckDlgButton(IDC_CHECK1, BST_CHECKED); if (TrackerSettings::Instance().m_dwPatternSetup & PATTERN_EFFECTHILIGHT) CheckDlgButton(IDC_CHECK2, BST_CHECKED); if (TrackerSettings::Instance().m_dwPatternSetup & PATTERN_2NDHIGHLIGHT) CheckDlgButton(IDC_CHECK4, BST_CHECKED); + CheckDlgButton(IDC_CHECK3, TrackerSettings::Instance().patternIgnoreSongTimeSignature ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(IDC_CHECK5, TrackerSettings::Instance().rememberSongWindows ? BST_CHECKED : BST_UNCHECKED); SetDlgItemInt(IDC_PRIMARYHILITE, TrackerSettings::Instance().m_nRowHighlightMeasures); SetDlgItemInt(IDC_SECONDARYHILITE, TrackerSettings::Instance().m_nRowHighlightBeats); @@ -267,6 +268,7 @@ if(IsDlgButtonChecked(IDC_CHECK1)) TrackerSettings::Instance().m_dwPatternSetup |= PATTERN_STDHIGHLIGHT; if(IsDlgButtonChecked(IDC_CHECK2)) TrackerSettings::Instance().m_dwPatternSetup |= PATTERN_EFFECTHILIGHT; if(IsDlgButtonChecked(IDC_CHECK4)) TrackerSettings::Instance().m_dwPatternSetup |= PATTERN_2NDHIGHLIGHT; + TrackerSettings::Instance().patternIgnoreSongTimeSignature = IsDlgButtonChecked(IDC_CHECK3) != BST_UNCHECKED; TrackerSettings::Instance().rememberSongWindows = IsDlgButtonChecked(IDC_CHECK5) != BST_UNCHECKED; TrackerSettings::Instance().accidentalFlats = IsDlgButtonChecked(IDC_RADIO2) != BST_UNCHECKED; Modified: trunk/OpenMPT/mptrack/mptrack.rc ============================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc Sun Dec 1 23:06:51 2024 (r22440) +++ trunk/OpenMPT/mptrack/mptrack.rc Sun Dec 1 23:13:00 2024 (r22441) @@ -1332,7 +1332,8 @@ CONTROL "Secondar&y highlight",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,156,80,10 EDITTEXT IDC_SECONDARYHILITE,102,156,24,12,ES_AUTOHSCROLL | ES_NUMBER LTEXT "Rows per beat (default)",IDC_STATIC,132,159,144,8 - LTEXT "Note: Songs' time signatures will override the default highlight values",IDC_STATIC,18,172,258,8 + CONTROL "Always use default highlight values instead of songs' time signatures",IDC_CHECK3, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,174,258,10 GROUPBOX "Colours",IDC_STATIC,6,204,312,102 LTEXT "Select colo&ur for:",IDC_STATIC,18,218,63,8 CONTROL "",IDC_SPIN1,"msctls_updown32",UDS_ARROWKEYS,84,216,11,12 |
From: <sv...@op...> - 2024-12-01 22:07:28
|
Author: sagamusix Revision: 22440 Property Name: svn:log Action: modified Property diff: --- old property value +++ new property value @@ -1,2 +1,3 @@ [Imp] Allow DPI-awareness to be set in the Display options directly, without the need to edit hidden settings. System-DPI-aware mode is now also supported. -[Mod] The old Display.HighResUI and Display.UseGDIUpscaling settings are gone. They are not migrated. \ No newline at end of file +[Mod] The old Display.HighResUI and Display.UseGDIUpscaling settings are gone. They are not migrated. +[Mod] OpenMPT is now per-monitor DPI-aware by default. \ No newline at end of file |
From: <sv...@op...> - 2024-12-01 22:07:04
|
Author: sagamusix Date: Sun Dec 1 23:06:51 2024 New Revision: 22440 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22440 Log: [Imp] Allow DPI-awareness to be set in the Display options directly, without the need to edit hidden settings. System-DPI-aware mode is now also supported. [Mod] The old Display.HighResUI and Display.UseGDIUpscaling settings are gone. They are not migrated. Modified: trunk/OpenMPT/mptrack/ColorConfigDlg.cpp trunk/OpenMPT/mptrack/ColorConfigDlg.h trunk/OpenMPT/mptrack/HighDPISupport.cpp trunk/OpenMPT/mptrack/HighDPISupport.h trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/TrackerSettings.cpp trunk/OpenMPT/mptrack/TrackerSettings.h trunk/OpenMPT/mptrack/mptrack.rc Modified: trunk/OpenMPT/mptrack/ColorConfigDlg.cpp ============================================================================== --- trunk/OpenMPT/mptrack/ColorConfigDlg.cpp Sun Dec 1 22:19:08 2024 (r22439) +++ trunk/OpenMPT/mptrack/ColorConfigDlg.cpp Sun Dec 1 23:06:51 2024 (r22440) @@ -108,6 +108,7 @@ DDX_Control(pDX, IDC_COMBO1, m_ComboItem); DDX_Control(pDX, IDC_COMBO2, m_ComboFont); DDX_Control(pDX, IDC_COMBO3, m_ComboPreset); + DDX_Control(pDX, IDC_COMBO4, m_ComboDPIAwareness); DDX_Control(pDX, IDC_BUTTON4, m_BtnPreview); DDX_Control(pDX, IDC_TEXT1, m_TxtColor[0]); DDX_Control(pDX, IDC_TEXT2, m_TxtColor[1]); @@ -143,11 +144,33 @@ BOOL COptionsColors::OnInitDialog() { CPropertyPage::OnInitDialog(); + m_pPreviewDib = LoadDib(MAKEINTRESOURCE(IDB_COLORSETUP)); + + m_ComboDPIAwareness.SetRedraw(FALSE); + static constexpr std::pair<const TCHAR *, DPIAwarenessMode> DPIModes[] = + { + {_T("Not DPI-Aware"), DPIAwarenessMode::NoDPIAwareness }, + {_T("Not DPI-Aware; GDI upscaling"), DPIAwarenessMode::NoDPIAwarenessGDIUpscaled}, + {_T("System DPI-Aware"), DPIAwarenessMode::SystemDPIAware }, + {_T("Per-Monitor DPI-Aware"), DPIAwarenessMode::PerMonitorDPIAware }, + }; + const DPIAwarenessMode currentDPIMode = TrackerSettings::Instance().dpiAwareness; + for(const auto dpiMode : DPIModes) + { + int item = m_ComboDPIAwareness.AddString(dpiMode.first); + m_ComboDPIAwareness.SetItemData(item, static_cast<DWORD_PTR>(dpiMode.second)); + if(currentDPIMode == dpiMode.second) + m_ComboDPIAwareness.SetCurSel(item); + } + m_ComboDPIAwareness.SetRedraw(TRUE); + + m_ComboItem.SetRedraw(FALSE); for (size_t i = 0; i < std::size(colorDefs); i++) { m_ComboItem.SetItemData(m_ComboItem.AddString(colorDefs[i].name), i); } + m_ComboItem.SetRedraw(TRUE); m_ComboItem.SetCurSel(0); m_BtnColor[0].SubclassDlgItem(IDC_BUTTON1, this); @@ -168,6 +191,7 @@ CheckRadioButton(IDC_RADIO3, IDC_RADIO5, IDC_RADIO3 + static_cast<int>(TrackerSettings::Instance().defaultRainbowChannelColors.Get())); patternFont = TrackerSettings::Instance().patternFont; + m_ComboFont.SetRedraw(FALSE); m_ComboFont.AddString(_T("Built-in (small)")); m_ComboFont.AddString(_T("Built-in (large)")); m_ComboFont.AddString(_T("Built-in (small, x2)")); @@ -186,6 +210,7 @@ m_ComboFont.AddString(FormatFontName(patternFont)); sel = 6; } + m_ComboFont.SetRedraw(TRUE); m_ComboFont.SetCurSel(sel); commentFont = TrackerSettings::Instance().commentsFont; @@ -227,6 +252,17 @@ void COptionsColors::OnOK() { + if(m_ComboDPIAwareness.GetCurSel() >= 0) + { + const DPIAwarenessMode currentDPIMode = TrackerSettings::Instance().dpiAwareness; + const DPIAwarenessMode newDPIMode = static_cast<DPIAwarenessMode>(m_ComboDPIAwareness.GetItemData(m_ComboDPIAwareness.GetCurSel())); + if(newDPIMode != currentDPIMode) + { + TrackerSettings::Instance().dpiAwareness = newDPIMode; + Reporting::Information(_T("You need to restart OpenMPT for the new DPI-awareness setting to take effect.")); + } + } + TrackerSettings::Instance().m_dwPatternSetup &= ~(PATTERN_STDHIGHLIGHT|PATTERN_2NDHIGHLIGHT|PATTERN_EFFECTHILIGHT); if(IsDlgButtonChecked(IDC_CHECK1)) TrackerSettings::Instance().m_dwPatternSetup |= PATTERN_STDHIGHLIGHT; if(IsDlgButtonChecked(IDC_CHECK2)) TrackerSettings::Instance().m_dwPatternSetup |= PATTERN_EFFECTHILIGHT; Modified: trunk/OpenMPT/mptrack/ColorConfigDlg.h ============================================================================== --- trunk/OpenMPT/mptrack/ColorConfigDlg.h Sun Dec 1 22:19:08 2024 (r22439) +++ trunk/OpenMPT/mptrack/ColorConfigDlg.h Sun Dec 1 23:06:51 2024 (r22440) @@ -23,7 +23,7 @@ { protected: std::array<COLORREF, MAX_MODCOLORS> CustomColors; - CComboBox m_ComboItem, m_ComboFont, m_ComboPreset; + CComboBox m_ComboDPIAwareness, m_ComboItem, m_ComboFont, m_ComboPreset; ColorPickerButton m_BtnColor[3]; CButton m_BtnPreview; CSpinButtonCtrl m_ColorSpin; Modified: trunk/OpenMPT/mptrack/HighDPISupport.cpp ============================================================================== --- trunk/OpenMPT/mptrack/HighDPISupport.cpp Sun Dec 1 22:19:08 2024 (r22439) +++ trunk/OpenMPT/mptrack/HighDPISupport.cpp Sun Dec 1 23:06:51 2024 (r22440) @@ -57,6 +57,20 @@ }; +static HANDLE DPIModeToContext(HighDPISupport::Mode mode) +{ + switch (mode) + { + case HighDPISupport::Mode::LowDpi: return HANDLE(MPT_DPI_AWARENESS_CONTEXT_UNAWARE); + case HighDPISupport::Mode::LowDpiUpscaled: return HANDLE(MPT_DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED); + case HighDPISupport::Mode::HighDpiSystem: return HANDLE(MPT_DPI_AWARENESS_CONTEXT_SYSTEM_AWARE); + case HighDPISupport::Mode::HighDpiPerMonitor: return HANDLE(MPT_DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2); + } + MPT_ASSERT_NOTREACHED(); + return HANDLE(MPT_DPI_AWARENESS_CONTEXT_UNAWARE); +} + + static HighDPISupportData *GetHighDPISupportData() { static std::unique_ptr<HighDPISupportData> highDPISupportData; @@ -70,7 +84,6 @@ void HighDPISupport::SetDPIAwareness(Mode mode) { auto instance = GetHighDPISupportData(); - bool setDPI = false; // For Windows 10, Creators Update (1703) and newer if(instance->m_user32.IsValid()) { @@ -78,29 +91,27 @@ PSETPROCESSDPIAWARENESSCONTEXT SetProcessDpiAwarenessContext = nullptr; if(instance->m_user32.Bind(SetProcessDpiAwarenessContext, "SetProcessDpiAwarenessContext")) { - if(mode == Mode::HighDpi) - setDPI = (SetProcessDpiAwarenessContext(HANDLE(MPT_DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2)) == TRUE); - else if(mode == Mode::LowDpiUpscaled && SetProcessDpiAwarenessContext(HANDLE(MPT_DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED)) == TRUE) - setDPI = true; - else - setDPI = (SetProcessDpiAwarenessContext(HANDLE(MPT_DPI_AWARENESS_CONTEXT_UNAWARE)) == TRUE); + if(SetProcessDpiAwarenessContext(DPIModeToContext(mode)) == TRUE) + return; } } // For Windows 8.1 and newer - if(!setDPI) + const bool highDPI = (mode == Mode::HighDpiSystem || mode == Mode::HighDpiPerMonitor); + mpt::Library shcore(mpt::LibraryPath::System(P_("SHCore"))); + if(shcore.IsValid()) { - mpt::Library shcore(mpt::LibraryPath::System(P_("SHCore"))); - if(shcore.IsValid()) + using PSETPROCESSDPIAWARENESS = HRESULT(WINAPI *)(int); + PSETPROCESSDPIAWARENESS SetProcessDPIAwareness = nullptr; + if(shcore.Bind(SetProcessDPIAwareness, "SetProcessDpiAwareness")) { - using PSETPROCESSDPIAWARENESS = HRESULT(WINAPI *)(int); - PSETPROCESSDPIAWARENESS SetProcessDPIAwareness = nullptr; - if(shcore.Bind(SetProcessDPIAwareness, "SetProcessDpiAwareness")) - setDPI = (SetProcessDPIAwareness(mode == Mode::HighDpi ? 2 : 0) == S_OK); + if(SetProcessDPIAwareness(highDPI ? 2 : 0) == S_OK) + return; } } + // For Vista and newer - if(!setDPI && mode == Mode::HighDpi && instance->m_user32.IsValid()) + if(highDPI && instance->m_user32.IsValid()) { using PSETPROCESSDPIAWARE = BOOL(WINAPI *)(); PSETPROCESSDPIAWARE SetProcessDPIAware = nullptr; @@ -199,7 +210,7 @@ HighDPISupport::DPIAwarenessBypass::DPIAwarenessBypass(Mode forceMode) { if(auto instance = GetHighDPISupportData(); instance->m_SetThreadDpiAwarenessContext) - m_previous = instance->m_SetThreadDpiAwarenessContext(HANDLE((forceMode == Mode::HighDpi) ? MPT_DPI_AWARENESS_CONTEXT_SYSTEM_AWARE : MPT_DPI_AWARENESS_CONTEXT_UNAWARE)); + m_previous = instance->m_SetThreadDpiAwarenessContext(DPIModeToContext(forceMode)); } Modified: trunk/OpenMPT/mptrack/HighDPISupport.h ============================================================================== --- trunk/OpenMPT/mptrack/HighDPISupport.h Sun Dec 1 22:19:08 2024 (r22439) +++ trunk/OpenMPT/mptrack/HighDPISupport.h Sun Dec 1 23:06:51 2024 (r22440) @@ -30,7 +30,8 @@ { LowDpi, LowDpiUpscaled, - HighDpi, + HighDpiSystem, + HighDpiPerMonitor, }; void SetDPIAwareness(Mode mode); @@ -64,7 +65,7 @@ class DPIAwarenessBypass { public: - DPIAwarenessBypass(Mode forceMode = Mode::HighDpi); + DPIAwarenessBypass(Mode forceMode = Mode::HighDpiSystem); ~DPIAwarenessBypass(); private: Modified: trunk/OpenMPT/mptrack/Mptrack.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp Sun Dec 1 22:19:08 2024 (r22439) +++ trunk/OpenMPT/mptrack/Mptrack.cpp Sun Dec 1 23:06:51 2024 (r22440) @@ -1295,12 +1295,24 @@ #endif // Dynamic DPI-awareness. Some users might want to disable DPI-awareness because of their DPI-unaware VST plugins. - if(TrackerSettings::Instance().highResUI) - HighDPISupport::SetDPIAwareness(HighDPISupport::Mode::HighDpi); - else if(TrackerSettings::Instance().useGDIUpcaling) - HighDPISupport::SetDPIAwareness(HighDPISupport::Mode::LowDpiUpscaled); - else + switch(TrackerSettings::Instance().dpiAwareness) + { + case DPIAwarenessMode::NoDPIAwareness: HighDPISupport::SetDPIAwareness(HighDPISupport::Mode::LowDpi); + break; + case DPIAwarenessMode::NoDPIAwarenessGDIUpscaled: + HighDPISupport::SetDPIAwareness(HighDPISupport::Mode::LowDpiUpscaled); + break; + case DPIAwarenessMode::SystemDPIAware: + HighDPISupport::SetDPIAwareness(HighDPISupport::Mode::HighDpiSystem); + break; + case DPIAwarenessMode::PerMonitorDPIAware: + HighDPISupport::SetDPIAwareness(HighDPISupport::Mode::HighDpiPerMonitor); + break; + default: + MPT_ASSERT_NOTREACHED(); + break; + } // create main MDI Frame window CMainFrame *pMainFrame = new CMainFrame(); Modified: trunk/OpenMPT/mptrack/TrackerSettings.cpp ============================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.cpp Sun Dec 1 22:19:08 2024 (r22439) +++ trunk/OpenMPT/mptrack/TrackerSettings.cpp Sun Dec 1 23:06:51 2024 (r22440) @@ -182,8 +182,7 @@ // Display , m_ShowSplashScreen(conf, UL_("Display"), UL_("ShowSplashScreen"), true) , gbMdiMaximize(conf, UL_("Display"), UL_("MDIMaximize"), true) - , highResUI(conf, UL_("Display"), UL_("HighResUI"), false) - , useGDIUpcaling(conf, UL_("Display"), UL_("UseGDIUpscaling"), true) + , dpiAwareness(conf, UL_("Display"), UL_("DPIAwareness"), DPIAwarenessMode::PerMonitorDPIAware) , glTreeSplitRatio(conf, UL_("Display"), UL_("MDITreeRatio"), 128) , glTreeWindowWidth(conf, UL_("Display"), UL_("MDITreeWidth"), 160) , glGeneralWindowHeight(conf, UL_("Display"), UL_("MDIGeneralHeight"), 222) Modified: trunk/OpenMPT/mptrack/TrackerSettings.h ============================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.h Sun Dec 1 22:19:08 2024 (r22439) +++ trunk/OpenMPT/mptrack/TrackerSettings.h Sun Dec 1 23:06:51 2024 (r22440) @@ -266,6 +266,13 @@ Random, }; +enum class DPIAwarenessMode +{ + NoDPIAwareness = 0, + NoDPIAwarenessGDIUpscaled, + SystemDPIAware, + PerMonitorDPIAware, +}; class SampleUndoBufferSize { @@ -323,6 +330,9 @@ template<> inline SettingValue ToSettingValue(const DefaultChannelColors & val) { return SettingValue(int32(val)); } template<> inline DefaultChannelColors FromSettingValue(const SettingValue& val) { return DefaultChannelColors(val.as<int32>()); } +template<> inline SettingValue ToSettingValue(const DPIAwarenessMode &val) { return SettingValue(int32(val)); } +template<> inline DPIAwarenessMode FromSettingValue(const SettingValue &val) { return DPIAwarenessMode(val.as<int32>()); } + template<> inline SettingValue ToSettingValue(const MODTYPE &val) { return SettingValue(SettingsModTypeToString(val), "MODTYPE"); } template<> inline MODTYPE FromSettingValue(const SettingValue &val) { ASSERT(val.GetTypeTag() == "MODTYPE"); return SettingsStringToModType(val.as<mpt::ustring>()); } @@ -684,8 +694,7 @@ Setting<bool> m_ShowSplashScreen; Setting<bool> gbMdiMaximize; - Setting<bool> highResUI; - Setting<bool> useGDIUpcaling; + Setting<DPIAwarenessMode> dpiAwareness; Setting<LONG> glTreeSplitRatio; Setting<LONG> glTreeWindowWidth; Setting<LONG> glGeneralWindowHeight; Modified: trunk/OpenMPT/mptrack/mptrack.rc ============================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc Sun Dec 1 22:19:08 2024 (r22439) +++ trunk/OpenMPT/mptrack/mptrack.rc Sun Dec 1 23:06:51 2024 (r22440) @@ -1308,29 +1308,31 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "",IDC_STATIC,6,6,312,192 - LTEXT "Pattern &Font:",IDC_STATIC,18,20,54,8 - COMBOBOX IDC_COMBO2,72,18,180,66,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "&Custom...",IDC_BUTTON9,258,18,50,12 - LTEXT "Comments f&ont:",IDC_STATIC,18,38,52,8 - PUSHBUTTON "Font",IDC_BUTTON10,72,36,180,12 - LTEXT "Display accidentals as:",IDC_STATIC,18,53,78,12,SS_CENTERIMAGE - CONTROL "&Sharps (#)",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,102,54,66,12 - CONTROL "Flats (&b)",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,168,54,108,12 - LTEXT "Default channel colours:",IDC_STATIC,18,67,78,12,SS_CENTERIMAGE - CONTROL "&No Colours",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,102,67,66,12 - CONTROL "&Rainbow",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON,168,67,60,12 - CONTROL "Ran&dom",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON,228,67,48,12 - CONTROL "&Enable effect highlighting",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,84,114,10 + LTEXT "DPI Awareness:",IDC_STATIC,18,20,54,8 + COMBOBOX IDC_COMBO4,78,18,174,66,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Pattern &Font:",IDC_STATIC,18,39,54,8 + COMBOBOX IDC_COMBO2,78,36,174,66,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "&Custom...",IDC_BUTTON9,258,36,50,12 + LTEXT "Comments f&ont:",IDC_STATIC,18,57,54,8 + PUSHBUTTON "Font",IDC_BUTTON10,78,55,174,12 + LTEXT "Display accidentals as:",IDC_STATIC,18,71,84,12,SS_CENTERIMAGE + CONTROL "&Sharps (#)",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,108,72,66,12 + CONTROL "Flats (&b)",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,174,72,108,12 + LTEXT "Default channel colours:",IDC_STATIC,18,86,84,12,SS_CENTERIMAGE + CONTROL "&No Colours",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,108,85,66,12 + CONTROL "&Rainbow",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON,174,85,60,12 + CONTROL "Ran&dom",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON,234,85,48,12 + CONTROL "&Enable effect highlighting",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,103,114,10 CONTROL "Remember each song's &window positions",IDC_CHECK5, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,102,168,10 - PUSHBUTTON "Clear Song Cac&he",IDC_BUTTON11,186,100,78,12 - CONTROL "&Primary highlight",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,118,84,10 - EDITTEXT IDC_PRIMARYHILITE,102,118,24,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "Rows per measure (default)",IDC_STATIC,132,121,144,8 - CONTROL "Secondar&y highlight",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,137,80,10 - EDITTEXT IDC_SECONDARYHILITE,102,137,24,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "Rows per beat (default)",IDC_STATIC,132,140,144,8 - LTEXT "Note: Songs' time signatures will override the default highlight values",IDC_STATIC,18,153,258,8 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,121,168,10 + PUSHBUTTON "Clear Song Cac&he",IDC_BUTTON11,186,119,78,12 + CONTROL "&Primary highlight",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,137,84,10 + EDITTEXT IDC_PRIMARYHILITE,102,137,24,12,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "Rows per measure (default)",IDC_STATIC,132,140,144,8 + CONTROL "Secondar&y highlight",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,156,80,10 + EDITTEXT IDC_SECONDARYHILITE,102,156,24,12,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "Rows per beat (default)",IDC_STATIC,132,159,144,8 + LTEXT "Note: Songs' time signatures will override the default highlight values",IDC_STATIC,18,172,258,8 GROUPBOX "Colours",IDC_STATIC,6,204,312,102 LTEXT "Select colo&ur for:",IDC_STATIC,18,218,63,8 CONTROL "",IDC_SPIN1,"msctls_updown32",UDS_ARROWKEYS,84,216,11,12 |
From: <sv...@op...> - 2024-12-01 21:19:20
|
Author: sagamusix Date: Sun Dec 1 22:19:08 2024 New Revision: 22439 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22439 Log: Merged revision(s) 22437 from trunk/OpenMPT: [Fix] Pattern tab: Upon data entry, the status bar display was not updated unless playback was running. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/mptrack/View_pat.cpp Modified: branches/OpenMPT-1.31/mptrack/View_pat.cpp ============================================================================== --- branches/OpenMPT-1.31/mptrack/View_pat.cpp Sun Dec 1 22:18:42 2024 (r22438) +++ branches/OpenMPT-1.31/mptrack/View_pat.cpp Sun Dec 1 22:19:08 2024 (r22439) @@ -2997,6 +2997,7 @@ SetModified(false); InvalidatePattern(); + UpdateIndicator(); if(column == PatternCursor::noteColumn && m_Selection.GetNumChannels() == 1 && m_Selection.GetNumRows() == 1 && (TrackerSettings::Instance().m_dwPatternSetup & PATTERN_PLAYTRANSPOSE)) { |
From: <sv...@op...> - 2024-12-01 21:18:53
|
Author: sagamusix Date: Sun Dec 1 22:18:42 2024 New Revision: 22438 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22438 Log: [Imp] When displaying the volume column in hex, also show the effect info for it in hex. Modified: trunk/OpenMPT/mptrack/Draw_pat.cpp trunk/OpenMPT/mptrack/EffectInfo.cpp trunk/OpenMPT/mptrack/EffectInfo.h trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp Modified: trunk/OpenMPT/mptrack/Draw_pat.cpp ============================================================================== --- trunk/OpenMPT/mptrack/Draw_pat.cpp Sun Dec 1 22:18:08 2024 (r22437) +++ trunk/OpenMPT/mptrack/Draw_pat.cpp Sun Dec 1 22:18:42 2024 (r22438) @@ -1776,7 +1776,7 @@ effectInfo.GetVolCmdInfo(effectInfo.GetIndexFromVolCmd(m->volcmd), &s); s += _T(": "); CString tmp; - effectInfo.GetVolCmdParamInfo(*m, &tmp); + effectInfo.GetVolCmdParamInfo(*m, &tmp, TrackerSettings::Instance().patternVolColHex); s += tmp; } break; Modified: trunk/OpenMPT/mptrack/EffectInfo.cpp ============================================================================== --- trunk/OpenMPT/mptrack/EffectInfo.cpp Sun Dec 1 22:18:08 2024 (r22437) +++ trunk/OpenMPT/mptrack/EffectInfo.cpp Sun Dec 1 22:18:42 2024 (r22438) @@ -1026,11 +1026,18 @@ } -bool EffectInfo::GetVolCmdParamInfo(const ModCommand &m, CString *s) const +bool EffectInfo::GetVolCmdParamInfo(const ModCommand &m, CString *s, bool hex) const { - if(s == nullptr) return false; + if(s == nullptr) + return false; s->Empty(); + CString volume; + if(hex) + volume = mpt::cfmt::HEX(m.vol); + else + volume = mpt::cfmt::dec(m.vol); + switch(m.volcmd) { case VOLCMD_PANNING: @@ -1043,9 +1050,8 @@ case VOLCMD_FINEVOLDOWN: if(m.vol > 0 || sndFile.GetType() == MOD_TYPE_XM) { - s->Format(_T("%c%u"), - (m.volcmd == VOLCMD_VOLSLIDEUP || m.volcmd == VOLCMD_FINEVOLUP) ? _T('+') : _T('-'), - m.vol); + *s = (m.volcmd == VOLCMD_VOLSLIDEUP || m.volcmd == VOLCMD_FINEVOLUP) ? _T('+') : _T('-') + + volume; } else { *s = _T("continue"); @@ -1068,8 +1074,8 @@ if(sndFile.GetType() != MOD_TYPE_XM) param = ImpulseTrackerPortaVolCmd[m.vol & 0x0F]; else param = m.vol << 4; } - s->Format(_T("%u (%c%02X)"), - m.vol, + *s = volume; + s->AppendFormat(_T(" (%c%02X)"), sndFile.GetModSpecifications().GetEffectLetter(cmd), param); } else @@ -1113,7 +1119,7 @@ break; default: - s->Format(_T("%u"), m.vol); + *s = volume; break; } return true; Modified: trunk/OpenMPT/mptrack/EffectInfo.h ============================================================================== --- trunk/OpenMPT/mptrack/EffectInfo.h Sun Dec 1 22:18:08 2024 (r22437) +++ trunk/OpenMPT/mptrack/EffectInfo.h Sun Dec 1 22:18:42 2024 (r22438) @@ -61,7 +61,7 @@ // Get range information, effect name, etc... from a given effect. bool GetVolCmdInfo(UINT ndx, CString *s, ModCommand::VOL *prangeMin = nullptr, ModCommand::VOL *prangeMax = nullptr) const; // Get effect name and parameter description - bool GetVolCmdParamInfo(const ModCommand &m, CString *s) const; + bool GetVolCmdParamInfo(const ModCommand &m, CString *s, bool hex) const; // Map an effect value to slider position UINT MapVolumeToPos(VolumeCommand cmd, ModCommand::VOL param) const; // Map slider position to an effect value Modified: trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp ============================================================================== --- trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp Sun Dec 1 22:18:08 2024 (r22437) +++ trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp Sun Dec 1 22:18:42 2024 (r22438) @@ -829,7 +829,7 @@ } else { // process as effect - effectInfo.GetVolCmdParamInfo(*m, &s); + effectInfo.GetVolCmdParamInfo(*m, &s, TrackerSettings::Instance().patternVolColHex); } SetDlgItemText(IDC_TEXT2, s); } |
From: <sv...@op...> - 2024-12-01 21:18:20
|
Author: sagamusix Date: Sun Dec 1 22:18:08 2024 New Revision: 22437 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22437 Log: [Fix] Pattern tab: Upon data entry, the status bar display was not updated unless playback was running. Modified: trunk/OpenMPT/mptrack/View_pat.cpp Modified: trunk/OpenMPT/mptrack/View_pat.cpp ============================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp Sun Dec 1 19:39:09 2024 (r22436) +++ trunk/OpenMPT/mptrack/View_pat.cpp Sun Dec 1 22:18:08 2024 (r22437) @@ -3029,6 +3029,7 @@ SetModified(false); InvalidatePattern(); + UpdateIndicator(); if(column == PatternCursor::noteColumn && m_Selection.GetNumChannels() == 1 && m_Selection.GetNumRows() == 1 && (TrackerSettings::Instance().m_dwPatternSetup & PATTERN_PLAYTRANSPOSE)) { |
From: <sv...@op...> - 2024-12-01 18:39:21
|
Author: manx Date: Sun Dec 1 19:39:09 2024 New Revision: 22436 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22436 Log: Merged revision(s) 22430, 22434 from trunk/OpenMPT: [Ref] examples: Silence Clang warning. ........ [Var] Run clang-format. ........ Modified: branches/OpenMPT-1.30/ (props changed) branches/OpenMPT-1.30/examples/libopenmpt_example_c_unsafe.c Modified: branches/OpenMPT-1.30/examples/libopenmpt_example_c_unsafe.c ============================================================================== --- branches/OpenMPT-1.30/examples/libopenmpt_example_c_unsafe.c Sun Dec 1 19:38:43 2024 (r22435) +++ branches/OpenMPT-1.30/examples/libopenmpt_example_c_unsafe.c Sun Dec 1 19:39:09 2024 (r22436) @@ -61,6 +61,9 @@ file = fopen( argv[1], "rb" ); #endif mod = openmpt_module_create2( openmpt_stream_get_file_callbacks(), file, NULL, NULL, NULL, NULL, NULL, NULL, NULL ); +#if defined( __clang__ ) && defined( __clang_analyzer__ ) + [[clang::suppress]] +#endif fclose( file ); Pa_Initialize(); Pa_OpenDefaultStream( &stream, 0, 2, paInt16 | paNonInterleaved, SAMPLERATE, paFramesPerBufferUnspecified, NULL, NULL ); |
From: <sv...@op...> - 2024-12-01 18:38:49
|
Author: manx Date: Sun Dec 1 19:38:43 2024 New Revision: 22435 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22435 Log: Merged revision(s) 22430, 22434 from trunk/OpenMPT: [Ref] examples: Silence Clang warning. ........ [Var] Run clang-format. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/examples/libopenmpt_example_c_unsafe.c Modified: branches/OpenMPT-1.31/examples/libopenmpt_example_c_unsafe.c ============================================================================== --- branches/OpenMPT-1.31/examples/libopenmpt_example_c_unsafe.c Sun Dec 1 19:30:22 2024 (r22434) +++ branches/OpenMPT-1.31/examples/libopenmpt_example_c_unsafe.c Sun Dec 1 19:38:43 2024 (r22435) @@ -83,6 +83,9 @@ file = fopen( argv[1], "rb" ); #endif mod = openmpt_module_create2( openmpt_stream_get_file_callbacks2(), file, NULL, NULL, NULL, NULL, NULL, NULL, NULL ); +#if defined( __clang__ ) && defined( __clang_analyzer__ ) + [[clang::suppress]] +#endif fclose( file ); Pa_Initialize(); Pa_OpenDefaultStream( &stream, 0, 2, paInt16 | paNonInterleaved, SAMPLERATE, paFramesPerBufferUnspecified, NULL, NULL ); |
From: <sv...@op...> - 2024-12-01 18:30:29
|
Author: manx Date: Sun Dec 1 19:30:22 2024 New Revision: 22434 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22434 Log: [Var] Run clang-format. Modified: trunk/OpenMPT/examples/libopenmpt_example_c_unsafe.c Modified: trunk/OpenMPT/examples/libopenmpt_example_c_unsafe.c ============================================================================== --- trunk/OpenMPT/examples/libopenmpt_example_c_unsafe.c Sun Dec 1 19:14:39 2024 (r22433) +++ trunk/OpenMPT/examples/libopenmpt_example_c_unsafe.c Sun Dec 1 19:30:22 2024 (r22434) @@ -83,7 +83,7 @@ file = fopen( argv[1], "rb" ); #endif mod = openmpt_module_create2( openmpt_stream_get_file_callbacks2(), file, NULL, NULL, NULL, NULL, NULL, NULL, NULL ); -#if defined(__clang__) && defined(__clang_analyzer__) +#if defined( __clang__ ) && defined( __clang_analyzer__ ) [[clang::suppress]] #endif fclose( file ); |
From: <sv...@op...> - 2024-12-01 18:14:52
|
Author: manx Date: Sun Dec 1 19:14:39 2024 New Revision: 22433 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22433 Log: [Mod] examples: Use float32 instead of int16. Modified: trunk/OpenMPT/examples/libopenmpt_example_c.c trunk/OpenMPT/examples/libopenmpt_example_c_mem.c trunk/OpenMPT/examples/libopenmpt_example_c_unsafe.c Modified: trunk/OpenMPT/examples/libopenmpt_example_c.c ============================================================================== --- trunk/OpenMPT/examples/libopenmpt_example_c.c Sun Dec 1 19:14:07 2024 (r22432) +++ trunk/OpenMPT/examples/libopenmpt_example_c.c Sun Dec 1 19:14:39 2024 (r22433) @@ -72,10 +72,10 @@ #define BUFFERSIZE 480 #define SAMPLERATE 48000 -static int16_t left[BUFFERSIZE]; -static int16_t right[BUFFERSIZE]; -static int16_t * const buffers[2] = { left, right }; -static int16_t interleaved_buffer[BUFFERSIZE * 2]; +static float left[BUFFERSIZE]; +static float right[BUFFERSIZE]; +static float * const buffers[2] = { left, right }; +static float interleaved_buffer[BUFFERSIZE * 2]; static int is_interleaved = 0; static void libopenmpt_example_logfunc( const char * message, void * userdata ) { @@ -208,10 +208,10 @@ } pa_initialized = 1; - pa_error = Pa_OpenDefaultStream( &stream, 0, 2, paInt16 | paNonInterleaved, SAMPLERATE, paFramesPerBufferUnspecified, NULL, NULL ); + pa_error = Pa_OpenDefaultStream( &stream, 0, 2, paFloat32 | paNonInterleaved, SAMPLERATE, paFramesPerBufferUnspecified, NULL, NULL ); if ( pa_error == paSampleFormatNotSupported ) { is_interleaved = 1; - pa_error = Pa_OpenDefaultStream( &stream, 0, 2, paInt16, SAMPLERATE, paFramesPerBufferUnspecified, NULL, NULL ); + pa_error = Pa_OpenDefaultStream( &stream, 0, 2, paFloat32, SAMPLERATE, paFramesPerBufferUnspecified, NULL, NULL ); } if ( pa_error != paNoError ) { fprintf( stderr, "Error: %s\n", "Pa_OpenStream() failed." ); @@ -231,7 +231,7 @@ while ( 1 ) { openmpt_module_error_clear( mod ); - count = is_interleaved ? openmpt_module_read_interleaved_stereo( mod, SAMPLERATE, BUFFERSIZE, interleaved_buffer ) : openmpt_module_read_stereo( mod, SAMPLERATE, BUFFERSIZE, left, right ); + count = is_interleaved ? openmpt_module_read_interleaved_float_stereo( mod, SAMPLERATE, BUFFERSIZE, interleaved_buffer ) : openmpt_module_read_float_stereo( mod, SAMPLERATE, BUFFERSIZE, left, right ); mod_err = openmpt_module_error_get_last( mod ); mod_err_str = openmpt_module_error_get_last_message( mod ); if ( mod_err != OPENMPT_ERROR_OK ) { Modified: trunk/OpenMPT/examples/libopenmpt_example_c_mem.c ============================================================================== --- trunk/OpenMPT/examples/libopenmpt_example_c_mem.c Sun Dec 1 19:14:07 2024 (r22432) +++ trunk/OpenMPT/examples/libopenmpt_example_c_mem.c Sun Dec 1 19:14:39 2024 (r22433) @@ -44,10 +44,10 @@ #define BUFFERSIZE 480 #define SAMPLERATE 48000 -static int16_t left[BUFFERSIZE]; -static int16_t right[BUFFERSIZE]; -static int16_t * const buffers[2] = { left, right }; -static int16_t interleaved_buffer[BUFFERSIZE * 2]; +static float left[BUFFERSIZE]; +static float right[BUFFERSIZE]; +static float * const buffers[2] = { left, right }; +static float interleaved_buffer[BUFFERSIZE * 2]; static int is_interleaved = 0; static void libopenmpt_example_logfunc( const char * message, void * userdata ) { @@ -254,10 +254,10 @@ pa_initialized = 1; is_interleaved = 0; - pa_error = Pa_OpenDefaultStream( &stream, 0, 2, paInt16 | paNonInterleaved, SAMPLERATE, paFramesPerBufferUnspecified, NULL, NULL ); + pa_error = Pa_OpenDefaultStream( &stream, 0, 2, paFloat32 | paNonInterleaved, SAMPLERATE, paFramesPerBufferUnspecified, NULL, NULL ); if ( pa_error == paSampleFormatNotSupported ) { is_interleaved = 1; - pa_error = Pa_OpenDefaultStream( &stream, 0, 2, paInt16, SAMPLERATE, paFramesPerBufferUnspecified, NULL, NULL ); + pa_error = Pa_OpenDefaultStream( &stream, 0, 2, paFloat32, SAMPLERATE, paFramesPerBufferUnspecified, NULL, NULL ); } if ( pa_error != paNoError ) { fprintf( stderr, "Error: %s\n", "Pa_OpenStream() failed." ); @@ -277,7 +277,7 @@ while ( 1 ) { openmpt_module_error_clear( mod ); - count = is_interleaved ? openmpt_module_read_interleaved_stereo( mod, SAMPLERATE, BUFFERSIZE, interleaved_buffer ) : openmpt_module_read_stereo( mod, SAMPLERATE, BUFFERSIZE, left, right ); + count = is_interleaved ? openmpt_module_read_interleaved_float_stereo( mod, SAMPLERATE, BUFFERSIZE, interleaved_buffer ) : openmpt_module_read_float_stereo( mod, SAMPLERATE, BUFFERSIZE, left, right ); mod_err = openmpt_module_error_get_last( mod ); mod_err_str = openmpt_module_error_get_last_message( mod ); if ( mod_err != OPENMPT_ERROR_OK ) { Modified: trunk/OpenMPT/examples/libopenmpt_example_c_unsafe.c ============================================================================== --- trunk/OpenMPT/examples/libopenmpt_example_c_unsafe.c Sun Dec 1 19:14:07 2024 (r22432) +++ trunk/OpenMPT/examples/libopenmpt_example_c_unsafe.c Sun Dec 1 19:14:39 2024 (r22433) @@ -46,9 +46,9 @@ #define BUFFERSIZE 480 #define SAMPLERATE 48000 -static int16_t left[BUFFERSIZE]; -static int16_t right[BUFFERSIZE]; -static int16_t * const buffers[2] = { left, right }; +static float left[BUFFERSIZE]; +static float right[BUFFERSIZE]; +static float * const buffers[2] = { left, right }; #if defined( __DJGPP__ ) /* clang-format off */ @@ -88,10 +88,10 @@ #endif fclose( file ); Pa_Initialize(); - Pa_OpenDefaultStream( &stream, 0, 2, paInt16 | paNonInterleaved, SAMPLERATE, paFramesPerBufferUnspecified, NULL, NULL ); + Pa_OpenDefaultStream( &stream, 0, 2, paFloat32 | paNonInterleaved, SAMPLERATE, paFramesPerBufferUnspecified, NULL, NULL ); Pa_StartStream( stream ); while ( 1 ) { - count = openmpt_module_read_stereo( mod, SAMPLERATE, BUFFERSIZE, left, right ); + count = openmpt_module_read_float_stereo( mod, SAMPLERATE, BUFFERSIZE, left, right ); if ( count == 0 ) { break; } |
From: <sv...@op...> - 2024-12-01 18:14:19
|
Author: sagamusix Date: Sun Dec 1 19:14:07 2024 New Revision: 22432 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22432 Log: [Doc] libopenmpt: Update changelog. Modified: branches/OpenMPT-1.31/doc/libopenmpt/changelog.md Modified: branches/OpenMPT-1.31/doc/libopenmpt/changelog.md ============================================================================== --- branches/OpenMPT-1.31/doc/libopenmpt/changelog.md Sun Dec 1 19:13:50 2024 (r22431) +++ branches/OpenMPT-1.31/doc/libopenmpt/changelog.md Sun Dec 1 19:14:07 2024 (r22432) @@ -32,7 +32,7 @@ mixing disabled but sample transpose enabled. * MED: Don't enable Amiga resampler if any stereo samples are found, as it does not support stereo samples. - * MED: Fix tempo in some files using oftware mixing mode and legacy tempo + * MED: Fix tempo in some files using software mixing mode and legacy tempo values. * MED: Avoid importing effect memory for some commands. * MED: Retrigger with instrument-less note now keeps using the previous sample |
From: <sv...@op...> - 2024-12-01 18:14:02
|
Author: sagamusix Date: Sun Dec 1 19:13:50 2024 New Revision: 22431 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22431 Log: Merged revision(s) 22424 from trunk/OpenMPT: [Fix] MIDI Macros: An unfinished byte right before a "s" SysEx checksum macro letter was not considered in the checksum. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/soundlib/Snd_fx.cpp Modified: branches/OpenMPT-1.31/soundlib/Snd_fx.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/Snd_fx.cpp Sun Dec 1 19:13:20 2024 (r22430) +++ branches/OpenMPT-1.31/soundlib/Snd_fx.cpp Sun Dec 1 19:13:50 2024 (r22431) @@ -5165,6 +5165,12 @@ } else if(macro[pos] == 's') { // SysEx Checksum (not an original Impulse Tracker macro variable, but added for convenience) + if(!firstNibble) // From MIDI.TXT: '9n' is exactly the same as '09 n' or '9 n' -- so finish current byte first + { + outPos++; + firstNibble = true; + } + auto startPos = outPos; while(startPos > 0 && out[--startPos] != 0xF0) ; |