Skip to content

Commit afb90dc

Browse files
committed
Revert unnecessary changes
1 parent b4b7897 commit afb90dc

4 files changed

Lines changed: 4 additions & 22 deletions

File tree

Source/Processors/RecordNode/OpenEphysFormat/OriginalRecording.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ String OriginalRecording::generateSpikeHeader(const SpikeChannel* elec)
372372
header += "';\n";
373373

374374
header += "header.num_channels = ";
375-
header += String(c);
375+
header += String(elec->getNumChannels());
376376
header += ";\n";
377377

378378
header += "header.sampleRate = ";

Source/Processors/RecordNode/RecordNode.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void RecordNode::addInputChannel(const GenericProcessor* sourceNode, int chan)
9191
const EventChannel* orig = sourceNode->getEventChannel(n);
9292
//only add to the record node the events originating from this processor, to avoid duplicates
9393
if (orig->getSourceNodeID() == sourceNode->getNodeId())
94-
nonOwnedEventChannelArray.add(new EventChannel(*orig));
94+
eventChannelArray.add(new EventChannel(*orig));
9595

9696
}
9797

@@ -359,10 +359,10 @@ void RecordNode::updateSubprocessorMap()
359359

360360
}
361361

362-
for (int ch = 0; ch < nonOwnedEventChannelArray.size(); ch++)
362+
for (int ch = 0; ch < eventChannelArray.size(); ch++)
363363
{
364364

365-
EventChannel* chan = nonOwnedEventChannelArray[ch];
365+
EventChannel* chan = eventChannelArray[ch];
366366
int sourceID = chan->getSourceNodeID();
367367
int subProcID = chan->getSubProcessorIdx();
368368

Source/Processors/RecordNode/RecordNode.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@ class RecordNode : public GenericProcessor, public FilenameComponentListener
122122
std::vector<std::vector<int>> subProcessorMap;
123123
std::vector<int> startRecChannels;
124124

125-
Array<EventChannel*> nonOwnedEventChannelArray;
126-
127125
bool isSyncReady;
128126

129127
//TODO: Need to validate these new methods

Source/Processors/RecordNode/RecordThread.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -208,24 +208,14 @@ void RecordThread::writeSynchronizedData(const AudioSampleBuffer& dataBuffer, co
208208
std::vector<SpikeMessagePtr> spikes;
209209
int nSpikes = m_spikeQueue->getEvents(spikes, maxSpikes);
210210

211-
int total_null = 0;
212-
int total_real = 0;
213-
214211
for (int sp = 0; sp < nSpikes; ++sp)
215212
{
216213
if (spikes[sp] == NULL)
217214
{
218-
total_null++;
219-
}
220-
else{
221-
222215
m_engine->writeSpike(spikes[sp]->getExtra(), &spikes[sp]->getData());
223-
total_real++;
224216
}
225217
//m_engine->writeSpike(0, &spikes[sp]->getData());
226218
}
227-
if (total_null > 0)
228-
std::cout << "Total null: " << total_null << ", total real: " << total_real << std::endl;
229219
}
230220

231221
void RecordThread::writeData(const AudioSampleBuffer& dataBuffer, int maxSamples, int maxEvents, int maxSpikes, bool lastBlock)
@@ -287,9 +277,6 @@ void RecordThread::writeData(const AudioSampleBuffer& dataBuffer, int maxSamples
287277
std::vector<SpikeMessagePtr> spikes;
288278
int nSpikes = m_spikeQueue->getEvents(spikes, maxSpikes);
289279

290-
//int total_null = 0;
291-
//int total_real = 0;
292-
293280
for (int sp = 0; sp < nSpikes; ++sp)
294281
{
295282
if (spikes[sp] != NULL)
@@ -298,9 +285,6 @@ void RecordThread::writeData(const AudioSampleBuffer& dataBuffer, int maxSamples
298285
}
299286
}
300287

301-
//if (total_null > 0)
302-
// std::cout << "Total null: " << total_null << ", total real: " << total_real << std::endl;
303-
304288
}
305289

306290
void RecordThread::forceCloseFiles()

0 commit comments

Comments
 (0)