From 5375b971df7a108854eb5c04829f3663760532b9 Mon Sep 17 00:00:00 2001 From: Benjamin Moody Date: Thu, 11 May 2023 12:39:33 -0400 Subject: [PATCH] _auto_signal_file_names: fix counting channels per group. Since the FLAC format has a hard limit of eight channels, we need to use multiple signal files if a record contains more than eight signals. Commit d1d26ba was meant to do this automatically (when Record.set_default or wfdb.wrsamp is used to generate the signal file names), but this was never tested. --- wfdb/io/_header.py | 1 + 1 file changed, 1 insertion(+) diff --git a/wfdb/io/_header.py b/wfdb/io/_header.py index dbcc0177..419fb1cf 100644 --- a/wfdb/io/_header.py +++ b/wfdb/io/_header.py @@ -384,6 +384,7 @@ def _auto_signal_file_names(self): num_groups += 1 channels_in_group = 0 group_number.append(num_groups) + channels_in_group += 1 prev_fmt = ch_fmt prev_spf = ch_spf