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:
parent
f2300164d7
commit
3fca030603
@ -130,6 +130,9 @@ class 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;
|
||||
|
||||
@ -208,7 +211,8 @@ class 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;
|
||||
|
Loading…
Reference in New Issue
Block a user