Sampling frequency iOS SDK
Hi,
I've started working with the iOS SDK and I noticed that my data is coming in at half the sampling frequency: 125 samples per second. I've also noticed that the subscribeLengthChanged closure is outputting length that skips 1 length constantly. I'm using the example iOS project that is provided by Brainbit on this gitlab account.
Do I have to set the sampling rate somewhere to receive data at 250Hz? Or what else can be done to have subscribeLengthChanged output all data? Printing the channel?.samplingFrequency does output 250.
FYI: I've also looked into setting up raw signal channels with NTSignalChannel but this seems to have the same issue.
Here's the code from the sample project with a simple print statement to illustrate the issue
self.eegChannels.forEach { (channelName, channel) in
channel?.subscribeLengthChanged(subscribe: { (length) in
print(length)
let newdata = channel?.readData(offset: length-1, length: 1).first
^ The print statement above yields the following output:
2 2 2 2 4 4 4 4 6 6 6 6 ...
Thank you for your reply!
EDIT: I see the same for the react-native integration.
BR, Elroy