From 2c1f07d655cd83654ffd5274ecc80b642dbfb6e4 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Sun, 16 Nov 2014 01:21:54 +0100 Subject: [PATCH 01/10] Travis CI: Add win32 target os Temporarily disable Linux builds --- .travis.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index ecb14fd55..28376a99b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,18 @@ language: cpp compiler: gcc -before_install: sudo apt-get update -install: sudo apt-get install libqt4-dev libsndfile-dev fftw3-dev libvorbis-dev libogg-dev libasound2-dev libjack-dev libsdl-dev libsamplerate0-dev libstk0-dev libfluidsynth-dev portaudio19-dev wine-dev g++-multilib libfltk1.3-dev -before_script: mkdir build && cd build -script: cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. && make -j8 VERBOSE=1 +env: +# - TARGET_OS=linux + - TARGET_OS=win32 +before_install: + - if [ $TARGET_OS != linux ]; then sudo add-apt-repository ppa:tobydox/mingw -y; fi + - sudo apt-get update -qq +install: + - if [ $TARGET_OS != linux ]; then sudo apt-get install -y cloog-isl libmpc2 mingw32; fi + - if [ $TARGET_OS == win32 ]; then sudo apt-get install -y mingw32-x-qt mingw32-x-sdl mingw32-x-libvorbis mingw32-x-fluidsynth mingw32-x-stk mingw32-x-glib2 mingw32-x-portaudio mingw32-x-libsndfile mingw32-x-fftw mingw32-x-flac mingw32-x-fltk mingw32-x-libsamplerate mingw32-x-pkgconfig mingw32-x-binutils mingw32-x-gcc mingw32-x-runtime; fi + - if [ $TARGET_OS == linux ]; then sudo apt-get install -y libqt4-dev libsndfile-dev fftw3-dev libvorbis-dev libogg-dev libasound2-dev libjack-dev libsdl-dev libsamplerate0-dev libstk0-dev libfluidsynth-dev portaudio19-dev wine-dev g++-multilib libfltk1.3-dev; fi +before_script: + - mkdir build && cd build +script: + - if [ $TARGET_OS == win32 ]; then ../build_mingw32 || ../build_mingw32; fi + - if [ $TARGET_OS == linux ]; then cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..; fi + - make VERBOSE=1 From 0916bc073e42bbf490c0b7686505dd893ef4382f Mon Sep 17 00:00:00 2001 From: Lukas W Date: Sun, 16 Nov 2014 01:51:29 +0100 Subject: [PATCH 02/10] Fix compile errors --- include/lmms_math.h | 7 ++++++- src/core/fft_helpers.cpp | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/lmms_math.h b/include/lmms_math.h index 78585d4c9..43f699718 100644 --- a/include/lmms_math.h +++ b/include/lmms_math.h @@ -31,7 +31,12 @@ #include "lmmsconfig.h" #include -#include +#include +using namespace std; + +#ifndef M_PI +# define M_PI 3.14159265358979323846 +#endif #if defined (LMMS_BUILD_WIN32) || defined (LMMS_BUILD_APPLE) #ifndef isnanf diff --git a/src/core/fft_helpers.cpp b/src/core/fft_helpers.cpp index e1ebc648b..0f9444aa6 100644 --- a/src/core/fft_helpers.cpp +++ b/src/core/fft_helpers.cpp @@ -25,7 +25,7 @@ #include "fft_helpers.h" -#include +#include /* returns biggest value from abs_spectrum[spec_size] array From 7a62d0ce6ff7e1de913fda332e952d565461a7a9 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Sun, 16 Nov 2014 02:15:15 +0100 Subject: [PATCH 03/10] Travis: Enable multithreading, Linux, Win64 --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 28376a99b..34a636525 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,21 @@ language: cpp compiler: gcc env: -# - TARGET_OS=linux + - TARGET_OS=linux - TARGET_OS=win32 + - TARGET_OS=win64 before_install: - if [ $TARGET_OS != linux ]; then sudo add-apt-repository ppa:tobydox/mingw -y; fi - sudo apt-get update -qq install: - if [ $TARGET_OS != linux ]; then sudo apt-get install -y cloog-isl libmpc2 mingw32; fi - if [ $TARGET_OS == win32 ]; then sudo apt-get install -y mingw32-x-qt mingw32-x-sdl mingw32-x-libvorbis mingw32-x-fluidsynth mingw32-x-stk mingw32-x-glib2 mingw32-x-portaudio mingw32-x-libsndfile mingw32-x-fftw mingw32-x-flac mingw32-x-fltk mingw32-x-libsamplerate mingw32-x-pkgconfig mingw32-x-binutils mingw32-x-gcc mingw32-x-runtime; fi + - if [ $TARGET_OS == win64 ]; then sudo apt-get install -y mingw64-x-qt mingw64-x-sdl mingw64-x-libvorbis mingw64-x-fluidsynth mingw64-x-stk mingw64-x-glib2 mingw64-x-portaudio mingw64-x-libsndfile mingw64-x-fftw mingw64-x-flac mingw64-x-fltk mingw64-x-libsamplerate mingw64-x-pkgconfig mingw64-x-binutils mingw64-x-gcc mingw64-x-runtime; fi - if [ $TARGET_OS == linux ]; then sudo apt-get install -y libqt4-dev libsndfile-dev fftw3-dev libvorbis-dev libogg-dev libasound2-dev libjack-dev libsdl-dev libsamplerate0-dev libstk0-dev libfluidsynth-dev portaudio19-dev wine-dev g++-multilib libfltk1.3-dev; fi before_script: - mkdir build && cd build script: - if [ $TARGET_OS == win32 ]; then ../build_mingw32 || ../build_mingw32; fi + - if [ $TARGET_OS == win64 ]; then ../build_mingw64 || ../build_mingw64; fi - if [ $TARGET_OS == linux ]; then cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..; fi - - make VERBOSE=1 + - make -j4 VERBOSE=1 From 3aba823ecc45473594ed32861a07317bda08aafe Mon Sep 17 00:00:00 2001 From: Lukas W Date: Sun, 16 Nov 2014 02:23:29 +0100 Subject: [PATCH 04/10] Travis: No multithreading make for windows builds --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 34a636525..0846b08ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,5 +17,5 @@ before_script: script: - if [ $TARGET_OS == win32 ]; then ../build_mingw32 || ../build_mingw32; fi - if [ $TARGET_OS == win64 ]; then ../build_mingw64 || ../build_mingw64; fi - - if [ $TARGET_OS == linux ]; then cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..; fi - - make -j4 VERBOSE=1 + - if [ $TARGET_OS == linux ]; then cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. && make -j4 VERBOSE=1; fi + - if [ $TARGET_OS != linux ]; then make; fi From eed060840505838bb58cbaa431115d2d80693fb5 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Sun, 16 Nov 2014 11:15:37 +0100 Subject: [PATCH 05/10] Fix win64 build --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0846b08ac..3b0272969 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ before_install: - sudo apt-get update -qq install: - if [ $TARGET_OS != linux ]; then sudo apt-get install -y cloog-isl libmpc2 mingw32; fi - - if [ $TARGET_OS == win32 ]; then sudo apt-get install -y mingw32-x-qt mingw32-x-sdl mingw32-x-libvorbis mingw32-x-fluidsynth mingw32-x-stk mingw32-x-glib2 mingw32-x-portaudio mingw32-x-libsndfile mingw32-x-fftw mingw32-x-flac mingw32-x-fltk mingw32-x-libsamplerate mingw32-x-pkgconfig mingw32-x-binutils mingw32-x-gcc mingw32-x-runtime; fi + - if [ $TARGET_OS != linux ]; then sudo apt-get install -y mingw32-x-qt mingw32-x-sdl mingw32-x-libvorbis mingw32-x-fluidsynth mingw32-x-stk mingw32-x-glib2 mingw32-x-portaudio mingw32-x-libsndfile mingw32-x-fftw mingw32-x-flac mingw32-x-fltk mingw32-x-libsamplerate mingw32-x-pkgconfig mingw32-x-binutils mingw32-x-gcc mingw32-x-runtime; fi - if [ $TARGET_OS == win64 ]; then sudo apt-get install -y mingw64-x-qt mingw64-x-sdl mingw64-x-libvorbis mingw64-x-fluidsynth mingw64-x-stk mingw64-x-glib2 mingw64-x-portaudio mingw64-x-libsndfile mingw64-x-fftw mingw64-x-flac mingw64-x-fltk mingw64-x-libsamplerate mingw64-x-pkgconfig mingw64-x-binutils mingw64-x-gcc mingw64-x-runtime; fi - if [ $TARGET_OS == linux ]; then sudo apt-get install -y libqt4-dev libsndfile-dev fftw3-dev libvorbis-dev libogg-dev libasound2-dev libjack-dev libsdl-dev libsamplerate0-dev libstk0-dev libfluidsynth-dev portaudio19-dev wine-dev g++-multilib libfltk1.3-dev; fi before_script: From e66326b36b9a18f7940787f6c558f80cb488065d Mon Sep 17 00:00:00 2001 From: Lukas W Date: Sun, 16 Nov 2014 14:51:20 +0100 Subject: [PATCH 06/10] Automatic deployment for Windows builds --- .travis.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.travis.yml b/.travis.yml index 3b0272969..82aa2cab4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,3 +19,14 @@ script: - if [ $TARGET_OS == win64 ]; then ../build_mingw64 || ../build_mingw64; fi - if [ $TARGET_OS == linux ]; then cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. && make -j4 VERBOSE=1; fi - if [ $TARGET_OS != linux ]; then make; fi +before_deploy: make package +deploy: + provider: releases + api_key: + secure: d4a+x4Gugpss7JK2DcHjyBZDmEFFh4iVfKDfITSD50T6Mc6At4LMgojvEu+6qT6IyOY2vm3UVT6fhyeuWDTRDwW9tfFlaHVA0h8aTRD+eAXOA7pQ8rEMwQO3+WCKuKTfEqUkpL4wxhww8dpkv54tqeIs0S4TBqz9tk8UhzU7XbE= + file: lmms-*-win*.exe + on: + tags: true + all_branches: true + condition: "$TARGET_OS != linux" + repo: LMMS/lmms From d8662e76de07eb2ee2bb100d764271f35c1d6300 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Sun, 16 Nov 2014 15:01:15 +0100 Subject: [PATCH 07/10] Remove M_PI definition, use F_PI --- include/lmms_math.h | 4 ---- src/core/fft_helpers.cpp | 4 ++-- src/gui/widgets/knob.cpp | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/include/lmms_math.h b/include/lmms_math.h index 43f699718..ea13f94b7 100644 --- a/include/lmms_math.h +++ b/include/lmms_math.h @@ -34,10 +34,6 @@ #include using namespace std; -#ifndef M_PI -# define M_PI 3.14159265358979323846 -#endif - #if defined (LMMS_BUILD_WIN32) || defined (LMMS_BUILD_APPLE) #ifndef isnanf #define isnanf(x) isnan(x) diff --git a/src/core/fft_helpers.cpp b/src/core/fft_helpers.cpp index 0f9444aa6..71e84a8db 100644 --- a/src/core/fft_helpers.cpp +++ b/src/core/fft_helpers.cpp @@ -25,7 +25,7 @@ #include "fft_helpers.h" -#include +#include "lmms_math.h" /* returns biggest value from abs_spectrum[spec_size] array @@ -73,7 +73,7 @@ int hanming(float *timebuffer, int length, WINDOWS type) for ( i=0; i Date: Sun, 16 Nov 2014 15:51:40 +0100 Subject: [PATCH 08/10] BassBooster: Remove inline keyword --- plugins/BassBooster/BassBooster.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/BassBooster/BassBooster.cpp b/plugins/BassBooster/BassBooster.cpp index 38a9bced3..13a1445e6 100644 --- a/plugins/BassBooster/BassBooster.cpp +++ b/plugins/BassBooster/BassBooster.cpp @@ -98,7 +98,7 @@ bool BassBoosterEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames } -inline void BassBoosterEffect::changeFrequency() +void BassBoosterEffect::changeFrequency() { const sample_t fac = engine::mixer()->processingSampleRate() / 44100.0f; @@ -109,7 +109,7 @@ inline void BassBoosterEffect::changeFrequency() -inline void BassBoosterEffect::changeGain() +void BassBoosterEffect::changeGain() { m_bbFX.leftFX().setGain( m_bbControls.m_gainModel.value() ); m_bbFX.rightFX().setGain( m_bbControls.m_gainModel.value() ); @@ -118,7 +118,7 @@ inline void BassBoosterEffect::changeGain() -inline void BassBoosterEffect::changeRatio() +void BassBoosterEffect::changeRatio() { m_bbFX.leftFX().setRatio( m_bbControls.m_ratioModel.value() ); m_bbFX.rightFX().setRatio( m_bbControls.m_ratioModel.value() ); From 84c8755dcd8bfbf9006372fb172f368a1dda38af Mon Sep 17 00:00:00 2001 From: Vesa Date: Sun, 16 Nov 2014 17:07:35 +0200 Subject: [PATCH 09/10] Revert "BassBooster: Remove inline keyword" This reverts commit 761a71f760d2aae0f9943ad23e7b2c01fb0a4948. --- plugins/BassBooster/BassBooster.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/BassBooster/BassBooster.cpp b/plugins/BassBooster/BassBooster.cpp index 13a1445e6..38a9bced3 100644 --- a/plugins/BassBooster/BassBooster.cpp +++ b/plugins/BassBooster/BassBooster.cpp @@ -98,7 +98,7 @@ bool BassBoosterEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames } -void BassBoosterEffect::changeFrequency() +inline void BassBoosterEffect::changeFrequency() { const sample_t fac = engine::mixer()->processingSampleRate() / 44100.0f; @@ -109,7 +109,7 @@ void BassBoosterEffect::changeFrequency() -void BassBoosterEffect::changeGain() +inline void BassBoosterEffect::changeGain() { m_bbFX.leftFX().setGain( m_bbControls.m_gainModel.value() ); m_bbFX.rightFX().setGain( m_bbControls.m_gainModel.value() ); @@ -118,7 +118,7 @@ void BassBoosterEffect::changeGain() -void BassBoosterEffect::changeRatio() +inline void BassBoosterEffect::changeRatio() { m_bbFX.leftFX().setRatio( m_bbControls.m_ratioModel.value() ); m_bbFX.rightFX().setRatio( m_bbControls.m_ratioModel.value() ); From bf7b5a5d9d61b9aa8f23575ce61c8320201cbd2c Mon Sep 17 00:00:00 2001 From: Vesa Date: Sun, 16 Nov 2014 17:08:39 +0200 Subject: [PATCH 10/10] Fix bassbooster --- plugins/BassBooster/BassBooster.cpp | 7 ++++++- plugins/BassBooster/BassBooster.h | 5 ++++- plugins/BassBooster/BassBoosterControls.cpp | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/plugins/BassBooster/BassBooster.cpp b/plugins/BassBooster/BassBooster.cpp index 38a9bced3..60c31ab1a 100644 --- a/plugins/BassBooster/BassBooster.cpp +++ b/plugins/BassBooster/BassBooster.cpp @@ -49,6 +49,7 @@ Plugin::Descriptor PLUGIN_EXPORT bassbooster_plugin_descriptor = BassBoosterEffect::BassBoosterEffect( Model* parent, const Descriptor::SubPluginFeatures::Key* key ) : Effect( &bassbooster_plugin_descriptor, parent, key ), + m_frequencyChangeNeeded( false ), m_bbFX( DspEffectLibrary::FastBassBoost( 70.0f, 1.0f, 2.8f ) ), m_bbControls( this ) { @@ -74,7 +75,11 @@ bool BassBoosterEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames return( false ); } // check out changed controls - if( m_bbControls.m_freqModel.isValueChanged() ) { changeFrequency(); } + if( m_frequencyChangeNeeded || m_bbControls.m_freqModel.isValueChanged() ) + { + changeFrequency(); + m_frequencyChangeNeeded = false; + } if( m_bbControls.m_gainModel.isValueChanged() ) { changeGain(); } if( m_bbControls.m_ratioModel.isValueChanged() ) { changeRatio(); } diff --git a/plugins/BassBooster/BassBooster.h b/plugins/BassBooster/BassBooster.h index ad7c6c457..160328e93 100644 --- a/plugins/BassBooster/BassBooster.h +++ b/plugins/BassBooster/BassBooster.h @@ -44,11 +44,14 @@ public: } -private: +protected: void changeFrequency(); void changeGain(); void changeRatio(); + bool m_frequencyChangeNeeded; + +private: DspEffectLibrary::MonoToStereoAdaptor m_bbFX; BassBoosterControls m_bbControls; diff --git a/plugins/BassBooster/BassBoosterControls.cpp b/plugins/BassBooster/BassBoosterControls.cpp index 28d1a8f83..ce03e7d16 100644 --- a/plugins/BassBooster/BassBoosterControls.cpp +++ b/plugins/BassBooster/BassBoosterControls.cpp @@ -43,7 +43,7 @@ BassBoosterControls::BassBoosterControls( BassBoosterEffect* effect ) : void BassBoosterControls::changeFrequency() { - m_effect->changeFrequency(); + m_effect->m_frequencyChangeNeeded = true; }