summaryrefslogtreecommitdiff
path: root/libs/audiographer/audiographer
diff options
context:
space:
mode:
authorSakari Bergen <sakari.bergen@beatwaves.net>2012-10-30 20:15:11 +0000
committerSakari Bergen <sakari.bergen@beatwaves.net>2012-10-30 20:15:11 +0000
commitb5c5fc7a08a4f02d80a664ee18812e84d08dc6fd (patch)
tree4881c088a06c187e43bd4bc403ab037aa84c4b15 /libs/audiographer/audiographer
parenta2de07a48faf17ef9ec61322add18960676037ce (diff)
Fix chunker to handle end of input properly
git-svn-id: svn://localhost/ardour2/branches/3.0@13370 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/audiographer/audiographer')
-rw-r--r--libs/audiographer/audiographer/general/chunker.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/audiographer/audiographer/general/chunker.h b/libs/audiographer/audiographer/general/chunker.h
index 397d67ffc5..cc46aa4575 100644
--- a/libs/audiographer/audiographer/general/chunker.h
+++ b/libs/audiographer/audiographer/general/chunker.h
@@ -49,14 +49,15 @@ class Chunker
framecnt_t const frames_to_copy = chunk_size - position;
TypeUtils<T>::copy (&context.data()[input_position], &buffer[position], frames_to_copy);
- // Output whole buffer
- ProcessContext<T> c_out (context, buffer, chunk_size);
- ListedSource<T>::output (c_out);
-
// Update counters
position = 0;
input_position += frames_to_copy;
frames_left -= frames_to_copy;
+
+ // Output whole buffer
+ ProcessContext<T> c_out (context, buffer, chunk_size);
+ if (frames_left) { c_out.remove_flag(ProcessContext<T>::EndOfInput); }
+ ListedSource<T>::output (c_out);
}
if (frames_left) {