Commits (1)
  • Jussi Lindgren's avatar
    Boxes: Fixed stimulation sending in LSL Export (GIPSA) · b605985b
    Jussi Lindgren authored
    - Pushing out a signal chunk will now wait until the corresponding
    stimulation chunk has been received (it can be empty). This will fix
    issues where the box had sent out the signal chunk already before
    receiving the stimulation that would have belonged to its time range
    - Note that this solution will delay the signal if the stimulation
    stream is not dense and it takes a long time to receive a stim chunk
    - The box should still work if stimulation stream is not connected
    - Switched the 'InputChannel' approach to the more usual OV toolkit
    encoder/decoder convention for easier code maintainability
    - Added some tests for stimulations that are too close in time
    - Added warning about stimulation codes = 0 (as they would be invisible)
......@@ -39,7 +39,13 @@ namespace OpenViBEPlugins
OpenViBE::CString m_sStreamName;
OpenViBE::CString m_sStreamType;
OpenViBEPlugins::SignalProcessing::CInputChannel m_oCInputChannel1;
OpenViBEToolkit::TSignalDecoder<CBoxAlgorithmLSLExportGipsa> m_oSignalDecoder;
OpenViBEToolkit::TStimulationDecoder<CBoxAlgorithmLSLExportGipsa> m_oStimulationDecoder;
OpenViBE::uint64 m_ui64LastStimChunkEndTime;
OpenViBE::uint64 m_ui64SamplingRate = 512; // reasonable assumption, will be overridden by signal
// OpenViBEPlugins::SignalProcessing::CInputChannel m_oCInputChannel1;
lsl::stream_outlet* m_outlet;
std::vector< std::pair<OpenViBE::float32,OpenViBE::uint64> > m_stims;//identifier,time