Skip to content
Snippets Groups Projects
Commit a3719d97 authored by Aaron Cuevas Lopez's avatar Aaron Cuevas Lopez
Browse files

Restore buffers on kwik file close

parent bede44c6
No related branches found
No related tags found
No related merge requests found
......@@ -186,11 +186,14 @@ void HDF5Recording::closeFiles()
recordedChanToKWDChan.clear();
channelTimestampArray.clear();
channelLeftOverSamples.clear();
scaledBuffer.malloc(MAX_BUFFER_SIZE);
intBuffer.malloc(MAX_BUFFER_SIZE);
bufferSize = MAX_BUFFER_SIZE;
}
void HDF5Recording::writeData(int writeChannel, int realChannel, const float* buffer, int size)
{
if (size > bufferSize) //Shouldn't happen, and if it happens it'll be slow, but better this than crashing. Will be reset on reset.
if (size > bufferSize) //Shouldn't happen, and if it happens it'll be slow, but better this than crashing. Will be reset on flie close and reset.
{
std::cerr << "Write buffer overrun, resizing to" << size << std::endl;
bufferSize = size;
......
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