diff options
Diffstat (limited to 'orkbasecxx/CapturePluginProxy.cpp')
-rw-r--r-- | orkbasecxx/CapturePluginProxy.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/orkbasecxx/CapturePluginProxy.cpp b/orkbasecxx/CapturePluginProxy.cpp index fbfc3da..925c14a 100644 --- a/orkbasecxx/CapturePluginProxy.cpp +++ b/orkbasecxx/CapturePluginProxy.cpp @@ -217,7 +217,31 @@ void __CDECL__ CapturePluginProxy::CaptureEventCallBack(CaptureEventRef eventRef { if (eventRef->m_type == CaptureEvent::EtStart || eventRef->m_type == CaptureEvent::EtStop) { - LOG4CXX_ERROR(LOG.portLog, "#" + capturePort + ": received start or stop while in VAD or audio segmentation mode"); + if(CONFIG.m_audioSegmentation == true) + { + // find the right port and give it the event + // If this is EtStop, we clear the event cache + CapturePortRef portRef = CapturePortsSingleton::instance()->AddAndReturnPort(capturePort); + if(eventRef->m_type == CaptureEvent::EtStop) + { + portRef->ClearEventQueue(); + } + portRef->AddCaptureEvent(eventRef); + } + else + { + LOG4CXX_ERROR(LOG.portLog, "#" + capturePort + ": received start or stop while in VAD mode"); + } + } + else + { + if(CONFIG.m_audioSegmentation == true) + { + // find the right port and give it the event + CapturePortRef portRef = CapturePortsSingleton::instance()->AddAndReturnPort(capturePort); + portRef->QueueCaptureEvent(eventRef); + portRef->AddCaptureEvent(eventRef); + } } } else |