diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2017-09-18 12:39:17 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2017-09-18 12:39:17 -0400 |
commit | 30b087ab3d28f1585987fa3f6ae006562ae192e3 (patch) | |
tree | 620ae0250b5d77f90a18f8c2b83be61e4fe7b0b5 /libs/audiographer/src/general/normalizer.cc | |
parent | cb956e3e480716a3efd280a5287bdd7bee1cedc5 (diff) |
globally change all use of "frame" to refer to audio into "sample".
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode
and video in order to keep the legible
Diffstat (limited to 'libs/audiographer/src/general/normalizer.cc')
-rw-r--r-- | libs/audiographer/src/general/normalizer.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libs/audiographer/src/general/normalizer.cc b/libs/audiographer/src/general/normalizer.cc index a10382031a..ae603ef946 100644 --- a/libs/audiographer/src/general/normalizer.cc +++ b/libs/audiographer/src/general/normalizer.cc @@ -54,23 +54,23 @@ float Normalizer::set_peak (float peak) * non-const ProcessContexts are given to \a process() . * \n Not RT safe */ -void Normalizer::alloc_buffer(framecnt_t frames) +void Normalizer::alloc_buffer(samplecnt_t samples) { delete [] buffer; - buffer = new float[frames]; - buffer_size = frames; + buffer = new float[samples]; + buffer_size = samples; } /// Process a const ProcessContext \see alloc_buffer() \n RT safe void Normalizer::process (ProcessContext<float> const & c) { - if (throw_level (ThrowProcess) && c.frames() > buffer_size) { - throw Exception (*this, "Too many frames given to process()"); + if (throw_level (ThrowProcess) && c.samples() > buffer_size) { + throw Exception (*this, "Too many samples given to process()"); } if (enabled) { - memcpy (buffer, c.data(), c.frames() * sizeof(float)); - Routines::apply_gain_to_buffer (buffer, c.frames(), gain); + memcpy (buffer, c.data(), c.samples() * sizeof(float)); + Routines::apply_gain_to_buffer (buffer, c.samples(), gain); } ProcessContext<float> c_out (c, buffer); @@ -81,7 +81,7 @@ void Normalizer::process (ProcessContext<float> const & c) void Normalizer::process (ProcessContext<float> & c) { if (enabled) { - Routines::apply_gain_to_buffer (c.data(), c.frames(), gain); + Routines::apply_gain_to_buffer (c.data(), c.samples(), gain); } ListedSource<float>::output(c); } |