- build fixes for OS X.
authorTaybin Rutkin <taybin@taybin.com>
Tue, 31 Jul 2007 00:48:10 +0000 (00:48 +0000)
committerTaybin Rutkin <taybin@taybin.com>
Tue, 31 Jul 2007 00:48:10 +0000 (00:48 +0000)
-- casts for vDSP in mix.cc
-- fix for PluginInsert::PluginControl usage
-- disable POWERMATE if POWERMATE=0

git-svn-id: svn://localhost/ardour2/trunk@2193 d708f5d6-7413-0410-9779-e7cbd77b26cf

SConstruct
libs/ardour/ardour/plugin.h
libs/ardour/ardour/plugin_insert.h
libs/ardour/mix.cc
libs/surfaces/powermate/SConscript

index d88e8989cbb4faae96e0ef46362e392952ee0d25..d462a155cbda6883c5c60e3b31dcf8aa6a41a8c4 100644 (file)
@@ -28,6 +28,7 @@ opts = Options('scache.conf')
 opts.AddOptions(
     ('ARCH', 'Set architecture-specific compilation flags by hand (all flags as 1 argument)',''),
     BoolOption('AUDIOUNITS', 'Compile with Apple\'s AudioUnit library. (experimental)', 0),
+    BoolOption('CMT', 'Compile with support for CMT Additions', 1),
     BoolOption('COREAUDIO', 'Compile with Apple\'s CoreAudio library', 0),
     BoolOption('DEBUG', 'Set to build with debugging information and no optimizations', 1),
     PathOption('DESTDIR', 'Set the intermediate install "prefix"', '/'),
@@ -36,17 +37,16 @@ opts.AddOptions(
     BoolOption('EXTRA_WARN', 'Compile with -Wextra, -ansi, and -pedantic.  Might break compilation.  For pedants', 0),
     BoolOption('FFT_ANALYSIS', 'Include FFT analysis window', 0),
     BoolOption('FPU_OPTIMIZATION', 'Build runtime checked assembler code', 1),
+    BoolOption('GPROFILE', 'Compile with support for gprofile (Developers only)', 0),
     BoolOption('LIBLO', 'Compile with support for liblo library', 1),
     BoolOption('NLS', 'Set to turn on i18n support', 1),
     PathOption('PREFIX', 'Set the install "prefix"', '/usr/local'),
     BoolOption('SURFACES', 'Build support for control surfaces', 1),
     BoolOption('SYSLIBS', 'USE AT YOUR OWN RISK: CANCELS ALL SUPPORT FROM ARDOUR AUTHORS: Use existing system versions of various libraries instead of internal ones', 0),
+    BoolOption('TRANZPORT', 'Compile with support for Frontier Designs (if libusb is available)', 1),
     BoolOption('UNIVERSAL', 'Compile as universal binary.  Requires that external libraries are already universal.', 0),
     BoolOption('VERSIONED', 'Add revision information to ardour/gtk executable name inside the build directory', 0),
     BoolOption('VST', 'Compile with support for VST', 0),
-    BoolOption('GPROFILE', 'Compile with support for gprofile (Developers only)', 0),
-    BoolOption('TRANZPORT', 'Compile with support for Frontier Designs (if libusb is available)', 1),
-    BoolOption('CMT', 'Compile with support for CMT Additions', 1)
 )
 
 #----------------------------------------------------------------------
index 0cdcc9bb2664eb612bb7aa7e157624b175147be8..451774be6c3976399177c01fbad2de36e89cb352 100644 (file)
@@ -33,6 +33,7 @@
 #include <ardour/cycles.h>
 #include <ardour/latent.h>
 #include <ardour/parameter.h>
+#include <ardour/plugin_insert.h>
 
 #include <vector>
 #include <set>
@@ -150,6 +151,7 @@ class Plugin : public PBD::StatefulDestructible, public Latent
 
   protected:
        friend class PluginInsert;
+       friend struct PluginInsert::PluginControl;
        virtual void set_parameter (uint32_t which, float val) = 0;
 
        ARDOUR::AudioEngine& _engine;
index 0694fa2a683e03c22da78577b4b5616fe31634d0..2038153d8601ed6a8d0d8076520cf6f5783c9e31 100644 (file)
@@ -81,13 +81,14 @@ class PluginInsert : public Processor
 
        float default_parameter_value (Parameter param);
        
-       struct PluginControl : public AutomationControl {
+       struct PluginControl : public AutomationControl 
+       {
            PluginControl (PluginInsert& p, boost::shared_ptr<AutomationList> list);
            
                void set_value (float val);
            float get_value (void) const;
        
-       private:
+         private:
                PluginInsert& _plugin;
                boost::shared_ptr<AutomationList> _list;
                bool _logarithmic;
index 1c5d2586610a25d2f616e3a61da9fd1d6888664c..726d3754530fc0c765806424a7a79feed968f0c8 100644 (file)
@@ -140,35 +140,35 @@ float
 veclib_compute_peak (const ARDOUR::Sample * buf, nframes_t nsamples, float current)
 {
        float tmpmax = 0.0f;
-        vDSP_maxmgv(buf, 1, &tmpmax, nsamples);
-        return f_max(current, tmpmax);
+       vDSP_maxmgv(buf, 1, &tmpmax, nsamples);
+       return f_max(current, tmpmax);
 }
 
 void
 veclib_find_peaks (const ARDOUR::Sample * buf, nframes_t nframes, float *min, float *max)
 {
-       vDSP_maxv (buf, 1, max, nframes);
-       vDSP_minv (buf, 1, min, nframes);
+       vDSP_maxv (const_cast<ARDOUR::Sample*>(buf), 1, max, nframes);
+       vDSP_minv (const_cast<ARDOUR::Sample*>(buf), 1, min, nframes);
 }
 
 void
 veclib_apply_gain_to_buffer (ARDOUR::Sample * buf, nframes_t nframes, float gain)
 {
-        vDSP_vsmul(buf, 1, &gain, buf, 1, nframes);
+       vDSP_vsmul(buf, 1, &gain, buf, 1, nframes);
 }
 
 void
 veclib_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes, float gain)
 {
-        vDSP_vsma(src, 1, &gain, dst, 1, dst, 1, nframes);
+       vDSP_vsma(src, 1, &gain, dst, 1, dst, 1, nframes);
 }
 
 void
 veclib_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes)
 {
-        // It seems that a vector mult only operation does not exist...
-        float gain = 1.0f;
-        vDSP_vsma(src, 1, &gain, dst, 1, dst, 1, nframes);
+       // It seems that a vector mult only operation does not exist...
+       float gain = 1.0f;
+       vDSP_vsma(src, 1, &gain, dst, 1, dst, 1, nframes);
 }
 
 #endif
index e6f7e251df8bc9ca5f74d82618a35ee5be588363..cb144e37d331ce2558238ec3198d1685954bd2c1 100644 (file)
@@ -44,14 +44,16 @@ powermate.Merge ([
 
 libardour_powermate = powermate.SharedLibrary('ardour_powermate', powermate_files)
 
-Default(libardour_powermate)
+if env['POWERMATE']:
+       Default(libardour_powermate)
 
-if env['NLS']:
-       i18n (powermate, powermate_files, env)
+       if env['NLS']:
+               i18n (powermate, powermate_files, env)
              
-env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2/surfaces'), libardour_powermate))
+       env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2/surfaces'), libardour_powermate))
+
+       env.Alias('tarball', env.Distribute (env['DISTTREE'],
+                                            [ 'SConscript' ] +
+                                            powermate_files + 
+                                            glob.glob('po/*.po') + glob.glob('*.h')))
 
-env.Alias('tarball', env.Distribute (env['DISTTREE'],
-                                    [ 'SConscript' ] +
-                                    powermate_files + 
-                                    glob.glob('po/*.po') + glob.glob('*.h')))