From 64dc582e502585aac65284756a6fd84c09ec48df Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Thu, 7 Jun 2018 08:46:39 +0200 Subject: Make queue push behaviour depend on drift compensation push() now blocks without drift compensation --- src/odr-audioenc.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/odr-audioenc.cpp') diff --git a/src/odr-audioenc.cpp b/src/odr-audioenc.cpp index b5f7b9f..3b42dfd 100644 --- a/src/odr-audioenc.cpp +++ b/src/odr-audioenc.cpp @@ -931,7 +931,7 @@ int main(int argc, char *argv[]) /*! The SampleQueue \c queue is given to the inputs, so that they * can fill it. */ - SampleQueue queue(BYTES_PER_SAMPLE, settings.channels, max_size); + SampleQueue queue(BYTES_PER_SAMPLE, settings.channels, max_size, settings.drift_compensation); /* symsize=8, gfpoly=0x11d, fcr=0, prim=1, nroots=10, pad=135 */ rs_handler = init_rs_char(8, 0x11d, 0, 1, 10, 135); @@ -1106,8 +1106,7 @@ int main(int argc, char *argv[]) size_t bytes_from_queue = queue.pop_wait(&input_buf[0], read_bytes, timeout_ms, &overruns); // returns bytes if (overruns) { - fprintf(stderr, "%zd overruns occured!\n", overruns); - status |= STATUS_OVERRUN; + throw logic_error("Queue overrun in non-drift compensation!"); } if (bytes_from_queue < read_bytes) { -- cgit v1.2.3