changeset 185:3287df4588dd

Warn for this potential error case
author Chris Cannam
date Fri, 20 Feb 2015 18:09:12 +0000
parents 64a067c37557
children 848e3fa3528c
files runner/MultiplexedReader.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/runner/MultiplexedReader.cpp	Fri Jan 09 14:41:56 2015 +0000
+++ b/runner/MultiplexedReader.cpp	Fri Feb 20 18:09:12 2015 +0000
@@ -28,6 +28,9 @@
 	if (!r->isOK()) {
 	    m_channelCount = 0;
 	    m_error = r->getError();
+        } else if (r->getSampleRate() != m_sampleRate) {
+            m_channelCount = 0;
+            m_error = "Readers provided to MultiplexedReader must have the same sample rate";
 	} else {
 	    if (r->getFrameCount() > m_frameCount) {
 		m_frameCount = r->getFrameCount();