Specify channels with duplicated values
This commit is contained in:
parent
2d05fbaeea
commit
10de4c8f09
@ -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;
|
||||
};
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user