From 10de4c8f0905cc6570bda28f8bf32ecad059fd74 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Thu, 16 Feb 2023 16:04:49 +0100 Subject: [PATCH] Specify channels with duplicated values --- src/emu/model_chan.h | 1 + src/emu/model_thread.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/emu/model_chan.h b/src/emu/model_chan.h index ab955ac..a4fd1d0 100644 --- a/src/emu/model_chan.h +++ b/src/emu/model_chan.h @@ -11,6 +11,7 @@ struct model_chan_spec { const char *prefix; const char **ch_names; const int *ch_stack; + const int *ch_dup; const struct model_pvt_spec *pvt; const int *track; }; diff --git a/src/emu/model_thread.c b/src/emu/model_thread.c index 14c1f20..9f1df0c 100644 --- a/src/emu/model_thread.c +++ b/src/emu/model_thread.c @@ -20,6 +20,11 @@ init_chan(struct model_thread *th, const struct model_chan_spec *spec, int64_t g const char *ch_name = spec->ch_names[i]; chan_init(c, type, fmt, prefix, gindex, ch_name); + if (spec->ch_dup != NULL) { + int dup = spec->ch_dup[i]; + chan_prop_set(c, CHAN_DUPLICATES, dup); + } + if (bay_register(th->bay, c) != 0) { err("bay_register failed"); return -1;