summaryrefslogtreecommitdiffstats
path: root/src/odr-audioenc.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-06-07 08:46:39 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-06-07 08:46:39 +0200
commit64dc582e502585aac65284756a6fd84c09ec48df (patch)
treedcd794fb7ba80d0ac8b4de241b87ae9edda587fe /src/odr-audioenc.cpp
parentee29f6dbd130f26ed51b7a94b34790ba4c039089 (diff)
downloadODR-AudioEnc-64dc582e502585aac65284756a6fd84c09ec48df.tar.gz
ODR-AudioEnc-64dc582e502585aac65284756a6fd84c09ec48df.tar.bz2
ODR-AudioEnc-64dc582e502585aac65284756a6fd84c09ec48df.zip
Make queue push behaviour depend on drift compensation
push() now blocks without drift compensation
Diffstat (limited to 'src/odr-audioenc.cpp')
-rw-r--r--src/odr-audioenc.cpp5
1 files changed, 2 insertions, 3 deletions
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<uint8_t> queue(BYTES_PER_SAMPLE, settings.channels, max_size);
+ SampleQueue<uint8_t> 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) {