summaryrefslogtreecommitdiff
path: root/libs/audiographer/src
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-10-05 16:17:49 +0200
committerRobin Gareus <robin@gareus.org>2015-10-05 16:17:49 +0200
commit22b07e0233a29d9633ffa825a79503befaf2e16e (patch)
tree1d8b06056f8e12197158f5d906319767d3dedda5 /libs/audiographer/src
parente11ba7b79d68bc1070b170236c22123966d7bcc3 (diff)
NOOP, remove trailing tabs/whitespace.
Diffstat (limited to 'libs/audiographer/src')
-rw-r--r--libs/audiographer/src/debug_utils.cc4
-rw-r--r--libs/audiographer/src/general/normalizer.cc6
-rw-r--r--libs/audiographer/src/general/sample_format_converter.cc12
-rw-r--r--libs/audiographer/src/general/sr_converter.cc24
4 files changed, 23 insertions, 23 deletions
diff --git a/libs/audiographer/src/debug_utils.cc b/libs/audiographer/src/debug_utils.cc
index c243164f58..4113ad7841 100644
--- a/libs/audiographer/src/debug_utils.cc
+++ b/libs/audiographer/src/debug_utils.cc
@@ -30,7 +30,7 @@ std::string
DebugUtils::process_context_flag_name (FlagField::Flag flag)
{
std::ostringstream ret;
-
+
switch (flag) {
case ProcessContext<>::EndOfInput:
ret << "EndOfInput";
@@ -39,7 +39,7 @@ DebugUtils::process_context_flag_name (FlagField::Flag flag)
ret << flag;
break;
}
-
+
return ret.str();
}
diff --git a/libs/audiographer/src/general/normalizer.cc b/libs/audiographer/src/general/normalizer.cc
index 5497c2ab14..d241d71892 100644
--- a/libs/audiographer/src/general/normalizer.cc
+++ b/libs/audiographer/src/general/normalizer.cc
@@ -30,7 +30,7 @@ Normalizer::Normalizer (float target_dB)
{
target = pow (10.0f, target_dB * 0.05f);
}
-
+
Normalizer::~Normalizer()
{
delete [] buffer;
@@ -66,12 +66,12 @@ 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 (enabled) {
memcpy (buffer, c.data(), c.frames() * sizeof(float));
Routines::apply_gain_to_buffer (buffer, c.frames(), gain);
}
-
+
ProcessContext<float> c_out (c, buffer);
ListedSource<float>::output (c_out);
}
diff --git a/libs/audiographer/src/general/sample_format_converter.cc b/libs/audiographer/src/general/sample_format_converter.cc
index a04ebfc25c..1f79818a8b 100644
--- a/libs/audiographer/src/general/sample_format_converter.cc
+++ b/libs/audiographer/src/general/sample_format_converter.cc
@@ -120,11 +120,11 @@ SampleFormatConverter<TOut>::reset()
gdither_free (dither);
dither = 0;
}
-
+
delete[] data_out;
data_out_size = 0;
data_out = 0;
-
+
clip_floats = false;
}
@@ -134,7 +134,7 @@ void
SampleFormatConverter<TOut>::process (ProcessContext<float> const & c_in)
{
float const * const data = c_in.data();
-
+
check_frame_and_channel_count (c_in.frames (), c_in.channels ());
/* Do conversion */
@@ -164,7 +164,7 @@ SampleFormatConverter<float>::process (ProcessContext<float> & c_in)
{
framecnt_t frames = c_in.frames();
float * data = c_in.data();
-
+
if (clip_floats) {
for (framecnt_t x = 0; x < frames; ++x) {
if (data[x] > 1.0f) {
@@ -186,7 +186,7 @@ SampleFormatConverter<float>::process (ProcessContext<float> const & c_in)
// Make copy of data and pass it to non-const version
check_frame_and_channel_count (c_in.frames(), c_in.channels());
TypeUtils<float>::copy (c_in.data(), data_out, c_in.frames());
-
+
ProcessContext<float> c (c_in, data_out);
process (c);
}
@@ -200,7 +200,7 @@ SampleFormatConverter<TOut>::check_frame_and_channel_count (framecnt_t frames, C
("Wrong channel count given to process(), %1% instead of %2%")
% channels_ % channels));
}
-
+
if (throw_level (ThrowProcess) && frames > data_out_size) {
throw Exception (*this, boost::str (boost::format
("Too many frames given to process(), %1% instad of %2%")
diff --git a/libs/audiographer/src/general/sr_converter.cc b/libs/audiographer/src/general/sr_converter.cc
index 512e57a743..90de3e58d7 100644
--- a/libs/audiographer/src/general/sr_converter.cc
+++ b/libs/audiographer/src/general/sr_converter.cc
@@ -49,7 +49,7 @@ void
SampleRateConverter::init (framecnt_t in_rate, framecnt_t out_rate, int quality)
{
reset();
-
+
if (in_rate == out_rate) {
src_data.src_ratio = 1;
return;
@@ -76,7 +76,7 @@ framecnt_t
SampleRateConverter::allocate_buffers (framecnt_t max_frames)
{
if (!active) { return max_frames; }
-
+
framecnt_t max_frames_out = (framecnt_t) ceil (max_frames * src_data.src_ratio);
if (data_out_size < max_frames_out) {
@@ -93,7 +93,7 @@ SampleRateConverter::allocate_buffers (framecnt_t max_frames)
max_frames_in = max_frames;
data_out_size = max_frames_out;
}
-
+
return max_frames_out;
}
@@ -101,7 +101,7 @@ void
SampleRateConverter::process (ProcessContext<float> const & c)
{
check_flags (*this, c);
-
+
if (!active) {
output (c);
return;
@@ -158,7 +158,7 @@ SampleRateConverter::process (ProcessContext<float> const & c)
", data_out: " << src_data.data_out <<
", output_frames: " << src_data.output_frames << std::endl;
}
-
+
err = src_process (src_state, &src_data);
if (throw_level (ThrowProcess) && err) {
throw Exception (*this, str (format
@@ -193,9 +193,9 @@ SampleRateConverter::process (ProcessContext<float> const & c)
("No output frames genereated with %1% leftover frames")
% leftover_frames));
}
-
+
} while (leftover_frames > frames);
-
+
// src_data.end_of_input has to be checked to prevent infinite recursion
if (!src_data.end_of_input && c.has_flag(ProcessContext<float>::EndOfInput)) {
set_end_of_input (c);
@@ -205,10 +205,10 @@ SampleRateConverter::process (ProcessContext<float> const & c)
void SampleRateConverter::set_end_of_input (ProcessContext<float> const & c)
{
src_data.end_of_input = true;
-
+
float f;
ProcessContext<float> const dummy (c, &f, 0, channels);
-
+
/* No idea why this has to be done twice for all data to be written,
* but that just seems to be the way it is...
*/
@@ -224,17 +224,17 @@ void SampleRateConverter::reset ()
active = false;
max_frames_in = 0;
src_data.end_of_input = false;
-
+
if (src_state) {
src_delete (src_state);
}
-
+
leftover_frames = 0;
max_leftover_frames = 0;
if (leftover_data) {
free (leftover_data);
}
-
+
data_out_size = 0;
delete [] data_out;
data_out = 0;