From 8756647ab974971e0d0e59bb172a39470baebf02 Mon Sep 17 00:00:00 2001 From: Taybin Rutkin Date: Tue, 31 Jul 2007 00:48:10 +0000 Subject: - build fixes for OS X. -- 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 | 6 +++--- libs/ardour/ardour/plugin.h | 2 ++ libs/ardour/ardour/plugin_insert.h | 5 +++-- libs/ardour/mix.cc | 18 +++++++++--------- libs/surfaces/powermate/SConscript | 18 ++++++++++-------- 5 files changed, 27 insertions(+), 22 deletions(-) diff --git a/SConstruct b/SConstruct index d88e8989cb..d462a155cb 100644 --- a/SConstruct +++ b/SConstruct @@ -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) ) #---------------------------------------------------------------------- diff --git a/libs/ardour/ardour/plugin.h b/libs/ardour/ardour/plugin.h index 0cdcc9bb26..451774be6c 100644 --- a/libs/ardour/ardour/plugin.h +++ b/libs/ardour/ardour/plugin.h @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -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; diff --git a/libs/ardour/ardour/plugin_insert.h b/libs/ardour/ardour/plugin_insert.h index 0694fa2a68..2038153d86 100644 --- a/libs/ardour/ardour/plugin_insert.h +++ b/libs/ardour/ardour/plugin_insert.h @@ -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 list); void set_value (float val); float get_value (void) const; - private: + private: PluginInsert& _plugin; boost::shared_ptr _list; bool _logarithmic; diff --git a/libs/ardour/mix.cc b/libs/ardour/mix.cc index 1c5d258661..726d375453 100644 --- a/libs/ardour/mix.cc +++ b/libs/ardour/mix.cc @@ -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(buf), 1, max, nframes); + vDSP_minv (const_cast(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 diff --git a/libs/surfaces/powermate/SConscript b/libs/surfaces/powermate/SConscript index e6f7e251df..cb144e37d3 100644 --- a/libs/surfaces/powermate/SConscript +++ b/libs/surfaces/powermate/SConscript @@ -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'))) -- cgit v1.2.3