Modules | |
Sequencer Client Interface | |
Sequencer Port Interface | |
Sequencer Port Subscription | |
Sequencer Queue Interface | |
Sequencer Event API | |
Sequencer Miscellaneous | |
Sequencer Event Type Checks | |
Sequencer Event Definitions | |
Sequencer Middle Level Interface | |
Sequencer event <-> MIDI byte stream coder | |
Defines | |
#define | SND_SEQ_DLSYM_VERSION _dlsym_seq_001 |
#define | SND_SEQ_OPEN_OUTPUT 1 |
#define | SND_SEQ_OPEN_INPUT 2 |
#define | SND_SEQ_OPEN_DUPLEX (SND_SEQ_OPEN_OUTPUT|SND_SEQ_OPEN_INPUT) |
#define | SND_SEQ_NONBLOCK 0x0001 |
#define | SND_SEQ_ADDRESS_UNKNOWN 253 |
#define | SND_SEQ_ADDRESS_SUBSCRIBERS 254 |
#define | SND_SEQ_ADDRESS_BROADCAST 255 |
#define | SND_SEQ_CLIENT_SYSTEM 0 |
#define | snd_seq_system_info_alloca(ptr) SND_ALLOCA(snd_seq_system_info, ptr) |
Typedefs | |
typedef _snd_seq | snd_seq_t |
typedef enum _snd_seq_type | snd_seq_type_t |
typedef _snd_seq_system_info | snd_seq_system_info_t |
Enumerations | |
enum | _snd_seq_type { SND_SEQ_TYPE_HW, SND_SEQ_TYPE_SHM, SND_SEQ_TYPE_INET } |
Functions | |
int | snd_seq_open (snd_seq_t **handle, const char *name, int streams, int mode) |
Open the ALSA sequencer. | |
int | snd_seq_open_lconf (snd_seq_t **handle, const char *name, int streams, int mode, snd_config_t *lconf) |
Open the ALSA sequencer using local configuration. | |
const char * | snd_seq_name (snd_seq_t *seq) |
get identifier of sequencer handle | |
snd_seq_type_t | snd_seq_type (snd_seq_t *seq) |
get type of sequencer handle | |
int | snd_seq_close (snd_seq_t *handle) |
Close the sequencer. | |
int | snd_seq_poll_descriptors_count (snd_seq_t *handle, short events) |
Returns the number of poll descriptors. | |
int | snd_seq_poll_descriptors (snd_seq_t *handle, struct pollfd *pfds, unsigned int space, short events) |
Get poll descriptors. | |
int | snd_seq_poll_descriptors_revents (snd_seq_t *seq, struct pollfd *pfds, unsigned int nfds, unsigned short *revents) |
get returned events from poll descriptors | |
int | snd_seq_nonblock (snd_seq_t *handle, int nonblock) |
Set nonblock mode. | |
int | snd_seq_client_id (snd_seq_t *handle) |
Get the client id. | |
size_t | snd_seq_get_output_buffer_size (snd_seq_t *handle) |
Return the size of output buffer. | |
size_t | snd_seq_get_input_buffer_size (snd_seq_t *handle) |
Return the size of input buffer. | |
int | snd_seq_set_output_buffer_size (snd_seq_t *handle, size_t size) |
Change the size of output buffer. | |
int | snd_seq_set_input_buffer_size (snd_seq_t *handle, size_t size) |
Resize the input buffer. | |
size_t | snd_seq_system_info_sizeof (void) |
Get size of snd_seq_system_info_t. | |
int | snd_seq_system_info_malloc (snd_seq_system_info_t **ptr) |
Allocate an empty snd_seq_system_info_t using standard malloc. | |
void | snd_seq_system_info_free (snd_seq_system_info_t *ptr) |
Frees a previously allocated snd_seq_system_info_t. | |
void | snd_seq_system_info_copy (snd_seq_system_info_t *dst, const snd_seq_system_info_t *src) |
Copy one snd_seq_system_info_t to another. | |
int | snd_seq_system_info_get_queues (const snd_seq_system_info_t *info) |
Get maximum number of queues. | |
int | snd_seq_system_info_get_clients (const snd_seq_system_info_t *info) |
Get maximum number of clients. | |
int | snd_seq_system_info_get_ports (const snd_seq_system_info_t *info) |
Get maximum number of ports. | |
int | snd_seq_system_info_get_channels (const snd_seq_system_info_t *info) |
Get maximum number of channels. | |
int | snd_seq_system_info_get_cur_clients (const snd_seq_system_info_t *info) |
Get the current number of clients. | |
int | snd_seq_system_info_get_cur_queues (const snd_seq_system_info_t *info) |
Get the current number of queues. | |
int | snd_seq_system_info (snd_seq_t *handle, snd_seq_system_info_t *info) |
obtain the sequencer system information |
#define SND_SEQ_ADDRESS_BROADCAST 255 |
send event to all queues/clients/ports/channels
#define SND_SEQ_ADDRESS_SUBSCRIBERS 254 |
send event to all subscribed ports
#define SND_SEQ_ADDRESS_UNKNOWN 253 |
special client (port) ids unknown source
#define SND_SEQ_CLIENT_SYSTEM 0 |
known client numbers system client
#define SND_SEQ_DLSYM_VERSION _dlsym_seq_001 |
dlsym version for interface entry callback
#define SND_SEQ_NONBLOCK 0x0001 |
sequencer opening mode non-blocking mode (flag to open mode)
#define SND_SEQ_OPEN_DUPLEX (SND_SEQ_OPEN_OUTPUT|SND_SEQ_OPEN_INPUT) |
open for both input and output (read/write)
#define SND_SEQ_OPEN_INPUT 2 |
open for input (read)
#define SND_SEQ_OPEN_OUTPUT 1 |
sequencer opening stream types open for output (write)
#define snd_seq_system_info_alloca | ( | ptr | ) | SND_ALLOCA(snd_seq_system_info, ptr) |
allocate a snd_seq_system_info_t container on stack
typedef struct _snd_seq_system_info snd_seq_system_info_t |
system information container
typedef struct _snd_seq snd_seq_t |
Sequencer handle
typedef enum _snd_seq_type snd_seq_type_t |
sequencer handle type
enum _snd_seq_type |
int snd_seq_client_id | ( | snd_seq_t * | seq | ) |
Get the client id.
seq | sequencer handle |
int snd_seq_close | ( | snd_seq_t * | seq | ) |
Close the sequencer.
seq | Handle returned from snd_seq_open() |
size_t snd_seq_get_input_buffer_size | ( | snd_seq_t * | seq | ) |
Return the size of input buffer.
seq | sequencer handle |
size_t snd_seq_get_output_buffer_size | ( | snd_seq_t * | seq | ) |
Return the size of output buffer.
seq | sequencer handle |
const char* snd_seq_name | ( | snd_seq_t * | seq | ) |
get identifier of sequencer handle
seq | sequencer handle |
int snd_seq_nonblock | ( | snd_seq_t * | seq, | |
int | nonblock | |||
) |
Set nonblock mode.
seq | sequencer handle | |
nonblock | 0 = block, 1 = nonblock mode |
int snd_seq_open | ( | snd_seq_t ** | seqp, | |
const char * | name, | |||
int | streams, | |||
int | mode | |||
) |
Open the ALSA sequencer.
seqp | Pointer to a snd_seq_t pointer. This pointer must be kept and passed to most of the other sequencer functions. | |
name | The sequencer's "name". This is not a name you make up for your own purposes; it has special significance to the ALSA library. Usually you need to pass "default" here. | |
streams | The read/write mode of the sequencer. Can be one of three values:
|
O_WRONLY
, O_RDONLY
and O_RDWR
respectively and used as the second argument to the C library open() call. mode | Optional modifier. Can be either 0, or SND_SEQ_NONBLOCK, which will make read/write operations non-blocking. This can also be set later using snd_seq_nonblock(). |
int snd_seq_open_lconf | ( | snd_seq_t ** | seqp, | |
const char * | name, | |||
int | streams, | |||
int | mode, | |||
snd_config_t * | lconf | |||
) |
Open the ALSA sequencer using local configuration.
seqp | Pointer to a snd_seq_t pointer. | |
name | The name to open | |
streams | The read/write mode of the sequencer. | |
mode | Optional modifier | |
lconf | Local configuration |
int snd_seq_poll_descriptors | ( | snd_seq_t * | seq, | |
struct pollfd * | pfds, | |||
unsigned int | space, | |||
short | events | |||
) |
Get poll descriptors.
seq | sequencer handle | |
pfds | array of poll descriptors | |
space | space in the poll descriptor array | |
events | polling events to be checked (POLLIN and POLLOUT ) |
POLLIN
bit is specified, the incoming events to the ports are checked.To check the returned poll-events, call snd_seq_poll_descriptors_revents() instead of reading the pollfd structs directly.
int snd_seq_poll_descriptors_count | ( | snd_seq_t * | seq, | |
short | events | |||
) |
Returns the number of poll descriptors.
seq | sequencer handle | |
events | the poll events to be checked (POLLIN and POLLOUT ) |
POLLIN|POLLOUT
int snd_seq_poll_descriptors_revents | ( | snd_seq_t * | seq, | |
struct pollfd * | pfds, | |||
unsigned int | nfds, | |||
unsigned short * | revents | |||
) |
get returned events from poll descriptors
seq | sequencer handle | |
pfds | array of poll descriptors | |
nfds | count of poll descriptors | |
revents | returned events |
int snd_seq_set_input_buffer_size | ( | snd_seq_t * | seq, | |
size_t | size | |||
) |
Resize the input buffer.
seq | sequencer handle | |
size | the size of input buffer to be changed in bytes |
int snd_seq_set_output_buffer_size | ( | snd_seq_t * | seq, | |
size_t | size | |||
) |
Change the size of output buffer.
seq | sequencer handle | |
size | the size of output buffer to be changed in bytes |
int snd_seq_system_info | ( | snd_seq_t * | seq, | |
snd_seq_system_info_t * | info | |||
) |
obtain the sequencer system information
seq | sequencer handle | |
info | the pointer to be stored |
void snd_seq_system_info_copy | ( | snd_seq_system_info_t * | dst, | |
const snd_seq_system_info_t * | src | |||
) |
Copy one snd_seq_system_info_t to another.
dst | pointer to destination | |
src | pointer to source |
void snd_seq_system_info_free | ( | snd_seq_system_info_t * | obj | ) |
int snd_seq_system_info_get_channels | ( | const snd_seq_system_info_t * | info | ) |
Get maximum number of channels.
info | snd_seq_system_info_t container |
int snd_seq_system_info_get_clients | ( | const snd_seq_system_info_t * | info | ) |
Get maximum number of clients.
info | snd_seq_system_info_t container |
int snd_seq_system_info_get_cur_clients | ( | const snd_seq_system_info_t * | info | ) |
Get the current number of clients.
info | snd_seq_system_info_t container |
int snd_seq_system_info_get_cur_queues | ( | const snd_seq_system_info_t * | info | ) |
Get the current number of queues.
info | snd_seq_system_info_t container |
int snd_seq_system_info_get_ports | ( | const snd_seq_system_info_t * | info | ) |
Get maximum number of ports.
info | snd_seq_system_info_t container |
int snd_seq_system_info_get_queues | ( | const snd_seq_system_info_t * | info | ) |
Get maximum number of queues.
info | snd_seq_system_info_t container |
int snd_seq_system_info_malloc | ( | snd_seq_system_info_t ** | ptr | ) |
Allocate an empty snd_seq_system_info_t using standard malloc.
ptr | returned pointer |
size_t snd_seq_system_info_sizeof | ( | void | ) |
snd_seq_type_t snd_seq_type | ( | snd_seq_t * | seq | ) |
get type of sequencer handle
seq | sequencer handle |