summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2016-12-06 11:02:56 +1000
committerTim Mayberry <mojofunk@gmail.com>2016-12-06 13:43:10 +1000
commit568cf861f948fcf3ad1dff142c1ed6aa8af04618 (patch)
treea86b101e6f4d6c5cf3d407fc38f85c9bf0fb03f2 /libs
parent2c67e71e98dd29337797c720d16b1031f2d2436c (diff)
Rename AudioGrapher::SilentTrimmer method to reflect behaviour
Unlike many of the other uses of the term "frame" this is actually returning the index to the first sample in the interleaved frame that contains non-silence.
Diffstat (limited to 'libs')
-rw-r--r--libs/audiographer/audiographer/general/silence_trimmer.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/audiographer/audiographer/general/silence_trimmer.h b/libs/audiographer/audiographer/general/silence_trimmer.h
index 82981d58b6..8959c8674a 100644
--- a/libs/audiographer/audiographer/general/silence_trimmer.h
+++ b/libs/audiographer/audiographer/general/silence_trimmer.h
@@ -183,7 +183,7 @@ class /*LIBAUDIOGRAPHER_API*/ SilenceTrimmer
// only check silence if doing either of these
// This will set both has_data and frame_index
if (add_to_beginning || trim_beginning) {
- has_data = find_first_non_zero_sample (c, frame_index);
+ has_data = find_first_non_silent_frame (c, frame_index);
}
// Added silence if there is silence to add
@@ -215,7 +215,7 @@ class /*LIBAUDIOGRAPHER_API*/ SilenceTrimmer
} else if (trim_end) { // Only check zero samples if trimming end
- if (find_first_non_zero_sample (c, frame_index)) {
+ if (find_first_non_silent_frame (c, frame_index)) {
if (debug_level (DebugVerbose)) {
debug_stream () << DebugUtils::demangled_name (*this) <<
@@ -272,7 +272,7 @@ class /*LIBAUDIOGRAPHER_API*/ SilenceTrimmer
private:
- bool find_first_non_zero_sample (ProcessContext<T> const & c, framecnt_t & result_frame)
+ bool find_first_non_silent_frame (ProcessContext<T> const & c, framecnt_t & result_frame)
{
for (framecnt_t i = 0; i < c.frames(); ++i) {
if (!tester.is_silent (c.data()[i])) {