* logical and (short-circuiting).
*/
template<DebugLevel L = DEFAULT_DEBUG_LEVEL>
- class LIBAUDIOGRAPHER_API Debuggable
+ class /*LIBAUDIOGRAPHER_API*/ Debuggable
{
protected:
Debuggable(std::ostream & debug_stream = std::cerr)
: stream (debug_stream) {}
bool debug_level (DebugLevel level) {
- #ifdef NDEBUG
- level = DEFAULT_DEBUG_LEVEL; /* stop pedantic gcc complaints about unused parameter */
+#ifndef NDEBUG
+ (void) level; /* stop pedantic gcc complaints about unused parameter */
return false;
- #else
+#else
return L >= level;
- #endif
+#endif
}
std::ostream & debug_stream() { return stream; }
/// Removes and adds silent frames to beginning and/or end of stream
template<typename T = DefaultSampleType>
- class LIBAUDIOGRAPHER_API SilenceTrimmer
+ class /*LIBAUDIOGRAPHER_API*/ SilenceTrimmer
: public ListedSource<T>
, public Sink<T>
, public FlagDebuggable<>
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;
// 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;