From: <man...@us...> - 2013-07-01 17:38:31
|
Revision: 2473 http://sourceforge.net/p/modplug/code/2473 Author: manxorist Date: 2013-07-01 17:38:20 +0000 (Mon, 01 Jul 2013) Log Message: ----------- [Mod] Remove QUALITY render param. [Mod] Remove openmpt123 --quality option. It was a bad idea and just an alias for filter length anyway. [Mod] Remove MAXMIXCHANNELS render param. [Mod] Remove polyphony options from libopenmpt plugins. [Mod] Reorder render param indices. [New] Add generic ctl API to libopenmpt. [Fix] Correct path to svn_version_template.h in libopenmpt vs2010 project file, so it does not try to rebuild always. [Fix] Properly disable C++ API with unsupported compiler settings. [Fix] Make libopenmpt_modplug build on win64 again. [Ref] Minor tweaks to libopenmpt windows build. Modified Paths: -------------- trunk/OpenMPT/libopenmpt/SettingsForm.h trunk/OpenMPT/libopenmpt/libopenmpt.h trunk/OpenMPT/libopenmpt/libopenmpt.hpp trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters trunk/OpenMPT/libopenmpt/libopenmpt_c.cpp trunk/OpenMPT/libopenmpt/libopenmpt_cxx.cpp trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp trunk/OpenMPT/libopenmpt/libopenmpt_modplug.c trunk/OpenMPT/libopenmpt/libopenmpt_settings.cpp trunk/OpenMPT/libopenmpt/libopenmpt_settings.h trunk/OpenMPT/libopenmpt/libopenmpt_settings.vcxproj trunk/OpenMPT/libopenmpt/libopenmpt_winamp.cpp trunk/OpenMPT/libopenmpt/libopenmpt_xmplay.cpp trunk/OpenMPT/openmpt123/openmpt123.cpp Modified: trunk/OpenMPT/libopenmpt/SettingsForm.h =================================================================== --- trunk/OpenMPT/libopenmpt/SettingsForm.h 2013-07-01 13:56:47 UTC (rev 2472) +++ trunk/OpenMPT/libopenmpt/SettingsForm.h 2013-07-01 17:38:20 UTC (rev 2473) @@ -57,8 +57,6 @@ trackBarGain->Value = settings->mastergain_millibel; - trackBarMaxPolyphony->Value = settings->maxmixchannels; - if ( settings->interpolationfilterlength == 0 ) { comboBoxInterpolation->SelectedIndex = 3; } else if ( settings->interpolationfilterlength >= 8 ) { @@ -102,8 +100,8 @@ private: System::Windows::Forms::ComboBox^ comboBoxChannels; private: System::Windows::Forms::Label^ labelGain; private: System::Windows::Forms::TrackBar^ trackBarGain; - private: System::Windows::Forms::Label^ labelMaxPolyphony; - private: System::Windows::Forms::TrackBar^ trackBarMaxPolyphony; + + private: System::Windows::Forms::Label^ labelInterpolation; private: System::Windows::Forms::ComboBox^ comboBoxInterpolation; private: System::Windows::Forms::Label^ labelRepeat; @@ -138,8 +136,6 @@ this->comboBoxChannels = (gcnew System::Windows::Forms::ComboBox()); this->labelGain = (gcnew System::Windows::Forms::Label()); this->trackBarGain = (gcnew System::Windows::Forms::TrackBar()); - this->labelMaxPolyphony = (gcnew System::Windows::Forms::Label()); - this->trackBarMaxPolyphony = (gcnew System::Windows::Forms::TrackBar()); this->labelInterpolation = (gcnew System::Windows::Forms::Label()); this->comboBoxInterpolation = (gcnew System::Windows::Forms::ComboBox()); this->labelRepeat = (gcnew System::Windows::Forms::Label()); @@ -151,7 +147,6 @@ this->trackBarVolrampin = (gcnew System::Windows::Forms::TrackBar()); this->trackBarVolrampout = (gcnew System::Windows::Forms::TrackBar()); (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->trackBarGain))->BeginInit(); - (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->trackBarMaxPolyphony))->BeginInit(); (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->trackBarStereoSeparation))->BeginInit(); (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->trackBarVolrampin))->BeginInit(); (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->trackBarVolrampout))->BeginInit(); @@ -178,7 +173,7 @@ // // buttonOK // - this->buttonOK->Location = System::Drawing::Point(15, 357); + this->buttonOK->Location = System::Drawing::Point(15, 309); this->buttonOK->Name = L"buttonOK"; this->buttonOK->Size = System::Drawing::Size(212, 23); this->buttonOK->TabIndex = 2; @@ -228,33 +223,10 @@ this->trackBarGain->TickStyle = System::Windows::Forms::TickStyle::Both; this->trackBarGain->Scroll += gcnew System::EventHandler(this, &SettingsForm::trackBarGain_Scroll); // - // labelMaxPolyphony - // - this->labelMaxPolyphony->AutoSize = true; - this->labelMaxPolyphony->Location = System::Drawing::Point(12, 124); - this->labelMaxPolyphony->Name = L"labelMaxPolyphony"; - this->labelMaxPolyphony->Size = System::Drawing::Size(77, 13); - this->labelMaxPolyphony->TabIndex = 7; - this->labelMaxPolyphony->Text = L"max polyphony"; - // - // trackBarMaxPolyphony - // - this->trackBarMaxPolyphony->LargeChange = 16; - this->trackBarMaxPolyphony->Location = System::Drawing::Point(106, 111); - this->trackBarMaxPolyphony->Maximum = 256; - this->trackBarMaxPolyphony->Minimum = 16; - this->trackBarMaxPolyphony->Name = L"trackBarMaxPolyphony"; - this->trackBarMaxPolyphony->Size = System::Drawing::Size(121, 42); - this->trackBarMaxPolyphony->TabIndex = 8; - this->trackBarMaxPolyphony->TickFrequency = 16; - this->trackBarMaxPolyphony->TickStyle = System::Windows::Forms::TickStyle::Both; - this->trackBarMaxPolyphony->Value = 256; - this->trackBarMaxPolyphony->Scroll += gcnew System::EventHandler(this, &SettingsForm::trackBarMaxPolyphony_Scroll); - // // labelInterpolation // this->labelInterpolation->AutoSize = true; - this->labelInterpolation->Location = System::Drawing::Point(12, 162); + this->labelInterpolation->Location = System::Drawing::Point(12, 114); this->labelInterpolation->Name = L"labelInterpolation"; this->labelInterpolation->Size = System::Drawing::Size(64, 13); this->labelInterpolation->TabIndex = 9; @@ -266,7 +238,7 @@ this->comboBoxInterpolation->FormattingEnabled = true; this->comboBoxInterpolation->Items->AddRange(gcnew cli::array< System::Object^ >(4) {L"1 tap (nearest)", L"2 tap (linear)", L"4 tap (cubic)", L"8 tap (polyphase fir)"}); - this->comboBoxInterpolation->Location = System::Drawing::Point(106, 159); + this->comboBoxInterpolation->Location = System::Drawing::Point(106, 111); this->comboBoxInterpolation->Name = L"comboBoxInterpolation"; this->comboBoxInterpolation->Size = System::Drawing::Size(121, 21); this->comboBoxInterpolation->TabIndex = 10; @@ -275,7 +247,7 @@ // labelRepeat // this->labelRepeat->AutoSize = true; - this->labelRepeat->Location = System::Drawing::Point(12, 189); + this->labelRepeat->Location = System::Drawing::Point(12, 141); this->labelRepeat->Name = L"labelRepeat"; this->labelRepeat->Size = System::Drawing::Size(37, 13); this->labelRepeat->TabIndex = 11; @@ -286,7 +258,7 @@ this->comboBoxRepeat->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDownList; this->comboBoxRepeat->FormattingEnabled = true; this->comboBoxRepeat->Items->AddRange(gcnew cli::array< System::Object^ >(3) {L"forever", L"never", L"once"}); - this->comboBoxRepeat->Location = System::Drawing::Point(106, 186); + this->comboBoxRepeat->Location = System::Drawing::Point(106, 138); this->comboBoxRepeat->Name = L"comboBoxRepeat"; this->comboBoxRepeat->Size = System::Drawing::Size(121, 21); this->comboBoxRepeat->TabIndex = 12; @@ -295,7 +267,7 @@ // labelStereoSeparation // this->labelStereoSeparation->AutoSize = true; - this->labelStereoSeparation->Location = System::Drawing::Point(12, 226); + this->labelStereoSeparation->Location = System::Drawing::Point(12, 178); this->labelStereoSeparation->Name = L"labelStereoSeparation"; this->labelStereoSeparation->Size = System::Drawing::Size(88, 13); this->labelStereoSeparation->TabIndex = 13; @@ -304,7 +276,7 @@ // trackBarStereoSeparation // this->trackBarStereoSeparation->LargeChange = 100; - this->trackBarStereoSeparation->Location = System::Drawing::Point(106, 213); + this->trackBarStereoSeparation->Location = System::Drawing::Point(106, 165); this->trackBarStereoSeparation->Maximum = 400; this->trackBarStereoSeparation->Name = L"trackBarStereoSeparation"; this->trackBarStereoSeparation->Size = System::Drawing::Size(121, 42); @@ -318,7 +290,7 @@ // labelVolrampin // this->labelVolrampin->AutoSize = true; - this->labelVolrampin->Location = System::Drawing::Point(12, 274); + this->labelVolrampin->Location = System::Drawing::Point(12, 226); this->labelVolrampin->Name = L"labelVolrampin"; this->labelVolrampin->Size = System::Drawing::Size(78, 13); this->labelVolrampin->TabIndex = 15; @@ -327,7 +299,7 @@ // labelVolrampout // this->labelVolrampout->AutoSize = true; - this->labelVolrampout->Location = System::Drawing::Point(12, 321); + this->labelVolrampout->Location = System::Drawing::Point(12, 273); this->labelVolrampout->Name = L"labelVolrampout"; this->labelVolrampout->Size = System::Drawing::Size(85, 13); this->labelVolrampout->TabIndex = 16; @@ -336,7 +308,7 @@ // trackBarVolrampin // this->trackBarVolrampin->LargeChange = 1000; - this->trackBarVolrampin->Location = System::Drawing::Point(106, 261); + this->trackBarVolrampin->Location = System::Drawing::Point(106, 213); this->trackBarVolrampin->Maximum = 10000; this->trackBarVolrampin->Name = L"trackBarVolrampin"; this->trackBarVolrampin->Size = System::Drawing::Size(121, 42); @@ -349,7 +321,7 @@ // trackBarVolrampout // this->trackBarVolrampout->LargeChange = 1000; - this->trackBarVolrampout->Location = System::Drawing::Point(106, 309); + this->trackBarVolrampout->Location = System::Drawing::Point(106, 261); this->trackBarVolrampout->Maximum = 10000; this->trackBarVolrampout->Name = L"trackBarVolrampout"; this->trackBarVolrampout->Size = System::Drawing::Size(121, 42); @@ -376,8 +348,6 @@ this->Controls->Add(this->labelRepeat); this->Controls->Add(this->comboBoxInterpolation); this->Controls->Add(this->labelInterpolation); - this->Controls->Add(this->trackBarMaxPolyphony); - this->Controls->Add(this->labelMaxPolyphony); this->Controls->Add(this->trackBarGain); this->Controls->Add(this->labelGain); this->Controls->Add(this->comboBoxChannels); @@ -394,7 +364,6 @@ this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent; this->Text = L"SettingsForm"; (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->trackBarGain))->EndInit(); - (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->trackBarMaxPolyphony))->EndInit(); (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->trackBarStereoSeparation))->EndInit(); (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->trackBarVolrampin))->EndInit(); (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->trackBarVolrampout))->EndInit(); @@ -450,10 +419,6 @@ } settings->changed(); } -private: System::Void trackBarMaxPolyphony_Scroll(System::Object^ sender, System::EventArgs^ e) { - settings->maxmixchannels = (int)trackBarMaxPolyphony->Value; - settings->changed(); - } private: System::Void comboBoxRepeat_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e) { settings->repeatcount = (int)comboBoxRepeat->SelectedIndex - 1; settings->changed(); Modified: trunk/OpenMPT/libopenmpt/libopenmpt.h =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.h 2013-07-01 13:56:47 UTC (rev 2472) +++ trunk/OpenMPT/libopenmpt/libopenmpt.h 2013-07-01 17:38:20 UTC (rev 2473) @@ -64,14 +64,12 @@ LIBOPENMPT_API void openmpt_module_destroy( openmpt_module * mod ); -#define OPENMPT_MODULE_RENDER_MASTERGAIN_MILLIBEL 1 -#define OPENMPT_MODULE_RENDER_STEREOSEPARATION_PERCENT 2 -#define OPENMPT_MODULE_RENDER_REPEATCOUNT 3 -#define OPENMPT_MODULE_RENDER_QUALITY_PERCENT 4 -#define OPENMPT_MODULE_RENDER_MAXMIXCHANNELS 5 -#define OPENMPT_MODULE_RENDER_INTERPOLATION_FILTER_LENGTH 6 -#define OPENMPT_MODULE_RENDER_VOLUMERAMP_UP_MICROSECONDS 7 -#define OPENMPT_MODULE_RENDER_VOLUMERAMP_DOWN_MICROSECONDS 8 +#define OPENMPT_MODULE_RENDER_REPEATCOUNT 1 +#define OPENMPT_MODULE_RENDER_MASTERGAIN_MILLIBEL 2 +#define OPENMPT_MODULE_RENDER_STEREOSEPARATION_PERCENT 3 +#define OPENMPT_MODULE_RENDER_INTERPOLATION_FILTER_LENGTH 4 +#define OPENMPT_MODULE_RENDER_VOLUMERAMP_UP_MICROSECONDS 5 +#define OPENMPT_MODULE_RENDER_VOLUMERAMP_DOWN_MICROSECONDS 6 #define OPENMPT_MODULE_COMMAND_NOTE 0 #define OPENMPT_MODULE_COMMAND_INSTRUMENT 1 @@ -80,8 +78,8 @@ #define OPENMPT_MODULE_COMMAND_VOLUME 4 #define OPENMPT_MODULE_COMMAND_PARAMETER 5 -LIBOPENMPT_API int openmpt_module_get_render_param( openmpt_module * mod, int command, int32_t * value ); -LIBOPENMPT_API int openmpt_module_set_render_param( openmpt_module * mod, int command, int32_t value ); +LIBOPENMPT_API int openmpt_module_get_render_param( openmpt_module * mod, int param, int32_t * value ); +LIBOPENMPT_API int openmpt_module_set_render_param( openmpt_module * mod, int param, int32_t value ); LIBOPENMPT_API int openmpt_module_select_subsong( openmpt_module * mod, int32_t subsong ); @@ -127,6 +125,14 @@ LIBOPENMPT_API uint8_t openmpt_module_get_pattern_row_channel_command( openmpt_module * mod, int32_t pattern, int32_t row, int32_t channel, int command ); +LIBOPENMPT_API const char * openmpt_module_get_ctls( openmpt_module * mod ); +LIBOPENMPT_API const char * openmpt_module_ctl_get_string( openmpt_module * mod, const char * ctl ); +LIBOPENMPT_API int openmpt_module_ctl_get_double( openmpt_module * mod, const char * ctl, double * value ); +LIBOPENMPT_API int openmpt_module_ctl_get_int64( openmpt_module * mod, const char * ctl, int64_t * value ); +LIBOPENMPT_API int openmpt_module_ctl_set_string( openmpt_module * mod, const char * ctl, const char * value ); +LIBOPENMPT_API int openmpt_module_ctl_set_double( openmpt_module * mod, const char * ctl, double value ); +LIBOPENMPT_API int openmpt_module_ctl_set_int64( openmpt_module * mod, const char * ctl, int64_t value ); + /* remember to add new functions to both C and C++ interfaces and to increase OPENMPT_API_VERSION_MINOR */ #ifdef __cplusplus Modified: trunk/OpenMPT/libopenmpt/libopenmpt.hpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.hpp 2013-07-01 13:56:47 UTC (rev 2472) +++ trunk/OpenMPT/libopenmpt/libopenmpt.hpp 2013-07-01 17:38:20 UTC (rev 2473) @@ -77,14 +77,12 @@ public: enum render_param { - RENDER_MASTERGAIN_MILLIBEL = 1, - RENDER_STEREOSEPARATION_PERCENT = 2, - RENDER_REPEATCOUNT = 3, - RENDER_QUALITY_PERCENT = 4, - RENDER_MAXMIXCHANNELS = 5, - RENDER_INTERPOLATION_FILTER_LENGTH = 6, - RENDER_VOLUMERAMP_UP_MICROSECONDS = 7, - RENDER_VOLUMERAMP_DOWN_MICROSECONDS = 8 + RENDER_REPEATCOUNT = 1, + RENDER_MASTERGAIN_MILLIBEL = 2, + RENDER_STEREOSEPARATION_PERCENT = 3, + RENDER_INTERPOLATION_FILTER_LENGTH = 4, + RENDER_VOLUMERAMP_UP_MICROSECONDS = 5, + RENDER_VOLUMERAMP_DOWN_MICROSECONDS = 6 }; enum command_index { @@ -118,8 +116,8 @@ virtual ~module(); public: - std::int32_t get_render_param( int command ) const; - void set_render_param( int command, std::int32_t value ); + std::int32_t get_render_param( int param ) const; + void set_render_param( int param, std::int32_t value ); void select_subsong( std::int32_t subsong ); @@ -166,6 +164,16 @@ std::uint8_t get_pattern_row_channel_command( std::int32_t pattern, std::int32_t row, std::int32_t channel, int command ) const; + std::vector<std::string> get_ctls() const; + + std::string ctl_get_string( const std::string & ctl ) const; + double ctl_get_double( const std::string & ctl ) const; + std::int64_t ctl_get_int64( const std::string & ctl ) const; + + void ctl_set( const std::string & ctl, const std::string & value ); + void ctl_set( const std::string & ctl, double value ); + void ctl_set( const std::string & ctl, std::int64_t value ); + // remember to add new functions to both C and C++ interfaces and to increase OPENMPT_API_VERSION_MINOR }; // class module Modified: trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj 2013-07-01 13:56:47 UTC (rev 2472) +++ trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj 2013-07-01 17:38:20 UTC (rev 2473) @@ -325,8 +325,8 @@ <ClInclude Include="..\common\serialization_utils.h" /> <ClInclude Include="..\common\stdafx.h" /> <ClInclude Include="..\common\StringFixer.h" /> - <ClInclude Include="..\common\svn_version\svn_version.template.h" /> <ClInclude Include="..\common\svn_version_default\svn_version.h" /> + <ClInclude Include="..\common\svn_version_subwcrev\svn_version.template.h" /> <ClInclude Include="..\common\typedefs.h" /> <ClInclude Include="..\common\version.h" /> <ClInclude Include="..\common\versionNumber.h" /> Modified: trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters 2013-07-01 13:56:47 UTC (rev 2472) +++ trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters 2013-07-01 17:38:20 UTC (rev 2473) @@ -9,10 +9,6 @@ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> </Filter> - <Filter Include="Resource Files"> - <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> - <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> - </Filter> <Filter Include="Source Files\soundlib"> <UniqueIdentifier>{31765892-63ca-4ab1-8fba-cd7a44e7b6cc}</UniqueIdentifier> </Filter> @@ -195,9 +191,6 @@ <ClInclude Include="..\common\svn_version_default\svn_version.h"> <Filter>Header Files\common</Filter> </ClInclude> - <ClInclude Include="..\common\svn_version\svn_version.template.h"> - <Filter>Header Files\common</Filter> - </ClInclude> <ClInclude Include="..\common\version.h"> <Filter>Header Files\common</Filter> </ClInclude> @@ -237,6 +230,9 @@ <ClInclude Include="..\soundlib\S3MTools.h"> <Filter>Header Files\soundlib</Filter> </ClInclude> + <ClInclude Include="..\common\svn_version_subwcrev\svn_version.template.h"> + <Filter>Header Files\common</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <ClCompile Include="..\common\AudioCriticalSection.cpp"> Modified: trunk/OpenMPT/libopenmpt/libopenmpt_c.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_c.cpp 2013-07-01 13:56:47 UTC (rev 2472) +++ trunk/OpenMPT/libopenmpt/libopenmpt_c.cpp 2013-07-01 17:38:20 UTC (rev 2473) @@ -23,7 +23,7 @@ #include <cstdlib> #include <cstring> -//#ifndef NO_LIBOPENMPT_C +#ifndef NO_LIBOPENMPT_C namespace openmpt { @@ -333,20 +333,20 @@ return; } -int openmpt_module_get_render_param( openmpt_module * mod, int command, int32_t * value ) { +int openmpt_module_get_render_param( openmpt_module * mod, int param, int32_t * value ) { try { OPENMPT_INTERFACE_CHECK_SOUNDFILE( mod ); OPENMPT_INTERFACE_CHECK_POINTER( value ); - *value = mod->impl->get_render_param( (openmpt::module::render_param)command ); + *value = mod->impl->get_render_param( (openmpt::module::render_param)param ); return 1; } OPENMPT_INTERFACE_CATCH_TO_LOG; return 0; } -int openmpt_module_set_render_param( openmpt_module * mod, int command, int32_t value ) { +int openmpt_module_set_render_param( openmpt_module * mod, int param, int32_t value ) { try { OPENMPT_INTERFACE_CHECK_SOUNDFILE( mod ); - mod->impl->set_render_param( (openmpt::module::render_param)command, value ); + mod->impl->set_render_param( (openmpt::module::render_param)param, value ); return 1; } OPENMPT_INTERFACE_CATCH_TO_LOG; return 0; @@ -650,6 +650,83 @@ return 0; } +const char * openmpt_module_get_ctls( openmpt_module * mod ) { + try { + OPENMPT_INTERFACE_CHECK_SOUNDFILE( mod ); + std::string retval; + bool first = true; + std::vector<std::string> ctls = mod->impl->get_ctls(); + for ( std::vector<std::string>::iterator i = ctls.begin(); i != ctls.end(); ++i ) { + if ( first ) { + first = false; + } else { + retval += ";"; + } + retval += *i; + } + return openmpt::strdup( retval.c_str() ); + } OPENMPT_INTERFACE_CATCH_TO_LOG; + return NULL; +} + +const char * openmpt_module_ctl_get_string( openmpt_module * mod, const char * ctl ) { + try { + OPENMPT_INTERFACE_CHECK_SOUNDFILE( mod ); + OPENMPT_INTERFACE_CHECK_POINTER( ctl ); + return openmpt::strdup( mod->impl->ctl_get_string( ctl ).c_str() ); + } OPENMPT_INTERFACE_CATCH_TO_LOG; + return NULL; +} + +int openmpt_module_ctl_get_double( openmpt_module * mod, const char * ctl, double * value ) { + try { + OPENMPT_INTERFACE_CHECK_SOUNDFILE( mod ); + OPENMPT_INTERFACE_CHECK_POINTER( ctl ); + OPENMPT_INTERFACE_CHECK_POINTER( value ); + *value = mod->impl->ctl_get_double( ctl ); + return 1; + } OPENMPT_INTERFACE_CATCH_TO_LOG; + return 0; +} +int openmpt_module_ctl_get_int64( openmpt_module * mod, const char * ctl, int64_t * value ) { + try { + OPENMPT_INTERFACE_CHECK_SOUNDFILE( mod ); + OPENMPT_INTERFACE_CHECK_POINTER( ctl ); + OPENMPT_INTERFACE_CHECK_POINTER( value ); + *value = mod->impl->ctl_get_int64( ctl ); + return 1; + } OPENMPT_INTERFACE_CATCH_TO_LOG; + return 0; +} +int openmpt_module_ctl_set_string( openmpt_module * mod, const char * ctl, const char * value ) { + try { + OPENMPT_INTERFACE_CHECK_SOUNDFILE( mod ); + OPENMPT_INTERFACE_CHECK_POINTER( ctl ); + OPENMPT_INTERFACE_CHECK_POINTER( value ); + mod->impl->ctl_set( ctl, value ); + return 1; + } OPENMPT_INTERFACE_CATCH_TO_LOG; + return 0; +} +int openmpt_module_ctl_set_double( openmpt_module * mod, const char * ctl, double value ) { + try { + OPENMPT_INTERFACE_CHECK_SOUNDFILE( mod ); + OPENMPT_INTERFACE_CHECK_POINTER( ctl ); + mod->impl->ctl_set( ctl, value ); + return 1; + } OPENMPT_INTERFACE_CATCH_TO_LOG; + return 0; +} +int openmpt_module_ctl_set_int64( openmpt_module * mod, const char * ctl, int64_t value ) { + try { + OPENMPT_INTERFACE_CHECK_SOUNDFILE( mod ); + OPENMPT_INTERFACE_CHECK_POINTER( ctl ); + mod->impl->ctl_set( ctl, value ); + return 1; + } OPENMPT_INTERFACE_CATCH_TO_LOG; + return 0; +} + #undef OPENMPT_INTERFACE_CHECK_POINTER #undef OPENMPT_INTERFACE_CHECK_SOUNDFILE #undef OPENMPT_INTERFACE_CATCH_TO_LOG @@ -659,4 +736,4 @@ } // extern "C" -//#endif // NO_LIBOPENMPT_C +#endif // NO_LIBOPENMPT_C Modified: trunk/OpenMPT/libopenmpt/libopenmpt_cxx.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_cxx.cpp 2013-07-01 13:56:47 UTC (rev 2472) +++ trunk/OpenMPT/libopenmpt/libopenmpt_cxx.cpp 2013-07-01 17:38:20 UTC (rev 2473) @@ -17,7 +17,7 @@ #include <algorithm> #include <stdexcept> -//#ifndef NO_LIBOPENMPT_CXX +#ifndef NO_LIBOPENMPT_CXX namespace openmpt { @@ -110,12 +110,12 @@ impl = 0; } -std::int32_t module::get_render_param( int command ) const { - return impl->get_render_param( command ); +std::int32_t module::get_render_param( int param ) const { + return impl->get_render_param( param ); } -void module::set_render_param( int command, std::int32_t value ) { - impl->set_render_param( command, value ); +void module::set_render_param( int param, std::int32_t value ) { + impl->set_render_param( param, value ); } void module::select_subsong( std::int32_t subsong ) { @@ -228,6 +228,28 @@ return impl->get_pattern_row_channel_command( pattern, row, channel, command ); } +std::vector<std::string> module::get_ctls() const { + return impl->get_ctls(); +} +std::string module::ctl_get_string( const std::string & ctl ) const { + return impl->ctl_get_string( ctl ); +} +double module::ctl_get_double( const std::string & ctl ) const { + return impl->ctl_get_double( ctl ); +} +std::int64_t module::ctl_get_int64( const std::string & ctl ) const { + return impl->ctl_get_int64( ctl ); +} +void module::ctl_set( const std::string & ctl, const std::string & value ) { + impl->ctl_set( ctl, value ); +} +void module::ctl_set( const std::string & ctl, double value ) { + impl->ctl_set( ctl, value ); +} +void module::ctl_set( const std::string & ctl, std::int64_t value ) { + impl->ctl_set( ctl, value ); +} + } // namespace openmpt -//#endif // NO_LIBOPENMPT_CXX +#endif // NO_LIBOPENMPT_CXX Modified: trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp 2013-07-01 13:56:47 UTC (rev 2472) +++ trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp 2013-07-01 17:38:20 UTC (rev 2473) @@ -78,12 +78,6 @@ static float fx16_to_float( std::int32_t x ) { return static_cast<float>( x * (1.0f/(1<<16)) ); } -template < typename T > static T scale_percent( T percent, T min, T max ) { - return Clamp( min + ( percent * ( max - min ) ) / 100, min, max ); -} -template < typename T > static T unscale_percent( T value, T min, T max ) { - return Clamp( ( value - min ) * 100 / ( max - min ), 0, 100 ); -} class loader_log : public ILog { private: @@ -145,16 +139,6 @@ } } -std::int32_t module_impl::get_quality() const { - return unscale_percent<int>( resamplingmode_to_filterlength( m_sndFile->m_Resampler.m_Settings.SrcMode ), 1, 8 ); -} -void module_impl::set_quality( std::int32_t value ) { - CResamplerSettings resamplersettings = m_sndFile->m_Resampler.m_Settings; - resamplersettings.SrcMode = filterlength_to_resamplingmode( scale_percent<int>( value, 1, 8 ) ); - resamplersettings.gdWFIRCutoff = CResamplerSettings().gdWFIRCutoff; // use default - resamplersettings.gbWFIRType = CResamplerSettings().gbWFIRType; // use default - m_sndFile->SetResamplerSettings( resamplersettings ); -} void module_impl::apply_mixer_settings( std::int32_t samplerate, int channels, bool format_float ) { SampleFormat format = ( format_float ? SampleFormatFloat32 : SampleFormatInt16 ); if ( @@ -175,7 +159,6 @@ } void module_impl::apply_libopenmpt_defaults() { set_render_param( module::RENDER_STEREOSEPARATION_PERCENT, 100 ); - set_render_param( module::RENDER_QUALITY_PERCENT, 100 ); } void module_impl::init() { m_sndFile = std::unique_ptr<CSoundFile>(new CSoundFile()); @@ -313,8 +296,8 @@ m_sndFile->Destroy(); } -std::int32_t module_impl::get_render_param( int command ) const { - switch ( command ) { +std::int32_t module_impl::get_render_param( int param ) const { + switch ( param ) { case module::RENDER_MASTERGAIN_MILLIBEL: { return static_cast<std::int32_t>( 1000.0f * 2.0f * std::log10( fx16_to_float( m_sndFile->m_MixerSettings.m_FinalOutputGain ) ) ); } break; @@ -324,12 +307,6 @@ case module::RENDER_REPEATCOUNT: { return m_sndFile->m_nRepeatCount; } break; - case module::RENDER_QUALITY_PERCENT: { - return get_quality(); - } break; - case module::RENDER_MAXMIXCHANNELS: { - return m_sndFile->m_MixerSettings.m_nMaxMixChannels; - } break; case module::RENDER_INTERPOLATION_FILTER_LENGTH: { return resamplingmode_to_filterlength( m_sndFile->m_Resampler.m_Settings.SrcMode ); } break; @@ -339,12 +316,12 @@ case module::RENDER_VOLUMERAMP_DOWN_MICROSECONDS: { return m_sndFile->m_MixerSettings.GetVolumeRampDownMicroseconds(); } break; - default: throw openmpt::exception_message("unknown command"); break; + default: throw openmpt::exception_message("unknown render param"); break; } return 0; } -void module_impl::set_render_param( int command, std::int32_t value ) { - switch ( command ) { +void module_impl::set_render_param( int param, std::int32_t value ) { + switch ( param ) { case module::RENDER_MASTERGAIN_MILLIBEL: { float gainFactor = static_cast<float>( std::pow( 10.0f, value * 0.001f * 0.5f ) ); if ( static_cast<std::int32_t>( m_sndFile->m_MixerSettings.m_FinalOutputGain ) != float_to_fx16( gainFactor ) ) { @@ -364,16 +341,6 @@ case module::RENDER_REPEATCOUNT: { m_sndFile->SetRepeatCount( value ); } break; - case module::RENDER_QUALITY_PERCENT: { - set_quality( value ); - } break; - case module::RENDER_MAXMIXCHANNELS: { - if ( value != static_cast<std::int32_t>( m_sndFile->m_MixerSettings.m_nMaxMixChannels ) ) { - MixerSettings settings = m_sndFile->m_MixerSettings; - settings.m_nMaxMixChannels = value; - m_sndFile->SetMixerSettings( settings ); - } - } break; case module::RENDER_INTERPOLATION_FILTER_LENGTH: { CResamplerSettings newsettings; newsettings.SrcMode = filterlength_to_resamplingmode( value ); @@ -395,9 +362,10 @@ m_sndFile->SetMixerSettings( newsettings ); } } break; - default: throw openmpt::exception_message("unknown command"); break; + default: throw openmpt::exception_message("unknown render param"); break; } } + std::size_t module_impl::read( std::int32_t samplerate, std::size_t count, std::int16_t * mono ) { if ( !mono ) { throw openmpt::exception_message("null pointer"); @@ -672,4 +640,45 @@ return 0; } +std::vector<std::string> module_impl::get_ctls() const { + std::vector<std::string> retval; + return retval; +} +std::string module_impl::ctl_get_string( const std::string & ctl ) const { + if ( ctl == "" ) { + throw openmpt::exception_message("unknown ctl"); + } + throw openmpt::exception_message("unknown ctl"); +} +double module_impl::ctl_get_double( const std::string & ctl ) const { + if ( ctl == "" ) { + throw openmpt::exception_message("unknown ctl"); + } + throw openmpt::exception_message("unknown ctl"); +} +std::int64_t module_impl::ctl_get_int64( const std::string & ctl ) const { + if ( ctl == "" ) { + throw openmpt::exception_message("unknown ctl"); + } + throw openmpt::exception_message("unknown ctl"); +} +void module_impl::ctl_set( const std::string & ctl, const std::string & value ) { + if ( ctl == "" ) { + throw openmpt::exception_message("unknown ctl"); + } + throw openmpt::exception_message("unknown ctl"); +} +void module_impl::ctl_set( const std::string & ctl, double value ) { + if ( ctl == "" ) { + throw openmpt::exception_message("unknown ctl"); + } + throw openmpt::exception_message("unknown ctl"); +} +void module_impl::ctl_set( const std::string & ctl, std::int64_t value ) { + if ( ctl == "" ) { + throw openmpt::exception_message("unknown ctl"); + } + throw openmpt::exception_message("unknown ctl"); +} + } // namespace openmpt Modified: trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp 2013-07-01 13:56:47 UTC (rev 2472) +++ trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp 2013-07-01 17:38:20 UTC (rev 2473) @@ -72,8 +72,6 @@ void PushToCSoundFileLog( const std::string & text ) const; void PushToCSoundFileLog( int loglevel, const std::string & text ) const; private: - std::int32_t get_quality() const; - void set_quality( std::int32_t value ); void apply_mixer_settings( std::int32_t samplerate, int channels, bool format_float ); void apply_libopenmpt_defaults(); void init(); @@ -93,8 +91,8 @@ module_impl( const void * data, std::size_t size, std::shared_ptr<log_interface> log ); ~module_impl(); public: - std::int32_t get_render_param( int command ) const; - void set_render_param( int command, std::int32_t value ); + std::int32_t get_render_param( int param ) const; + void set_render_param( int param, std::int32_t value ); std::size_t read( std::int32_t samplerate, std::size_t count, std::int16_t * mono ); std::size_t read( std::int32_t samplerate, std::size_t count, std::int16_t * left, std::int16_t * right ); std::size_t read( std::int32_t samplerate, std::size_t count, std::int16_t * left, std::int16_t * right, std::int16_t * rear_left, std::int16_t * rear_right ); @@ -128,6 +126,13 @@ std::int32_t get_order_pattern( std::int32_t o ) const; std::int32_t get_pattern_num_rows( std::int32_t p ) const; std::uint8_t get_pattern_row_channel_command( std::int32_t p, std::int32_t r, std::int32_t c, int cmd ) const; + std::vector<std::string> get_ctls() const; + std::string ctl_get_string( const std::string & ctl ) const; + double ctl_get_double( const std::string & ctl ) const; + std::int64_t ctl_get_int64( const std::string & ctl ) const; + void ctl_set( const std::string & ctl, const std::string & value ); + void ctl_set( const std::string & ctl, double value ); + void ctl_set( const std::string & ctl, std::int64_t value ); }; // class module_impl } // namespace openmpt Modified: trunk/OpenMPT/libopenmpt/libopenmpt_modplug.c =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_modplug.c 2013-07-01 13:56:47 UTC (rev 2472) +++ trunk/OpenMPT/libopenmpt/libopenmpt_modplug.c 2013-07-01 17:38:20 UTC (rev 2473) @@ -131,7 +131,6 @@ file->name = openmpt_module_get_metadata(file->mod,"title"); file->message = openmpt_module_get_metadata(file->mod,"message"); openmpt_module_set_render_param(file->mod,OPENMPT_MODULE_RENDER_STEREOSEPARATION_PERCENT,file->settings.mStereoSeparation*100/128); - openmpt_module_set_render_param(file->mod,OPENMPT_MODULE_RENDER_MAXMIXCHANNELS,file->settings.mMaxMixChannels); openmpt_module_set_render_param(file->mod,OPENMPT_MODULE_RENDER_INTERPOLATION_FILTER_LENGTH,modplugresamplingmode_to_filterlength(file->settings.mResamplingMode)); return file; } @@ -582,6 +581,7 @@ } #ifdef _MSC_VER +#ifdef _M_IX86 #pragma comment(linker, "/EXPORT:ModPlug_Load=_ModPlug_Load") #pragma comment(linker, "/EXPORT:ModPlug_Unload=_ModPlug_Unload") #pragma comment(linker, "/EXPORT:ModPlug_Read=_ModPlug_Read") @@ -614,6 +614,40 @@ #pragma comment(linker, "/EXPORT:ModPlug_ExportXM=_ModPlug_ExportXM") #pragma comment(linker, "/EXPORT:ModPlug_ExportMOD=_ModPlug_ExportMOD") #pragma comment(linker, "/EXPORT:ModPlug_ExportIT=_ModPlug_ExportIT") +#else /* !_M_IX86 */ +#pragma comment(linker, "/EXPORT:ModPlug_Load") +#pragma comment(linker, "/EXPORT:ModPlug_Unload") +#pragma comment(linker, "/EXPORT:ModPlug_Read") +#pragma comment(linker, "/EXPORT:ModPlug_GetName") +#pragma comment(linker, "/EXPORT:ModPlug_GetLength") +#pragma comment(linker, "/EXPORT:ModPlug_Seek") +#pragma comment(linker, "/EXPORT:ModPlug_GetSettings") +#pragma comment(linker, "/EXPORT:ModPlug_SetSettings") +#pragma comment(linker, "/EXPORT:ModPlug_GetMasterVolume") +#pragma comment(linker, "/EXPORT:ModPlug_SetMasterVolume") +#pragma comment(linker, "/EXPORT:ModPlug_GetCurrentSpeed") +#pragma comment(linker, "/EXPORT:ModPlug_GetCurrentTempo") +#pragma comment(linker, "/EXPORT:ModPlug_GetCurrentOrder") +#pragma comment(linker, "/EXPORT:ModPlug_GetCurrentPattern") +#pragma comment(linker, "/EXPORT:ModPlug_GetCurrentRow") +#pragma comment(linker, "/EXPORT:ModPlug_GetPlayingChannels") +#pragma comment(linker, "/EXPORT:ModPlug_SeekOrder") +#pragma comment(linker, "/EXPORT:ModPlug_GetModuleType") +#pragma comment(linker, "/EXPORT:ModPlug_GetMessage") +#pragma comment(linker, "/EXPORT:ModPlug_NumInstruments") +#pragma comment(linker, "/EXPORT:ModPlug_NumSamples") +#pragma comment(linker, "/EXPORT:ModPlug_NumPatterns") +#pragma comment(linker, "/EXPORT:ModPlug_NumChannels") +#pragma comment(linker, "/EXPORT:ModPlug_SampleName") +#pragma comment(linker, "/EXPORT:ModPlug_InstrumentName") +#pragma comment(linker, "/EXPORT:ModPlug_GetPattern") +#pragma comment(linker, "/EXPORT:ModPlug_InitMixerCallback") +#pragma comment(linker, "/EXPORT:ModPlug_UnloadMixerCallback") +#pragma comment(linker, "/EXPORT:ModPlug_ExportS3M") +#pragma comment(linker, "/EXPORT:ModPlug_ExportXM") +#pragma comment(linker, "/EXPORT:ModPlug_ExportMOD") +#pragma comment(linker, "/EXPORT:ModPlug_ExportIT") +#endif /* _M_IX86 */ #endif /* _MSC_VER */ #endif /* NO_LIBMODPLUG */ Modified: trunk/OpenMPT/libopenmpt/libopenmpt_settings.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_settings.cpp 2013-07-01 13:56:47 UTC (rev 2472) +++ trunk/OpenMPT/libopenmpt/libopenmpt_settings.cpp 2013-07-01 17:38:20 UTC (rev 2473) @@ -41,7 +41,6 @@ read_setting( subkey, "MasterGain_milliBel", s.mastergain_millibel ); read_setting( subkey, "SeteroSeparation_Percent", s.stereoseparation ); read_setting( subkey, "RepeatCount", s.repeatcount ); - read_setting( subkey, "MixerChannels", s.maxmixchannels ); read_setting( subkey, "InterpolationFilterLength", s.interpolationfilterlength ); read_setting( subkey, "VolumeRampingIn_microseconds", s.volrampinus ); read_setting( subkey, "VolumeRampingOut_microseconds", s.volrampoutus ); @@ -53,7 +52,6 @@ write_setting( subkey, "MasterGain_milliBel", s.mastergain_millibel ); write_setting( subkey, "SeteroSeparation_Percent", s.stereoseparation ); write_setting( subkey, "RepeatCount", s.repeatcount ); - write_setting( subkey, "MixerChannels", s.maxmixchannels ); write_setting( subkey, "InterpolationFilterLength", s.interpolationfilterlength ); write_setting( subkey, "VolumeRampingIn_microseconds", s.volrampinus ); write_setting( subkey, "VolumeRampingOut_microseconds", s.volrampoutus ); Modified: trunk/OpenMPT/libopenmpt/libopenmpt_settings.h =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_settings.h 2013-07-01 13:56:47 UTC (rev 2472) +++ trunk/OpenMPT/libopenmpt/libopenmpt_settings.h 2013-07-01 17:38:20 UTC (rev 2473) @@ -37,7 +37,6 @@ int mastergain_millibel; int stereoseparation; int repeatcount; - int maxmixchannels; int interpolationfilterlength; int volrampinus; int volrampoutus; @@ -51,7 +50,6 @@ s.mastergain_millibel = 0; s.stereoseparation = 100; s.repeatcount = 0; - s.maxmixchannels = 256; s.interpolationfilterlength = 8; s.volrampinus = 363; s.volrampoutus = 952; Modified: trunk/OpenMPT/libopenmpt/libopenmpt_settings.vcxproj =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_settings.vcxproj 2013-07-01 13:56:47 UTC (rev 2472) +++ trunk/OpenMPT/libopenmpt/libopenmpt_settings.vcxproj 2013-07-01 17:38:20 UTC (rev 2473) @@ -23,7 +23,6 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> - <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>NotSet</CharacterSet> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> Modified: trunk/OpenMPT/libopenmpt/libopenmpt_winamp.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_winamp.cpp 2013-07-01 13:56:47 UTC (rev 2472) +++ trunk/OpenMPT/libopenmpt/libopenmpt_winamp.cpp 2013-07-01 17:38:20 UTC (rev 2473) @@ -99,7 +99,6 @@ self->mod->set_render_param( openmpt::module::RENDER_MASTERGAIN_MILLIBEL, self->settings.mastergain_millibel ); self->mod->set_render_param( openmpt::module::RENDER_STEREOSEPARATION_PERCENT, self->settings.stereoseparation ); self->mod->set_render_param( openmpt::module::RENDER_REPEATCOUNT, self->settings.repeatcount ); - self->mod->set_render_param( openmpt::module::RENDER_MAXMIXCHANNELS, self->settings.maxmixchannels ); self->mod->set_render_param( openmpt::module::RENDER_INTERPOLATION_FILTER_LENGTH, self->settings.interpolationfilterlength ); self->mod->set_render_param( openmpt::module::RENDER_VOLUMERAMP_UP_MICROSECONDS, self->settings.volrampinus ); self->mod->set_render_param( openmpt::module::RENDER_VOLUMERAMP_DOWN_MICROSECONDS, self->settings.volrampoutus ); Modified: trunk/OpenMPT/libopenmpt/libopenmpt_xmplay.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_xmplay.cpp 2013-07-01 13:56:47 UTC (rev 2472) +++ trunk/OpenMPT/libopenmpt/libopenmpt_xmplay.cpp 2013-07-01 17:38:20 UTC (rev 2473) @@ -83,7 +83,6 @@ result[ "MasterGain_milliBel" ] = s.mastergain_millibel; result[ "SeteroSeparation_Percent" ] = s.stereoseparation; result[ "RepeatCount" ] = s.repeatcount; - result[ "MixerChannels" ] = s.maxmixchannels; result[ "InterpolationFilterLength" ] = s.interpolationfilterlength; result[ "VolumeRampingIn_microseconds" ] = s.volrampinus; result[ "VolumeRampingOut_microseconds" ] = s.volrampoutus; @@ -102,7 +101,6 @@ load_map_setting( map, "MasterGain_milliBel", s.mastergain_millibel ); load_map_setting( map, "SeteroSeparation_Percent", s.stereoseparation ); load_map_setting( map, "RepeatCount", s.repeatcount ); - load_map_setting( map, "MixerChannels", s.maxmixchannels ); load_map_setting( map, "InterpolationFilterLength", s.interpolationfilterlength ); load_map_setting( map, "VolumeRampingIn_microseconds", s.volrampinus ); load_map_setting( map, "VolumeRampingOut_microseconds", s.volrampoutus ); @@ -137,7 +135,6 @@ self->mod->set_render_param( openmpt::module::RENDER_MASTERGAIN_MILLIBEL, self->settings.mastergain_millibel ); self->mod->set_render_param( openmpt::module::RENDER_STEREOSEPARATION_PERCENT, self->settings.stereoseparation ); self->mod->set_render_param( openmpt::module::RENDER_REPEATCOUNT, self->settings.repeatcount ); - self->mod->set_render_param( openmpt::module::RENDER_MAXMIXCHANNELS, self->settings.maxmixchannels ); self->mod->set_render_param( openmpt::module::RENDER_INTERPOLATION_FILTER_LENGTH, self->settings.interpolationfilterlength ); self->mod->set_render_param( openmpt::module::RENDER_VOLUMERAMP_UP_MICROSECONDS, self->settings.volrampinus ); self->mod->set_render_param( openmpt::module::RENDER_VOLUMERAMP_DOWN_MICROSECONDS, self->settings.volrampoutus ); Modified: trunk/OpenMPT/openmpt123/openmpt123.cpp =================================================================== --- trunk/OpenMPT/openmpt123/openmpt123.cpp 2013-07-01 13:56:47 UTC (rev 2472) +++ trunk/OpenMPT/openmpt123/openmpt123.cpp 2013-07-01 17:38:20 UTC (rev 2473) @@ -69,7 +69,6 @@ s << "Repeat count: " << flags.repeatcount << std::endl; s << "Sample rate: " << flags.samplerate << std::endl; s << "Gain: " << flags.gain / 100.0 << std::endl; - s << "Quality: " << flags.quality << std::endl; s << "Filter taps: " << flags.filtertaps << std::endl; s << "Seek target: " << flags.seek_target << std::endl; s << "Float: " << flags.use_float << std::endl; @@ -196,7 +195,6 @@ std::clog << " --samplerate n Set samplerate to n Hz [default: " << commandlineflags().samplerate << "]" << std::endl; std::clog << " --gain n Set output gain to n dB [default: " << commandlineflags().gain / 100.0 << "]" << std::endl; std::clog << " --repeat n Repeat song n times (-1 means forever) [default: " << commandlineflags().repeatcount << "]" << std::endl; - std::clog << " --quality n Set rendering quality to n % [default: " << commandlineflags().quality << "]" << std::endl; std::clog << " --filtertaps n Set interpolation filter taps to n % [default: " << commandlineflags().filtertaps << "]" << std::endl; std::clog << " --seek n Seek to n seconds on start [default: " << commandlineflags().seek_target << "]" << std::endl; std::clog << " --volrampup n Use n microseconds volume ramping up [default: " << commandlineflags().rampupus << "]" << std::endl; @@ -378,7 +376,6 @@ openmpt::module mod( data_stream ); mod.set_render_param( openmpt::module::RENDER_REPEATCOUNT, flags.repeatcount ); - mod.set_render_param( openmpt::module::RENDER_QUALITY_PERCENT, flags.quality ); mod.set_render_param( openmpt::module::RENDER_INTERPOLATION_FILTER_LENGTH, flags.filtertaps ); mod.set_render_param( openmpt::module::RENDER_MASTERGAIN_MILLIBEL, flags.gain ); mod.set_render_param( openmpt::module::RENDER_VOLUMERAMP_UP_MICROSECONDS, flags.rampupus ); @@ -532,10 +529,6 @@ std::istringstream istr( nextarg ); istr >> flags.repeatcount; ++i; - } else if ( arg == "--quality" && nextarg != "" ) { - std::istringstream istr( nextarg ); - istr >> flags.quality; - ++i; } else if ( arg == "--filtertaps" && nextarg != "" ) { std::istringstream istr( nextarg ); istr >> flags.filtertaps; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |