From 2fe8b1b92fa2a9b93fea0ed0cb62802237b82e8d Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Tue, 8 Dec 2020 22:26:17 +0900 Subject: Renaming of files in preparation for code style tools. Signed-off-by: Michele Calgaro (cherry picked from commit fce86b22a2367f1be1f9aae5e1ba3d18d1371b74) --- noatun/modules/artseffects/CMakeLists.txt | 4 +- noatun/modules/artseffects/Makefile.am | 8 +- noatun/modules/artseffects/extrastereo_impl.cc | 153 --------------------- noatun/modules/artseffects/extrastereo_impl.cpp | 153 +++++++++++++++++++++ noatun/modules/artseffects/extrastereogui_impl.cc | 28 ---- noatun/modules/artseffects/extrastereogui_impl.cpp | 28 ++++ noatun/modules/winskin/vis/CMakeLists.txt | 4 +- noatun/modules/winskin/vis/Makefile.am | 8 +- 8 files changed, 193 insertions(+), 193 deletions(-) delete mode 100644 noatun/modules/artseffects/extrastereo_impl.cc create mode 100644 noatun/modules/artseffects/extrastereo_impl.cpp delete mode 100644 noatun/modules/artseffects/extrastereogui_impl.cc create mode 100644 noatun/modules/artseffects/extrastereogui_impl.cpp (limited to 'noatun/modules') diff --git a/noatun/modules/artseffects/CMakeLists.txt b/noatun/modules/artseffects/CMakeLists.txt index 90864c7d..9d7ae40b 100644 --- a/noatun/modules/artseffects/CMakeLists.txt +++ b/noatun/modules/artseffects/CMakeLists.txt @@ -29,7 +29,7 @@ link_directories( tde_add_kpart( libartseffects SOURCES - artseffects.cc extrastereo_impl.cc + artseffects.cpp extrastereo_impl.cpp LINK artsgui_idl-shared ${ARTS_LIBRARIES} mcop kmedia2_idl artsflow artsflow_idl soundserver_idl @@ -38,7 +38,7 @@ tde_add_kpart( libartseffects add_custom_command( OUTPUT - artseffects.cc artseffects.h + artseffects.cpp artseffects.h COMMAND ${ARTS_MCOPIDL_EXECUTABLE} -t -I${CMAKE_BINARY_DIR}/arts/gui/common -I${CMAKE_SOURCE_DIR}/arts/gui/common diff --git a/noatun/modules/artseffects/Makefile.am b/noatun/modules/artseffects/Makefile.am index 49a5bb99..9a458a4b 100644 --- a/noatun/modules/artseffects/Makefile.am +++ b/noatun/modules/artseffects/Makefile.am @@ -2,18 +2,18 @@ INCLUDES= -I$(top_builddir)/arts/gui/common -I$(top_srcdir)/arts/gui/common -I$( lib_LTLIBRARIES = libartseffects.la #libartseffectsui.la -libartseffects_la_SOURCES = artseffects.cc extrastereo_impl.cc -libartseffects_la_COMPILE_FIRST = artseffects.cc +libartseffects_la_SOURCES = artseffects.cpp extrastereo_impl.cpp +libartseffects_la_COMPILE_FIRST = artseffects.cpp libartseffects_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined libartseffects_la_LIBADD = $(top_builddir)/arts/gui/common/libartsgui_idl.la -lkmedia2_idl -lsoundserver_idl -lartsflow artseffects.mcopclass: artseffects.h artseffects.mcoptype: artseffects.h -artseffects.cc artseffects.h: $(srcdir)/artseffects.idl $(MCOPIDL) +artseffects.cpp artseffects.h: $(srcdir)/artseffects.idl $(MCOPIDL) $(MCOPIDL) -t -I$(top_builddir)/arts/gui/common -I$(top_srcdir)/arts/gui/common -I$(kde_includes)/arts $(srcdir)/artseffects.idl -CLEANFILES = artsmidi.cc artsmidi.h artsmidi.mcoptype artsmidi.mcopclass +CLEANFILES = artsmidi.cpp artsmidi.h artsmidi.mcoptype artsmidi.mcopclass mcoptypedir = $(libdir)/mcop mcoptype_DATA = artseffects.mcoptype artseffects.mcopclass diff --git a/noatun/modules/artseffects/extrastereo_impl.cc b/noatun/modules/artseffects/extrastereo_impl.cc deleted file mode 100644 index 3dc92705..00000000 --- a/noatun/modules/artseffects/extrastereo_impl.cc +++ /dev/null @@ -1,153 +0,0 @@ -#include "artsgui.h" -#include "artseffects.h" -#include "stdsynthmodule.h" -#include -#include -#include -#include -#include -#include "debug.h" -#include -#include - -using namespace Arts; - -class ExtraStereo_impl : virtual public ExtraStereo_skel, - virtual public StdSynthModule -{ - float _intensity; -// StereoEffectGUI mStereoEffectGUI; -public: - float intensity() { return _intensity; } - void intensity(float newValue) { - _intensity = newValue; -// cout << " **** INTENSITY = " << newValue << endl; - } - - ExtraStereo_impl() : _intensity(2.0) - { -// mStereoEffectGUI = DynamicCast(server.createObject("Arts::ExtraStereo")); -// DynamicRequest(mStereoEffectGUI).method("_set_effect").param(*this).invoke(); - - } - void calculateBlock(unsigned long samples) - { - unsigned long i; - - for(i = 0; i < samples; i++) - { - float average = (inleft[i] + inright[i]) / 2.0; - - float outleftnew = average + (inleft[i] - average) * _intensity; - if(outleftnew > 1.0) outleft[i] = 1.0; - else if(outleftnew < -1.0) outleft[i] = -1.0; - else outleft[i] = outleftnew; - - float outrightnew = average + (inright[i] - average) * _intensity; - if(outrightnew > 1.0) outright[i] = 1.0; - else if(outrightnew < -1.0) outright[i] = -1.0; - else outright[i] = outrightnew; - } - } -}; - - -class VoiceRemoval_impl : virtual public VoiceRemoval_skel, - virtual public StdSynthModule -{ -public: - - VoiceRemoval_impl() - { - - } - // This is based on the work of Anders Carlsson - void calculateBlock(unsigned long samples) - { - for (unsigned i = 0; i < samples; i++) - { - float outleftnew=inleft[i]-inright[i]; - float outrightnew=inright[i]-inleft[i]; - - if (inleft[i] < -1.0) outleftnew = -1.0; - else if (inleft[i] > 1.0) outleftnew = 1.0; - - if (inright[i] < -1.0) outrightnew = -1.0; - else if (inright[i] > 1.0) outrightnew = 1.0; - outleft[i] = outleftnew; - outright[i] = outrightnew; - } - - } -}; - -class RawWriter_impl : virtual public RawWriter_skel, - virtual public StdSynthModule -{ - int mFd; -public: - RawWriter_impl() - { - std::string file=getenv("HOME"); - file.append("/arts-write.raw"); - mFd=::open(file.c_str(), O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); - } - ~RawWriter_impl() - { - ::close(mFd); - } - // This is based on the work of Anders Carlsson - void calculateBlock(unsigned long samples) - { - for (unsigned i = 0; i < samples; i++) - { - outleft[i]=inleft[i]; - outright[i]=inright[i]; - } - unsigned char *buffer=new unsigned char[samples*4]; - convert_stereo_2float_i16le(samples, - inleft, inright, buffer); - ::write(mFd, (const void*)buffer, samples*4); - delete [] buffer; - } -}; - -class ExtraStereoGuiFactory_impl : public ExtraStereoGuiFactory_skel -{ -public: - Widget createGui(Object object) - { - arts_return_val_if_fail(!object.isNull(), Arts::Widget::null()); - - ExtraStereo e = DynamicCast(object); - arts_return_val_if_fail(!e.isNull(), Arts::Widget::null()); - - HBox hbox; - hbox.width(80); - hbox.height(80); - hbox.show(); - - - Poti intense; - intense.caption("Intensity"); - intense.color("red"); - intense.min(0); - intense.max(5); - intense.value(e.intensity()); - intense.parent(hbox); - intense.show(); - connect(intense,"value_changed", e, "intensity"); - - hbox._addChild(intense,"intensityWidget"); - - return hbox; - } -}; - - -REGISTER_IMPLEMENTATION(ExtraStereo_impl); -REGISTER_IMPLEMENTATION(VoiceRemoval_impl); -REGISTER_IMPLEMENTATION(RawWriter_impl); -REGISTER_IMPLEMENTATION(ExtraStereoGuiFactory_impl); - - diff --git a/noatun/modules/artseffects/extrastereo_impl.cpp b/noatun/modules/artseffects/extrastereo_impl.cpp new file mode 100644 index 00000000..3dc92705 --- /dev/null +++ b/noatun/modules/artseffects/extrastereo_impl.cpp @@ -0,0 +1,153 @@ +#include "artsgui.h" +#include "artseffects.h" +#include "stdsynthmodule.h" +#include +#include +#include +#include +#include +#include "debug.h" +#include +#include + +using namespace Arts; + +class ExtraStereo_impl : virtual public ExtraStereo_skel, + virtual public StdSynthModule +{ + float _intensity; +// StereoEffectGUI mStereoEffectGUI; +public: + float intensity() { return _intensity; } + void intensity(float newValue) { + _intensity = newValue; +// cout << " **** INTENSITY = " << newValue << endl; + } + + ExtraStereo_impl() : _intensity(2.0) + { +// mStereoEffectGUI = DynamicCast(server.createObject("Arts::ExtraStereo")); +// DynamicRequest(mStereoEffectGUI).method("_set_effect").param(*this).invoke(); + + } + void calculateBlock(unsigned long samples) + { + unsigned long i; + + for(i = 0; i < samples; i++) + { + float average = (inleft[i] + inright[i]) / 2.0; + + float outleftnew = average + (inleft[i] - average) * _intensity; + if(outleftnew > 1.0) outleft[i] = 1.0; + else if(outleftnew < -1.0) outleft[i] = -1.0; + else outleft[i] = outleftnew; + + float outrightnew = average + (inright[i] - average) * _intensity; + if(outrightnew > 1.0) outright[i] = 1.0; + else if(outrightnew < -1.0) outright[i] = -1.0; + else outright[i] = outrightnew; + } + } +}; + + +class VoiceRemoval_impl : virtual public VoiceRemoval_skel, + virtual public StdSynthModule +{ +public: + + VoiceRemoval_impl() + { + + } + // This is based on the work of Anders Carlsson + void calculateBlock(unsigned long samples) + { + for (unsigned i = 0; i < samples; i++) + { + float outleftnew=inleft[i]-inright[i]; + float outrightnew=inright[i]-inleft[i]; + + if (inleft[i] < -1.0) outleftnew = -1.0; + else if (inleft[i] > 1.0) outleftnew = 1.0; + + if (inright[i] < -1.0) outrightnew = -1.0; + else if (inright[i] > 1.0) outrightnew = 1.0; + outleft[i] = outleftnew; + outright[i] = outrightnew; + } + + } +}; + +class RawWriter_impl : virtual public RawWriter_skel, + virtual public StdSynthModule +{ + int mFd; +public: + RawWriter_impl() + { + std::string file=getenv("HOME"); + file.append("/arts-write.raw"); + mFd=::open(file.c_str(), O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); + } + ~RawWriter_impl() + { + ::close(mFd); + } + // This is based on the work of Anders Carlsson + void calculateBlock(unsigned long samples) + { + for (unsigned i = 0; i < samples; i++) + { + outleft[i]=inleft[i]; + outright[i]=inright[i]; + } + unsigned char *buffer=new unsigned char[samples*4]; + convert_stereo_2float_i16le(samples, + inleft, inright, buffer); + ::write(mFd, (const void*)buffer, samples*4); + delete [] buffer; + } +}; + +class ExtraStereoGuiFactory_impl : public ExtraStereoGuiFactory_skel +{ +public: + Widget createGui(Object object) + { + arts_return_val_if_fail(!object.isNull(), Arts::Widget::null()); + + ExtraStereo e = DynamicCast(object); + arts_return_val_if_fail(!e.isNull(), Arts::Widget::null()); + + HBox hbox; + hbox.width(80); + hbox.height(80); + hbox.show(); + + + Poti intense; + intense.caption("Intensity"); + intense.color("red"); + intense.min(0); + intense.max(5); + intense.value(e.intensity()); + intense.parent(hbox); + intense.show(); + connect(intense,"value_changed", e, "intensity"); + + hbox._addChild(intense,"intensityWidget"); + + return hbox; + } +}; + + +REGISTER_IMPLEMENTATION(ExtraStereo_impl); +REGISTER_IMPLEMENTATION(VoiceRemoval_impl); +REGISTER_IMPLEMENTATION(RawWriter_impl); +REGISTER_IMPLEMENTATION(ExtraStereoGuiFactory_impl); + + diff --git a/noatun/modules/artseffects/extrastereogui_impl.cc b/noatun/modules/artseffects/extrastereogui_impl.cc deleted file mode 100644 index 92148ba0..00000000 --- a/noatun/modules/artseffects/extrastereogui_impl.cc +++ /dev/null @@ -1,28 +0,0 @@ -#include -#include -#include "extrastereogui_impl.h" - -namespace Arts { - -ExtraStereoGUI_impl::ExtraStereoGUI_impl() : TQWidget(0) -{ - (new TQHBoxLayout(this))->setAutoAdd(true); - mSlider=new TQSlider(0,100,10, 0,Qt::Horizontal, this); - mSlider->show(); - show(); -} - -void ExtraStereoGUI_impl::changeSlider(int v) -{ - effect.intensity((float)v/100.0); -} - -void ExtraStereoGUI_impl::setEffect(StereoEffect newEffect) -{ - effect = DynamicCast(newEffect); -} - -REGISTER_IMPLEMENTATION(ExtraStereoGUI_impl); - -}; - diff --git a/noatun/modules/artseffects/extrastereogui_impl.cpp b/noatun/modules/artseffects/extrastereogui_impl.cpp new file mode 100644 index 00000000..92148ba0 --- /dev/null +++ b/noatun/modules/artseffects/extrastereogui_impl.cpp @@ -0,0 +1,28 @@ +#include +#include +#include "extrastereogui_impl.h" + +namespace Arts { + +ExtraStereoGUI_impl::ExtraStereoGUI_impl() : TQWidget(0) +{ + (new TQHBoxLayout(this))->setAutoAdd(true); + mSlider=new TQSlider(0,100,10, 0,Qt::Horizontal, this); + mSlider->show(); + show(); +} + +void ExtraStereoGUI_impl::changeSlider(int v) +{ + effect.intensity((float)v/100.0); +} + +void ExtraStereoGUI_impl::setEffect(StereoEffect newEffect) +{ + effect = DynamicCast(newEffect); +} + +REGISTER_IMPLEMENTATION(ExtraStereoGUI_impl); + +}; + diff --git a/noatun/modules/winskin/vis/CMakeLists.txt b/noatun/modules/winskin/vis/CMakeLists.txt index 25b86e8a..fc206056 100644 --- a/noatun/modules/winskin/vis/CMakeLists.txt +++ b/noatun/modules/winskin/vis/CMakeLists.txt @@ -27,7 +27,7 @@ link_directories( tde_add_library( winskinvis SHARED AUTOMOC SOURCES - winskinvis.cc + winskinvis.cpp winSkinFFT_impl.cpp realFFT.cpp realFFTFilter.cpp visQueue.cpp LINK @@ -37,7 +37,7 @@ tde_add_library( winskinvis SHARED AUTOMOC add_custom_command( OUTPUT - winskinvis.cc winskinvis.h + winskinvis.cpp winskinvis.h COMMAND ${ARTS_MCOPIDL_EXECUTABLE} -t -I${ARTS_INCLUDEDIR} ${CMAKE_CURRENT_SOURCE_DIR}/winskinvis.idl DEPENDS winskinvis.idl diff --git a/noatun/modules/winskin/vis/Makefile.am b/noatun/modules/winskin/vis/Makefile.am index b72036d3..473da0cb 100644 --- a/noatun/modules/winskin/vis/Makefile.am +++ b/noatun/modules/winskin/vis/Makefile.am @@ -1,15 +1,15 @@ INCLUDES= -I$(kde_includes)/arts $(all_includes) KDE_OPTIONS = nofinal -DISTCLEANFILES = winskinvis.h winskinvis.cc +DISTCLEANFILES = winskinvis.h winskinvis.cpp winskinvis.mcopclass: winskinvis.h winskinvis.mcoptype: winskinvis.h -winskinvis.cc winskinvis.h : $(srcdir)/winskinvis.idl +winskinvis.cpp winskinvis.h : $(srcdir)/winskinvis.idl $(MCOPIDL) -t -I$(kde_includes)/arts $(srcdir)/winskinvis.idl lib_LTLIBRARIES = libwinskinvis.la -libwinskinvis_la_SOURCES= winskinvis.cc \ +libwinskinvis_la_SOURCES= winskinvis.cpp \ winSkinFFT_impl.cpp realFFT.cpp \ realFFTFilter.cpp visQueue.cpp @@ -18,7 +18,7 @@ libwinskinvis_la_LDFLAGS= $(all_libraries) -avoid-version \ -no-undefined libwinskinvis_la_LIBADD = -lkmedia2_idl -lsoundserver_idl -lartsflow -lartsflow_idl -lmcop -libwinskinvis_la_COMPILE_FIRST = winskinvis.cc +libwinskinvis_la_COMPILE_FIRST = winskinvis.cpp libwinskinvis_la_METASOURCES = AUTO -- cgit v1.2.1