From 2a362712f380b4e071a19b1439c852b4a1a09b69 Mon Sep 17 00:00:00 2001 From: Jamie Forth Date: Thu, 30 Jan 2025 20:23:52 +0000 Subject: [PATCH] Correct off-by-one sample_count --- src/recording.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/recording.cpp b/src/recording.cpp index 5d595f4..0b8b43e 100644 --- a/src/recording.cpp +++ b/src/recording.cpp @@ -386,6 +386,7 @@ void recording::typed_transfer_loop(streamid_t streamid, double srate, const inl if (!shutdown_) { timestamps.push_back(first_timestamp); file_.write_data_chunk(streamid, timestamps, chunk, (uint32_t)in->get_channel_count()); + sample_count += timestamps.size(); } auto next_pull = Clock::now();