While modifying the brain invaders, I found that the signal corresponding to the first flash was not epoched by its corresponding stimulation based epocher. Waited stimulation and signal are there, but debuging showed me that, in stimulation based epoching box, the offset sample count was not initialised the very first call to this box, thus "samples to skip" is high, and the box does not epoch the signal even if it has the right stimulation.
I managed to make it work by forcing samplesToSkip to 0 (see code below), but I'm not very happy with this solution as I'm not sure of the consequences (I don't get a whole understanding there...).
Could you lead me to a better solution ?
Thanks.
Nicolas.
Code: Select all
boolean CAlgorithmStimulationBasedEpoching::process(void)
{
if (isInputTriggerActive(OVP_Algorithm_StimulationBasedEpoching_InputTriggerId_Reset))
{
m_ui64ReceivedSamples=0;
m_ui64SamplesToSkip=0; // *** instead of : m_ui64OffsetSampleCount ***
}