summaryrefslogtreecommitdiff
path: root/libs/ardour/audioanalyser.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-10-14 16:10:01 +0000
committerDavid Robillard <d@drobilla.net>2009-10-14 16:10:01 +0000
commitbb9cc45cd22af67ac275a5e73accbe14fee664d8 (patch)
treee52977d3eae6ff07b856088041a080a2fa3e5b79 /libs/ardour/audioanalyser.cc
parent8c4ce1e2ce35571aed5a686671431fdfffae7f8c (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/audioanalyser.cc')
-rw-r--r--libs/ardour/audioanalyser.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/libs/ardour/audioanalyser.cc b/libs/ardour/audioanalyser.cc
index 53b60f9eaa..3acfc9bce4 100644
--- a/libs/ardour/audioanalyser.cc
+++ b/libs/ardour/audioanalyser.cc
@@ -26,11 +26,11 @@ AudioAnalyser::AudioAnalyser (float sr, AnalysisPluginKey key)
, plugin_key (key)
{
/* create VAMP plugin and initialize */
-
+
if (initialize_plugin (plugin_key, sample_rate)) {
error << string_compose (_("cannot load VAMP plugin \"%1\""), key) << endmsg;
throw failed_constructor();
- }
+ }
}
AudioAnalyser::~AudioAnalyser ()
@@ -50,7 +50,7 @@ AudioAnalyser::initialize_plugin (AnalysisPluginKey key, float sr)
if (!plugin) {
error << string_compose (_("VAMP Plugin \"%1\" could not be loaded"), key) << endmsg;
return -1;
- }
+ }
/* we asked for the buffering adapter, so set the blocksize to
something that makes for efficient disk i/o
@@ -79,7 +79,7 @@ AudioAnalyser::reset ()
plugin->reset ();
}
}
-
+
int
AudioAnalyser::analyse (const string& path, Readable* src, uint32_t channel)
{
@@ -96,7 +96,7 @@ AudioAnalyser::analyse (const string& path, Readable* src, uint32_t channel)
if (!path.empty()) {
/* store data in tmp file, not the real one */
-
+
tmp_path = path;
tmp_path += ".tmp";
@@ -112,11 +112,11 @@ AudioAnalyser::analyse (const string& path, Readable* src, uint32_t channel)
while (!done) {
nframes64_t to_read;
-
+
/* read from source */
to_read = min ((len - pos), bufsize);
-
+
if (src->read (data, pos, to_read, channel) != to_read) {
goto out;
}
@@ -126,7 +126,7 @@ AudioAnalyser::analyse (const string& path, Readable* src, uint32_t channel)
if (to_read != bufsize) {
memset (data + to_read, 0, (bufsize - to_read) * sizeof (Sample));
}
-
+
features = plugin->process (bufs, RealTime::fromSeconds ((double) pos / sample_rate));
if (use_features (features, (path.empty() ? 0 : &ofile))) {