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
(126) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sv...@op...> - 2024-12-27 12:14:01
|
Author: manx Date: Fri Dec 27 13:13:54 2024 New Revision: 22627 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22627 Log: [Imp] xmp-openmpt: Do not show "Default" in settings for sample rate and channels. Show "XMPlay output format" instead, which makes it more clear what this actually does. Modified: trunk/OpenMPT/libopenmpt/plugin-common/libopenmpt_plugin_gui.cpp trunk/OpenMPT/libopenmpt/plugin-common/libopenmpt_plugin_settings.hpp trunk/OpenMPT/libopenmpt/xmp-openmpt/xmp-openmpt.cpp Modified: trunk/OpenMPT/libopenmpt/plugin-common/libopenmpt_plugin_gui.cpp ============================================================================== --- trunk/OpenMPT/libopenmpt/plugin-common/libopenmpt_plugin_gui.cpp Fri Dec 27 12:44:54 2024 (r22626) +++ trunk/OpenMPT/libopenmpt/plugin-common/libopenmpt_plugin_gui.cpp Fri Dec 27 13:13:54 2024 (r22627) @@ -127,7 +127,7 @@ selected = false; if ( !s->no_default_format ) { - m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( TEXT("Default") ), 0 ); + m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( s->player_setting_name ? s->player_setting_name.value().c_str() : TEXT("Default") ), 0 ); } m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( TEXT("6000") ), 6000 ); m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( TEXT("8000") ), 8000 ); @@ -154,7 +154,7 @@ selected = false; if ( !s->no_default_format ) { - m_ComboBoxChannels.SetItemData( m_ComboBoxChannels.AddString( TEXT("Default") ), 0 ); + m_ComboBoxChannels.SetItemData( m_ComboBoxChannels.AddString( s->player_setting_name ? s->player_setting_name.value().c_str() : TEXT("Default") ), 0 ); } m_ComboBoxChannels.SetItemData( m_ComboBoxChannels.AddString( TEXT("Mono") ), 1 ); m_ComboBoxChannels.SetItemData( m_ComboBoxChannels.AddString( TEXT("Stereo") ), 2 ); Modified: trunk/OpenMPT/libopenmpt/plugin-common/libopenmpt_plugin_settings.hpp ============================================================================== --- trunk/OpenMPT/libopenmpt/plugin-common/libopenmpt_plugin_settings.hpp Fri Dec 27 12:44:54 2024 (r22626) +++ trunk/OpenMPT/libopenmpt/plugin-common/libopenmpt_plugin_settings.hpp Fri Dec 27 13:13:54 2024 (r22627) @@ -12,6 +12,7 @@ #include <windows.h> +#include <optional> #include <string> @@ -33,6 +34,7 @@ int interpolationfilterlength = 8; int ramping = -1; int vis_allow_scroll = 1; + std::optional<std::basic_string<TCHAR>> player_setting_name = std::nullopt; changed_func changed = nullptr; }; @@ -70,10 +72,11 @@ } } public: - settings( const std::basic_string<TCHAR> & subkey, bool no_default_format_ ) - : subkey(subkey) + settings( const std::basic_string<TCHAR> & subkey_, bool no_default_format_, const std::optional<std::basic_string<TCHAR>> & player_setting_name_ = std::nullopt) + : subkey(subkey_) { no_default_format = no_default_format_; + player_setting_name = player_setting_name_; if (!no_default_format) { samplerate = 0; channels = 0; Modified: trunk/OpenMPT/libopenmpt/xmp-openmpt/xmp-openmpt.cpp ============================================================================== --- trunk/OpenMPT/libopenmpt/xmp-openmpt/xmp-openmpt.cpp Fri Dec 27 12:44:54 2024 (r22626) +++ trunk/OpenMPT/libopenmpt/xmp-openmpt/xmp-openmpt.cpp Fri Dec 27 13:13:54 2024 (r22627) @@ -132,7 +132,7 @@ } public: xmp_openmpt_settings() - : libopenmpt::plugin::settings(TEXT(SHORT_TITLE), false) + : libopenmpt::plugin::settings(TEXT(SHORT_TITLE), false, TEXT("XMPlay output format")) { return; } |
From: <sv...@op...> - 2024-12-27 11:45:08
|
Author: manx Date: Fri Dec 27 12:44:54 2024 New Revision: 22626 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22626 Log: [Ref] libopenmpt: Plugin settings: Small cleanup. Modified: trunk/OpenMPT/libopenmpt/plugin-common/libopenmpt_plugin_settings.hpp Modified: trunk/OpenMPT/libopenmpt/plugin-common/libopenmpt_plugin_settings.hpp ============================================================================== --- trunk/OpenMPT/libopenmpt/plugin-common/libopenmpt_plugin_settings.hpp Fri Dec 27 12:44:29 2024 (r22625) +++ trunk/OpenMPT/libopenmpt/plugin-common/libopenmpt_plugin_settings.hpp Fri Dec 27 12:44:54 2024 (r22626) @@ -81,11 +81,7 @@ } void load() { - #ifdef UNICODE - #define read_setting(a,b,c) read_setting( b , L ## b , c) - #else - #define read_setting(a,b,c) read_setting( b , b , c) - #endif + #define read_setting(a,b,c) read_setting( b , TEXT(b) , c) read_setting( subkey, "Samplerate_Hz", samplerate ); read_setting( subkey, "Channels", channels ); read_setting( subkey, "MasterGain_milliBel", mastergain_millibel ); @@ -100,11 +96,7 @@ } void save() { - #ifdef UNICODE - #define write_setting(a,b,c) write_setting( b , L ## b , c) - #else - #define write_setting(a,b,c) write_setting( b , b , c) - #endif + #define write_setting(a,b,c) write_setting( b , TEXT(b) , c) write_setting( subkey, "Samplerate_Hz", samplerate ); write_setting( subkey, "Channels", channels ); write_setting( subkey, "MasterGain_milliBel", mastergain_millibel ); |
From: <sv...@op...> - 2024-12-27 11:44:36
|
Author: manx Date: Fri Dec 27 12:44:29 2024 New Revision: 22625 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22625 Log: [Fix] libopenmpt: Plugin GUI: Make MFC code not depend on UNICODE. Modified: trunk/OpenMPT/libopenmpt/plugin-common/libopenmpt_plugin_gui.cpp Modified: trunk/OpenMPT/libopenmpt/plugin-common/libopenmpt_plugin_gui.cpp ============================================================================== --- trunk/OpenMPT/libopenmpt/plugin-common/libopenmpt_plugin_gui.cpp Fri Dec 27 10:38:18 2024 (r22624) +++ trunk/OpenMPT/libopenmpt/plugin-common/libopenmpt_plugin_gui.cpp Fri Dec 27 12:44:29 2024 (r22625) @@ -19,6 +19,10 @@ #include <vector> #endif +#if defined(MPT_WITH_MFC) +#include <tchar.h> +#endif + #if !defined(MPT_WITH_MFC) #include <windows.h> #endif @@ -123,20 +127,20 @@ selected = false; if ( !s->no_default_format ) { - m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( L"Default" ), 0 ); + m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( TEXT("Default") ), 0 ); } - m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( L"6000" ), 6000 ); - m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( L"8000" ), 8000 ); - m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( L"11025" ), 11025 ); - m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( L"16000" ), 16000 ); - m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( L"22050" ), 22050 ); - m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( L"32000" ), 32000 ); - m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( L"44100" ), 44100 ); - m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( L"48000" ), 48000 ); - m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( L"88200" ), 88200 ); - m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( L"96000" ), 96000 ); + m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( TEXT("6000") ), 6000 ); + m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( TEXT("8000") ), 8000 ); + m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( TEXT("11025") ), 11025 ); + m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( TEXT("16000") ), 16000 ); + m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( TEXT("22050") ), 22050 ); + m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( TEXT("32000") ), 32000 ); + m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( TEXT("44100") ), 44100 ); + m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( TEXT("48000") ), 48000 ); + m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( TEXT("88200") ), 88200 ); + m_ComboBoxSamplerate.SetItemData( m_ComboBoxSamplerate.AddString( TEXT("96000") ), 96000 ); if ( !s->no_default_format && s->samplerate == 0 ) { - m_ComboBoxSamplerate.SelectString( 0, L"Default" ); + m_ComboBoxSamplerate.SelectString( 0, TEXT("Default") ); } for ( int index = 0; index < m_ComboBoxSamplerate.GetCount(); ++index ) { if ( static_cast<int>( m_ComboBoxSamplerate.GetItemData( index ) ) == s->samplerate ) { @@ -145,18 +149,18 @@ } } if ( !selected ) { - m_ComboBoxSamplerate.SelectString( 0, L"48000" ); + m_ComboBoxSamplerate.SelectString( 0, TEXT("48000") ); } selected = false; if ( !s->no_default_format ) { - m_ComboBoxChannels.SetItemData( m_ComboBoxChannels.AddString( L"Default" ), 0 ); + m_ComboBoxChannels.SetItemData( m_ComboBoxChannels.AddString( TEXT("Default") ), 0 ); } - m_ComboBoxChannels.SetItemData( m_ComboBoxChannels.AddString( L"Mono" ), 1 ); - m_ComboBoxChannels.SetItemData( m_ComboBoxChannels.AddString( L"Stereo" ), 2 ); - m_ComboBoxChannels.SetItemData( m_ComboBoxChannels.AddString( L"Quad" ), 4 ); + m_ComboBoxChannels.SetItemData( m_ComboBoxChannels.AddString( TEXT("Mono") ), 1 ); + m_ComboBoxChannels.SetItemData( m_ComboBoxChannels.AddString( TEXT("Stereo") ), 2 ); + m_ComboBoxChannels.SetItemData( m_ComboBoxChannels.AddString( TEXT("Quad") ), 4 ); if ( !s->no_default_format && s->channels == 0 ) { - m_ComboBoxChannels.SelectString( 0, L"Default" ); + m_ComboBoxChannels.SelectString( 0, TEXT("Default") ); } for ( int index = 0; index < m_ComboBoxChannels.GetCount(); ++index ) { if ( static_cast<int>( m_ComboBoxChannels.GetItemData( index ) ) == s->channels ) { @@ -165,7 +169,7 @@ } } if ( !selected ) { - m_ComboBoxChannels.SelectString( 0, L"Stereo" ); + m_ComboBoxChannels.SelectString( 0, TEXT("Stereo") ); } m_SliderCtrlGain.SetRange( -1200, 1200 ); @@ -175,10 +179,10 @@ m_SliderCtrlGain.SetPos( s->mastergain_millibel ); selected = false; - m_ComboBoxInterpolation.SetItemData( m_ComboBoxInterpolation.AddString( L"Off / 1 Tap (Nearest)" ), 1 ); - m_ComboBoxInterpolation.SetItemData( m_ComboBoxInterpolation.AddString( L"2 Tap (Linear)" ), 2 ); - m_ComboBoxInterpolation.SetItemData( m_ComboBoxInterpolation.AddString( L"4 Tap (Cubic)" ), 4 ); - m_ComboBoxInterpolation.SetItemData( m_ComboBoxInterpolation.AddString( L"8 Tap (Polyphase FIR)" ), 8 ); + m_ComboBoxInterpolation.SetItemData( m_ComboBoxInterpolation.AddString( TEXT("Off / 1 Tap (Nearest)") ), 1 ); + m_ComboBoxInterpolation.SetItemData( m_ComboBoxInterpolation.AddString( TEXT("2 Tap (Linear)") ), 2 ); + m_ComboBoxInterpolation.SetItemData( m_ComboBoxInterpolation.AddString( TEXT("4 Tap (Cubic)") ), 4 ); + m_ComboBoxInterpolation.SetItemData( m_ComboBoxInterpolation.AddString( TEXT("8 Tap (Polyphase FIR)") ), 8 ); for ( int index = 0; index < m_ComboBoxInterpolation.GetCount(); ++index ) { if ( static_cast<int>( m_ComboBoxInterpolation.GetItemData( index ) ) == s->interpolationfilterlength ) { m_ComboBoxInterpolation.SetCurSel( index ); @@ -186,16 +190,16 @@ } } if ( !selected ) { - m_ComboBoxInterpolation.SelectString( 0, L"8 Tap (Polyphase FIR)" ); + m_ComboBoxInterpolation.SelectString( 0, TEXT("8 Tap (Polyphase FIR)") ); } m_CheckBoxAmigaResampler.SetCheck( s->use_amiga_resampler ? BST_CHECKED : BST_UNCHECKED ); selected = false; m_ComboBoxAmigaFilter.EnableWindow( s->use_amiga_resampler ? TRUE : FALSE ); - m_ComboBoxAmigaFilter.SetItemData( m_ComboBoxAmigaFilter.AddString( L"Default" ), 0 ); - m_ComboBoxAmigaFilter.SetItemData( m_ComboBoxAmigaFilter.AddString( L"A500 Filter" ), 0xA500 ); - m_ComboBoxAmigaFilter.SetItemData( m_ComboBoxAmigaFilter.AddString( L"A1200 Filter" ), 0xA1200 ); - m_ComboBoxAmigaFilter.SetItemData( m_ComboBoxAmigaFilter.AddString( L"Unfiltered" ), 1 ); + m_ComboBoxAmigaFilter.SetItemData( m_ComboBoxAmigaFilter.AddString( TEXT("Default") ), 0 ); + m_ComboBoxAmigaFilter.SetItemData( m_ComboBoxAmigaFilter.AddString( TEXT("A500 Filter") ), 0xA500 ); + m_ComboBoxAmigaFilter.SetItemData( m_ComboBoxAmigaFilter.AddString( TEXT("A1200 Filter") ), 0xA1200 ); + m_ComboBoxAmigaFilter.SetItemData( m_ComboBoxAmigaFilter.AddString( TEXT("Unfiltered") ), 1 ); for ( int index = 0; index < m_ComboBoxAmigaFilter.GetCount(); ++index ) { if ( static_cast<int>( m_ComboBoxAmigaFilter.GetItemData( index ) ) == s->amiga_filter_type ) { m_ComboBoxAmigaFilter.SetCurSel( index ); @@ -203,13 +207,13 @@ } } if ( !selected ) { - m_ComboBoxAmigaFilter.SelectString( 0, L"Default" ); + m_ComboBoxAmigaFilter.SelectString( 0, TEXT("Default") ); } selected = false; - m_ComboBoxRepeat.SetItemData( m_ComboBoxRepeat.AddString( L"Forever" ), static_cast<unsigned int>( -1 ) ); - m_ComboBoxRepeat.SetItemData( m_ComboBoxRepeat.AddString( L"Never" ), 0 ); - m_ComboBoxRepeat.SetItemData( m_ComboBoxRepeat.AddString( L"Once" ), 1 ); + m_ComboBoxRepeat.SetItemData( m_ComboBoxRepeat.AddString( TEXT("Forever") ), static_cast<unsigned int>( -1 ) ); + m_ComboBoxRepeat.SetItemData( m_ComboBoxRepeat.AddString( TEXT("Never") ), 0 ); + m_ComboBoxRepeat.SetItemData( m_ComboBoxRepeat.AddString( TEXT("Once") ), 1 ); for ( int index = 0; index < m_ComboBoxRepeat.GetCount(); ++index ) { if ( static_cast<int>( m_ComboBoxRepeat.GetItemData( index ) ) == s->repeatcount ) { m_ComboBoxRepeat.SetCurSel( index ); @@ -217,7 +221,7 @@ } } if ( !selected ) { - m_ComboBoxRepeat.SelectString( 0, L"Never" ); + m_ComboBoxRepeat.SelectString( 0, TEXT("Never") ); } m_SliderCtrlStereoSeparation.SetRange( 0, 200 ); @@ -227,13 +231,13 @@ m_SliderCtrlStereoSeparation.SetPos( s->stereoseparation ); selected = false; - m_ComboBoxRamping.SetItemData( m_ComboBoxRamping.AddString( L"Default" ), static_cast<unsigned int>( -1 ) ); - m_ComboBoxRamping.SetItemData( m_ComboBoxRamping.AddString( L"Off" ), 0 ); - m_ComboBoxRamping.SetItemData( m_ComboBoxRamping.AddString( L"1 ms" ), 1 ); - m_ComboBoxRamping.SetItemData( m_ComboBoxRamping.AddString( L"2 ms" ), 2 ); - m_ComboBoxRamping.SetItemData( m_ComboBoxRamping.AddString( L"3 ms" ), 3 ); - m_ComboBoxRamping.SetItemData( m_ComboBoxRamping.AddString( L"5 ms" ), 5 ); - m_ComboBoxRamping.SetItemData( m_ComboBoxRamping.AddString( L"10 ms" ), 10 ); + m_ComboBoxRamping.SetItemData( m_ComboBoxRamping.AddString( TEXT("Default") ), static_cast<unsigned int>( -1 ) ); + m_ComboBoxRamping.SetItemData( m_ComboBoxRamping.AddString( TEXT("Off") ), 0 ); + m_ComboBoxRamping.SetItemData( m_ComboBoxRamping.AddString( TEXT("1 ms") ), 1 ); + m_ComboBoxRamping.SetItemData( m_ComboBoxRamping.AddString( TEXT("2 ms") ), 2 ); + m_ComboBoxRamping.SetItemData( m_ComboBoxRamping.AddString( TEXT("3 ms") ), 3 ); + m_ComboBoxRamping.SetItemData( m_ComboBoxRamping.AddString( TEXT("5 ms") ), 5 ); + m_ComboBoxRamping.SetItemData( m_ComboBoxRamping.AddString( TEXT("10 ms") ), 10 ); for ( int index = 0; index < m_ComboBoxRamping.GetCount(); ++index ) { if ( static_cast<int>( m_ComboBoxRamping.GetItemData( index ) ) == s->ramping ) { m_ComboBoxRamping.SetCurSel( index ); @@ -241,7 +245,7 @@ } } if ( !selected ) { - m_ComboBoxRamping.SelectString( 0, L"Default" ); + m_ComboBoxRamping.SelectString( 0, TEXT("Default") ); } return TRUE; @@ -285,11 +289,11 @@ switch ( nID ) { case IDC_SLIDER_GAIN: - swprintf( pTTT->szText, _countof(pTTT->szText), L"%.02f dB", m_SliderCtrlGain.GetPos() * 0.01f ); + _sntprintf( pTTT->szText, _countof(pTTT->szText), TEXT("%.02f dB"), m_SliderCtrlGain.GetPos() * 0.01f ); break; case IDC_SLIDER_STEREOSEPARATION: - swprintf( pTTT->szText, _countof(pTTT->szText), L"%d %%", m_SliderCtrlStereoSeparation.GetPos()); + _sntprintf( pTTT->szText, _countof(pTTT->szText), TEXT("%d %%"), m_SliderCtrlStereoSeparation.GetPos() ); break; default: |
From: <sv...@op...> - 2024-12-27 09:38:26
|
Author: manx Date: Fri Dec 27 10:38:18 2024 New Revision: 22624 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22624 Log: Merged revision(s) 22621 from trunk/OpenMPT: [Doc] libopenmpt: File loading strategy documentation was missed in 0.5 when implementing the performance enhancements for seekable std::istream. Update it now. ........ Modified: branches/OpenMPT-1.29/ (props changed) branches/OpenMPT-1.29/libopenmpt/ (props changed) branches/OpenMPT-1.29/libopenmpt/libopenmpt.hpp Modified: branches/OpenMPT-1.29/libopenmpt/libopenmpt.hpp ============================================================================== --- branches/OpenMPT-1.29/libopenmpt/libopenmpt.hpp Fri Dec 27 10:37:50 2024 (r22623) +++ branches/OpenMPT-1.29/libopenmpt/libopenmpt.hpp Fri Dec 27 10:38:18 2024 (r22624) @@ -49,25 +49,25 @@ * * libopenmpt can use 3 different strategies for file I/O. * - * - openmpt::module::module() with any kind of memory buffer as parameter will - * load the module from the provided memory buffer, which will require loading - * all data upfront by the library - * caller. * - openmpt::module::module() with a seekable std::istream as parameter will - * load the module via the stream interface. libopenmpt will not implement an - * additional buffering layer in this case which means the callbacks are assumed - * to be performant even with small i/o sizes. + * load the module via the stream interface. This is the recommended strategy. * - openmpt::module::module() with an unseekable std::istream as parameter * will load the module via the stream interface. libopempt will make an * internal copy as it goes along, and sometimes have to pre-cache the whole * file in case it needs to know the complete file size. This strategy is * intended to be used if the file is located on a high latency network. + * - openmpt::module::module() with any kind of memory buffer as parameter will + * load the module from the provided memory buffer, which will require loading + * all data upfront by the library caller. This strategy has the disadvantage of + * requiring all data to be loaded even when the module loading happens to fail + * after that. It should only be used when the data has already been loaded into + * memory for other reasons. * - * | constructor | speed | memory consumption | - * | ----------------: | :----: | :----------------: | - * | memory buffer | <p style="background-color:green" >fast </p> | <p style="background-color:yellow">medium</p> | - * | seekable stream | <p style="background-color:red" >slow </p> | <p style="background-color:green" >low </p> | + * | constructor | speed | memory consumption | + * | ----------------: | :---: | :----------------: | + * | seekable stream | <p style="background-color:yellow">medium</p> | <p style="background-color:green" >low </p> | * | unseekable stream | <p style="background-color:yellow">medium</p> | <p style="background-color:red" >high </p> | + * | memory buffer | <p style="background-color:green" >fast </p> | <p style="background-color:yellow">medium</p> | * * In all cases, the data or stream passed to the constructor is no longer * needed after the openmpt::module has been constructed and can be destroyed |
From: <sv...@op...> - 2024-12-27 09:38:02
|
Author: manx Date: Fri Dec 27 10:37:50 2024 New Revision: 22623 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22623 Log: Merged revision(s) 22621 from trunk/OpenMPT: [Doc] libopenmpt: File loading strategy documentation was missed in 0.5 when implementing the performance enhancements for seekable std::istream. Update it now. ........ Modified: branches/OpenMPT-1.30/ (props changed) branches/OpenMPT-1.30/libopenmpt/ (props changed) branches/OpenMPT-1.30/libopenmpt/libopenmpt.hpp Modified: branches/OpenMPT-1.30/libopenmpt/libopenmpt.hpp ============================================================================== --- branches/OpenMPT-1.30/libopenmpt/libopenmpt.hpp Fri Dec 27 10:37:13 2024 (r22622) +++ branches/OpenMPT-1.30/libopenmpt/libopenmpt.hpp Fri Dec 27 10:37:50 2024 (r22623) @@ -49,25 +49,25 @@ * * libopenmpt can use 3 different strategies for file I/O. * - * - openmpt::module::module() with any kind of memory buffer as parameter will - * load the module from the provided memory buffer, which will require loading - * all data upfront by the library - * caller. * - openmpt::module::module() with a seekable std::istream as parameter will - * load the module via the stream interface. libopenmpt will not implement an - * additional buffering layer in this case which means the callbacks are assumed - * to be performant even with small i/o sizes. + * load the module via the stream interface. This is the recommended strategy. * - openmpt::module::module() with an unseekable std::istream as parameter * will load the module via the stream interface. libopempt will make an * internal copy as it goes along, and sometimes have to pre-cache the whole * file in case it needs to know the complete file size. This strategy is * intended to be used if the file is located on a high latency network. + * - openmpt::module::module() with any kind of memory buffer as parameter will + * load the module from the provided memory buffer, which will require loading + * all data upfront by the library caller. This strategy has the disadvantage of + * requiring all data to be loaded even when the module loading happens to fail + * after that. It should only be used when the data has already been loaded into + * memory for other reasons. * - * | constructor | speed | memory consumption | - * | ----------------: | :----: | :----------------: | - * | memory buffer | <p style="background-color:green" >fast </p> | <p style="background-color:yellow">medium</p> | - * | seekable stream | <p style="background-color:red" >slow </p> | <p style="background-color:green" >low </p> | + * | constructor | speed | memory consumption | + * | ----------------: | :---: | :----------------: | + * | seekable stream | <p style="background-color:yellow">medium</p> | <p style="background-color:green" >low </p> | * | unseekable stream | <p style="background-color:yellow">medium</p> | <p style="background-color:red" >high </p> | + * | memory buffer | <p style="background-color:green" >fast </p> | <p style="background-color:yellow">medium</p> | * * In all cases, the data or stream passed to the constructor is no longer * needed after the openmpt::module has been constructed and can be destroyed |
From: <sv...@op...> - 2024-12-27 09:37:24
|
Author: manx Date: Fri Dec 27 10:37:13 2024 New Revision: 22622 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22622 Log: Merged revision(s) 22621 from trunk/OpenMPT: [Doc] libopenmpt: File loading strategy documentation was missed in 0.5 when implementing the performance enhancements for seekable std::istream. Update it now. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/libopenmpt/libopenmpt.hpp Modified: branches/OpenMPT-1.31/libopenmpt/libopenmpt.hpp ============================================================================== --- branches/OpenMPT-1.31/libopenmpt/libopenmpt.hpp Fri Dec 27 10:36:49 2024 (r22621) +++ branches/OpenMPT-1.31/libopenmpt/libopenmpt.hpp Fri Dec 27 10:37:13 2024 (r22622) @@ -49,25 +49,25 @@ * * libopenmpt can use 3 different strategies for file I/O. * - * - openmpt::module::module() with any kind of memory buffer as parameter will - * load the module from the provided memory buffer, which will require loading - * all data upfront by the library - * caller. * - openmpt::module::module() with a seekable std::istream as parameter will - * load the module via the stream interface. libopenmpt will not implement an - * additional buffering layer in this case which means the callbacks are assumed - * to be performant even with small i/o sizes. + * load the module via the stream interface. This is the recommended strategy. * - openmpt::module::module() with an unseekable std::istream as parameter * will load the module via the stream interface. libopempt will make an * internal copy as it goes along, and sometimes have to pre-cache the whole * file in case it needs to know the complete file size. This strategy is * intended to be used if the file is located on a high latency network. + * - openmpt::module::module() with any kind of memory buffer as parameter will + * load the module from the provided memory buffer, which will require loading + * all data upfront by the library caller. This strategy has the disadvantage of + * requiring all data to be loaded even when the module loading happens to fail + * after that. It should only be used when the data has already been loaded into + * memory for other reasons. * - * | constructor | speed | memory consumption | - * | ----------------: | :----: | :----------------: | - * | memory buffer | <p style="background-color:green" >fast </p> | <p style="background-color:yellow">medium</p> | - * | seekable stream | <p style="background-color:red" >slow </p> | <p style="background-color:green" >low </p> | + * | constructor | speed | memory consumption | + * | ----------------: | :---: | :----------------: | + * | seekable stream | <p style="background-color:yellow">medium</p> | <p style="background-color:green" >low </p> | * | unseekable stream | <p style="background-color:yellow">medium</p> | <p style="background-color:red" >high </p> | + * | memory buffer | <p style="background-color:green" >fast </p> | <p style="background-color:yellow">medium</p> | * * In all cases, the data or stream passed to the constructor is no longer * needed after the openmpt::module has been constructed and can be destroyed |
From: <sv...@op...> - 2024-12-27 09:37:01
|
Author: manx Date: Fri Dec 27 10:36:49 2024 New Revision: 22621 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22621 Log: [Doc] libopenmpt: File loading strategy documentation was missed in 0.5 when implementing the performance enhancements for seekable std::istream. Update it now. Modified: trunk/OpenMPT/libopenmpt/libopenmpt.hpp Modified: trunk/OpenMPT/libopenmpt/libopenmpt.hpp ============================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.hpp Fri Dec 27 10:19:31 2024 (r22620) +++ trunk/OpenMPT/libopenmpt/libopenmpt.hpp Fri Dec 27 10:36:49 2024 (r22621) @@ -49,25 +49,25 @@ * * libopenmpt can use 3 different strategies for file I/O. * - * - openmpt::module::module() with any kind of memory buffer as parameter will - * load the module from the provided memory buffer, which will require loading - * all data upfront by the library - * caller. * - openmpt::module::module() with a seekable std::istream as parameter will - * load the module via the stream interface. libopenmpt will not implement an - * additional buffering layer in this case which means the callbacks are assumed - * to be performant even with small i/o sizes. + * load the module via the stream interface. This is the recommended strategy. * - openmpt::module::module() with an unseekable std::istream as parameter * will load the module via the stream interface. libopempt will make an * internal copy as it goes along, and sometimes have to pre-cache the whole * file in case it needs to know the complete file size. This strategy is * intended to be used if the file is located on a high latency network. + * - openmpt::module::module() with any kind of memory buffer as parameter will + * load the module from the provided memory buffer, which will require loading + * all data upfront by the library caller. This strategy has the disadvantage of + * requiring all data to be loaded even when the module loading happens to fail + * after that. It should only be used when the data has already been loaded into + * memory for other reasons. * - * | constructor | speed | memory consumption | - * | ----------------: | :----: | :----------------: | - * | memory buffer | <p style="background-color:green" >fast </p> | <p style="background-color:yellow">medium</p> | - * | seekable stream | <p style="background-color:red" >slow </p> | <p style="background-color:green" >low </p> | + * | constructor | speed | memory consumption | + * | ----------------: | :---: | :----------------: | + * | seekable stream | <p style="background-color:yellow">medium</p> | <p style="background-color:green" >low </p> | * | unseekable stream | <p style="background-color:yellow">medium</p> | <p style="background-color:red" >high </p> | + * | memory buffer | <p style="background-color:green" >fast </p> | <p style="background-color:yellow">medium</p> | * * In all cases, the data or stream passed to the constructor is no longer * needed after the openmpt::module has been constructed and can be destroyed |
From: <sv...@op...> - 2024-12-27 09:19:43
|
Author: manx Date: Fri Dec 27 10:19:31 2024 New Revision: 22620 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22620 Log: Merged revision(s) 22616 from trunk/OpenMPT: [Doc] libopenmpt: Fix typo. ........ Modified: branches/OpenMPT-1.28/ (props changed) branches/OpenMPT-1.28/libopenmpt/ (props changed) branches/OpenMPT-1.28/libopenmpt/libopenmpt.hpp Modified: branches/OpenMPT-1.28/libopenmpt/libopenmpt.hpp ============================================================================== --- branches/OpenMPT-1.28/libopenmpt/libopenmpt.hpp Fri Dec 27 10:19:11 2024 (r22619) +++ branches/OpenMPT-1.28/libopenmpt/libopenmpt.hpp Fri Dec 27 10:19:31 2024 (r22620) @@ -53,7 +53,7 @@ * caller. * - openmpt::module::module() with a seekable std::istream as parameter will * load the module via the stream interface. libopenmpt will not implement an - * additional buffering layer in this case whih means the callbacks are assumed + * additional buffering layer in this case which means the callbacks are assumed * to be performant even with small i/o sizes. * - openmpt::module::module() with an unseekable std::istream as parameter * will load the module via the stream interface. libopempt will make an |
From: <sv...@op...> - 2024-12-27 09:19:22
|
Author: manx Date: Fri Dec 27 10:19:11 2024 New Revision: 22619 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22619 Log: Merged revision(s) 22616 from trunk/OpenMPT: [Doc] libopenmpt: Fix typo. ........ Modified: branches/OpenMPT-1.29/ (props changed) branches/OpenMPT-1.29/libopenmpt/ (props changed) branches/OpenMPT-1.29/libopenmpt/libopenmpt.hpp Modified: branches/OpenMPT-1.29/libopenmpt/libopenmpt.hpp ============================================================================== --- branches/OpenMPT-1.29/libopenmpt/libopenmpt.hpp Fri Dec 27 10:18:50 2024 (r22618) +++ branches/OpenMPT-1.29/libopenmpt/libopenmpt.hpp Fri Dec 27 10:19:11 2024 (r22619) @@ -55,7 +55,7 @@ * caller. * - openmpt::module::module() with a seekable std::istream as parameter will * load the module via the stream interface. libopenmpt will not implement an - * additional buffering layer in this case whih means the callbacks are assumed + * additional buffering layer in this case which means the callbacks are assumed * to be performant even with small i/o sizes. * - openmpt::module::module() with an unseekable std::istream as parameter * will load the module via the stream interface. libopempt will make an |
From: <sv...@op...> - 2024-12-27 09:18:57
|
Author: manx Date: Fri Dec 27 10:18:50 2024 New Revision: 22618 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22618 Log: Merged revision(s) 22616 from trunk/OpenMPT: [Doc] libopenmpt: Fix typo. ........ Modified: branches/OpenMPT-1.30/ (props changed) branches/OpenMPT-1.30/libopenmpt/ (props changed) branches/OpenMPT-1.30/libopenmpt/libopenmpt.hpp Modified: branches/OpenMPT-1.30/libopenmpt/libopenmpt.hpp ============================================================================== --- branches/OpenMPT-1.30/libopenmpt/libopenmpt.hpp Fri Dec 27 10:18:22 2024 (r22617) +++ branches/OpenMPT-1.30/libopenmpt/libopenmpt.hpp Fri Dec 27 10:18:50 2024 (r22618) @@ -55,7 +55,7 @@ * caller. * - openmpt::module::module() with a seekable std::istream as parameter will * load the module via the stream interface. libopenmpt will not implement an - * additional buffering layer in this case whih means the callbacks are assumed + * additional buffering layer in this case which means the callbacks are assumed * to be performant even with small i/o sizes. * - openmpt::module::module() with an unseekable std::istream as parameter * will load the module via the stream interface. libopempt will make an |
From: <sv...@op...> - 2024-12-27 09:18:40
|
Author: manx Date: Fri Dec 27 10:18:22 2024 New Revision: 22617 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22617 Log: Merged revision(s) 22616 from trunk/OpenMPT: [Doc] libopenmpt: Fix typo. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/libopenmpt/libopenmpt.hpp Modified: branches/OpenMPT-1.31/libopenmpt/libopenmpt.hpp ============================================================================== --- branches/OpenMPT-1.31/libopenmpt/libopenmpt.hpp Fri Dec 27 10:17:54 2024 (r22616) +++ branches/OpenMPT-1.31/libopenmpt/libopenmpt.hpp Fri Dec 27 10:18:22 2024 (r22617) @@ -55,7 +55,7 @@ * caller. * - openmpt::module::module() with a seekable std::istream as parameter will * load the module via the stream interface. libopenmpt will not implement an - * additional buffering layer in this case whih means the callbacks are assumed + * additional buffering layer in this case which means the callbacks are assumed * to be performant even with small i/o sizes. * - openmpt::module::module() with an unseekable std::istream as parameter * will load the module via the stream interface. libopempt will make an |
From: <sv...@op...> - 2024-12-27 09:18:06
|
Author: manx Date: Fri Dec 27 10:17:54 2024 New Revision: 22616 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22616 Log: [Doc] libopenmpt: Fix typo. Modified: trunk/OpenMPT/libopenmpt/libopenmpt.hpp Modified: trunk/OpenMPT/libopenmpt/libopenmpt.hpp ============================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.hpp Thu Dec 26 20:23:57 2024 (r22615) +++ trunk/OpenMPT/libopenmpt/libopenmpt.hpp Fri Dec 27 10:17:54 2024 (r22616) @@ -55,7 +55,7 @@ * caller. * - openmpt::module::module() with a seekable std::istream as parameter will * load the module via the stream interface. libopenmpt will not implement an - * additional buffering layer in this case whih means the callbacks are assumed + * additional buffering layer in this case which means the callbacks are assumed * to be performant even with small i/o sizes. * - openmpt::module::module() with an unseekable std::istream as parameter * will load the module via the stream interface. libopempt will make an |
From: <sv...@op...> - 2024-12-26 19:24:09
|
Author: manx Date: Thu Dec 26 20:23:57 2024 New Revision: 22615 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22615 Log: Merged revision(s) 22608 from trunk/OpenMPT: [Fix] mpt/base/detect_quirks.hpp: Add MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE for older Apple Clang. See <https://github.com/fink/fink-distributions/issues/1202>. ........ Modified: branches/OpenMPT-1.30/ (props changed) branches/OpenMPT-1.30/common/mptFileIO.cpp branches/OpenMPT-1.30/soundlib/Dlsbank.cpp branches/OpenMPT-1.30/soundlib/Load_mod.cpp branches/OpenMPT-1.30/src/mpt/base/detect_quirks.hpp branches/OpenMPT-1.30/src/mpt/library/library.hpp Modified: branches/OpenMPT-1.30/common/mptFileIO.cpp ============================================================================== --- branches/OpenMPT-1.30/common/mptFileIO.cpp Thu Dec 26 20:18:00 2024 (r22614) +++ branches/OpenMPT-1.30/common/mptFileIO.cpp Thu Dec 26 20:23:57 2024 (r22615) @@ -562,7 +562,11 @@ m_IsTempFile = true; } else { +#if defined(MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE) + m_Filename = *(file.GetOptionalFileName()); +#else m_Filename = file.GetOptionalFileName().value(); +#endif } } catch (const std::runtime_error &) { Modified: branches/OpenMPT-1.30/soundlib/Dlsbank.cpp ============================================================================== --- branches/OpenMPT-1.30/soundlib/Dlsbank.cpp Thu Dec 26 20:18:00 2024 (r22614) +++ branches/OpenMPT-1.30/soundlib/Dlsbank.cpp Thu Dec 26 20:23:57 2024 (r22615) @@ -1306,7 +1306,13 @@ uint32 nInsDef; if(file.GetOptionalFileName()) + { +#if defined(MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE) + m_szFileName = *(file.GetOptionalFileName()); +#else m_szFileName = file.GetOptionalFileName().value(); +#endif + } file.Rewind(); size_t dwMemLength = file.GetLength(); Modified: branches/OpenMPT-1.30/soundlib/Load_mod.cpp ============================================================================== --- branches/OpenMPT-1.30/soundlib/Load_mod.cpp Thu Dec 26 20:18:00 2024 (r22614) +++ branches/OpenMPT-1.30/soundlib/Load_mod.cpp Thu Dec 26 20:23:57 2024 (r22615) @@ -1244,7 +1244,11 @@ FileReader amData; if(file.GetOptionalFileName()) { +#if defined(MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE) + mpt::PathString filename = *(file.GetOptionalFileName()); +#else mpt::PathString filename = file.GetOptionalFileName().value(); +#endif // Find instrument definition file const mpt::PathString exts[] = {P_(".nt"), P_(".NT"), P_(".as"), P_(".AS")}; for(const auto &ext : exts) Modified: branches/OpenMPT-1.30/src/mpt/base/detect_quirks.hpp ============================================================================== --- branches/OpenMPT-1.30/src/mpt/base/detect_quirks.hpp Thu Dec 26 20:18:00 2024 (r22614) +++ branches/OpenMPT-1.30/src/mpt/base/detect_quirks.hpp Thu Dec 26 20:23:57 2024 (r22615) @@ -157,4 +157,20 @@ +#if MPT_OS_MACOSX_OR_IOS +#if defined(TARGET_OS_OSX) +#if TARGET_OS_OSX +#if !defined(MAC_OS_X_VERSION_10_14) +#define MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE +#else +#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_14) +#define MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE +#endif +#endif +#endif +#endif +#endif + + + #endif // MPT_BASE_DETECT_QUIRKS_HPP Modified: branches/OpenMPT-1.30/src/mpt/library/library.hpp ============================================================================== --- branches/OpenMPT-1.30/src/mpt/library/library.hpp Thu Dec 26 20:18:00 2024 (r22614) +++ branches/OpenMPT-1.30/src/mpt/library/library.hpp Thu Dec 26 20:23:57 2024 (r22615) @@ -184,7 +184,11 @@ if (!optionalfilename) { return std::nullopt; } +#if defined(MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE) + mpt::path & filename = *optionalfilename; +#else mpt::path & filename = optionalfilename.value(); +#endif if (filename.empty()) { return std::nullopt; } @@ -330,7 +334,11 @@ if (!optionalfilename) { return std::nullopt; } +#if defined(MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE) + mpt::path & filename = *optionalfilename; +#else mpt::path & filename = optionalfilename.value(); +#endif if (filename.empty()) { return std::nullopt; } @@ -384,7 +392,11 @@ if (!optionalfilename) { return std::nullopt; } +#if defined(MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE) + mpt::path & filename = *optionalfilename; +#else mpt::path & filename = optionalfilename.value(); +#endif if (filename.empty()) { return std::nullopt; } |
From: <sv...@op...> - 2024-12-26 19:18:12
|
Author: manx Date: Thu Dec 26 20:18:00 2024 New Revision: 22614 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22614 Log: Merged revision(s) 22609 from trunk/OpenMPT: [Fix] mpt/base/source_location.hpp: Work-around missing std::source_location builtins in older Apple Clang versions. See <https://github.com/fink/fink-distributions/issues/1202>. ........ Modified: branches/OpenMPT-1.30/ (props changed) branches/OpenMPT-1.30/src/mpt/base/source_location.hpp Modified: branches/OpenMPT-1.30/src/mpt/base/source_location.hpp ============================================================================== --- branches/OpenMPT-1.30/src/mpt/base/source_location.hpp Thu Dec 26 20:17:29 2024 (r22613) +++ branches/OpenMPT-1.30/src/mpt/base/source_location.hpp Thu Dec 26 20:18:00 2024 (r22614) @@ -41,7 +41,11 @@ #define MPT_SOURCE_LOCATION_LINE __builtin_LINE() #define MPT_SOURCE_LOCATION_COLUMN 0 -#elif MPT_COMPILER_CLANG && MPT_CLANG_AT_LEAST(9, 0, 0) +#elif MPT_COMPILER_CLANG && ((!MPT_OS_MACOSX_OR_IOS && MPT_CLANG_AT_LEAST(9, 0, 0)) || (MPT_OS_MACOSX_OR_IOS && MPT_CLANG_AT_LEAST(12, 0, 0))) + +// We do not know which Apple Clang version introduced __builtin_FILE(). +// It fails with 10.x (see <https://github.com/fink/fink-distributions/issues/1202>), +// and IRC dicussion decided on 12.x as a somewhat safe choice. #define MPT_SOURCE_LOCATION_FILE __builtin_FILE() #define MPT_SOURCE_LOCATION_FUNCTION __builtin_FUNCTION() |
From: <sv...@op...> - 2024-12-26 19:17:46
|
Author: manx Date: Thu Dec 26 20:17:29 2024 New Revision: 22613 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22613 Log: Merged revision(s) 22608 from trunk/OpenMPT: [Fix] mpt/base/detect_quirks.hpp: Add MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE for older Apple Clang. See <https://github.com/fink/fink-distributions/issues/1202>. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/common/mptString.h branches/OpenMPT-1.31/soundlib/Dlsbank.cpp branches/OpenMPT-1.31/soundlib/Load_mod.cpp branches/OpenMPT-1.31/src/mpt/base/detect_quirks.hpp branches/OpenMPT-1.31/src/mpt/io_file_adapter/fileadapter.hpp branches/OpenMPT-1.31/src/mpt/library/library.hpp Modified: branches/OpenMPT-1.31/common/mptString.h ============================================================================== --- branches/OpenMPT-1.31/common/mptString.h Thu Dec 26 20:16:50 2024 (r22612) +++ branches/OpenMPT-1.31/common/mptString.h Thu Dec 26 20:17:29 2024 (r22613) @@ -429,7 +429,11 @@ std::optional<mpt::common_encoding> charset = mpt::optional_encoding_from_codepage(codepage); if(charset.has_value()) { +#if defined(MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE) + result = mpt::transcode<mpt::ustring>(*charset, std::forward<Tsrc>(str)); +#else result = mpt::transcode<mpt::ustring>(charset.value(), std::forward<Tsrc>(str)); +#endif } else if(mpt::has_codepage(static_cast<UINT>(codepage))) { result = mpt::transcode<mpt::ustring>(static_cast<UINT>(codepage), std::forward<Tsrc>(str)); @@ -440,7 +444,11 @@ return result; #else // !MPT_OS_WINDOWS std::optional<mpt::common_encoding> charset = mpt::optional_encoding_from_codepage(codepage); +#if defined(MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE) return charset.has_value() ? mpt::transcode<mpt::ustring>(charset.value(), std::forward<Tsrc>(str)) : mpt::transcode<mpt::ustring>(std::forward<Tencoding>(fallback), std::forward<Tsrc>(str)); +#else + return charset.has_value() ? mpt::transcode<mpt::ustring>(*charset, std::forward<Tsrc>(str)) : mpt::transcode<mpt::ustring>(std::forward<Tencoding>(fallback), std::forward<Tsrc>(str)); +#endif #endif // MPT_OS_WINDOWS } Modified: branches/OpenMPT-1.31/soundlib/Dlsbank.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/Dlsbank.cpp Thu Dec 26 20:16:50 2024 (r22612) +++ branches/OpenMPT-1.31/soundlib/Dlsbank.cpp Thu Dec 26 20:17:29 2024 (r22613) @@ -1415,7 +1415,13 @@ uint32 nInsDef; if(file.GetOptionalFileName()) + { +#if defined(MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE) + m_szFileName = *(file.GetOptionalFileName()); +#else m_szFileName = file.GetOptionalFileName().value(); +#endif + } file.Rewind(); if(!file.CanRead(256)) Modified: branches/OpenMPT-1.31/soundlib/Load_mod.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/Load_mod.cpp Thu Dec 26 20:16:50 2024 (r22612) +++ branches/OpenMPT-1.31/soundlib/Load_mod.cpp Thu Dec 26 20:17:29 2024 (r22613) @@ -1286,7 +1286,11 @@ FileReader amData; if(file.GetOptionalFileName()) { +#if defined(MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE) + mpt::PathString filename = *(file.GetOptionalFileName()); +#else mpt::PathString filename = file.GetOptionalFileName().value(); +#endif // Find instrument definition file const mpt::PathString exts[] = {P_(".nt"), P_(".NT"), P_(".as"), P_(".AS")}; for(const auto &ext : exts) Modified: branches/OpenMPT-1.31/src/mpt/base/detect_quirks.hpp ============================================================================== --- branches/OpenMPT-1.31/src/mpt/base/detect_quirks.hpp Thu Dec 26 20:16:50 2024 (r22612) +++ branches/OpenMPT-1.31/src/mpt/base/detect_quirks.hpp Thu Dec 26 20:17:29 2024 (r22613) @@ -322,4 +322,20 @@ +#if MPT_OS_MACOSX_OR_IOS +#if defined(TARGET_OS_OSX) +#if TARGET_OS_OSX +#if !defined(MAC_OS_X_VERSION_10_14) +#define MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE +#else +#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_14) +#define MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE +#endif +#endif +#endif +#endif +#endif + + + #endif // MPT_BASE_DETECT_QUIRKS_HPP Modified: branches/OpenMPT-1.31/src/mpt/io_file_adapter/fileadapter.hpp ============================================================================== --- branches/OpenMPT-1.31/src/mpt/io_file_adapter/fileadapter.hpp Thu Dec 26 20:16:50 2024 (r22612) +++ branches/OpenMPT-1.31/src/mpt/io_file_adapter/fileadapter.hpp Thu Dec 26 20:17:29 2024 (r22613) @@ -135,7 +135,11 @@ m_Filename = tempName; m_IsTempFile = true; } else { +#if defined(MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE) + m_Filename = *(file.GetOptionalFileName()); +#else m_Filename = file.GetOptionalFileName().value(); +#endif } } catch (const std::runtime_error &) { m_Filename = mpt::os_path{}; Modified: branches/OpenMPT-1.31/src/mpt/library/library.hpp ============================================================================== --- branches/OpenMPT-1.31/src/mpt/library/library.hpp Thu Dec 26 20:16:50 2024 (r22612) +++ branches/OpenMPT-1.31/src/mpt/library/library.hpp Thu Dec 26 20:17:29 2024 (r22613) @@ -187,7 +187,11 @@ if (!optionalfilename) { return std::nullopt; } +#if defined(MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE) + mpt::native_path & filename = *optionalfilename; +#else mpt::native_path & filename = optionalfilename.value(); +#endif if (filename.empty()) { return std::nullopt; } @@ -351,7 +355,11 @@ if (!optionalfilename) { return std::nullopt; } +#if defined(MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE) + mpt::native_path & filename = *optionalfilename; +#else mpt::native_path & filename = optionalfilename.value(); +#endif if (filename.empty()) { return std::nullopt; } @@ -405,7 +413,11 @@ if (!optionalfilename) { return std::nullopt; } +#if defined(MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE) + mpt::native_path & filename = *optionalfilename; +#else mpt::native_path & filename = optionalfilename.value(); +#endif if (filename.empty()) { return std::nullopt; } |
From: <sv...@op...> - 2024-12-26 19:17:01
|
Author: manx Date: Thu Dec 26 20:16:50 2024 New Revision: 22612 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22612 Log: Merged revision(s) 22607 from trunk/OpenMPT: [Fix] mpt/base/detect_quirks.hpp: Be more defensive with macOS target version check for older XCode. ........ Modified: branches/OpenMPT-1.30/ (props changed) branches/OpenMPT-1.30/src/mpt/base/detect_quirks.hpp Modified: branches/OpenMPT-1.30/src/mpt/base/detect_quirks.hpp ============================================================================== --- branches/OpenMPT-1.30/src/mpt/base/detect_quirks.hpp Thu Dec 26 20:16:25 2024 (r22611) +++ branches/OpenMPT-1.30/src/mpt/base/detect_quirks.hpp Thu Dec 26 20:16:50 2024 (r22612) @@ -138,11 +138,15 @@ #if MPT_OS_MACOSX_OR_IOS #if defined(TARGET_OS_OSX) #if TARGET_OS_OSX +#if !defined(MAC_OS_X_VERSION_10_15) +#define MPT_LIBCXX_QUIRK_NO_TO_CHARS_INT +#else #if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_15) #define MPT_LIBCXX_QUIRK_NO_TO_CHARS_INT #endif #endif #endif +#endif #endif |
From: <sv...@op...> - 2024-12-26 19:16:40
|
Author: manx Date: Thu Dec 26 20:16:25 2024 New Revision: 22611 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22611 Log: Merged revision(s) 22609 from trunk/OpenMPT: [Fix] mpt/base/source_location.hpp: Work-around missing std::source_location builtins in older Apple Clang versions. See <https://github.com/fink/fink-distributions/issues/1202>. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/src/mpt/base/source_location.hpp Modified: branches/OpenMPT-1.31/src/mpt/base/source_location.hpp ============================================================================== --- branches/OpenMPT-1.31/src/mpt/base/source_location.hpp Thu Dec 26 20:16:02 2024 (r22610) +++ branches/OpenMPT-1.31/src/mpt/base/source_location.hpp Thu Dec 26 20:16:25 2024 (r22611) @@ -41,7 +41,11 @@ #define MPT_SOURCE_LOCATION_LINE __builtin_LINE() #define MPT_SOURCE_LOCATION_COLUMN 0 -#elif MPT_COMPILER_CLANG && MPT_CLANG_AT_LEAST(9, 0, 0) +#elif MPT_COMPILER_CLANG && ((!MPT_OS_MACOSX_OR_IOS && MPT_CLANG_AT_LEAST(9, 0, 0)) || (MPT_OS_MACOSX_OR_IOS && MPT_CLANG_AT_LEAST(12, 0, 0))) + +// We do not know which Apple Clang version introduced __builtin_FILE(). +// It fails with 10.x (see <https://github.com/fink/fink-distributions/issues/1202>), +// and IRC dicussion decided on 12.x as a somewhat safe choice. #define MPT_SOURCE_LOCATION_FILE __builtin_FILE() #define MPT_SOURCE_LOCATION_FUNCTION __builtin_FUNCTION() |
From: <sv...@op...> - 2024-12-26 19:16:10
|
Author: manx Date: Thu Dec 26 20:16:02 2024 New Revision: 22610 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22610 Log: Merged revision(s) 22607 from trunk/OpenMPT: [Fix] mpt/base/detect_quirks.hpp: Be more defensive with macOS target version check for older XCode. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/src/mpt/base/detect_quirks.hpp Modified: branches/OpenMPT-1.31/src/mpt/base/detect_quirks.hpp ============================================================================== --- branches/OpenMPT-1.31/src/mpt/base/detect_quirks.hpp Thu Dec 26 20:14:51 2024 (r22609) +++ branches/OpenMPT-1.31/src/mpt/base/detect_quirks.hpp Thu Dec 26 20:16:02 2024 (r22610) @@ -291,11 +291,15 @@ #elif MPT_OS_MACOSX_OR_IOS #if defined(TARGET_OS_OSX) #if TARGET_OS_OSX +#if !defined(MAC_OS_X_VERSION_10_15) +#define MPT_LIBCXX_QUIRK_NO_TO_CHARS_INT +#else #if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_15) #define MPT_LIBCXX_QUIRK_NO_TO_CHARS_INT #endif #endif #endif +#endif #endif |
From: <sv...@op...> - 2024-12-26 19:14:57
|
Author: manx Date: Thu Dec 26 20:14:51 2024 New Revision: 22609 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22609 Log: [Fix] mpt/base/source_location.hpp: Work-around missing std::source_location builtins in older Apple Clang versions. See <https://github.com/fink/fink-distributions/issues/1202>. Modified: trunk/OpenMPT/src/mpt/base/source_location.hpp Modified: trunk/OpenMPT/src/mpt/base/source_location.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/base/source_location.hpp Thu Dec 26 20:11:29 2024 (r22608) +++ trunk/OpenMPT/src/mpt/base/source_location.hpp Thu Dec 26 20:14:51 2024 (r22609) @@ -41,7 +41,11 @@ #define MPT_SOURCE_LOCATION_LINE __builtin_LINE() #define MPT_SOURCE_LOCATION_COLUMN 0 -#elif MPT_COMPILER_CLANG && MPT_CLANG_AT_LEAST(9, 0, 0) +#elif MPT_COMPILER_CLANG && ((!MPT_OS_MACOSX_OR_IOS && MPT_CLANG_AT_LEAST(9, 0, 0)) || (MPT_OS_MACOSX_OR_IOS && MPT_CLANG_AT_LEAST(12, 0, 0))) + +// We do not know which Apple Clang version introduced __builtin_FILE(). +// It fails with 10.x (see <https://github.com/fink/fink-distributions/issues/1202>), +// and IRC dicussion decided on 12.x as a somewhat safe choice. #define MPT_SOURCE_LOCATION_FILE __builtin_FILE() #define MPT_SOURCE_LOCATION_FUNCTION __builtin_FUNCTION() |
From: <sv...@op...> - 2024-12-26 19:11:42
|
Author: manx Date: Thu Dec 26 20:11:29 2024 New Revision: 22608 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22608 Log: [Fix] mpt/base/detect_quirks.hpp: Add MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE for older Apple Clang. See <https://github.com/fink/fink-distributions/issues/1202>. Modified: trunk/OpenMPT/common/mptString.h trunk/OpenMPT/soundlib/Dlsbank.cpp trunk/OpenMPT/soundlib/Load_mod.cpp trunk/OpenMPT/src/mpt/base/detect_quirks.hpp trunk/OpenMPT/src/mpt/io_file_adapter/fileadapter.hpp trunk/OpenMPT/src/mpt/library/library.hpp Modified: trunk/OpenMPT/common/mptString.h ============================================================================== --- trunk/OpenMPT/common/mptString.h Thu Dec 26 20:04:41 2024 (r22607) +++ trunk/OpenMPT/common/mptString.h Thu Dec 26 20:11:29 2024 (r22608) @@ -430,7 +430,11 @@ std::optional<mpt::common_encoding> charset = mpt::optional_encoding_from_codepage(codepage); if(charset.has_value()) { +#if defined(MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE) + result = mpt::transcode<mpt::ustring>(*charset, std::forward<Tsrc>(str)); +#else result = mpt::transcode<mpt::ustring>(charset.value(), std::forward<Tsrc>(str)); +#endif } else if(mpt::has_codepage(static_cast<UINT>(codepage))) { result = mpt::transcode<mpt::ustring>(static_cast<UINT>(codepage), std::forward<Tsrc>(str)); @@ -441,7 +445,11 @@ return result; #else // !MPT_OS_WINDOWS std::optional<mpt::common_encoding> charset = mpt::optional_encoding_from_codepage(codepage); +#if defined(MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE) return charset.has_value() ? mpt::transcode<mpt::ustring>(charset.value(), std::forward<Tsrc>(str)) : mpt::transcode<mpt::ustring>(std::forward<Tencoding>(fallback), std::forward<Tsrc>(str)); +#else + return charset.has_value() ? mpt::transcode<mpt::ustring>(*charset, std::forward<Tsrc>(str)) : mpt::transcode<mpt::ustring>(std::forward<Tencoding>(fallback), std::forward<Tsrc>(str)); +#endif #endif // MPT_OS_WINDOWS } Modified: trunk/OpenMPT/soundlib/Dlsbank.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Dlsbank.cpp Thu Dec 26 20:04:41 2024 (r22607) +++ trunk/OpenMPT/soundlib/Dlsbank.cpp Thu Dec 26 20:11:29 2024 (r22608) @@ -1423,7 +1423,13 @@ uint32 nInsDef; if(file.GetOptionalFileName()) + { +#if defined(MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE) + m_szFileName = *(file.GetOptionalFileName()); +#else m_szFileName = file.GetOptionalFileName().value(); +#endif + } file.Rewind(); if(!file.CanRead(256)) Modified: trunk/OpenMPT/soundlib/Load_mod.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_mod.cpp Thu Dec 26 20:04:41 2024 (r22607) +++ trunk/OpenMPT/soundlib/Load_mod.cpp Thu Dec 26 20:11:29 2024 (r22608) @@ -712,7 +712,11 @@ FileReader amData; if(file.GetOptionalFileName()) { +#if defined(MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE) + mpt::PathString filename = *(file.GetOptionalFileName()); +#else mpt::PathString filename = file.GetOptionalFileName().value(); +#endif // Find instrument definition file const mpt::PathString exts[] = {P_(".nt"), P_(".NT"), P_(".as"), P_(".AS")}; for(const auto &ext : exts) Modified: trunk/OpenMPT/src/mpt/base/detect_quirks.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/base/detect_quirks.hpp Thu Dec 26 20:04:41 2024 (r22607) +++ trunk/OpenMPT/src/mpt/base/detect_quirks.hpp Thu Dec 26 20:11:29 2024 (r22608) @@ -355,4 +355,20 @@ +#if MPT_OS_MACOSX_OR_IOS +#if defined(TARGET_OS_OSX) +#if TARGET_OS_OSX +#if !defined(MAC_OS_X_VERSION_10_14) +#define MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE +#else +#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_14) +#define MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE +#endif +#endif +#endif +#endif +#endif + + + #endif // MPT_BASE_DETECT_QUIRKS_HPP Modified: trunk/OpenMPT/src/mpt/io_file_adapter/fileadapter.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/io_file_adapter/fileadapter.hpp Thu Dec 26 20:04:41 2024 (r22607) +++ trunk/OpenMPT/src/mpt/io_file_adapter/fileadapter.hpp Thu Dec 26 20:11:29 2024 (r22608) @@ -135,7 +135,11 @@ m_Filename = tempName; m_IsTempFile = true; } else { +#if defined(MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE) + m_Filename = *(file.GetOptionalFileName()); +#else m_Filename = file.GetOptionalFileName().value(); +#endif } } catch (const std::runtime_error &) { m_Filename = mpt::os_path{}; Modified: trunk/OpenMPT/src/mpt/library/library.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/library/library.hpp Thu Dec 26 20:04:41 2024 (r22607) +++ trunk/OpenMPT/src/mpt/library/library.hpp Thu Dec 26 20:11:29 2024 (r22608) @@ -187,7 +187,11 @@ if (!optionalfilename) { return std::nullopt; } +#if defined(MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE) + mpt::native_path & filename = *optionalfilename; +#else mpt::native_path & filename = optionalfilename.value(); +#endif if (filename.empty()) { return std::nullopt; } @@ -351,7 +355,11 @@ if (!optionalfilename) { return std::nullopt; } +#if defined(MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE) + mpt::native_path & filename = *optionalfilename; +#else mpt::native_path & filename = optionalfilename.value(); +#endif if (filename.empty()) { return std::nullopt; } @@ -405,7 +413,11 @@ if (!optionalfilename) { return std::nullopt; } +#if defined(MPT_LIBCXX_QUIRK_NO_OPTIONAL_VALUE) + mpt::native_path & filename = *optionalfilename; +#else mpt::native_path & filename = optionalfilename.value(); +#endif if (filename.empty()) { return std::nullopt; } |
From: <sv...@op...> - 2024-12-26 19:04:54
|
Author: manx Date: Thu Dec 26 20:04:41 2024 New Revision: 22607 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22607 Log: [Fix] mpt/base/detect_quirks.hpp: Be more defensive with macOS target version check for older XCode. Modified: trunk/OpenMPT/src/mpt/base/detect_quirks.hpp Modified: trunk/OpenMPT/src/mpt/base/detect_quirks.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/base/detect_quirks.hpp Mon Dec 23 17:50:51 2024 (r22606) +++ trunk/OpenMPT/src/mpt/base/detect_quirks.hpp Thu Dec 26 20:04:41 2024 (r22607) @@ -318,11 +318,15 @@ #elif MPT_OS_MACOSX_OR_IOS #if defined(TARGET_OS_OSX) #if TARGET_OS_OSX +#if !defined(MAC_OS_X_VERSION_10_15) +#define MPT_LIBCXX_QUIRK_NO_TO_CHARS_INT +#else #if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_15) #define MPT_LIBCXX_QUIRK_NO_TO_CHARS_INT #endif #endif #endif +#endif #endif |
From: <sv...@op...> - 2024-12-23 16:51:03
|
Author: sagamusix Date: Mon Dec 23 17:50:51 2024 New Revision: 22606 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22606 Log: Merged revision(s) 22605 from trunk/OpenMPT: [Imp] Sample tab: Cue preview shortcuts now set the cue point if it's currently unused and the sample is playing (https://bugs.openmpt.org/view.php?id=1852). ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/mptrack/View_smp.cpp branches/OpenMPT-1.31/mptrack/View_smp.h Modified: branches/OpenMPT-1.31/mptrack/View_smp.cpp ============================================================================== --- branches/OpenMPT-1.31/mptrack/View_smp.cpp Mon Dec 23 17:49:54 2024 (r22605) +++ branches/OpenMPT-1.31/mptrack/View_smp.cpp Mon Dec 23 17:50:51 2024 (r22606) @@ -1394,30 +1394,10 @@ if(m_nZoom != 0 && TrackerSettings::Instance().m_followSamplePlayCursor != FollowSamplePlayCursor::DoNotFollow) { // Scroll sample into view if it's not in the visible range - size_t count = 0; - SmpLength scrollToPos = 0; - bool backwards = false; - const auto &playChns = GetDocument()->GetSoundFile().m_PlayState.Chn; - for(CHANNELINDEX chn = 0; chn < MAX_CHANNELS; chn++) - { - if(m_dwNotifyPos[chn] == Notification::PosInvalid) - continue; - - // Only update based on notes triggered by this view - if(!playChns[chn].isPreviewNote) - continue; - if(!ModCommand::IsNote(playChns[chn].nNewNote) || m_noteChannel[playChns[chn].nNewNote - NOTE_MIN] != chn) - continue; - - count++; - if(count > 1) - break; - - scrollToPos = m_dwNotifyPos[chn]; - backwards = playChns[chn].dwFlags[CHN_PINGPONGFLAG]; - } - if(count == 1) + const CHANNELINDEX previewChannel = GetPreviewChannel(); + if(previewChannel != CHANNELINDEX_INVALID) { + const SmpLength scrollToPos = m_dwNotifyPos[previewChannel]; const auto screenPos = SampleToScreen(scrollToPos); const bool alwaysCenter = (TrackerSettings::Instance().m_followSamplePlayCursor == FollowSamplePlayCursor::FollowCentered); if(alwaysCenter || screenPos < m_rcClient.left || screenPos >= m_rcClient.right) @@ -1425,7 +1405,7 @@ ScrollTarget target = ScrollTarget::Left; if(alwaysCenter) target = ScrollTarget::Center; - else if(backwards) + else if(GetDocument()->GetSoundFile().m_PlayState.Chn[previewChannel].dwFlags[CHN_PINGPONGFLAG]) // TODO: this should be taken via notification, not directly from player state target = ScrollTarget::Right; ScrollToSample(scrollToPos, true, target); } @@ -1441,6 +1421,31 @@ } +CHANNELINDEX CViewSample::GetPreviewChannel() const +{ + size_t count = 0; + CHANNELINDEX channel = CHANNELINDEX_INVALID; + const auto &playChns = GetDocument()->GetSoundFile().m_PlayState.Chn; + for(CHANNELINDEX chn = 0; chn < MAX_CHANNELS; chn++) + { + if(m_dwNotifyPos[chn] == Notification::PosInvalid) + continue; + + // Only update based on notes triggered by this view + if(!playChns[chn].isPreviewNote) + continue; + if(!ModCommand::IsNote(playChns[chn].nNewNote) || m_noteChannel[playChns[chn].nNewNote - NOTE_MIN] != chn) + continue; + + count++; + if(count > 1) + return CHANNELINDEX_INVALID; + channel = chn; + } + return channel; +} + + bool CViewSample::GetNcButtonRect(UINT button, CRect &rect) const { rect.left = 4; @@ -3853,10 +3858,7 @@ } } else if(wParam >= kcStartSampleCues && wParam <= kcEndSampleCues) { - const ModSample &sample = sndFile.GetSample(m_nSample); - SmpLength offset = sample.cues[wParam - kcStartSampleCues]; - if(offset < sample.nLength) - PlayNote(NOTE_MIDDLEC, offset); + PlayOrSetCuePoint(wParam - kcStartSampleCues); return wParam; } @@ -3865,6 +3867,29 @@ } +void CViewSample::PlayOrSetCuePoint(size_t cue) +{ + CModDoc *modDoc = GetDocument(); + if(modDoc == nullptr) + return; + CSoundFile &sndFile = modDoc->GetSoundFile(); + ModSample &sample = sndFile.GetSample(m_nSample); + SmpLength offset = sample.cues[cue]; + if(offset < sample.nLength) + { + PlayNote(NOTE_MIDDLEC, offset); + return; + } + + const CHANNELINDEX previewChannel = GetPreviewChannel(); + if(previewChannel == CHANNELINDEX_INVALID) + return; + modDoc->GetSampleUndo().PrepareUndo(m_nSample, sundo_none, "Set Cue Point"); + sample.cues[cue] = m_dwNotifyPos[previewChannel]; + SetModified(SampleHint().Info(), true, false); +} + + void CViewSample::OnSampleSlice() { CModDoc *modDoc = GetDocument(); Modified: branches/OpenMPT-1.31/mptrack/View_smp.h ============================================================================== --- branches/OpenMPT-1.31/mptrack/View_smp.h Mon Dec 23 17:49:54 2024 (r22605) +++ branches/OpenMPT-1.31/mptrack/View_smp.h Mon Dec 23 17:50:51 2024 (r22606) @@ -156,6 +156,11 @@ SmpLength SnapToGrid(const SmpLength pos) const; + // Returns index of preview channel if exactly one one is being previewed, CHANNELINDEX_INVALID otherwise. + CHANNELINDEX GetPreviewChannel() const; + + void PlayOrSetCuePoint(size_t cue); + public: //{{AFX_VIRTUAL(CViewSample) void OnDraw(CDC *) override; |
From: <sv...@op...> - 2024-12-23 16:50:08
|
Author: sagamusix Date: Mon Dec 23 17:49:54 2024 New Revision: 22605 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22605 Log: [Imp] Sample tab: Cue preview shortcuts now set the cue point if it's currently unused and the sample is playing (https://bugs.openmpt.org/view.php?id=1852). Modified: trunk/OpenMPT/mptrack/View_smp.cpp trunk/OpenMPT/mptrack/View_smp.h Modified: trunk/OpenMPT/mptrack/View_smp.cpp ============================================================================== --- trunk/OpenMPT/mptrack/View_smp.cpp Mon Dec 23 13:57:57 2024 (r22604) +++ trunk/OpenMPT/mptrack/View_smp.cpp Mon Dec 23 17:49:54 2024 (r22605) @@ -1384,30 +1384,10 @@ if(m_nZoom != 0 && TrackerSettings::Instance().m_followSamplePlayCursor != FollowSamplePlayCursor::DoNotFollow) { // Scroll sample into view if it's not in the visible range - size_t count = 0; - SmpLength scrollToPos = 0; - bool backwards = false; - const auto &playChns = GetDocument()->GetSoundFile().m_PlayState.Chn; - for(CHANNELINDEX chn = 0; chn < MAX_CHANNELS; chn++) - { - if(m_dwNotifyPos[chn] == Notification::PosInvalid) - continue; - - // Only update based on notes triggered by this view - if(!playChns[chn].isPreviewNote) - continue; - if(!ModCommand::IsNote(playChns[chn].nNewNote) || m_noteChannel[playChns[chn].nNewNote - NOTE_MIN] != chn) - continue; - - count++; - if(count > 1) - break; - - scrollToPos = m_dwNotifyPos[chn]; - backwards = playChns[chn].dwFlags[CHN_PINGPONGFLAG]; - } - if(count == 1) + const CHANNELINDEX previewChannel = GetPreviewChannel(); + if(previewChannel != CHANNELINDEX_INVALID) { + const SmpLength scrollToPos = m_dwNotifyPos[previewChannel]; const auto screenPos = SampleToScreen(scrollToPos); const bool alwaysCenter = (TrackerSettings::Instance().m_followSamplePlayCursor == FollowSamplePlayCursor::FollowCentered); if(alwaysCenter || screenPos < m_rcClient.left || screenPos >= m_rcClient.right) @@ -1415,7 +1395,7 @@ ScrollTarget target = ScrollTarget::Left; if(alwaysCenter) target = ScrollTarget::Center; - else if(backwards) + else if(GetDocument()->GetSoundFile().m_PlayState.Chn[previewChannel].dwFlags[CHN_PINGPONGFLAG]) // TODO: this should be taken via notification, not directly from player state target = ScrollTarget::Right; ScrollToSample(scrollToPos, true, target); } @@ -1431,6 +1411,31 @@ } +CHANNELINDEX CViewSample::GetPreviewChannel() const +{ + size_t count = 0; + CHANNELINDEX channel = CHANNELINDEX_INVALID; + const auto &playChns = GetDocument()->GetSoundFile().m_PlayState.Chn; + for(CHANNELINDEX chn = 0; chn < MAX_CHANNELS; chn++) + { + if(m_dwNotifyPos[chn] == Notification::PosInvalid) + continue; + + // Only update based on notes triggered by this view + if(!playChns[chn].isPreviewNote) + continue; + if(!ModCommand::IsNote(playChns[chn].nNewNote) || m_noteChannel[playChns[chn].nNewNote - NOTE_MIN] != chn) + continue; + + count++; + if(count > 1) + return CHANNELINDEX_INVALID; + channel = chn; + } + return channel; +} + + bool CViewSample::GetNcButtonRect(UINT button, CRect &rect) const { rect.left = 4; @@ -3849,10 +3854,7 @@ } } else if(wParam >= kcStartSampleCues && wParam <= kcEndSampleCues) { - const ModSample &sample = sndFile.GetSample(m_nSample); - SmpLength offset = sample.cues[wParam - kcStartSampleCues]; - if(offset < sample.nLength) - PlayNote(NOTE_MIDDLEC, offset); + PlayOrSetCuePoint(wParam - kcStartSampleCues); return wParam; } @@ -3861,6 +3863,29 @@ } +void CViewSample::PlayOrSetCuePoint(size_t cue) +{ + CModDoc *modDoc = GetDocument(); + if(modDoc == nullptr) + return; + CSoundFile &sndFile = modDoc->GetSoundFile(); + ModSample &sample = sndFile.GetSample(m_nSample); + SmpLength offset = sample.cues[cue]; + if(offset < sample.nLength) + { + PlayNote(NOTE_MIDDLEC, offset); + return; + } + + const CHANNELINDEX previewChannel = GetPreviewChannel(); + if(previewChannel == CHANNELINDEX_INVALID) + return; + modDoc->GetSampleUndo().PrepareUndo(m_nSample, sundo_none, "Set Cue Point"); + sample.cues[cue] = m_dwNotifyPos[previewChannel]; + SetModified(SampleHint().Info(), true, false); +} + + void CViewSample::OnSampleSlice() { CModDoc *modDoc = GetDocument(); Modified: trunk/OpenMPT/mptrack/View_smp.h ============================================================================== --- trunk/OpenMPT/mptrack/View_smp.h Mon Dec 23 13:57:57 2024 (r22604) +++ trunk/OpenMPT/mptrack/View_smp.h Mon Dec 23 17:49:54 2024 (r22605) @@ -157,6 +157,11 @@ SmpLength SnapToGrid(const SmpLength pos) const; + // Returns index of preview channel if exactly one one is being previewed, CHANNELINDEX_INVALID otherwise. + CHANNELINDEX GetPreviewChannel() const; + + void PlayOrSetCuePoint(size_t cue); + public: //{{AFX_VIRTUAL(CViewSample) void OnDraw(CDC *) override; |
From: <sv...@op...> - 2024-12-23 12:58:22
|
Author: sagamusix Date: Mon Dec 23 13:57:57 2024 New Revision: 22604 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22604 Log: [Mod] XMPlay input plugin: Prefer using the default output format requested by XMPlay by default. Modified: trunk/OpenMPT/libopenmpt/plugin-common/libopenmpt_plugin_settings.hpp Modified: trunk/OpenMPT/libopenmpt/plugin-common/libopenmpt_plugin_settings.hpp ============================================================================== --- trunk/OpenMPT/libopenmpt/plugin-common/libopenmpt_plugin_settings.hpp Sat Dec 21 22:43:00 2024 (r22603) +++ trunk/OpenMPT/libopenmpt/plugin-common/libopenmpt_plugin_settings.hpp Mon Dec 23 13:57:57 2024 (r22604) @@ -74,6 +74,10 @@ : subkey(subkey) { no_default_format = no_default_format_; + if (!no_default_format) { + samplerate = 0; + channels = 0; + } } void load() { |
From: <sv...@op...> - 2024-12-21 21:43:11
|
Author: sagamusix Date: Sat Dec 21 22:43:00 2024 New Revision: 22603 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22603 Log: [Fix] We need a compatibility flag for the new NNA behaviour, it breaks files relying on the old NNA=Continue behaviour that didn't really act as expected, because notes kept being associated with the pattern channel. Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp trunk/OpenMPT/soundlib/Snd_defs.h trunk/OpenMPT/soundlib/Snd_fx.cpp trunk/OpenMPT/soundlib/UpgradeModule.cpp Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp ============================================================================== --- trunk/OpenMPT/mptrack/dlg_misc.cpp Sat Dec 21 21:48:51 2024 (r22602) +++ trunk/OpenMPT/mptrack/dlg_misc.cpp Sat Dec 21 22:43:00 2024 (r22603) @@ -764,6 +764,7 @@ case kS3MIgnoreCombinedFineSlides: desc =_T("Ignore combined fine slides (Kxy / Lxy)"); break; case kFT2AutoVibratoAbortSweep: desc = _T("Key-off before auto-vibrato sweep-in is complete resets auto-vibrato depth"); break; case kLegacyPPQpos: desc = _T("Report inaccurate PPQ position to VST plugins (like OpenMPT 1.31 and older)"); break; + case kLegacyPluginNNABehaviour: desc = _T("Plugin notes with New Note Action set to Continue are affected by note-offs (like OpenMPT 1.31 and older)"); break; default: MPT_ASSERT_NOTREACHED(); } Modified: trunk/OpenMPT/soundlib/Snd_defs.h ============================================================================== --- trunk/OpenMPT/soundlib/Snd_defs.h Sat Dec 21 21:48:51 2024 (r22602) +++ trunk/OpenMPT/soundlib/Snd_defs.h Sat Dec 21 22:43:00 2024 (r22603) @@ -614,6 +614,7 @@ kS3MIgnoreCombinedFineSlides, // S3M commands Kxy and Lxy ignore fine slides kFT2AutoVibratoAbortSweep, // Key-off before auto-vibrato sweep-in is complete resets auto-vibrato depth kLegacyPPQpos, // Report fake PPQ position to VST plugins + kLegacyPluginNNABehaviour, // Plugin notes with NNA=continue are affected by note-offs etc. // Add new play behaviours here. Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp Sat Dec 21 21:48:51 2024 (r22602) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp Sat Dec 21 22:43:00 2024 (r22603) @@ -2501,7 +2501,7 @@ // If there's no NNA channels available, avoid the note lingering on forever if(nnaChn == CHANNELINDEX_INVALID) SendMIDINote(nChn, NOTE_KEYOFF, 0, m_playBehaviour[kMIDINotesFromChannelPlugin] ? pPlugin : nullptr); - else + else if(!m_playBehaviour[kLegacyPluginNNABehaviour]) pPlugin->MoveChannel(nChn, nnaChn); break; } @@ -5300,7 +5300,7 @@ IMixPlugin *pPlugin; if(pIns != nullptr && pIns->nMixPlug && (pPlugin = m_MixPlugins[pIns->nMixPlug - 1].pMixPlugin) != nullptr) { - pPlugin->MidiCommand(*pIns, bkChn.nNote | IMixPlugin::MIDI_NOTE_OFF, 0, nChn); + pPlugin->MidiCommand(*pIns, bkChn.nNote | IMixPlugin::MIDI_NOTE_OFF, 0, m_playBehaviour[kLegacyPluginNNABehaviour] ? nChn : i); } #endif // NO_PLUGINS } Modified: trunk/OpenMPT/soundlib/UpgradeModule.cpp ============================================================================== --- trunk/OpenMPT/soundlib/UpgradeModule.cpp Sat Dec 21 21:48:51 2024 (r22602) +++ trunk/OpenMPT/soundlib/UpgradeModule.cpp Sat Dec 21 22:43:00 2024 (r22603) @@ -805,6 +805,18 @@ } } } + + if(m_dwLastSavedWithVersion < MPT_V("1.32.00.38") && hasAnyPlugins) + { + for(const auto &plugin : m_MixPlugins) + { + if(plugin.Info.dwPluginId1 == PLUGMAGIC('V', 's', 't', 'P')) + { + m_playBehaviour.set(kLegacyPluginNNABehaviour); + break; + } + } + } #endif } |