Commit 2567c684 authored by Jussi Lindgren's avatar Jussi Lindgren

Plugins: Added TCP Tagging stimulation passthrough to Sound Player box

parent 1853469e
......@@ -57,6 +57,9 @@ namespace OpenViBEPlugins
return TRUE;
}
// n.b. This reacts immediately to the received stimulation and doesn't use the date. Usually stimulations come from the upstream with
// chunks having a very narrow time range, so its alright for Graz that changes state only rarely. Note if multiple stimulations are
// received in the same chunk, they'll be passed to TCP Tagging with the true delay between them lost.
void CGrazVisualization::setStimulation(const uint32 ui32StimulationIndex, const uint64 ui64StimulationIdentifier, const uint64 ui64StimulationDate)
{
/*
......
......@@ -141,16 +141,22 @@ boolean CBoxAlgorithmOpenALSoundPlayer::process(void)
for(uint32 j=0; j<l_pStimulationSet->getStimulationCount(); j++)
{
if(l_pStimulationSet->getStimulationIdentifier(j) == m_ui64PlayTrigger)
const uint64 l_ui64Stimulation = l_pStimulationSet->getStimulationIdentifier(j);
if(l_ui64Stimulation == m_ui64PlayTrigger)
{
playSound();
m_bEndOfSoundSent = false;
m_bStartOfSoundSent = false;
}
if(l_pStimulationSet->getStimulationIdentifier(j) == m_ui64StopTrigger)
else if(l_ui64Stimulation == m_ui64StopTrigger)
{
stopSound();
}
else
{
// Immediate passthrough
m_pStimulusSender->sendStimulation(l_ui64Stimulation);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment