Skip to content
Snippets Groups Projects
Commit 26a613ec authored by jsiegle's avatar jsiegle
Browse files

Update 'getNumSamples()' method in SpikeDetector

parent c4979562
No related branches found
No related tags found
No related merge requests found
......@@ -168,7 +168,7 @@ void FileReader::process(AudioSampleBuffer& buffer, MidiBuffer& events)
int16 sample = readBuffer[n];
*buffer.getWritePointer(chan++, samp) = -sample * getDefaultBitVolts();
*buffer.getWritePointer(chan++, samp) = -sample * 0.05f;
}
......
......@@ -461,8 +461,9 @@ void SpikeDetector::process(AudioSampleBuffer& buffer,
// increment at start of getNextSample()
// cycle through samples
while (samplesAvailable(getNumSamples(electrode->sourceNodeId)))
while (samplesAvailable(getNumSamples(*electrode->channels)))
{
sampleIndex++;
// cycle through channels
for (int chan = 0; chan < electrode->numChannels; chan++)
......@@ -552,7 +553,7 @@ void SpikeDetector::process(AudioSampleBuffer& buffer,
} // end cycle through samples
electrode->lastBufferIndex = sampleIndex - getNumSamples(electrode->sourceNodeId); // should be negative
electrode->lastBufferIndex = sampleIndex - getNumSamples(*electrode->channels); // should be negative
//jassert(electrode->lastBufferIndex < 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment