ALSA project - the C library reference
|
Universal MIDI Protocol (UMP) Interface. More...
Functions | |
int | snd_ump_open (snd_ump_t **inputp, snd_ump_t **outputp, const char *name, int mode) |
Opens a new connection to the UMP interface. | |
int | snd_ump_close (snd_ump_t *ump) |
close UMP handle | |
snd_rawmidi_t * | snd_ump_rawmidi (snd_ump_t *ump) |
get RawMidi instance associated with the UMP handle | |
const char * | snd_ump_name (snd_ump_t *ump) |
get identifier of UMP handle | |
int | snd_ump_poll_descriptors_count (snd_ump_t *ump) |
get count of poll descriptors for UMP handle | |
int | snd_ump_poll_descriptors (snd_ump_t *ump, struct pollfd *pfds, unsigned int space) |
get poll descriptors | |
int | snd_ump_poll_descriptors_revents (snd_ump_t *ump, struct pollfd *pfds, unsigned int nfds, unsigned short *revents) |
get returned events from poll descriptors | |
int | snd_ump_nonblock (snd_ump_t *ump, int nonblock) |
set nonblock mode | |
int | snd_ump_rawmidi_info (snd_ump_t *ump, snd_rawmidi_info_t *info) |
get information about associated RawMidi handle | |
int | snd_ump_rawmidi_params (snd_ump_t *ump, snd_rawmidi_params_t *params) |
set parameters about associated RawMidi stream | |
int | snd_ump_rawmidi_params_current (snd_ump_t *ump, snd_rawmidi_params_t *params) |
get current parameters about associated RawMidi stream | |
int | snd_ump_rawmidi_status (snd_ump_t *ump, snd_rawmidi_status_t *status) |
get status of associated RawMidi stream | |
int | snd_ump_drop (snd_ump_t *ump) |
drop all packets in the rawmidi I/O ring buffer immediately | |
int | snd_ump_drain (snd_ump_t *ump) |
drain all packets in the UMP I/O ring buffer | |
ssize_t | snd_ump_write (snd_ump_t *ump, const void *buffer, size_t size) |
write UMP packets to UMP stream | |
ssize_t | snd_ump_read (snd_ump_t *ump, void *buffer, size_t size) |
read UMP packets from UMP stream | |
ssize_t | snd_ump_tread (snd_ump_t *ump, struct timespec *tstamp, void *buffer, size_t size) |
read UMP packets from UMP stream with timestamp | |
size_t | snd_ump_endpoint_info_sizeof (void) |
get size of the snd_ump_endpoint_info_t structure in bytes | |
int | snd_ump_endpoint_info_malloc (snd_ump_endpoint_info_t **info) |
allocate the snd_ump_endpoint_info_t structure | |
void | snd_ump_endpoint_info_free (snd_ump_endpoint_info_t *info) |
frees the snd_ump_endpoint_info_t structure | |
void | snd_ump_endpoint_info_copy (snd_ump_endpoint_info_t *dst, const snd_ump_endpoint_info_t *src) |
copy one snd_ump_endpoint_info_t structure to another | |
int | snd_ump_endpoint_info_get_card (const snd_ump_endpoint_info_t *info) |
get card number of UMP endpoint | |
int | snd_ump_endpoint_info_get_device (const snd_ump_endpoint_info_t *info) |
get device number of UMP endpoint | |
unsigned int | snd_ump_endpoint_info_get_flags (const snd_ump_endpoint_info_t *info) |
get UMP endpoint info flags | |
unsigned int | snd_ump_endpoint_info_get_protocol_caps (const snd_ump_endpoint_info_t *info) |
get UMP endpoint protocol capability bits | |
unsigned int | snd_ump_endpoint_info_get_protocol (const snd_ump_endpoint_info_t *info) |
get the current UMP endpoint protocol | |
unsigned int | snd_ump_endpoint_info_get_num_blocks (const snd_ump_endpoint_info_t *info) |
get the number of UMP blocks belonging to the endpoint | |
unsigned int | snd_ump_endpoint_info_get_version (const snd_ump_endpoint_info_t *info) |
get UMP version number | |
unsigned int | snd_ump_endpoint_info_get_manufacturer_id (const snd_ump_endpoint_info_t *info) |
get UMP manufacturer ID | |
unsigned int | snd_ump_endpoint_info_get_family_id (const snd_ump_endpoint_info_t *info) |
get UMP family ID | |
unsigned int | snd_ump_endpoint_info_get_model_id (const snd_ump_endpoint_info_t *info) |
get UMP model ID | |
const unsigned char * | snd_ump_endpoint_info_get_sw_revision (const snd_ump_endpoint_info_t *info) |
get UMP software revision | |
const char * | snd_ump_endpoint_info_get_name (const snd_ump_endpoint_info_t *info) |
get UMP endpoint name string | |
const char * | snd_ump_endpoint_info_get_product_id (const snd_ump_endpoint_info_t *info) |
get UMP endpoint product ID string | |
int | snd_ump_endpoint_info (snd_ump_t *ump, snd_ump_endpoint_info_t *info) |
get endpoint information about UMP handle | |
size_t | snd_ump_block_info_sizeof (void) |
get size of the snd_ump_block_info_t structure in bytes | |
int | snd_ump_block_info_malloc (snd_ump_block_info_t **info) |
allocate the snd_ump_block_info_t structure | |
void | snd_ump_block_info_free (snd_ump_block_info_t *info) |
frees the snd_ump_block_info_t structure | |
void | snd_ump_block_info_copy (snd_ump_block_info_t *dst, const snd_ump_block_info_t *src) |
copy one snd_ump_block_info_t structure to another | |
int | snd_ump_block_info_get_card (const snd_ump_block_info_t *info) |
get card number of UMP block | |
int | snd_ump_block_info_get_device (const snd_ump_block_info_t *info) |
get device number of UMP block | |
unsigned int | snd_ump_block_info_get_block_id (const snd_ump_block_info_t *info) |
get UMP block ID | |
void | snd_ump_block_info_set_block_id (snd_ump_block_info_t *info, unsigned int id) |
set UMP block ID for query | |
unsigned int | snd_ump_block_info_get_active (const snd_ump_block_info_t *info) |
get UMP block activeness | |
unsigned int | snd_ump_block_info_get_flags (const snd_ump_block_info_t *info) |
get UMP block information flags | |
unsigned int | snd_ump_block_info_get_direction (const snd_ump_block_info_t *info) |
get UMP block direction | |
unsigned int | snd_ump_block_info_get_first_group (const snd_ump_block_info_t *info) |
get first UMP group ID belonging to the block | |
unsigned int | snd_ump_block_info_get_num_groups (const snd_ump_block_info_t *info) |
get number of UMP groups belonging to the block | |
unsigned int | snd_ump_block_info_get_midi_ci_version (const snd_ump_block_info_t *info) |
get MIDI-CI version number | |
unsigned int | snd_ump_block_info_get_sysex8_streams (const snd_ump_block_info_t *info) |
get number of supported SysEx8 streams | |
unsigned int | snd_ump_block_info_get_ui_hint (const snd_ump_block_info_t *info) |
get UI hint of the given UMP block | |
const char * | snd_ump_block_info_get_name (const snd_ump_block_info_t *info) |
get the name string of UMP block | |
int | snd_ump_block_info (snd_ump_t *ump, snd_ump_block_info_t *info) |
get UMP block information | |
int | snd_ump_msg_sysex_expand (const uint32_t *ump, uint8_t *buf, size_t maxlen, size_t *filled) |
fill sysex byte from a UMP packet | |
Universal MIDI Protocol (UMP) Interface.
int snd_ump_block_info | ( | snd_ump_t * | ump, |
snd_ump_block_info_t * | info | ||
) |
get UMP block information
ump | UMP handle |
info | pointer to a snd_ump_block_info_t structure |
The caller should fill the block ID to query at first via snd_ump_block_info_set_block_id().
void snd_ump_block_info_copy | ( | snd_ump_block_info_t * | dst, |
const snd_ump_block_info_t * | src | ||
) |
copy one snd_ump_block_info_t structure to another
dst | destination snd_ump_block_info_t structure |
src | source snd_ump_block_info_t structure |
void snd_ump_block_info_free | ( | snd_ump_block_info_t * | info | ) |
frees the snd_ump_block_info_t structure
info | pointer to the snd_ump_block_info_t structure to free |
Frees the given snd_ump_block_info_t structure using the standard free C library function.
unsigned int snd_ump_block_info_get_active | ( | const snd_ump_block_info_t * | info | ) |
get UMP block activeness
info | pointer to a snd_ump_block_info_t structure |
unsigned int snd_ump_block_info_get_block_id | ( | const snd_ump_block_info_t * | info | ) |
get UMP block ID
info | pointer to a snd_ump_block_info_t structure |
int snd_ump_block_info_get_card | ( | const snd_ump_block_info_t * | info | ) |
get card number of UMP block
info | pointer to a snd_ump_block_info_t structure |
int snd_ump_block_info_get_device | ( | const snd_ump_block_info_t * | info | ) |
get device number of UMP block
info | pointer to a snd_ump_block_info_t structure |
unsigned int snd_ump_block_info_get_direction | ( | const snd_ump_block_info_t * | info | ) |
get UMP block direction
info | pointer to a snd_ump_block_info_t structure |
unsigned int snd_ump_block_info_get_first_group | ( | const snd_ump_block_info_t * | info | ) |
get first UMP group ID belonging to the block
info | pointer to a snd_ump_block_info_t structure |
unsigned int snd_ump_block_info_get_flags | ( | const snd_ump_block_info_t * | info | ) |
get UMP block information flags
info | pointer to a snd_ump_block_info_t structure |
unsigned int snd_ump_block_info_get_midi_ci_version | ( | const snd_ump_block_info_t * | info | ) |
get MIDI-CI version number
info | pointer to a snd_ump_block_info_t structure |
const char * snd_ump_block_info_get_name | ( | const snd_ump_block_info_t * | info | ) |
get the name string of UMP block
info | pointer to a snd_ump_block_info_t structure |
unsigned int snd_ump_block_info_get_num_groups | ( | const snd_ump_block_info_t * | info | ) |
get number of UMP groups belonging to the block
info | pointer to a snd_ump_block_info_t structure |
unsigned int snd_ump_block_info_get_sysex8_streams | ( | const snd_ump_block_info_t * | info | ) |
get number of supported SysEx8 streams
info | pointer to a snd_ump_block_info_t structure |
unsigned int snd_ump_block_info_get_ui_hint | ( | const snd_ump_block_info_t * | info | ) |
get UI hint of the given UMP block
info | pointer to a snd_ump_block_info_t structure |
int snd_ump_block_info_malloc | ( | snd_ump_block_info_t ** | info | ) |
allocate the snd_ump_block_info_t structure
info | returned pointer |
Allocates a new snd_ump_block_info_t structure using the standard malloc C library function.
void snd_ump_block_info_set_block_id | ( | snd_ump_block_info_t * | info, |
unsigned int | id | ||
) |
set UMP block ID for query
info | pointer to a snd_ump_block_info_t structure |
id | the ID number for query |
size_t snd_ump_block_info_sizeof | ( | void | ) |
get size of the snd_ump_block_info_t structure in bytes
int snd_ump_close | ( | snd_ump_t * | ump | ) |
close UMP handle
ump | UMP handle |
Closes the specified UMP handle and frees all associated resources.
int snd_ump_drain | ( | snd_ump_t * | ump | ) |
drain all packets in the UMP I/O ring buffer
ump | UMP handle |
Waits until all MIDI packets are not drained (sent) to the hardware device.
int snd_ump_drop | ( | snd_ump_t * | ump | ) |
drop all packets in the rawmidi I/O ring buffer immediately
ump | UMP handle |
int snd_ump_endpoint_info | ( | snd_ump_t * | ump, |
snd_ump_endpoint_info_t * | info | ||
) |
get endpoint information about UMP handle
ump | UMP handle |
info | pointer to a snd_ump_endpoint_info_t structure to be filled |
void snd_ump_endpoint_info_copy | ( | snd_ump_endpoint_info_t * | dst, |
const snd_ump_endpoint_info_t * | src | ||
) |
copy one snd_ump_endpoint_info_t structure to another
dst | destination snd_ump_endpoint_info_t structure |
src | source snd_ump_endpoint_info_t structure |
void snd_ump_endpoint_info_free | ( | snd_ump_endpoint_info_t * | info | ) |
frees the snd_ump_endpoint_info_t structure
info | pointer to the snd_ump_endpoint_info_t structure to free |
Frees the given snd_ump_endpoint_info_t structure using the standard free C library function.
int snd_ump_endpoint_info_get_card | ( | const snd_ump_endpoint_info_t * | info | ) |
get card number of UMP endpoint
info | pointer to a snd_ump_endpoint_info_t structure |
int snd_ump_endpoint_info_get_device | ( | const snd_ump_endpoint_info_t * | info | ) |
get device number of UMP endpoint
info | pointer to a snd_ump_endpoint_info_t structure |
unsigned int snd_ump_endpoint_info_get_family_id | ( | const snd_ump_endpoint_info_t * | info | ) |
get UMP family ID
info | pointer to a snd_ump_endpoint_info_t structure |
unsigned int snd_ump_endpoint_info_get_flags | ( | const snd_ump_endpoint_info_t * | info | ) |
get UMP endpoint info flags
info | pointer to a snd_ump_endpoint_info_t structure |
unsigned int snd_ump_endpoint_info_get_manufacturer_id | ( | const snd_ump_endpoint_info_t * | info | ) |
get UMP manufacturer ID
info | pointer to a snd_ump_endpoint_info_t structure |
unsigned int snd_ump_endpoint_info_get_model_id | ( | const snd_ump_endpoint_info_t * | info | ) |
get UMP model ID
info | pointer to a snd_ump_endpoint_info_t structure |
const char * snd_ump_endpoint_info_get_name | ( | const snd_ump_endpoint_info_t * | info | ) |
get UMP endpoint name string
info | pointer to a snd_ump_endpoint_info_t structure |
unsigned int snd_ump_endpoint_info_get_num_blocks | ( | const snd_ump_endpoint_info_t * | info | ) |
get the number of UMP blocks belonging to the endpoint
info | pointer to a snd_ump_endpoint_info_t structure |
const char * snd_ump_endpoint_info_get_product_id | ( | const snd_ump_endpoint_info_t * | info | ) |
get UMP endpoint product ID string
info | pointer to a snd_ump_endpoint_info_t structure |
unsigned int snd_ump_endpoint_info_get_protocol | ( | const snd_ump_endpoint_info_t * | info | ) |
get the current UMP endpoint protocol
info | pointer to a snd_ump_endpoint_info_t structure |
unsigned int snd_ump_endpoint_info_get_protocol_caps | ( | const snd_ump_endpoint_info_t * | info | ) |
get UMP endpoint protocol capability bits
info | pointer to a snd_ump_endpoint_info_t structure |
const unsigned char * snd_ump_endpoint_info_get_sw_revision | ( | const snd_ump_endpoint_info_t * | info | ) |
get UMP software revision
info | pointer to a snd_ump_endpoint_info_t structure |
unsigned int snd_ump_endpoint_info_get_version | ( | const snd_ump_endpoint_info_t * | info | ) |
get UMP version number
info | pointer to a snd_ump_endpoint_info_t structure |
int snd_ump_endpoint_info_malloc | ( | snd_ump_endpoint_info_t ** | info | ) |
allocate the snd_ump_endpoint_info_t structure
info | returned pointer |
Allocates a new snd_rawmidi_status_t structure using the standard malloc C library function.
size_t snd_ump_endpoint_info_sizeof | ( | void | ) |
get size of the snd_ump_endpoint_info_t structure in bytes
int snd_ump_msg_sysex_expand | ( | const uint32_t * | ump, |
uint8_t * | buf, | ||
size_t | maxlen, | ||
size_t * | filled | ||
) |
fill sysex byte from a UMP packet
ump | UMP packet pointer |
buf | buffer point to fill sysex bytes |
maxlen | max buffer size in bytes |
filled | the size of filled sysex bytes on the buffer |
const char * snd_ump_name | ( | snd_ump_t * | ump | ) |
get identifier of UMP handle
ump | UMP handle |
Returns the ASCII identifier of given UMP handle. It's the same identifier specified in snd_ump_open().
int snd_ump_nonblock | ( | snd_ump_t * | ump, |
int | nonblock | ||
) |
set nonblock mode
ump | UMP handle |
nonblock | 0 = block, 1 = nonblock mode |
The nonblock mode cannot be used when the stream is in SND_RAWMIDI_APPEND state.
int snd_ump_open | ( | snd_ump_t ** | inputp, |
snd_ump_t ** | outputp, | ||
const char * | name, | ||
int | mode | ||
) |
Opens a new connection to the UMP interface.
inputp | Returned input handle (NULL if not wanted) |
outputp | Returned output handle (NULL if not wanted) |
name | ASCII identifier of the UMP handle |
mode | Open mode |
Opens a new connection to the UMP interface specified with an ASCII identifier and mode.
int snd_ump_poll_descriptors | ( | snd_ump_t * | ump, |
struct pollfd * | pfds, | ||
unsigned int | space | ||
) |
get poll descriptors
ump | UMP handle |
pfds | array of poll descriptors |
space | space in the poll descriptor array |
int snd_ump_poll_descriptors_count | ( | snd_ump_t * | ump | ) |
get count of poll descriptors for UMP handle
ump | UMP handle |
int snd_ump_poll_descriptors_revents | ( | snd_ump_t * | ump, |
struct pollfd * | pfds, | ||
unsigned int | nfds, | ||
unsigned short * | revents | ||
) |
get returned events from poll descriptors
ump | UMP handle |
pfds | array of poll descriptors |
nfds | count of poll descriptors |
revents | returned events |
snd_rawmidi_t * snd_ump_rawmidi | ( | snd_ump_t * | ump | ) |
get RawMidi instance associated with the UMP handle
ump | UMP handle |
Returns the associated RawMidi instance with the given UMP handle
int snd_ump_rawmidi_info | ( | snd_ump_t * | ump, |
snd_rawmidi_info_t * | info | ||
) |
get information about associated RawMidi handle
ump | UMP handle |
info | pointer to a snd_rawmidi_info_t structure to be filled |
int snd_ump_rawmidi_params | ( | snd_ump_t * | ump, |
snd_rawmidi_params_t * | params | ||
) |
set parameters about associated RawMidi stream
ump | UMP handle |
params | pointer to a snd_rawmidi_params_t structure to be filled |
int snd_ump_rawmidi_params_current | ( | snd_ump_t * | ump, |
snd_rawmidi_params_t * | params | ||
) |
get current parameters about associated RawMidi stream
ump | UMP handle |
params | pointer to a snd_rawmidi_params_t structure to be filled |
int snd_ump_rawmidi_status | ( | snd_ump_t * | ump, |
snd_rawmidi_status_t * | status | ||
) |
get status of associated RawMidi stream
ump | UMP handle |
status | pointer to a snd_rawmidi_status_t structure to be filled |
ssize_t snd_ump_read | ( | snd_ump_t * | ump, |
void * | buffer, | ||
size_t | size | ||
) |
read UMP packets from UMP stream
ump | UMP handle |
buffer | buffer to store the input MIDI bytes |
size | input buffer size in bytes |
count | of UMP packet in bytes otherwise a negative error code |
ssize_t snd_ump_tread | ( | snd_ump_t * | ump, |
struct timespec * | tstamp, | ||
void * | buffer, | ||
size_t | size | ||
) |
read UMP packets from UMP stream with timestamp
ump | UMP handle | |
[out] | tstamp | timestamp for the returned UMP packets |
buffer | buffer to store the input UMP packets | |
size | input buffer size in bytes |
count | of UMP packet in bytes otherwise a negative error code |
ssize_t snd_ump_write | ( | snd_ump_t * | ump, |
const void * | buffer, | ||
size_t | size | ||
) |
write UMP packets to UMP stream
ump | UMP handle |
buffer | buffer containing UMP packets |
size | output buffer size in bytes |