Skip to contentSkip to conversation

alsa-gobject: seq: use guint8 for the numerical ID of client/port/queue

DISCUSSION GitHub pull_request - opened 1 participant 1 message Jun 19, 2020 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

alsa-project/alsa-gobject pull request #41 was opened from takaswie:

In ALSA Sequencer core, the number of client/port/queue is defined as below per each:

- SNDRV_SEQ_MAX_CLIENTS (=192)
- SNDRV_SEQ_MAX_PORTS (=254)
- SNDRV_SEQ_MAX_QUEUES (=32)

Following to it, in UAPI of Linux sound subsystem, several structures have unsigned char type of members:

- struct snd_seq_addr.client
- struct snd_seq_addr.port
- struct snd_seq_event.queue

On the other hand, within the UAPI, 'int' type is also used for the numerical ID of client/port/queue. Following to the 'int' type, current API of ALSASeq includes API with 'gint' or 'guint' type of argument. However, it's better to use 'guint8' with consideration about the range of value.

This patchset declares the arguments to have 'guint8' type.

Request URL : https://github.com/alsa-project/alsa-gobject/pull/41
Patch URL : https://github.com/alsa-project/alsa-gobject/pull/41.patch
Repository URL: https://github.com/alsa-project/alsa-gobject