summaryrefslogtreecommitdiff
path: root/orkbasecxx/AudioTape.cpp
diff options
context:
space:
mode:
authorHenri Herscher <henri@oreka.org>2006-07-07 19:31:41 +0000
committerHenri Herscher <henri@oreka.org>2006-07-07 19:31:41 +0000
commite88b6fb3ba37a5c7547f415c13a2053d8d5c32fc (patch)
tree608df196effaf251e0346c4fc4b06cf29a17cbc2 /orkbasecxx/AudioTape.cpp
parentc27745d1b387606b7e1a5869b7fe4b566410720d (diff)
* Added EndMetadata capture event
* A tape start message is now sent upon reception of the EndMetadata capture event * Removed TapeMsg.m_loginString git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@297 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkbasecxx/AudioTape.cpp')
-rw-r--r--orkbasecxx/AudioTape.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/orkbasecxx/AudioTape.cpp b/orkbasecxx/AudioTape.cpp
index 3cb81e5..c406485 100644
--- a/orkbasecxx/AudioTape.cpp
+++ b/orkbasecxx/AudioTape.cpp
@@ -249,13 +249,16 @@ void AudioTape::GetMessage(MessageRef& msgRef)
CaptureEventRef captureEventRef;
{
MutexSentinel sentinel(m_mutex);
- captureEventRef = m_toSendEventQueue.front();
- m_toSendEventQueue.pop();
+ if(m_toSendEventQueue.size() > 0)
+ {
+ captureEventRef = m_toSendEventQueue.front();
+ m_toSendEventQueue.pop();
+ }
}
msgRef.reset(new TapeMsg);
TapeMsg* pTapeMsg = (TapeMsg*)msgRef.get();
- if(captureEventRef->m_type == CaptureEvent::EtStop)
+ if(captureEventRef->m_type == CaptureEvent::EtStop || captureEventRef->m_type == CaptureEvent::EtStart)
{
pTapeMsg->m_recId = m_fileIdentifier;
pTapeMsg->m_fileName = m_filePath + m_fileIdentifier + m_fileExtension;
@@ -272,7 +275,7 @@ void AudioTape::GetMessage(MessageRef& msgRef)
}
else
{
- // This should be a key-value pair message or a start event
+ // This should be a key-value pair message
}
}