mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-01 22:58:49 -04:00
More sequencer extension (event hop counter, get information about subscription)..
This commit is contained in:
parent
33348ba6f4
commit
928bbc4f10
4 changed files with 123 additions and 25 deletions
|
|
@ -237,6 +237,15 @@ int snd_seq_set_port_info(snd_seq_t *seq, int port, snd_seq_port_info_t * info)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int snd_seq_get_port_subscription(snd_seq_t *seq, snd_seq_port_subscribe_t * sub)
|
||||
{
|
||||
if (!seq || !sub)
|
||||
return -EINVAL;
|
||||
if (ioctl(seq->fd, SND_SEQ_IOCTL_GET_SUBSCRIPTION, sub) < 0)
|
||||
return -errno;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int snd_seq_subscribe_port(snd_seq_t *seq, snd_seq_port_subscribe_t * sub)
|
||||
{
|
||||
if (!seq || !sub)
|
||||
|
|
@ -255,6 +264,15 @@ int snd_seq_unsubscribe_port(snd_seq_t *seq, snd_seq_port_subscribe_t * sub)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int snd_seq_query_port_subscribers(snd_seq_t *seq, snd_seq_query_subs_t * subs)
|
||||
{
|
||||
if (!seq || !subs)
|
||||
return -EINVAL;
|
||||
if (ioctl(seq->fd, SND_SEQ_IOCTL_QUERY_SUBS, subs) < 0)
|
||||
return -errno;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int snd_seq_get_queue_status(snd_seq_t *seq, int q, snd_seq_queue_status_t * status)
|
||||
{
|
||||
if (!seq || !status)
|
||||
|
|
@ -804,6 +822,26 @@ int snd_seq_set_client_pool(snd_seq_t *seq, snd_seq_client_pool_t *info)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int snd_seq_query_next_client(snd_seq_t *seq, snd_seq_client_info_t *info)
|
||||
{
|
||||
if (!seq || !info)
|
||||
return -EINVAL;
|
||||
info->client = seq->client;
|
||||
if (ioctl(seq->fd, SND_SEQ_IOCTL_QUERY_NEXT_CLIENT, info) < 0)
|
||||
return -errno;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int snd_seq_query_next_port(snd_seq_t *seq, snd_seq_port_info_t *info)
|
||||
{
|
||||
if (!seq || !info)
|
||||
return -EINVAL;
|
||||
info->client = seq->client;
|
||||
if (ioctl(seq->fd, SND_SEQ_IOCTL_QUERY_NEXT_PORT, info) < 0)
|
||||
return -errno;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void snd_seq_set_bit(int nr, void *array)
|
||||
{
|
||||
((unsigned int *)array)[nr >> 5] |= 1UL << (nr & 31);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue