@@ -685,7 +685,7 @@ void BinaryRecording::writeContinuousData (int writeChannel,
685685 }
686686
687687 /* Generate sequential sample numbers using SIMD-optimized fill */
688- SIMDConverter::fillSequentialInt64 (m_sampleNumberBuffer.getData (), baseSampleNumber, size);
688+ SIMDConverter::fillSequentialInt64 (reinterpret_cast < int64_t *> ( m_sampleNumberBuffer.getData () ), baseSampleNumber, size);
689689
690690 /* Write int timestamps to disc */
691691 m_dataTimestampFiles[fileIndex]->writeData (m_sampleNumberBuffer, size * sizeof (int64));
@@ -785,12 +785,12 @@ void BinaryRecording::writeSpike (int electrodeIndex, const Spike* spike)
785785}
786786
787787void BinaryRecording::writeContinuousDataBatch (const int * writeChannels,
788- const int * realChannels,
789- const float * const * dataBuffers,
790- const double * timestampBuffer,
791- int numChannels,
792- int numSamples,
793- int fileIndex)
788+ const int * realChannels,
789+ const float * const * dataBuffers,
790+ const double * timestampBuffer,
791+ int numChannels,
792+ int numSamples,
793+ int fileIndex)
794794{
795795 if (numSamples == 0 || numChannels == 0 )
796796 return ;
@@ -800,10 +800,13 @@ void BinaryRecording::writeContinuousDataBatch (const int* writeChannels,
800800 {
801801 int newSamples = jmax (numSamples, m_batchBufferSamples);
802802 int newChannels = jmax (numChannels, m_batchBufferChannels);
803-
804- LOGD (" BinaryRecording::writeContinuousDataBatch: Resizing batch buffer to " ,
805- newChannels, " channels x " , newSamples, " samples" );
806-
803+
804+ LOGD (" BinaryRecording::writeContinuousDataBatch: Resizing batch buffer to " ,
805+ newChannels,
806+ " channels x " ,
807+ newSamples,
808+ " samples" );
809+
807810 m_batchIntBuffer.malloc (newSamples * newChannels);
808811 m_batchBufferSamples = newSamples;
809812 m_batchBufferChannels = newChannels;
@@ -851,13 +854,8 @@ void BinaryRecording::writeContinuousDataBatch (const int* writeChannels,
851854 // Try batch interleaving if we have all channels for this file
852855 // The file's channel count is determined by the stream's channel count
853856 // If we have a partial batch, fall back to per-channel writes
854- bool useBatchWrite = m_continuousFiles[fileIndex] != nullptr &&
855- m_continuousFiles[fileIndex]->writeChannelBatch (
856- startPos,
857- m_batchIntBufferPtrs.data (),
858- numChannels,
859- numSamples);
860-
857+ bool useBatchWrite = m_continuousFiles[fileIndex] != nullptr && m_continuousFiles[fileIndex]->writeChannelBatch (startPos, m_batchIntBufferPtrs.data (), numChannels, numSamples);
858+
861859 if (! useBatchWrite)
862860 {
863861 // Fall back to per-channel writes for partial batches
@@ -866,9 +864,9 @@ void BinaryRecording::writeContinuousDataBatch (const int* writeChannels,
866864 int writeChannel = writeChannels[i];
867865 int channelIdx = m_channelIndexes[writeChannel];
868866 m_continuousFiles[fileIndex]->writeChannel (
869- startPos,
870- channelIdx,
871- m_batchIntBufferPtrs[i],
867+ startPos,
868+ channelIdx,
869+ m_batchIntBufferPtrs[i],
872870 numSamples);
873871 }
874872 }
@@ -895,7 +893,7 @@ void BinaryRecording::writeContinuousDataBatch (const int* writeChannels,
895893 }
896894
897895 /* Generate sequential sample numbers using SIMD-optimized fill */
898- SIMDConverter::fillSequentialInt64 (m_sampleNumberBuffer, baseSampleNumber, numSamples);
896+ SIMDConverter::fillSequentialInt64 (reinterpret_cast < int64_t *> ( m_sampleNumberBuffer. getData ()) , baseSampleNumber, numSamples);
899897
900898 m_dataTimestampFiles[fileIndex]->writeData (m_sampleNumberBuffer, numSamples * sizeof (int64));
901899 m_dataTimestampFiles[fileIndex]->increaseRecordCount (numSamples);
0 commit comments