mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-02-08 10:06:19 -05:00
seq: Add API helper functions for creating UMP Endpoint and Blocks
For making it easer for applications to create a virtual UMP Endpoint and UMP blocks, add two API helper functions. snd_seq_create_ump_endpoint() creates (unsurprisingly) a UMP Endpoint, based on the given snd_ump_endpoint_info_t information. The number of (max) UMP groups belonging to this Endpoint has to be specified. This function sets up the Endpoint info on the sequencer client, and creates a MIDI 2.0 UMP port as well as UMP Group ports automatically. The name of the sequencer client is updated from the Endpoint name, too. After creating a UMP Endpoint, create each UMP Block via snd_seq_create_ump_block() function with a snd_ump_block_info_t info. The associated groups for each block have to be specified there. The port names and capability bits are updated accordingly after setting each block information. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
6767f623ca
commit
6167b8ce3e
5 changed files with 271 additions and 1 deletions
|
|
@ -520,6 +520,13 @@ int snd_seq_reset_pool_input(snd_seq_t *seq);
|
|||
((ev)->type = SND_SEQ_EVENT_SYSEX,\
|
||||
snd_seq_ev_set_variable(ev, datalen, dataptr))
|
||||
|
||||
/* Helper API functions for UMP endpoint and block creations */
|
||||
int snd_seq_create_ump_endpoint(snd_seq_t *seq,
|
||||
const snd_ump_endpoint_info_t *info,
|
||||
unsigned int num_groups);
|
||||
int snd_seq_create_ump_block(snd_seq_t *seq, int blkid,
|
||||
const snd_ump_block_info_t *info);
|
||||
|
||||
/** \} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue