diff src/vamp-hostsdk/PluginInputDomainAdapter.cpp @ 298:5940dd0a399f

* Add NoShift option to PluginInputDomainAdapter as well, for completeness * Minor & doc updates
author cannam
date Tue, 22 Sep 2009 13:01:56 +0000
parents c97e70ed5abc
children 5cb298435765
line wrap: on
line diff
--- a/src/vamp-hostsdk/PluginInputDomainAdapter.cpp	Tue Sep 22 11:40:14 2009 +0000
+++ b/src/vamp-hostsdk/PluginInputDomainAdapter.cpp	Tue Sep 22 13:01:56 2009 +0000
@@ -406,7 +406,7 @@
 {
     if (m_plugin->getInputDomain() == TimeDomain) {
         return RealTime::zeroTime;
-    } else if (m_method == ShiftData) {
+    } else if (m_method == ShiftData || m_method == NoShift) {
         return RealTime::zeroTime;
     } else {
         return RealTime::frame2RealTime
@@ -434,7 +434,7 @@
         return m_plugin->process(inputBuffers, timestamp);
     }
 
-    if (m_method == ShiftTimestamp) {
+    if (m_method == ShiftTimestamp || m_method == NoShift) {
         return processShiftingTimestamp(inputBuffers, timestamp);
     } else {
         return processShiftingData(inputBuffers, timestamp);
@@ -445,7 +445,9 @@
 PluginInputDomainAdapter::Impl::processShiftingTimestamp(const float *const *inputBuffers,
                                                          RealTime timestamp)
 {
-    timestamp = timestamp + getTimestampAdjustment();
+    if (m_method == ShiftTimestamp) {
+        timestamp = timestamp + getTimestampAdjustment();
+    }
 
     for (int c = 0; c < m_channels; ++c) {