"alsaseq_event_set_connect_data";
"alsaseq_event_get_result_data";
"alsaseq_event_set_result_data";
+ "alsaseq_event_calculate_pool_consumption";
"alsaseq_user_client_schedule_events";
"alsaseq_user_client_schedule_event";
return TRUE;
}
+/**
+ * alsaseq_event_calculate_pool_consumption:
+ * @self: A [struct@Event].
+ * @cells: (out): The number of consumed cells in client pool.
+ *
+ * Calculate the number of cells in client pool to be consumed when the event is delivered.
+ * The comparison to properties of [class@ClientPool] is useful when scheduling the event.
+ */
+void alsaseq_event_calculate_pool_consumption(const ALSASeqEvent *self, guint *cells)
+{
+ g_return_if_fail(self != NULL);
+ g_return_if_fail(cells != NULL);
+
+ *cells = seq_event_calculate_flattened_length(self, TRUE) / sizeof(*self);
+}
+
void seq_event_copy_flattened(const ALSASeqEvent *self, guint8 *buf, gsize length)
{
memcpy(buf, self, sizeof(*self));
gboolean alsaseq_event_set_result_data(ALSASeqEvent *self, const ALSASeqEventDataResult *data,
GError **error);
+void alsaseq_event_calculate_pool_consumption(const ALSASeqEvent *self, guint *cells);
+
G_END_DECLS
#endif