mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-30 00:43:18 +01:00
towards fixing #5711
Don’t call ::output() [here: SilenceTrimmer::process()] with no data to process. If (position + N * period-size) % chunksize == 0; frames_left == 0 before the last call to ::output(). chunker.h:60 keeps the ProcessContext<T>::EndOfInput flag and the SilenceTrimmer will already have done ‘in_end’ processing.
This commit is contained in:
parent
6377fe89a6
commit
36bbd14113
2 changed files with 2 additions and 2 deletions
|
|
@ -67,7 +67,7 @@ class /*LIBAUDIOGRAPHER_API*/ Chunker
|
|||
position += frames_left;
|
||||
}
|
||||
|
||||
if (context.has_flag (ProcessContext<T>::EndOfInput)) {
|
||||
if (context.has_flag (ProcessContext<T>::EndOfInput) && position > 0) {
|
||||
ProcessContext<T> c_out (context, buffer, position);
|
||||
ListedSource<T>::output (c_out);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ class /*LIBAUDIOGRAPHER_API*/ SilenceTrimmer
|
|||
check_flags (*this, c);
|
||||
|
||||
if (throw_level (ThrowStrict) && in_end) {
|
||||
throw Exception(*this, "process() after reacing end of input");
|
||||
throw Exception(*this, "process() after reaching end of input");
|
||||
}
|
||||
in_end = c.has_flag (ProcessContext<T>::EndOfInput);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue