Hi,
I am making a processor plugin that would downsample the samples from a buffer coming from a file source.
In updateSettings( ).
As I can't change the data stream's sampling rate, I create a new one and inject it with the previous one's metadata. Then replace the processor's data streams with the newly created one. Then in process after filtering I call setTimestampAndSamples with the new reduced buffer size. However there is always something missing and falls apart with the LFP viewer trying to digest the new stream in the signal chain.
I tried finding examples of something similar in other plugins but couldn't find anything. Would appreciate if you could guide me in the right direction.
Many thanks,
Bruno
- GUI version: [e.g. 1.0.2]
- OS: [e.g. Windows 11]
- Electrode type: [e.g. tetrodes, Neuropixels]
Hi,
I am making a processor plugin that would downsample the samples from a buffer coming from a file source.
In updateSettings( ).
As I can't change the data stream's sampling rate, I create a new one and inject it with the previous one's metadata. Then replace the processor's data streams with the newly created one. Then in process after filtering I call setTimestampAndSamples with the new reduced buffer size. However there is always something missing and falls apart with the LFP viewer trying to digest the new stream in the signal chain.
I tried finding examples of something similar in other plugins but couldn't find anything. Would appreciate if you could guide me in the right direction.
Many thanks,
Bruno