jatinchowdhury18 / NewMixer

A unique and revolutionary audio mixing tool
GNU General Public License v2.0
23 stars 6 forks source link

Compilation on Linux. #93

Closed KottV closed 5 years ago

KottV commented 5 years ago

Hi,

I could compile NewMixer under Linux. But it has to do some changes:

  1. Fix SIMD call:

In file included from /home/kv/src/audio/NewMixer/JUCE/modules/juce_dsp/juce_dsp.h:245, from ../../JuceLibraryCode/JuceHeader.h:25, from ../../Source/Processors/ProcessorBase.h:4, from ../../Source/Processors/TrackBase.h:4, from ../../Source/Processors/TrackProcessor.h:4, from ../../Source/Processors/TrackProcessor.cpp:1: /home/kv/src/audio/NewMixer/JUCE/modules/juce_dsp/containers/juce_SIMDRegister.h: In instantiation of ‘struct juce::dsp::SIMDRegister’: ../../Source/Processors/TrackProcessor.cpp:82:97: required from here /home/kv/src/audio/NewMixer/JUCE/modules/juce_dsp/containers/juce_SIMDRegister.h:86:11: error: invalid use of incomplete type ‘struct juce::dsp::SIMDNativeOps’ 86 | using vSIMDType = typename NativeOps::vSIMDType;

by commenting template in juce_SIMDRegister_Impl.h

> // Extend some common used global functions to SIMDRegister types
> //template <typename Type>
> //inline dsp::SIMDRegister<Type> JUCE_VECTOR_CALLTYPE jmin (dsp::SIMDRegister<Type> a, dsp::SIMDRegister<Type> b) { return dsp::SIMDRegister<Type>::min (a, b); } 
> //template <typename Type>
> //inline dsp::SIMDRegister<Type> JUCE_VECTOR_CALLTYPE jmax (dsp::SIMDRegister<Type> a, dsp::SIMDRegister<Type> b) { return dsp::SIMDRegister<Type>::max (a, b); }

https://forum.juce.com/t/dsp-module-breaks-compilation-on-linux/27346

  1. call expf and logf from global (it's not in std in gcc) in TrackMeter.cpp:
> //    float rmsFactor = 1.0f + std::expf (std::logf (track->getProcessor()->getRMSLevel()) / skewFactor);
> float rmsFactor = 1.0f + expf (logf (track->getProcessor()->getRMSLevel()) / skewFactor);
  1. Comment out in Track.h: // void mouseDoubleClick (const MouseEvent& e) override;

because it gives linking error.

Forking/"fixing"/pull requesting is not problem. But I'm not programmer yet, so I prefer You decide how to resolves these issues better.

jatinchowdhury18 commented 5 years ago

Hello,

Thanks for looking into this! I've been meaning for some time to test compilation on Linux, but hadn't gotten around to it yet.

  1. Fix SIMD call: It's hard to believe the JUCE folks haven't taken care of this, but so it is. The latest version of the JUCE submodule used by the project has taken out the lines you mentioned just for Linux. Simply update your submodules, and you should be good to go.

  2. expf() and logf(): Thanks for letting me know, this should now be fixed.

  3. MouseDoubleClick(): I was being sloppy with my compiler directives. This is fixed now as well.

I've also added a Linux build to our CI pipeline, so all future changes will be tested on Linux, along with Mac and Windows!

To see all the changes, check out PR #94.

Cheers, Jatin