diff options
author | David Robillard <d@drobilla.net> | 2009-10-14 16:10:01 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-10-14 16:10:01 +0000 |
commit | bb9cc45cd22af67ac275a5e73accbe14fee664d8 (patch) | |
tree | e52977d3eae6ff07b856088041a080a2fa3e5b79 /libs/ardour/resampled_source.cc | |
parent | 8c4ce1e2ce35571aed5a686671431fdfffae7f8c (diff) |
Strip trailing whitespace and fix other whitespace errors (e.g. space/tab mixing). Whitespace changes only.
Vimmers, try let c_space_errors = 1 in your .vimrc to highlight this kind of stuff in red. I don't know the emacs equivalent...
git-svn-id: svn://localhost/ardour2/branches/3.0@5773 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/resampled_source.cc')
-rw-r--r-- | libs/ardour/resampled_source.cc | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/libs/ardour/resampled_source.cc b/libs/ardour/resampled_source.cc index cfc5c9f4f1..57811312f1 100644 --- a/libs/ardour/resampled_source.cc +++ b/libs/ardour/resampled_source.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2007 Paul Davis + 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 @@ -32,12 +32,12 @@ ResampledImportableSource::ResampledImportableSource (boost::shared_ptr<Importab : source (src) { int err; - + source->seek (0); - + /* Initialize the sample rate converter. */ - - int src_type = SRC_SINC_BEST_QUALITY; + + int src_type = SRC_SINC_BEST_QUALITY; switch (srcq) { case SrcBest: @@ -56,21 +56,21 @@ ResampledImportableSource::ResampledImportableSource (boost::shared_ptr<Importab src_type = SRC_LINEAR; break; } - - if ((src_state = src_new (src_type, source->channels(), &err)) == 0) { + + if ((src_state = src_new (src_type, source->channels(), &err)) == 0) { error << string_compose(_("Import: src_new() failed : %1"), src_strerror (err)) << endmsg ; throw failed_constructor (); } - + src_data.end_of_input = 0 ; /* Set this later. */ - + /* Start with zero to force load in while loop. */ - + src_data.input_frames = 0 ; src_data.data_in = input ; - + src_data.src_ratio = ((float) rate) / source->samplerate(); - + input = new float[blocksize]; } @@ -80,14 +80,14 @@ ResampledImportableSource::~ResampledImportableSource () delete [] input; } -nframes_t +nframes_t ResampledImportableSource::read (Sample* output, nframes_t nframes) { int err; /* If the input buffer is empty, refill it. */ - - if (src_data.input_frames == 0) { + + if (src_data.input_frames == 0) { src_data.input_frames = source->read (input, blocksize); @@ -95,12 +95,12 @@ ResampledImportableSource::read (Sample* output, nframes_t nframes) if ((nframes_t) src_data.input_frames < blocksize) { src_data.end_of_input = true; - } + } src_data.input_frames /= source->channels(); src_data.data_in = input; - } - + } + src_data.data_out = output; if (!src_data.end_of_input) { @@ -112,14 +112,14 @@ ResampledImportableSource::read (Sample* output, nframes_t nframes) if ((err = src_process (src_state, &src_data))) { error << string_compose(_("Import: %1"), src_strerror (err)) << endmsg ; return 0 ; - } - + } + /* Terminate if at end */ - + if (src_data.end_of_input && src_data.output_frames_gen == 0) { return 0; } - + src_data.data_in += src_data.input_frames_used * source->channels(); src_data.input_frames -= src_data.input_frames_used ; |