Merge branch 'windows+cc' into cairocanvas
[ardour.git] / libs / audiographer / audiographer / general / silence_trimmer.h
index 165b29d4d5e5c1fa1ad73af60faab91ebd0e0aee..c0d6d73c4b21bc03cc36ee32478fb5c895a5a7fe 100644 (file)
@@ -131,6 +131,9 @@ class /*LIBAUDIOGRAPHER_API*/ SilenceTrimmer
                        throw Exception(*this, "process() after reacing end of input");
                }
                in_end = c.has_flag (ProcessContext<T>::EndOfInput);
+
+               // If adding to end, delay end of input propagation
+               if (add_to_end) { c.remove_flag(ProcessContext<T>::EndOfInput); }
                
                framecnt_t frame_index = 0;
                
@@ -209,7 +212,8 @@ class /*LIBAUDIOGRAPHER_API*/ SilenceTrimmer
                
                // Finally, if in end, add silence to end
                if (in_end && add_to_end) {
-                       
+                       c.set_flag (ProcessContext<T>::EndOfInput);
+
                        if (debug_level (DebugVerbose)) {
                                debug_stream () << DebugUtils::demangled_name (*this) <<
                                        " adding to end" << std::endl;