struct context {
gboolean started;
uint64_t samplerate;
+ uint16_t unitsize;
};
static int init(struct sr_input *in, GHashTable *options)
sr_channel_new(in->sdi, i, SR_CHANNEL_LOGIC, TRUE, name);
}
+ inc->unitsize = (g_slist_length(in->sdi->channels) + 7) / 8;
+
return SR_OK;
}
packet.type = SR_DF_LOGIC;
packet.payload = &logic;
- logic.unitsize = (g_slist_length(in->sdi->channels) + 7) / 8;
+ logic.unitsize = inc->unitsize;
/* Cut off at multiple of unitsize. */
chunk_size = in->buf->len / logic.unitsize * logic.unitsize;