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/ardour/transient_detector.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/ardour/transient_detector.cc')
-rw-r--r-- | libs/ardour/transient_detector.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/ardour/transient_detector.cc b/libs/ardour/transient_detector.cc index 6eed8369a7..4909e40741 100644 --- a/libs/ardour/transient_detector.cc +++ b/libs/ardour/transient_detector.cc @@ -72,7 +72,7 @@ TransientDetector::use_features (Plugin::FeatureSet& features, ostream* out) (*out) << (*f).timestamp.toString() << endl; } - current_results->push_back (RealTime::realTime2Frame (f->timestamp, (framecnt_t) floor(sample_rate))); + current_results->push_back (RealTime::realTime2Frame (f->timestamp, (samplecnt_t) floor(sample_rate))); } } @@ -111,7 +111,7 @@ TransientDetector::cleanup_transients (AnalysisFeatureList& t, float sr, float g AnalysisFeatureList::iterator i = t.begin(); AnalysisFeatureList::iterator f, b; - const framecnt_t gap_frames = (framecnt_t) floor (gap_msecs * (sr / 1000.0)); + const samplecnt_t gap_samples = (samplecnt_t) floor (gap_msecs * (sr / 1000.0)); while (i != t.end()) { @@ -123,7 +123,7 @@ TransientDetector::cleanup_transients (AnalysisFeatureList& t, float sr, float g // move f until we find a new value that is far enough away - while ((f != t.end()) && gap_frames > 0 && (((*f) - (*i)) < gap_frames)) { + while ((f != t.end()) && gap_samples > 0 && (((*f) - (*i)) < gap_samples)) { ++f; } @@ -150,7 +150,7 @@ TransientDetector::update_positions (Readable* src, uint32_t channel, AnalysisFe while (i != positions.end()) { /* read from source */ - framecnt_t const to_read = buff_size; + samplecnt_t const to_read = buff_size; if (src->read (data, (*i) - buff_size, to_read, channel) != to_read) { break; |