13
0

Fix invalid silence trimmer end-of-input behavior (multiple EndOfInputs)

This caused an export bug when:
a) normalizing
b) adding silence to end
c) having more than one channel

The sound was corrupted by repeating each jack frame as many times
as there were channels.
This commit is contained in:
Sakari Bergen 2013-11-03 21:22:00 +02:00
parent f2300164d7
commit 3fca030603

View File

@ -131,6 +131,9 @@ class SilenceTrimmer
} }
in_end = c.has_flag (ProcessContext<T>::EndOfInput); 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; framecnt_t frame_index = 0;
if (in_beginning) { if (in_beginning) {
@ -208,6 +211,7 @@ class SilenceTrimmer
// Finally, if in end, add silence to end // Finally, if in end, add silence to end
if (in_end && add_to_end) { if (in_end && add_to_end) {
c.set_flag (ProcessContext<T>::EndOfInput);
if (debug_level (DebugVerbose)) { if (debug_level (DebugVerbose)) {
debug_stream () << DebugUtils::demangled_name (*this) << debug_stream () << DebugUtils::demangled_name (*this) <<