diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-05-02 15:21:51 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-05-02 15:21:51 +0000 |
commit | c3e666867cfd44768c9aa605abefde78274ace24 (patch) | |
tree | 547fb2300f0b384387647936c13d6672385aa0e7 /libs/ardour | |
parent | a612857eb6024f75f11094d09def4ccbe621b7b4 (diff) |
reintroduce use of optimized functions for gain into buffer code, and cleanup the way they are declared to avoid depending on Session
git-svn-id: svn://localhost/ardour2/branches/midi@1775 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/ardour/buffer.h | 15 | ||||
-rw-r--r-- | libs/ardour/ardour/mix.h | 52 | ||||
-rw-r--r-- | libs/ardour/ardour/peak.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/runtime_functions.h | 40 | ||||
-rw-r--r-- | libs/ardour/ardour/session.h | 12 | ||||
-rw-r--r-- | libs/ardour/audioregion.cc | 5 | ||||
-rw-r--r-- | libs/ardour/audiosource.cc | 6 | ||||
-rw-r--r-- | libs/ardour/globals.cc | 39 | ||||
-rw-r--r-- | libs/ardour/mix.cc | 22 | ||||
-rw-r--r-- | libs/ardour/panner.cc | 20 | ||||
-rw-r--r-- | libs/ardour/route.cc | 3 | ||||
-rw-r--r-- | libs/ardour/session.cc | 6 | ||||
-rw-r--r-- | libs/ardour/sse_functions_xmm.cc | 2 |
13 files changed, 117 insertions, 107 deletions
diff --git a/libs/ardour/ardour/buffer.h b/libs/ardour/ardour/buffer.h index 828eac4d64..6000872bdd 100644 --- a/libs/ardour/ardour/buffer.h +++ b/libs/ardour/ardour/buffer.h @@ -24,6 +24,7 @@ #include <iostream> #include <ardour/types.h> #include <ardour/data_type.h> +#include <ardour/runtime_functions.h> namespace ARDOUR { @@ -142,21 +143,13 @@ public: Sample* const dst_raw = _data + offset; const Sample* const src_raw = src.data(len); - for (jack_nframes_t n = 0; n < len; ++n) { - dst_raw[n] += src_raw[n] * gain_coeff; - } - + mix_buffers_with_gain (dst_raw, src_raw, len, gain_coeff); + _silent = ( (src.silent() && _silent) || (_silent && gain_coeff == 0) ); } void apply_gain(gain_t gain, jack_nframes_t len, jack_nframes_t offset=0) { - Sample* const buf = _data + offset; - - for (jack_nframes_t n = 0; n < len; ++n) { - buf[n] *= gain; - } - - _silent = (_silent || gain == 0); + apply_gain_to_buffer (_data + offset, len, gain); } /** Set the data contained by this buffer manually (for setting directly to jack buffer). diff --git a/libs/ardour/ardour/mix.h b/libs/ardour/ardour/mix.h index 5555f5437e..67779f0e07 100644 --- a/libs/ardour/ardour/mix.h +++ b/libs/ardour/ardour/mix.h @@ -27,53 +27,39 @@ extern "C" { /* SSE functions */ - float x86_sse_compute_peak (ARDOUR::Sample *buf, nframes_t nsamples, float current); - - void x86_sse_apply_gain_to_buffer (ARDOUR::Sample *buf, nframes_t nframes, float gain); - - void x86_sse_mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes, float gain); - - void x86_sse_mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes); + float x86_sse_compute_peak (const ARDOUR::Sample * buf, nframes_t nsamples, float current); + void x86_sse_apply_gain_to_buffer (ARDOUR::Sample * buf, nframes_t nframes, float gain); + void x86_sse_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes, float gain); + void x86_sse_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes); } -void x86_sse_find_peaks (ARDOUR::Sample *buf, nframes_t nsamples, float *min, float *max); +void x86_sse_find_peaks (const ARDOUR::Sample * buf, nframes_t nsamples, float *min, float *max); /* debug wrappers for SSE functions */ -float debug_compute_peak (ARDOUR::Sample *buf, nframes_t nsamples, float current); - -void debug_apply_gain_to_buffer (ARDOUR::Sample *buf, nframes_t nframes, float gain); - -void debug_mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes, float gain); - -void debug_mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes); +float debug_compute_peak (const ARDOUR::Sample * buf, nframes_t nsamples, float current); +void debug_apply_gain_to_buffer (ARDOUR::Sample * buf, nframes_t nframes, float gain); +void debug_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes, float gain); +void debug_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes); #endif #if defined (__APPLE__) -float veclib_compute_peak (ARDOUR::Sample *buf, nframes_t nsamples, float current); - -void veclib_find_peaks (ARDOUR::Sample *buf, nframes_t nsamples, float *min, float *max); - -void veclib_apply_gain_to_buffer (ARDOUR::Sample *buf, nframes_t nframes, float gain); - -void veclib_mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes, float gain); - -void veclib_mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes); +float veclib_compute_peak (const ARDOUR::Sample * buf, nframes_t nsamples, float current); +void veclib_find_peaks (const ARDOUR::Sample * buf, nframes_t nsamples, float *min, float *max); +void veclib_apply_gain_to_buffer (ARDOUR::Sample * buf, nframes_t nframes, float gain); +void veclib_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes, float gain); +void veclib_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes); #endif /* non-optimized functions */ -float compute_peak (ARDOUR::Sample *buf, nframes_t nsamples, float current); - -void find_peaks (ARDOUR::Sample *buf, nframes_t nsamples, float *min, float *max); - -void apply_gain_to_buffer (ARDOUR::Sample *buf, nframes_t nframes, float gain); - -void mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes, float gain); - -void mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes); +float default_compute_peak (const ARDOUR::Sample * buf, nframes_t nsamples, float current); +void default_find_peaks (const ARDOUR::Sample * buf, nframes_t nsamples, float *min, float *max); +void default_apply_gain_to_buffer (ARDOUR::Sample * buf, nframes_t nframes, float gain); +void default_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes, float gain); +void default_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes); #endif /* __ardour_mix_h__ */ diff --git a/libs/ardour/ardour/peak.h b/libs/ardour/ardour/peak.h index eaeafe0f5d..bbec40eea7 100644 --- a/libs/ardour/ardour/peak.h +++ b/libs/ardour/ardour/peak.h @@ -25,7 +25,7 @@ #include <ardour/utils.h> static inline float -compute_peak (ARDOUR::Sample *buf, nframes_t nsamples, float current) +default_compute_peak (const ARDOUR::Sample * const buf, nframes_t nsamples, float current) { for (nframes_t i = 0; i < nsamples; ++i) { current = f_max (current, fabsf (buf[i])); diff --git a/libs/ardour/ardour/runtime_functions.h b/libs/ardour/ardour/runtime_functions.h new file mode 100644 index 0000000000..c1dab4ebc7 --- /dev/null +++ b/libs/ardour/ardour/runtime_functions.h @@ -0,0 +1,40 @@ +/* + Copyright (C) 2007 Paul Davis + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#ifndef __ardour_runtime_functions_h__ +#define __ardour_runtime_functions_h__ + +#include <ardour/types.h> + +namespace ARDOUR { + + typedef float (*compute_peak_t) (const ARDOUR::Sample *, nframes_t, float); + typedef void (*find_peaks_t) (const ARDOUR::Sample *, nframes_t, float *, float*); + typedef void (*apply_gain_to_buffer_t) (ARDOUR::Sample *, nframes_t, float); + typedef void (*mix_buffers_with_gain_t) (ARDOUR::Sample *, const ARDOUR::Sample *, nframes_t, float); + typedef void (*mix_buffers_no_gain_t) (ARDOUR::Sample *, const ARDOUR::Sample *, nframes_t); + + extern compute_peak_t compute_peak; + extern find_peaks_t find_peaks; + extern apply_gain_to_buffer_t apply_gain_to_buffer; + extern mix_buffers_with_gain_t mix_buffers_with_gain; + extern mix_buffers_no_gain_t mix_buffers_no_gain; +} + +#endif /* __ardour_runtime_functions_h__ */ diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index d173f43407..27bc781b79 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -932,18 +932,6 @@ class Session : public PBD::StatefulDestructible void* ptr, float opt); - typedef float (*compute_peak_t) (Sample *, nframes_t, float); - typedef void (*find_peaks_t) (Sample *, nframes_t, float *, float*); - typedef void (*apply_gain_to_buffer_t) (Sample *, nframes_t, float); - typedef void (*mix_buffers_with_gain_t) (Sample *, Sample *, nframes_t, float); - typedef void (*mix_buffers_no_gain_t) (Sample *, Sample *, nframes_t); - - static compute_peak_t compute_peak; - static find_peaks_t find_peaks; - static apply_gain_to_buffer_t apply_gain_to_buffer; - static mix_buffers_with_gain_t mix_buffers_with_gain; - static mix_buffers_no_gain_t mix_buffers_no_gain; - static sigc::signal<void> SendFeedback; /* Controllables */ diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc index 61ae3ca073..e6646059e1 100644 --- a/libs/ardour/audioregion.cc +++ b/libs/ardour/audioregion.cc @@ -41,6 +41,7 @@ #include <ardour/audiofilter.h> #include <ardour/audiofilesource.h> #include <ardour/region_factory.h> +#include <ardour/runtime_functions.h> #include "i18n.h" #include <locale.h> @@ -467,7 +468,7 @@ AudioRegion::_read_at (const SourceList& srcs, Sample *buf, Sample *mixdown_buff } } } else if (_scale_amplitude != 1.0f) { - Session::apply_gain_to_buffer (mixdown_buffer, to_read, _scale_amplitude); + apply_gain_to_buffer (mixdown_buffer, to_read, _scale_amplitude); } merge: @@ -1099,7 +1100,7 @@ AudioRegion::normalize_to (float target_dB) return; } - maxamp = Session::compute_peak (buf, to_read, maxamp); + maxamp = compute_peak (buf, to_read, maxamp); } fpos += to_read; diff --git a/libs/ardour/audiosource.cc b/libs/ardour/audiosource.cc index 6fe2f67e05..49cfc15a54 100644 --- a/libs/ardour/audiosource.cc +++ b/libs/ardour/audiosource.cc @@ -35,7 +35,7 @@ #include <ardour/audiosource.h> #include <ardour/cycle_timer.h> -#include <ardour/session.h> +#include <ardour/runtime_functions.h> #include "i18n.h" @@ -696,7 +696,7 @@ AudioSource::compute_and_write_peaks (Sample* buf, nframes_t first_frame, nframe x.min = peak_leftovers[0]; x.max = peak_leftovers[0]; - Session::find_peaks (peak_leftovers + 1, peak_leftover_cnt - 1, &x.min, &x.max); + find_peaks (peak_leftovers + 1, peak_leftover_cnt - 1, &x.min, &x.max); off_t byte = (peak_leftover_frame / frames_per_peak) * sizeof (PeakData); @@ -779,7 +779,7 @@ AudioSource::compute_and_write_peaks (Sample* buf, nframes_t first_frame, nframe peakbuf[peaks_computed].max = buf[0]; peakbuf[peaks_computed].min = buf[0]; - Session::find_peaks (buf+1, this_time-1, &peakbuf[peaks_computed].min, &peakbuf[peaks_computed].max); + find_peaks (buf+1, this_time-1, &peakbuf[peaks_computed].min, &peakbuf[peaks_computed].max); peaks_computed++; buf += this_time; diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc index a310bd598f..ce0b333bcb 100644 --- a/libs/ardour/globals.cc +++ b/libs/ardour/globals.cc @@ -54,6 +54,7 @@ #endif #include <ardour/mix.h> +#include <ardour/runtime_functions.h> #if defined (__APPLE__) #include <Carbon/Carbon.h> // For Gestalt @@ -83,6 +84,12 @@ Change ARDOUR::PositionChanged = ARDOUR::new_change (); Change ARDOUR::NameChanged = ARDOUR::new_change (); Change ARDOUR::BoundsChanged = Change (0); // see init(), below +compute_peak_t ARDOUR::compute_peak = 0; +find_peaks_t ARDOUR::find_peaks = 0; +apply_gain_to_buffer_t ARDOUR::apply_gain_to_buffer = 0; +mix_buffers_with_gain_t ARDOUR::mix_buffers_with_gain = 0; +mix_buffers_no_gain_t ARDOUR::mix_buffers_no_gain = 0; + #ifdef HAVE_LIBLO static int setup_osc () @@ -236,11 +243,11 @@ setup_hardware_optimization (bool try_optimization) info << "Using SSE optimized routines" << endmsg; // SSE SET - Session::compute_peak = x86_sse_compute_peak; - Session::find_peaks = x86_sse_find_peaks; - Session::apply_gain_to_buffer = x86_sse_apply_gain_to_buffer; - Session::mix_buffers_with_gain = x86_sse_mix_buffers_with_gain; - Session::mix_buffers_no_gain = x86_sse_mix_buffers_no_gain; + compute_peak = x86_sse_compute_peak; + find_peaks = x86_sse_find_peaks; + apply_gain_to_buffer = x86_sse_apply_gain_to_buffer; + mix_buffers_with_gain = x86_sse_mix_buffers_with_gain; + mix_buffers_no_gain = x86_sse_mix_buffers_no_gain; generic_mix_functions = false; @@ -253,11 +260,11 @@ setup_hardware_optimization (bool try_optimization) sysVersion = 0; if (sysVersion >= 0x00001040) { // Tiger at least - Session::compute_peak = veclib_compute_peak; - Session::find_peaks = veclib_find_peaks; - Session::apply_gain_to_buffer = veclib_apply_gain_to_buffer; - Session::mix_buffers_with_gain = veclib_mix_buffers_with_gain; - Session::mix_buffers_no_gain = veclib_mix_buffers_no_gain; + compute_peak = veclib_compute_peak; + find_peaks = veclib_find_peaks; + apply_gain_to_buffer = veclib_apply_gain_to_buffer; + mix_buffers_with_gain = veclib_mix_buffers_with_gain; + mix_buffers_no_gain = veclib_mix_buffers_no_gain; generic_mix_functions = false; @@ -267,12 +274,12 @@ setup_hardware_optimization (bool try_optimization) } if (generic_mix_functions) { - - Session::compute_peak = compute_peak; - Session::find_peaks = find_peaks; - Session::apply_gain_to_buffer = apply_gain_to_buffer; - Session::mix_buffers_with_gain = mix_buffers_with_gain; - Session::mix_buffers_no_gain = mix_buffers_no_gain; + + compute_peak = default_compute_peak; + find_peaks = default_find_peaks; + apply_gain_to_buffer = default_apply_gain_to_buffer; + mix_buffers_with_gain = default_mix_buffers_with_gain; + mix_buffers_no_gain = default_mix_buffers_no_gain; info << "No H/W specific optimizations in use" << endmsg; } diff --git a/libs/ardour/mix.cc b/libs/ardour/mix.cc index 2d31c8ccc8..1c5d258661 100644 --- a/libs/ardour/mix.cc +++ b/libs/ardour/mix.cc @@ -23,6 +23,8 @@ #include <ardour/mix.h> #include <stdint.h> +using namespace ARDOUR; + #if defined (ARCH_X86) && defined (BUILD_SSE_OPTIMIZATIONS) // Debug wrappers @@ -80,7 +82,7 @@ debug_mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t n float -compute_peak (ARDOUR::Sample *buf, nframes_t nsamples, float current) +default_compute_peak (const ARDOUR::Sample * buf, nframes_t nsamples, float current) { for (nframes_t i = 0; i < nsamples; ++i) { current = f_max (current, fabsf (buf[i])); @@ -90,7 +92,7 @@ compute_peak (ARDOUR::Sample *buf, nframes_t nsamples, float current) } void -find_peaks (ARDOUR::Sample *buf, nframes_t nframes, float *min, float *max) +default_find_peaks (const ARDOUR::Sample * buf, nframes_t nframes, float *min, float *max) { nframes_t i; float a, b; @@ -109,14 +111,14 @@ find_peaks (ARDOUR::Sample *buf, nframes_t nframes, float *min, float *max) } void -apply_gain_to_buffer (ARDOUR::Sample *buf, nframes_t nframes, float gain) +default_apply_gain_to_buffer (ARDOUR::Sample * buf, nframes_t nframes, float gain) { for (nframes_t i=0; i<nframes; i++) buf[i] *= gain; } void -mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes, float gain) +default_mix_buffers_with_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes, float gain) { for (nframes_t i = 0; i < nframes; i++) { dst[i] += src[i] * gain; @@ -124,7 +126,7 @@ mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nfram } void -mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes) +default_mix_buffers_no_gain (ARDOUR::Sample * dst, const ARDOUR::Sample * src, nframes_t nframes) { for (nframes_t i=0; i < nframes; i++) { dst[i] += src[i]; @@ -135,7 +137,7 @@ mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes #include <Accelerate/Accelerate.h> float -veclib_compute_peak (ARDOUR::Sample *buf, nframes_t nsamples, float current) +veclib_compute_peak (const ARDOUR::Sample * buf, nframes_t nsamples, float current) { float tmpmax = 0.0f; vDSP_maxmgv(buf, 1, &tmpmax, nsamples); @@ -143,26 +145,26 @@ veclib_compute_peak (ARDOUR::Sample *buf, nframes_t nsamples, float current) } void -veclib_find_peaks (ARDOUR::Sample *buf, nframes_t nframes, float *min, float *max) +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); } void -veclib_apply_gain_to_buffer (ARDOUR::Sample *buf, nframes_t nframes, float gain) +veclib_apply_gain_to_buffer (ARDOUR::Sample * buf, nframes_t nframes, float gain) { vDSP_vsmul(buf, 1, &gain, buf, 1, nframes); } void -veclib_mix_buffers_with_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes, float gain) +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); } void -veclib_mix_buffers_no_gain (ARDOUR::Sample *dst, ARDOUR::Sample *src, nframes_t nframes) +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; diff --git a/libs/ardour/panner.cc b/libs/ardour/panner.cc index cb4faec148..d3c0dc8d4e 100644 --- a/libs/ardour/panner.cc +++ b/libs/ardour/panner.cc @@ -41,7 +41,7 @@ #include <ardour/panner.h> #include <ardour/utils.h> -#include <ardour/mix.h> +#include <ardour/runtime_functions.h> #include <ardour/buffer_set.h> #include "i18n.h" @@ -304,7 +304,7 @@ BaseStereoPanner::distribute (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gain pan = left * gain_coeff; - Session::mix_buffers_with_gain(dst+n,src+n,nframes-n,pan); + mix_buffers_with_gain(dst+n,src+n,nframes-n,pan); } else { @@ -315,7 +315,7 @@ BaseStereoPanner::distribute (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gain if (pan != 0.0f) { - Session::mix_buffers_with_gain(dst,src,nframes,pan); + mix_buffers_with_gain(dst,src,nframes,pan); /* mark that we wrote into the buffer */ @@ -325,7 +325,7 @@ BaseStereoPanner::distribute (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gain } else { - Session::mix_buffers_no_gain(dst,src,nframes); + mix_buffers_no_gain(dst,src,nframes); /* mark that we wrote into the buffer */ @@ -354,7 +354,7 @@ BaseStereoPanner::distribute (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gain pan = right * gain_coeff; - Session::mix_buffers_with_gain(dst+n,src+n,nframes-n,pan); + mix_buffers_with_gain(dst+n,src+n,nframes-n,pan); /* XXX it would be nice to mark the buffer as written to */ @@ -367,14 +367,14 @@ BaseStereoPanner::distribute (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gain if (pan != 0.0f) { - Session::mix_buffers_with_gain(dst,src,nframes,pan); + mix_buffers_with_gain(dst,src,nframes,pan); /* XXX it would be nice to mark the buffer as written to */ } } else { - Session::mix_buffers_no_gain(dst,src,nframes); + mix_buffers_no_gain(dst,src,nframes); /* XXX it would be nice to mark the buffer as written to */ } @@ -666,7 +666,7 @@ Multi2dPanner::distribute (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gain_co } pan = left * gain_coeff; - Session::mix_buffers_with_gain(dst+n,src+n,nframes-n,pan); + mix_buffers_with_gain(dst+n,src+n,nframes-n,pan); } else { @@ -676,10 +676,10 @@ Multi2dPanner::distribute (AudioBuffer& srcbuf, BufferSet& obufs, gain_t gain_co if ((pan *= gain_coeff) != 1.0f) { if (pan != 0.0f) { - Session::mix_buffers_with_gain(dst,src,nframes,pan); + mix_buffers_with_gain(dst,src,nframes,pan); } } else { - Session::mix_buffers_no_gain(dst,src,nframes); + mix_buffers_no_gain(dst,src,nframes); } #endif #ifdef CAN_INTERP diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index d37ae725af..b161afa6a5 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -41,7 +41,6 @@ #include <ardour/ladspa_plugin.h> #include <ardour/panner.h> #include <ardour/dB.h> -#include <ardour/mix.h> #include <ardour/amp.h> #include <ardour/meter.h> #include <ardour/buffer_set.h> @@ -507,7 +506,7 @@ Route::process_output_buffers (BufferSet& bufs, for (BufferSet::audio_iterator i = bufs.audio_begin(); i != bufs.audio_end(); ++i) { Sample* const sp = i->data(nframes); - Session::apply_gain_to_buffer(sp,nframes,this_gain); + apply_gain_to_buffer(sp,nframes,this_gain); } } else if (_gain == 0) { diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 8f02904fb1..00c8deb36b 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -100,12 +100,6 @@ const char* Session::dead_sound_dir_name = X_("dead_sounds"); const char* Session::interchange_dir_name = X_("interchange"); const char* Session::export_dir_name = X_("export"); -Session::compute_peak_t Session::compute_peak = 0; -Session::find_peaks_t Session::find_peaks = 0; -Session::apply_gain_to_buffer_t Session::apply_gain_to_buffer = 0; -Session::mix_buffers_with_gain_t Session::mix_buffers_with_gain = 0; -Session::mix_buffers_no_gain_t Session::mix_buffers_no_gain = 0; - sigc::signal<int> Session::AskAboutPendingState; sigc::signal<void> Session::SendFeedback; diff --git a/libs/ardour/sse_functions_xmm.cc b/libs/ardour/sse_functions_xmm.cc index 5554462132..9b37c37912 100644 --- a/libs/ardour/sse_functions_xmm.cc +++ b/libs/ardour/sse_functions_xmm.cc @@ -22,7 +22,7 @@ #include <ardour/types.h> void -x86_sse_find_peaks(float *buf, nframes_t nframes, float *min, float *max) +x86_sse_find_peaks(const ARDOUR::Sample* buf, nframes_t nframes, float *min, float *max) { __m128 current_max, current_min, work; |