Blame include/seq.h

Packit Service db8eaa
/**
Packit Service db8eaa
 * \file include/seq.h
Packit Service db8eaa
 * \brief Application interface library for the ALSA driver
Packit Service db8eaa
 * \author Jaroslav Kysela <perex@perex.cz>
Packit Service db8eaa
 * \author Abramo Bagnara <abramo@alsa-project.org>
Packit Service db8eaa
 * \author Takashi Iwai <tiwai@suse.de>
Packit Service db8eaa
 * \date 1998-2001
Packit Service db8eaa
 */
Packit Service db8eaa
/*
Packit Service db8eaa
 * Application interface library for the ALSA driver
Packit Service db8eaa
 *
Packit Service db8eaa
 *
Packit Service db8eaa
 *   This library is free software; you can redistribute it and/or modify
Packit Service db8eaa
 *   it under the terms of the GNU Lesser General Public License as
Packit Service db8eaa
 *   published by the Free Software Foundation; either version 2.1 of
Packit Service db8eaa
 *   the License, or (at your option) any later version.
Packit Service db8eaa
 *
Packit Service db8eaa
 *   This program is distributed in the hope that it will be useful,
Packit Service db8eaa
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service db8eaa
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service db8eaa
 *   GNU Lesser General Public License for more details.
Packit Service db8eaa
 *
Packit Service db8eaa
 *   You should have received a copy of the GNU Lesser General Public
Packit Service db8eaa
 *   License along with this library; if not, write to the Free Software
Packit Service db8eaa
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
Packit Service db8eaa
 *
Packit Service db8eaa
 */
Packit Service db8eaa
Packit Service db8eaa
#ifndef __ALSA_SEQ_H
Packit Service db8eaa
#define __ALSA_SEQ_H
Packit Service db8eaa
Packit Service db8eaa
#ifdef __cplusplus
Packit Service db8eaa
extern "C" {
Packit Service db8eaa
#endif
Packit Service db8eaa
Packit Service db8eaa
/**
Packit Service db8eaa
 *  \defgroup Sequencer MIDI Sequencer
Packit Service db8eaa
 *  MIDI Sequencer Interface.
Packit Service db8eaa
 *  See \ref seq page for more details.
Packit Service db8eaa
 *  \{
Packit Service db8eaa
 */
Packit Service db8eaa
Packit Service db8eaa
/** dlsym version for interface entry callback */
Packit Service db8eaa
#define SND_SEQ_DLSYM_VERSION		_dlsym_seq_001
Packit Service db8eaa
Packit Service db8eaa
/** Sequencer handle */
Packit Service db8eaa
typedef struct _snd_seq snd_seq_t;
Packit Service db8eaa
Packit Service db8eaa
/**
Packit Service db8eaa
 * sequencer opening stream types
Packit Service db8eaa
 */
Packit Service db8eaa
#define SND_SEQ_OPEN_OUTPUT	1	/**< open for output (write) */
Packit Service db8eaa
#define SND_SEQ_OPEN_INPUT	2	/**< open for input (read) */
Packit Service db8eaa
#define SND_SEQ_OPEN_DUPLEX	(SND_SEQ_OPEN_OUTPUT|SND_SEQ_OPEN_INPUT)	/**< open for both input and output (read/write) */
Packit Service db8eaa
Packit Service db8eaa
/**
Packit Service db8eaa
 * sequencer opening mode
Packit Service db8eaa
 */
Packit Service db8eaa
#define SND_SEQ_NONBLOCK	0x0001	/**< non-blocking mode (flag to open mode) */
Packit Service db8eaa
Packit Service db8eaa
/** sequencer handle type */
Packit Service db8eaa
typedef enum _snd_seq_type {
Packit Service db8eaa
	SND_SEQ_TYPE_HW,		/**< hardware */
Packit Service db8eaa
	SND_SEQ_TYPE_SHM,		/**< shared memory (NYI) */
Packit Service db8eaa
	SND_SEQ_TYPE_INET		/**< network (NYI) */
Packit Service db8eaa
} snd_seq_type_t;
Packit Service db8eaa
Packit Service db8eaa
/** special client (port) ids */
Packit Service db8eaa
#define SND_SEQ_ADDRESS_UNKNOWN		253	/**< unknown source */
Packit Service db8eaa
#define SND_SEQ_ADDRESS_SUBSCRIBERS	254	/**< send event to all subscribed ports */
Packit Service db8eaa
#define SND_SEQ_ADDRESS_BROADCAST	255	/**< send event to all queues/clients/ports/channels */
Packit Service db8eaa
Packit Service db8eaa
/** known client numbers */
Packit Service db8eaa
#define SND_SEQ_CLIENT_SYSTEM		0	/**< system client */
Packit Service db8eaa
Packit Service db8eaa
/*
Packit Service db8eaa
 */
Packit Service db8eaa
int snd_seq_open(snd_seq_t **handle, const char *name, int streams, int mode);
Packit Service db8eaa
int snd_seq_open_lconf(snd_seq_t **handle, const char *name, int streams, int mode, snd_config_t *lconf);
Packit Service db8eaa
const char *snd_seq_name(snd_seq_t *seq);
Packit Service db8eaa
snd_seq_type_t snd_seq_type(snd_seq_t *seq);
Packit Service db8eaa
int snd_seq_close(snd_seq_t *handle);
Packit Service db8eaa
int snd_seq_poll_descriptors_count(snd_seq_t *handle, short events);
Packit Service db8eaa
int snd_seq_poll_descriptors(snd_seq_t *handle, struct pollfd *pfds, unsigned int space, short events);
Packit Service db8eaa
int snd_seq_poll_descriptors_revents(snd_seq_t *seq, struct pollfd *pfds, unsigned int nfds, unsigned short *revents);
Packit Service db8eaa
int snd_seq_nonblock(snd_seq_t *handle, int nonblock);
Packit Service db8eaa
int snd_seq_client_id(snd_seq_t *handle);
Packit Service db8eaa
Packit Service db8eaa
size_t snd_seq_get_output_buffer_size(snd_seq_t *handle);
Packit Service db8eaa
size_t snd_seq_get_input_buffer_size(snd_seq_t *handle);
Packit Service db8eaa
int snd_seq_set_output_buffer_size(snd_seq_t *handle, size_t size);
Packit Service db8eaa
int snd_seq_set_input_buffer_size(snd_seq_t *handle, size_t size);
Packit Service db8eaa
Packit Service db8eaa
/** system information container */
Packit Service db8eaa
typedef struct _snd_seq_system_info snd_seq_system_info_t;
Packit Service db8eaa
Packit Service db8eaa
size_t snd_seq_system_info_sizeof(void);
Packit Service db8eaa
/** allocate a #snd_seq_system_info_t container on stack */
Packit Service db8eaa
#define snd_seq_system_info_alloca(ptr) \
Packit Service db8eaa
	__snd_alloca(ptr, snd_seq_system_info)
Packit Service db8eaa
int snd_seq_system_info_malloc(snd_seq_system_info_t **ptr);
Packit Service db8eaa
void snd_seq_system_info_free(snd_seq_system_info_t *ptr);
Packit Service db8eaa
void snd_seq_system_info_copy(snd_seq_system_info_t *dst, const snd_seq_system_info_t *src);
Packit Service db8eaa
Packit Service db8eaa
int snd_seq_system_info_get_queues(const snd_seq_system_info_t *info);
Packit Service db8eaa
int snd_seq_system_info_get_clients(const snd_seq_system_info_t *info);
Packit Service db8eaa
int snd_seq_system_info_get_ports(const snd_seq_system_info_t *info);
Packit Service db8eaa
int snd_seq_system_info_get_channels(const snd_seq_system_info_t *info);
Packit Service db8eaa
int snd_seq_system_info_get_cur_clients(const snd_seq_system_info_t *info);
Packit Service db8eaa
int snd_seq_system_info_get_cur_queues(const snd_seq_system_info_t *info);
Packit Service db8eaa
Packit Service db8eaa
int snd_seq_system_info(snd_seq_t *handle, snd_seq_system_info_t *info);
Packit Service db8eaa
Packit Service db8eaa
/** \} */
Packit Service db8eaa
Packit Service db8eaa
Packit Service db8eaa
/**
Packit Service db8eaa
 *  \defgroup SeqClient Sequencer Client Interface
Packit Service db8eaa
 *  Sequencer Client Interface
Packit Service db8eaa
 *  \ingroup Sequencer
Packit Service db8eaa
 *  \{
Packit Service db8eaa
 */
Packit Service db8eaa
Packit Service db8eaa
/** client information container */
Packit Service db8eaa
typedef struct _snd_seq_client_info snd_seq_client_info_t;
Packit Service db8eaa
Packit Service db8eaa
/** client types */
Packit Service db8eaa
typedef enum snd_seq_client_type {
Packit Service db8eaa
	SND_SEQ_USER_CLIENT     = 1,	/**< user client */
Packit Service db8eaa
	SND_SEQ_KERNEL_CLIENT   = 2	/**< kernel client */
Packit Service db8eaa
} snd_seq_client_type_t;
Packit Service db8eaa
                        
Packit Service db8eaa
size_t snd_seq_client_info_sizeof(void);
Packit Service db8eaa
/** allocate a #snd_seq_client_info_t container on stack */
Packit Service db8eaa
#define snd_seq_client_info_alloca(ptr) \
Packit Service db8eaa
	__snd_alloca(ptr, snd_seq_client_info)
Packit Service db8eaa
int snd_seq_client_info_malloc(snd_seq_client_info_t **ptr);
Packit Service db8eaa
void snd_seq_client_info_free(snd_seq_client_info_t *ptr);
Packit Service db8eaa
void snd_seq_client_info_copy(snd_seq_client_info_t *dst, const snd_seq_client_info_t *src);
Packit Service db8eaa
Packit Service db8eaa
int snd_seq_client_info_get_client(const snd_seq_client_info_t *info);
Packit Service db8eaa
snd_seq_client_type_t snd_seq_client_info_get_type(const snd_seq_client_info_t *info);
Packit Service db8eaa
const char *snd_seq_client_info_get_name(snd_seq_client_info_t *info);
Packit Service db8eaa
int snd_seq_client_info_get_broadcast_filter(const snd_seq_client_info_t *info);
Packit Service db8eaa
int snd_seq_client_info_get_error_bounce(const snd_seq_client_info_t *info);
Packit Service db8eaa
int snd_seq_client_info_get_card(const snd_seq_client_info_t *info);
Packit Service db8eaa
int snd_seq_client_info_get_pid(const snd_seq_client_info_t *info);
Packit Service db8eaa
const unsigned char *snd_seq_client_info_get_event_filter(const snd_seq_client_info_t *info);
Packit Service db8eaa
int snd_seq_client_info_get_num_ports(const snd_seq_client_info_t *info);
Packit Service db8eaa
int snd_seq_client_info_get_event_lost(const snd_seq_client_info_t *info);
Packit Service db8eaa
Packit Service db8eaa
void snd_seq_client_info_set_client(snd_seq_client_info_t *info, int client);
Packit Service db8eaa
void snd_seq_client_info_set_name(snd_seq_client_info_t *info, const char *name);
Packit Service db8eaa
void snd_seq_client_info_set_broadcast_filter(snd_seq_client_info_t *info, int val);
Packit Service db8eaa
void snd_seq_client_info_set_error_bounce(snd_seq_client_info_t *info, int val);
Packit Service db8eaa
void snd_seq_client_info_set_event_filter(snd_seq_client_info_t *info, unsigned char *filter);
Packit Service db8eaa
Packit Service db8eaa
void snd_seq_client_info_event_filter_clear(snd_seq_client_info_t *info);
Packit Service db8eaa
void snd_seq_client_info_event_filter_add(snd_seq_client_info_t *info, int event_type);
Packit Service db8eaa
void snd_seq_client_info_event_filter_del(snd_seq_client_info_t *info, int event_type);
Packit Service db8eaa
int snd_seq_client_info_event_filter_check(snd_seq_client_info_t *info, int event_type);
Packit Service db8eaa
Packit Service db8eaa
int snd_seq_get_client_info(snd_seq_t *handle, snd_seq_client_info_t *info);
Packit Service db8eaa
int snd_seq_get_any_client_info(snd_seq_t *handle, int client, snd_seq_client_info_t *info);
Packit Service db8eaa
int snd_seq_set_client_info(snd_seq_t *handle, snd_seq_client_info_t *info);
Packit Service db8eaa
int snd_seq_query_next_client(snd_seq_t *handle, snd_seq_client_info_t *info);
Packit Service db8eaa
Packit Service db8eaa
/*
Packit Service db8eaa
 */
Packit Service db8eaa
Packit Service db8eaa
/** client pool information container */
Packit Service db8eaa
typedef struct _snd_seq_client_pool snd_seq_client_pool_t;
Packit Service db8eaa
Packit Service db8eaa
size_t snd_seq_client_pool_sizeof(void);
Packit Service db8eaa
/** allocate a #snd_seq_client_pool_t container on stack */
Packit Service db8eaa
#define snd_seq_client_pool_alloca(ptr) \
Packit Service db8eaa
	__snd_alloca(ptr, snd_seq_client_pool)
Packit Service db8eaa
int snd_seq_client_pool_malloc(snd_seq_client_pool_t **ptr);
Packit Service db8eaa
void snd_seq_client_pool_free(snd_seq_client_pool_t *ptr);
Packit Service db8eaa
void snd_seq_client_pool_copy(snd_seq_client_pool_t *dst, const snd_seq_client_pool_t *src);
Packit Service db8eaa
Packit Service db8eaa
int snd_seq_client_pool_get_client(const snd_seq_client_pool_t *info);
Packit Service db8eaa
size_t snd_seq_client_pool_get_output_pool(const snd_seq_client_pool_t *info);
Packit Service db8eaa
size_t snd_seq_client_pool_get_input_pool(const snd_seq_client_pool_t *info);
Packit Service db8eaa
size_t snd_seq_client_pool_get_output_room(const snd_seq_client_pool_t *info);
Packit Service db8eaa
size_t snd_seq_client_pool_get_output_free(const snd_seq_client_pool_t *info);
Packit Service db8eaa
size_t snd_seq_client_pool_get_input_free(const snd_seq_client_pool_t *info);
Packit Service db8eaa
void snd_seq_client_pool_set_output_pool(snd_seq_client_pool_t *info, size_t size);
Packit Service db8eaa
void snd_seq_client_pool_set_input_pool(snd_seq_client_pool_t *info, size_t size);
Packit Service db8eaa
void snd_seq_client_pool_set_output_room(snd_seq_client_pool_t *info, size_t size);
Packit Service db8eaa
Packit Service db8eaa
int snd_seq_get_client_pool(snd_seq_t *handle, snd_seq_client_pool_t *info);
Packit Service db8eaa
int snd_seq_set_client_pool(snd_seq_t *handle, snd_seq_client_pool_t *info);
Packit Service db8eaa
Packit Service db8eaa
Packit Service db8eaa
/** \} */
Packit Service db8eaa
Packit Service db8eaa
Packit Service db8eaa
/**
Packit Service db8eaa
 *  \defgroup SeqPort Sequencer Port Interface
Packit Service db8eaa
 *  Sequencer Port Interface
Packit Service db8eaa
 *  \ingroup Sequencer
Packit Service db8eaa
 *  \{
Packit Service db8eaa
 */
Packit Service db8eaa
Packit Service db8eaa
/** port information container */
Packit Service db8eaa
typedef struct _snd_seq_port_info snd_seq_port_info_t;
Packit Service db8eaa
Packit Service db8eaa
/** known port numbers */
Packit Service db8eaa
#define SND_SEQ_PORT_SYSTEM_TIMER	0	/**< system timer port */
Packit Service db8eaa
#define SND_SEQ_PORT_SYSTEM_ANNOUNCE	1	/**< system announce port */
Packit Service db8eaa
Packit Service db8eaa
/** port capabilities (32 bits) */
Packit Service db8eaa
#define SND_SEQ_PORT_CAP_READ		(1<<0)	/**< readable from this port */
Packit Service db8eaa
#define SND_SEQ_PORT_CAP_WRITE		(1<<1)	/**< writable to this port */
Packit Service db8eaa
Packit Service db8eaa
#define SND_SEQ_PORT_CAP_SYNC_READ	(1<<2)	/**< allow read subscriptions */
Packit Service db8eaa
#define SND_SEQ_PORT_CAP_SYNC_WRITE	(1<<3)	/**< allow write subscriptions */
Packit Service db8eaa
Packit Service db8eaa
#define SND_SEQ_PORT_CAP_DUPLEX		(1<<4)	/**< allow read/write duplex */
Packit Service db8eaa
Packit Service db8eaa
#define SND_SEQ_PORT_CAP_SUBS_READ	(1<<5)	/**< allow read subscription */
Packit Service db8eaa
#define SND_SEQ_PORT_CAP_SUBS_WRITE	(1<<6)	/**< allow write subscription */
Packit Service db8eaa
#define SND_SEQ_PORT_CAP_NO_EXPORT	(1<<7)	/**< routing not allowed */
Packit Service db8eaa
Packit Service db8eaa
/* port type */
Packit Service db8eaa
/** Messages sent from/to this port have device-specific semantics. */
Packit Service db8eaa
#define SND_SEQ_PORT_TYPE_SPECIFIC	(1<<0)
Packit Service db8eaa
/** This port understands MIDI messages. */
Packit Service db8eaa
#define SND_SEQ_PORT_TYPE_MIDI_GENERIC	(1<<1)
Packit Service db8eaa
/** This port is compatible with the General MIDI specification. */
Packit Service db8eaa
#define SND_SEQ_PORT_TYPE_MIDI_GM	(1<<2)
Packit Service db8eaa
/** This port is compatible with the Roland GS standard. */
Packit Service db8eaa
#define SND_SEQ_PORT_TYPE_MIDI_GS	(1<<3)
Packit Service db8eaa
/** This port is compatible with the Yamaha XG specification. */
Packit Service db8eaa
#define SND_SEQ_PORT_TYPE_MIDI_XG	(1<<4)
Packit Service db8eaa
/** This port is compatible with the Roland MT-32. */
Packit Service db8eaa
#define SND_SEQ_PORT_TYPE_MIDI_MT32	(1<<5)
Packit Service db8eaa
/** This port is compatible with the General MIDI 2 specification. */
Packit Service db8eaa
#define SND_SEQ_PORT_TYPE_MIDI_GM2	(1<<6)
Packit Service db8eaa
/** This port understands SND_SEQ_EVENT_SAMPLE_xxx messages
Packit Service db8eaa
    (these are not MIDI messages). */
Packit Service db8eaa
#define SND_SEQ_PORT_TYPE_SYNTH		(1<<10)
Packit Service db8eaa
/** Instruments can be downloaded to this port
Packit Service db8eaa
    (with SND_SEQ_EVENT_INSTR_xxx messages sent directly). */
Packit Service db8eaa
#define SND_SEQ_PORT_TYPE_DIRECT_SAMPLE (1<<11)
Packit Service db8eaa
/** Instruments can be downloaded to this port
Packit Service db8eaa
    (with SND_SEQ_EVENT_INSTR_xxx messages sent directly or through a queue). */
Packit Service db8eaa
#define SND_SEQ_PORT_TYPE_SAMPLE	(1<<12)
Packit Service db8eaa
/** This port is implemented in hardware. */
Packit Service db8eaa
#define SND_SEQ_PORT_TYPE_HARDWARE	(1<<16)
Packit Service db8eaa
/** This port is implemented in software. */
Packit Service db8eaa
#define SND_SEQ_PORT_TYPE_SOFTWARE	(1<<17)
Packit Service db8eaa
/** Messages sent to this port will generate sounds. */
Packit Service db8eaa
#define SND_SEQ_PORT_TYPE_SYNTHESIZER	(1<<18)
Packit Service db8eaa
/** This port may connect to other devices
Packit Service db8eaa
    (whose characteristics are not known). */
Packit Service db8eaa
#define SND_SEQ_PORT_TYPE_PORT		(1<<19)
Packit Service db8eaa
/** This port belongs to an application, such as a sequencer or editor. */
Packit Service db8eaa
#define SND_SEQ_PORT_TYPE_APPLICATION	(1<<20)
Packit Service db8eaa
Packit Service db8eaa
Packit Service db8eaa
size_t snd_seq_port_info_sizeof(void);
Packit Service db8eaa
/** allocate a #snd_seq_port_info_t container on stack */
Packit Service db8eaa
#define snd_seq_port_info_alloca(ptr) \
Packit Service db8eaa
	__snd_alloca(ptr, snd_seq_port_info)
Packit Service db8eaa
int snd_seq_port_info_malloc(snd_seq_port_info_t **ptr);
Packit Service db8eaa
void snd_seq_port_info_free(snd_seq_port_info_t *ptr);
Packit Service db8eaa
void snd_seq_port_info_copy(snd_seq_port_info_t *dst, const snd_seq_port_info_t *src);
Packit Service db8eaa
Packit Service db8eaa
int snd_seq_port_info_get_client(const snd_seq_port_info_t *info);
Packit Service db8eaa
int snd_seq_port_info_get_port(const snd_seq_port_info_t *info);
Packit Service db8eaa
const snd_seq_addr_t *snd_seq_port_info_get_addr(const snd_seq_port_info_t *info);
Packit Service db8eaa
const char *snd_seq_port_info_get_name(const snd_seq_port_info_t *info);
Packit Service db8eaa
unsigned int snd_seq_port_info_get_capability(const snd_seq_port_info_t *info);
Packit Service db8eaa
unsigned int snd_seq_port_info_get_type(const snd_seq_port_info_t *info);
Packit Service db8eaa
int snd_seq_port_info_get_midi_channels(const snd_seq_port_info_t *info);
Packit Service db8eaa
int snd_seq_port_info_get_midi_voices(const snd_seq_port_info_t *info);
Packit Service db8eaa
int snd_seq_port_info_get_synth_voices(const snd_seq_port_info_t *info);
Packit Service db8eaa
int snd_seq_port_info_get_read_use(const snd_seq_port_info_t *info);
Packit Service db8eaa
int snd_seq_port_info_get_write_use(const snd_seq_port_info_t *info);
Packit Service db8eaa
int snd_seq_port_info_get_port_specified(const snd_seq_port_info_t *info);
Packit Service db8eaa
int snd_seq_port_info_get_timestamping(const snd_seq_port_info_t *info);
Packit Service db8eaa
int snd_seq_port_info_get_timestamp_real(const snd_seq_port_info_t *info);
Packit Service db8eaa
int snd_seq_port_info_get_timestamp_queue(const snd_seq_port_info_t *info);
Packit Service db8eaa
Packit Service db8eaa
void snd_seq_port_info_set_client(snd_seq_port_info_t *info, int client);
Packit Service db8eaa
void snd_seq_port_info_set_port(snd_seq_port_info_t *info, int port);
Packit Service db8eaa
void snd_seq_port_info_set_addr(snd_seq_port_info_t *info, const snd_seq_addr_t *addr);
Packit Service db8eaa
void snd_seq_port_info_set_name(snd_seq_port_info_t *info, const char *name);
Packit Service db8eaa
void snd_seq_port_info_set_capability(snd_seq_port_info_t *info, unsigned int capability);
Packit Service db8eaa
void snd_seq_port_info_set_type(snd_seq_port_info_t *info, unsigned int type);
Packit Service db8eaa
void snd_seq_port_info_set_midi_channels(snd_seq_port_info_t *info, int channels);
Packit Service db8eaa
void snd_seq_port_info_set_midi_voices(snd_seq_port_info_t *info, int voices);
Packit Service db8eaa
void snd_seq_port_info_set_synth_voices(snd_seq_port_info_t *info, int voices);
Packit Service db8eaa
void snd_seq_port_info_set_port_specified(snd_seq_port_info_t *info, int val);
Packit Service db8eaa
void snd_seq_port_info_set_timestamping(snd_seq_port_info_t *info, int enable);
Packit Service db8eaa
void snd_seq_port_info_set_timestamp_real(snd_seq_port_info_t *info, int realtime);
Packit Service db8eaa
void snd_seq_port_info_set_timestamp_queue(snd_seq_port_info_t *info, int queue);
Packit Service db8eaa
Packit Service db8eaa
int snd_seq_create_port(snd_seq_t *handle, snd_seq_port_info_t *info);
Packit Service db8eaa
int snd_seq_delete_port(snd_seq_t *handle, int port);
Packit Service db8eaa
int snd_seq_get_port_info(snd_seq_t *handle, int port, snd_seq_port_info_t *info);
Packit Service db8eaa
int snd_seq_get_any_port_info(snd_seq_t *handle, int client, int port, snd_seq_port_info_t *info);
Packit Service db8eaa
int snd_seq_set_port_info(snd_seq_t *handle, int port, snd_seq_port_info_t *info);
Packit Service db8eaa
int snd_seq_query_next_port(snd_seq_t *handle, snd_seq_port_info_t *info);
Packit Service db8eaa
Packit Service db8eaa
/** \} */
Packit Service db8eaa
Packit Service db8eaa
Packit Service db8eaa
/**
Packit Service db8eaa
 *  \defgroup SeqSubscribe Sequencer Port Subscription
Packit Service db8eaa
 *  Sequencer Port Subscription
Packit Service db8eaa
 *  \ingroup Sequencer
Packit Service db8eaa
 *  \{
Packit Service db8eaa
 */
Packit Service db8eaa
Packit Service db8eaa
/** port subscription container */
Packit Service db8eaa
typedef struct _snd_seq_port_subscribe snd_seq_port_subscribe_t;
Packit Service db8eaa
Packit Service db8eaa
size_t snd_seq_port_subscribe_sizeof(void);
Packit Service db8eaa
/** allocate a #snd_seq_port_subscribe_t container on stack */
Packit Service db8eaa
#define snd_seq_port_subscribe_alloca(ptr) \
Packit Service db8eaa
	__snd_alloca(ptr, snd_seq_port_subscribe)
Packit Service db8eaa
int snd_seq_port_subscribe_malloc(snd_seq_port_subscribe_t **ptr);
Packit Service db8eaa
void snd_seq_port_subscribe_free(snd_seq_port_subscribe_t *ptr);
Packit Service db8eaa
void snd_seq_port_subscribe_copy(snd_seq_port_subscribe_t *dst, const snd_seq_port_subscribe_t *src);
Packit Service db8eaa
Packit Service db8eaa
const snd_seq_addr_t *snd_seq_port_subscribe_get_sender(const snd_seq_port_subscribe_t *info);
Packit Service db8eaa
const snd_seq_addr_t *snd_seq_port_subscribe_get_dest(const snd_seq_port_subscribe_t *info);
Packit Service db8eaa
int snd_seq_port_subscribe_get_queue(const snd_seq_port_subscribe_t *info);
Packit Service db8eaa
int snd_seq_port_subscribe_get_exclusive(const snd_seq_port_subscribe_t *info);
Packit Service db8eaa
int snd_seq_port_subscribe_get_time_update(const snd_seq_port_subscribe_t *info);
Packit Service db8eaa
int snd_seq_port_subscribe_get_time_real(const snd_seq_port_subscribe_t *info);
Packit Service db8eaa
Packit Service db8eaa
void snd_seq_port_subscribe_set_sender(snd_seq_port_subscribe_t *info, const snd_seq_addr_t *addr);
Packit Service db8eaa
void snd_seq_port_subscribe_set_dest(snd_seq_port_subscribe_t *info, const snd_seq_addr_t *addr);
Packit Service db8eaa
void snd_seq_port_subscribe_set_queue(snd_seq_port_subscribe_t *info, int q);
Packit Service db8eaa
void snd_seq_port_subscribe_set_exclusive(snd_seq_port_subscribe_t *info, int val);
Packit Service db8eaa
void snd_seq_port_subscribe_set_time_update(snd_seq_port_subscribe_t *info, int val);
Packit Service db8eaa
void snd_seq_port_subscribe_set_time_real(snd_seq_port_subscribe_t *info, int val);
Packit Service db8eaa
Packit Service db8eaa
int snd_seq_get_port_subscription(snd_seq_t *handle, snd_seq_port_subscribe_t *sub);
Packit Service db8eaa
int snd_seq_subscribe_port(snd_seq_t *handle, snd_seq_port_subscribe_t *sub);
Packit Service db8eaa
int snd_seq_unsubscribe_port(snd_seq_t *handle, snd_seq_port_subscribe_t *sub);
Packit Service db8eaa
Packit Service db8eaa
/*
Packit Service db8eaa
 */
Packit Service db8eaa
Packit Service db8eaa
/** subscription query container */
Packit Service db8eaa
typedef struct _snd_seq_query_subscribe snd_seq_query_subscribe_t;
Packit Service db8eaa
Packit Service db8eaa
/** type of query subscription */
Packit Service db8eaa
typedef enum {
Packit Service db8eaa
	SND_SEQ_QUERY_SUBS_READ,	/**< query read subscriptions */
Packit Service db8eaa
	SND_SEQ_QUERY_SUBS_WRITE	/**< query write subscriptions */
Packit Service db8eaa
} snd_seq_query_subs_type_t;
Packit Service db8eaa
Packit Service db8eaa
size_t snd_seq_query_subscribe_sizeof(void);
Packit Service db8eaa
/** allocate a #snd_seq_query_subscribe_t container on stack */
Packit Service db8eaa
#define snd_seq_query_subscribe_alloca(ptr) \
Packit Service db8eaa
	__snd_alloca(ptr, snd_seq_query_subscribe)
Packit Service db8eaa
int snd_seq_query_subscribe_malloc(snd_seq_query_subscribe_t **ptr);
Packit Service db8eaa
void snd_seq_query_subscribe_free(snd_seq_query_subscribe_t *ptr);
Packit Service db8eaa
void snd_seq_query_subscribe_copy(snd_seq_query_subscribe_t *dst, const snd_seq_query_subscribe_t *src);
Packit Service db8eaa
Packit Service db8eaa
int snd_seq_query_subscribe_get_client(const snd_seq_query_subscribe_t *info);
Packit Service db8eaa
int snd_seq_query_subscribe_get_port(const snd_seq_query_subscribe_t *info);
Packit Service db8eaa
const snd_seq_addr_t *snd_seq_query_subscribe_get_root(const snd_seq_query_subscribe_t *info);
Packit Service db8eaa
snd_seq_query_subs_type_t snd_seq_query_subscribe_get_type(const snd_seq_query_subscribe_t *info);
Packit Service db8eaa
int snd_seq_query_subscribe_get_index(const snd_seq_query_subscribe_t *info);
Packit Service db8eaa
int snd_seq_query_subscribe_get_num_subs(const snd_seq_query_subscribe_t *info);
Packit Service db8eaa
const snd_seq_addr_t *snd_seq_query_subscribe_get_addr(const snd_seq_query_subscribe_t *info);
Packit Service db8eaa
int snd_seq_query_subscribe_get_queue(const snd_seq_query_subscribe_t *info);
Packit Service db8eaa
int snd_seq_query_subscribe_get_exclusive(const snd_seq_query_subscribe_t *info);
Packit Service db8eaa
int snd_seq_query_subscribe_get_time_update(const snd_seq_query_subscribe_t *info);
Packit Service db8eaa
int snd_seq_query_subscribe_get_time_real(const snd_seq_query_subscribe_t *info);
Packit Service db8eaa
Packit Service db8eaa
void snd_seq_query_subscribe_set_client(snd_seq_query_subscribe_t *info, int client);
Packit Service db8eaa
void snd_seq_query_subscribe_set_port(snd_seq_query_subscribe_t *info, int port);
Packit Service db8eaa
void snd_seq_query_subscribe_set_root(snd_seq_query_subscribe_t *info, const snd_seq_addr_t *addr);
Packit Service db8eaa
void snd_seq_query_subscribe_set_type(snd_seq_query_subscribe_t *info, snd_seq_query_subs_type_t type);
Packit Service db8eaa
void snd_seq_query_subscribe_set_index(snd_seq_query_subscribe_t *info, int _index);
Packit Service db8eaa
Packit Service db8eaa
int snd_seq_query_port_subscribers(snd_seq_t *seq, snd_seq_query_subscribe_t * subs);
Packit Service db8eaa
Packit Service db8eaa
/** \} */
Packit Service db8eaa
Packit Service db8eaa
Packit Service db8eaa
/**
Packit Service db8eaa
 *  \defgroup SeqQueue Sequencer Queue Interface
Packit Service db8eaa
 *  Sequencer Queue Interface
Packit Service db8eaa
 *  \ingroup Sequencer
Packit Service db8eaa
 *  \{
Packit Service db8eaa
 */
Packit Service db8eaa
Packit Service db8eaa
/** queue information container */
Packit Service db8eaa
typedef struct _snd_seq_queue_info snd_seq_queue_info_t;
Packit Service db8eaa
/** queue status container */
Packit Service db8eaa
typedef struct _snd_seq_queue_status snd_seq_queue_status_t;
Packit Service db8eaa
/** queue tempo container */
Packit Service db8eaa
typedef struct _snd_seq_queue_tempo snd_seq_queue_tempo_t;
Packit Service db8eaa
/** queue timer information container */
Packit Service db8eaa
typedef struct _snd_seq_queue_timer snd_seq_queue_timer_t;
Packit Service db8eaa
Packit Service db8eaa
/** special queue ids */
Packit Service db8eaa
#define SND_SEQ_QUEUE_DIRECT		253	/**< direct dispatch */
Packit Service db8eaa
Packit Service db8eaa
size_t snd_seq_queue_info_sizeof(void);
Packit Service db8eaa
/** allocate a #snd_seq_queue_info_t container on stack */
Packit Service db8eaa
#define snd_seq_queue_info_alloca(ptr) \
Packit Service db8eaa
	__snd_alloca(ptr, snd_seq_queue_info)
Packit Service db8eaa
int snd_seq_queue_info_malloc(snd_seq_queue_info_t **ptr);
Packit Service db8eaa
void snd_seq_queue_info_free(snd_seq_queue_info_t *ptr);
Packit Service db8eaa
void snd_seq_queue_info_copy(snd_seq_queue_info_t *dst, const snd_seq_queue_info_t *src);
Packit Service db8eaa
Packit Service db8eaa
int snd_seq_queue_info_get_queue(const snd_seq_queue_info_t *info);
Packit Service db8eaa
const char *snd_seq_queue_info_get_name(const snd_seq_queue_info_t *info);
Packit Service db8eaa
int snd_seq_queue_info_get_owner(const snd_seq_queue_info_t *info);
Packit Service db8eaa
int snd_seq_queue_info_get_locked(const snd_seq_queue_info_t *info);
Packit Service db8eaa
unsigned int snd_seq_queue_info_get_flags(const snd_seq_queue_info_t *info);
Packit Service db8eaa
Packit Service db8eaa
void snd_seq_queue_info_set_name(snd_seq_queue_info_t *info, const char *name);
Packit Service db8eaa
void snd_seq_queue_info_set_owner(snd_seq_queue_info_t *info, int owner);
Packit Service db8eaa
void snd_seq_queue_info_set_locked(snd_seq_queue_info_t *info, int locked);
Packit Service db8eaa
void snd_seq_queue_info_set_flags(snd_seq_queue_info_t *info, unsigned int flags);
Packit Service db8eaa
Packit Service db8eaa
int snd_seq_create_queue(snd_seq_t *seq, snd_seq_queue_info_t *info);
Packit Service db8eaa
int snd_seq_alloc_named_queue(snd_seq_t *seq, const char *name);
Packit Service db8eaa
int snd_seq_alloc_queue(snd_seq_t *handle);
Packit Service db8eaa
int snd_seq_free_queue(snd_seq_t *handle, int q);
Packit Service db8eaa
int snd_seq_get_queue_info(snd_seq_t *seq, int q, snd_seq_queue_info_t *info);
Packit Service db8eaa
int snd_seq_set_queue_info(snd_seq_t *seq, int q, snd_seq_queue_info_t *info);
Packit Service db8eaa
int snd_seq_query_named_queue(snd_seq_t *seq, const char *name);
Packit Service db8eaa
Packit Service db8eaa
int snd_seq_get_queue_usage(snd_seq_t *handle, int q);
Packit Service db8eaa
int snd_seq_set_queue_usage(snd_seq_t *handle, int q, int used);
Packit Service db8eaa
Packit Service db8eaa
/*
Packit Service db8eaa
 */
Packit Service db8eaa
size_t snd_seq_queue_status_sizeof(void);
Packit Service db8eaa
/** allocate a #snd_seq_queue_status_t container on stack */
Packit Service db8eaa
#define snd_seq_queue_status_alloca(ptr) \
Packit Service db8eaa
	__snd_alloca(ptr, snd_seq_queue_status)
Packit Service db8eaa
int snd_seq_queue_status_malloc(snd_seq_queue_status_t **ptr);
Packit Service db8eaa
void snd_seq_queue_status_free(snd_seq_queue_status_t *ptr);
Packit Service db8eaa
void snd_seq_queue_status_copy(snd_seq_queue_status_t *dst, const snd_seq_queue_status_t *src);
Packit Service db8eaa
Packit Service db8eaa
int snd_seq_queue_status_get_queue(const snd_seq_queue_status_t *info);
Packit Service db8eaa
int snd_seq_queue_status_get_events(const snd_seq_queue_status_t *info);
Packit Service db8eaa
snd_seq_tick_time_t snd_seq_queue_status_get_tick_time(const snd_seq_queue_status_t *info);
Packit Service db8eaa
const snd_seq_real_time_t *snd_seq_queue_status_get_real_time(const snd_seq_queue_status_t *info);
Packit Service db8eaa
unsigned int snd_seq_queue_status_get_status(const snd_seq_queue_status_t *info);
Packit Service db8eaa
Packit Service db8eaa
int snd_seq_get_queue_status(snd_seq_t *handle, int q, snd_seq_queue_status_t *status);
Packit Service db8eaa
Packit Service db8eaa
/*
Packit Service db8eaa
 */
Packit Service db8eaa
size_t snd_seq_queue_tempo_sizeof(void);
Packit Service db8eaa
/** allocate a #snd_seq_queue_tempo_t container on stack */
Packit Service db8eaa
#define snd_seq_queue_tempo_alloca(ptr) \
Packit Service db8eaa
	__snd_alloca(ptr, snd_seq_queue_tempo)
Packit Service db8eaa
int snd_seq_queue_tempo_malloc(snd_seq_queue_tempo_t **ptr);
Packit Service db8eaa
void snd_seq_queue_tempo_free(snd_seq_queue_tempo_t *ptr);
Packit Service db8eaa
void snd_seq_queue_tempo_copy(snd_seq_queue_tempo_t *dst, const snd_seq_queue_tempo_t *src);
Packit Service db8eaa
Packit Service db8eaa
int snd_seq_queue_tempo_get_queue(const snd_seq_queue_tempo_t *info);
Packit Service db8eaa
unsigned int snd_seq_queue_tempo_get_tempo(const snd_seq_queue_tempo_t *info);
Packit Service db8eaa
int snd_seq_queue_tempo_get_ppq(const snd_seq_queue_tempo_t *info);
Packit Service db8eaa
unsigned int snd_seq_queue_tempo_get_skew(const snd_seq_queue_tempo_t *info);
Packit Service db8eaa
unsigned int snd_seq_queue_tempo_get_skew_base(const snd_seq_queue_tempo_t *info);
Packit Service db8eaa
void snd_seq_queue_tempo_set_tempo(snd_seq_queue_tempo_t *info, unsigned int tempo);
Packit Service db8eaa
void snd_seq_queue_tempo_set_ppq(snd_seq_queue_tempo_t *info, int ppq);
Packit Service db8eaa
void snd_seq_queue_tempo_set_skew(snd_seq_queue_tempo_t *info, unsigned int skew);
Packit Service db8eaa
void snd_seq_queue_tempo_set_skew_base(snd_seq_queue_tempo_t *info, unsigned int base);
Packit Service db8eaa
Packit Service db8eaa
int snd_seq_get_queue_tempo(snd_seq_t *handle, int q, snd_seq_queue_tempo_t *tempo);
Packit Service db8eaa
int snd_seq_set_queue_tempo(snd_seq_t *handle, int q, snd_seq_queue_tempo_t *tempo);
Packit Service db8eaa
Packit Service db8eaa
/*
Packit Service db8eaa
 */
Packit Service db8eaa
Packit Service db8eaa
/** sequencer timer sources */
Packit Service db8eaa
typedef enum {
Packit Service db8eaa
	SND_SEQ_TIMER_ALSA = 0,		/* ALSA timer */
Packit Service db8eaa
	SND_SEQ_TIMER_MIDI_CLOCK = 1,	/* Midi Clock (CLOCK event) */
Packit Service db8eaa
	SND_SEQ_TIMER_MIDI_TICK = 2	/* Midi Timer Tick (TICK event */
Packit Service db8eaa
} snd_seq_queue_timer_type_t;
Packit Service db8eaa
Packit Service db8eaa
size_t snd_seq_queue_timer_sizeof(void);
Packit Service db8eaa
/** allocate a #snd_seq_queue_timer_t container on stack */
Packit Service db8eaa
#define snd_seq_queue_timer_alloca(ptr) \
Packit Service db8eaa
	__snd_alloca(ptr, snd_seq_queue_timer)
Packit Service db8eaa
int snd_seq_queue_timer_malloc(snd_seq_queue_timer_t **ptr);
Packit Service db8eaa
void snd_seq_queue_timer_free(snd_seq_queue_timer_t *ptr);
Packit Service db8eaa
void snd_seq_queue_timer_copy(snd_seq_queue_timer_t *dst, const snd_seq_queue_timer_t *src);
Packit Service db8eaa
Packit Service db8eaa
int snd_seq_queue_timer_get_queue(const snd_seq_queue_timer_t *info);
Packit Service db8eaa
snd_seq_queue_timer_type_t snd_seq_queue_timer_get_type(const snd_seq_queue_timer_t *info);
Packit Service db8eaa
const snd_timer_id_t *snd_seq_queue_timer_get_id(const snd_seq_queue_timer_t *info);
Packit Service db8eaa
unsigned int snd_seq_queue_timer_get_resolution(const snd_seq_queue_timer_t *info);
Packit Service db8eaa
Packit Service db8eaa
void snd_seq_queue_timer_set_type(snd_seq_queue_timer_t *info, snd_seq_queue_timer_type_t type);
Packit Service db8eaa
void snd_seq_queue_timer_set_id(snd_seq_queue_timer_t *info, const snd_timer_id_t *id);
Packit Service db8eaa
void snd_seq_queue_timer_set_resolution(snd_seq_queue_timer_t *info, unsigned int resolution);
Packit Service db8eaa
Packit Service db8eaa
int snd_seq_get_queue_timer(snd_seq_t *handle, int q, snd_seq_queue_timer_t *timer);
Packit Service db8eaa
int snd_seq_set_queue_timer(snd_seq_t *handle, int q, snd_seq_queue_timer_t *timer);
Packit Service db8eaa
Packit Service db8eaa
/** \} */
Packit Service db8eaa
Packit Service db8eaa
/**
Packit Service db8eaa
 *  \defgroup SeqEvent Sequencer Event API
Packit Service db8eaa
 *  Sequencer Event API
Packit Service db8eaa
 *  \ingroup Sequencer
Packit Service db8eaa
 *  \{
Packit Service db8eaa
 */
Packit Service db8eaa
Packit Service db8eaa
int snd_seq_free_event(snd_seq_event_t *ev);
Packit Service db8eaa
ssize_t snd_seq_event_length(snd_seq_event_t *ev);
Packit Service db8eaa
int snd_seq_event_output(snd_seq_t *handle, snd_seq_event_t *ev);
Packit Service db8eaa
int snd_seq_event_output_buffer(snd_seq_t *handle, snd_seq_event_t *ev);
Packit Service db8eaa
int snd_seq_event_output_direct(snd_seq_t *handle, snd_seq_event_t *ev);
Packit Service db8eaa
int snd_seq_event_input(snd_seq_t *handle, snd_seq_event_t **ev);
Packit Service db8eaa
int snd_seq_event_input_pending(snd_seq_t *seq, int fetch_sequencer);
Packit Service db8eaa
int snd_seq_drain_output(snd_seq_t *handle);
Packit Service db8eaa
int snd_seq_event_output_pending(snd_seq_t *seq);
Packit Service db8eaa
int snd_seq_extract_output(snd_seq_t *handle, snd_seq_event_t **ev);
Packit Service db8eaa
int snd_seq_drop_output(snd_seq_t *handle);
Packit Service db8eaa
int snd_seq_drop_output_buffer(snd_seq_t *handle);
Packit Service db8eaa
int snd_seq_drop_input(snd_seq_t *handle);
Packit Service db8eaa
int snd_seq_drop_input_buffer(snd_seq_t *handle);
Packit Service db8eaa
Packit Service db8eaa
/** event removal conditionals */
Packit Service db8eaa
typedef struct _snd_seq_remove_events snd_seq_remove_events_t;
Packit Service db8eaa
Packit Service db8eaa
/** Remove conditional flags */
Packit Service db8eaa
#define SND_SEQ_REMOVE_INPUT		(1<<0)	/**< Flush input queues */
Packit Service db8eaa
#define SND_SEQ_REMOVE_OUTPUT		(1<<1)	/**< Flush output queues */
Packit Service db8eaa
#define SND_SEQ_REMOVE_DEST		(1<<2)	/**< Restrict by destination q:client:port */
Packit Service db8eaa
#define SND_SEQ_REMOVE_DEST_CHANNEL	(1<<3)	/**< Restrict by channel */
Packit Service db8eaa
#define SND_SEQ_REMOVE_TIME_BEFORE	(1<<4)	/**< Restrict to before time */
Packit Service db8eaa
#define SND_SEQ_REMOVE_TIME_AFTER	(1<<5)	/**< Restrict to time or after */
Packit Service db8eaa
#define SND_SEQ_REMOVE_TIME_TICK	(1<<6)	/**< Time is in ticks */
Packit Service db8eaa
#define SND_SEQ_REMOVE_EVENT_TYPE	(1<<7)	/**< Restrict to event type */
Packit Service db8eaa
#define SND_SEQ_REMOVE_IGNORE_OFF 	(1<<8)	/**< Do not flush off events */
Packit Service db8eaa
#define SND_SEQ_REMOVE_TAG_MATCH 	(1<<9)	/**< Restrict to events with given tag */
Packit Service db8eaa
Packit Service db8eaa
size_t snd_seq_remove_events_sizeof(void);
Packit Service db8eaa
/** allocate a #snd_seq_remove_events_t container on stack */
Packit Service db8eaa
#define snd_seq_remove_events_alloca(ptr) \
Packit Service db8eaa
	__snd_alloca(ptr, snd_seq_remove_events)
Packit Service db8eaa
int snd_seq_remove_events_malloc(snd_seq_remove_events_t **ptr);
Packit Service db8eaa
void snd_seq_remove_events_free(snd_seq_remove_events_t *ptr);
Packit Service db8eaa
void snd_seq_remove_events_copy(snd_seq_remove_events_t *dst, const snd_seq_remove_events_t *src);
Packit Service db8eaa
Packit Service db8eaa
unsigned int snd_seq_remove_events_get_condition(const snd_seq_remove_events_t *info);
Packit Service db8eaa
int snd_seq_remove_events_get_queue(const snd_seq_remove_events_t *info);
Packit Service db8eaa
const snd_seq_timestamp_t *snd_seq_remove_events_get_time(const snd_seq_remove_events_t *info);
Packit Service db8eaa
const snd_seq_addr_t *snd_seq_remove_events_get_dest(const snd_seq_remove_events_t *info);
Packit Service db8eaa
int snd_seq_remove_events_get_channel(const snd_seq_remove_events_t *info);
Packit Service db8eaa
int snd_seq_remove_events_get_event_type(const snd_seq_remove_events_t *info);
Packit Service db8eaa
int snd_seq_remove_events_get_tag(const snd_seq_remove_events_t *info);
Packit Service db8eaa
Packit Service db8eaa
void snd_seq_remove_events_set_condition(snd_seq_remove_events_t *info, unsigned int flags);
Packit Service db8eaa
void snd_seq_remove_events_set_queue(snd_seq_remove_events_t *info, int queue);
Packit Service db8eaa
void snd_seq_remove_events_set_time(snd_seq_remove_events_t *info, const snd_seq_timestamp_t *time);
Packit Service db8eaa
void snd_seq_remove_events_set_dest(snd_seq_remove_events_t *info, const snd_seq_addr_t *addr);
Packit Service db8eaa
void snd_seq_remove_events_set_channel(snd_seq_remove_events_t *info, int channel);
Packit Service db8eaa
void snd_seq_remove_events_set_event_type(snd_seq_remove_events_t *info, int type);
Packit Service db8eaa
void snd_seq_remove_events_set_tag(snd_seq_remove_events_t *info, int tag);
Packit Service db8eaa
Packit Service db8eaa
int snd_seq_remove_events(snd_seq_t *handle, snd_seq_remove_events_t *info);
Packit Service db8eaa
Packit Service db8eaa
/** \} */
Packit Service db8eaa
Packit Service db8eaa
/**
Packit Service db8eaa
 *  \defgroup SeqMisc Sequencer Miscellaneous
Packit Service db8eaa
 *  Sequencer Miscellaneous
Packit Service db8eaa
 *  \ingroup Sequencer
Packit Service db8eaa
 *  \{
Packit Service db8eaa
 */
Packit Service db8eaa
Packit Service db8eaa
void snd_seq_set_bit(int nr, void *array);
Packit Service db8eaa
void snd_seq_unset_bit(int nr, void *array);
Packit Service db8eaa
int snd_seq_change_bit(int nr, void *array);
Packit Service db8eaa
int snd_seq_get_bit(int nr, void *array);
Packit Service db8eaa
Packit Service db8eaa
/** \} */
Packit Service db8eaa
Packit Service db8eaa
Packit Service db8eaa
/**
Packit Service db8eaa
 *  \defgroup SeqEvType Sequencer Event Type Checks
Packit Service db8eaa
 *  Sequencer Event Type Checks
Packit Service db8eaa
 *  \ingroup Sequencer
Packit Service db8eaa
 *  \{
Packit Service db8eaa
 */
Packit Service db8eaa
Packit Service db8eaa
/* event type macros */
Packit Service db8eaa
enum {
Packit Service db8eaa
	SND_SEQ_EVFLG_RESULT,
Packit Service db8eaa
	SND_SEQ_EVFLG_NOTE,
Packit Service db8eaa
	SND_SEQ_EVFLG_CONTROL,
Packit Service db8eaa
	SND_SEQ_EVFLG_QUEUE,
Packit Service db8eaa
	SND_SEQ_EVFLG_SYSTEM,
Packit Service db8eaa
	SND_SEQ_EVFLG_MESSAGE,
Packit Service db8eaa
	SND_SEQ_EVFLG_CONNECTION,
Packit Service db8eaa
	SND_SEQ_EVFLG_SAMPLE,
Packit Service db8eaa
	SND_SEQ_EVFLG_USERS,
Packit Service db8eaa
	SND_SEQ_EVFLG_INSTR,
Packit Service db8eaa
	SND_SEQ_EVFLG_QUOTE,
Packit Service db8eaa
	SND_SEQ_EVFLG_NONE,
Packit Service db8eaa
	SND_SEQ_EVFLG_RAW,
Packit Service db8eaa
	SND_SEQ_EVFLG_FIXED,
Packit Service db8eaa
	SND_SEQ_EVFLG_VARIABLE,
Packit Service db8eaa
	SND_SEQ_EVFLG_VARUSR
Packit Service db8eaa
};
Packit Service db8eaa
Packit Service db8eaa
enum {
Packit Service db8eaa
	SND_SEQ_EVFLG_NOTE_ONEARG,
Packit Service db8eaa
	SND_SEQ_EVFLG_NOTE_TWOARG
Packit Service db8eaa
};
Packit Service db8eaa
Packit Service db8eaa
enum {
Packit Service db8eaa
	SND_SEQ_EVFLG_QUEUE_NOARG,
Packit Service db8eaa
	SND_SEQ_EVFLG_QUEUE_TICK,
Packit Service db8eaa
	SND_SEQ_EVFLG_QUEUE_TIME,
Packit Service db8eaa
	SND_SEQ_EVFLG_QUEUE_VALUE
Packit Service db8eaa
};
Packit Service db8eaa
Packit Service db8eaa
/**
Packit Service db8eaa
 * Exported event type table
Packit Service db8eaa
 *
Packit Service db8eaa
 * This table is referred by snd_seq_ev_is_xxx.
Packit Service db8eaa
 */
Packit Service db8eaa
extern const unsigned int snd_seq_event_types[];
Packit Service db8eaa
Packit Service db8eaa
#define _SND_SEQ_TYPE(x)	(1<<(x))	/**< master type - 24bit */
Packit Service db8eaa
#define _SND_SEQ_TYPE_OPT(x)	((x)<<24)	/**< optional type - 8bit */
Packit Service db8eaa
Packit Service db8eaa
/** check the event type */
Packit Service db8eaa
#define snd_seq_type_check(ev,x) (snd_seq_event_types[(ev)->type] & _SND_SEQ_TYPE(x))
Packit Service db8eaa
Packit Service db8eaa
/** event type check: result events */
Packit Service db8eaa
#define snd_seq_ev_is_result_type(ev) \
Packit Service db8eaa
	snd_seq_type_check(ev, SND_SEQ_EVFLG_RESULT)
Packit Service db8eaa
/** event type check: note events */
Packit Service db8eaa
#define snd_seq_ev_is_note_type(ev) \
Packit Service db8eaa
	snd_seq_type_check(ev, SND_SEQ_EVFLG_NOTE)
Packit Service db8eaa
/** event type check: control events */
Packit Service db8eaa
#define snd_seq_ev_is_control_type(ev) \
Packit Service db8eaa
	snd_seq_type_check(ev, SND_SEQ_EVFLG_CONTROL)
Packit Service db8eaa
/** event type check: channel specific events */
Packit Service db8eaa
#define snd_seq_ev_is_channel_type(ev) \
Packit Service db8eaa
	(snd_seq_event_types[(ev)->type] & (_SND_SEQ_TYPE(SND_SEQ_EVFLG_NOTE) | _SND_SEQ_TYPE(SND_SEQ_EVFLG_CONTROL)))
Packit Service db8eaa
Packit Service db8eaa
/** event type check: queue control events */
Packit Service db8eaa
#define snd_seq_ev_is_queue_type(ev) \
Packit Service db8eaa
	snd_seq_type_check(ev, SND_SEQ_EVFLG_QUEUE)
Packit Service db8eaa
/** event type check: system status messages */
Packit Service db8eaa
#define snd_seq_ev_is_message_type(ev) \
Packit Service db8eaa
	snd_seq_type_check(ev, SND_SEQ_EVFLG_MESSAGE)
Packit Service db8eaa
/** event type check: system status messages */
Packit Service db8eaa
#define snd_seq_ev_is_subscribe_type(ev) \
Packit Service db8eaa
	snd_seq_type_check(ev, SND_SEQ_EVFLG_CONNECTION)
Packit Service db8eaa
/** event type check: sample messages */
Packit Service db8eaa
#define snd_seq_ev_is_sample_type(ev) \
Packit Service db8eaa
	snd_seq_type_check(ev, SND_SEQ_EVFLG_SAMPLE)
Packit Service db8eaa
/** event type check: user-defined messages */
Packit Service db8eaa
#define snd_seq_ev_is_user_type(ev) \
Packit Service db8eaa
	snd_seq_type_check(ev, SND_SEQ_EVFLG_USERS)
Packit Service db8eaa
/** event type check: instrument layer events */
Packit Service db8eaa
#define snd_seq_ev_is_instr_type(ev) \
Packit Service db8eaa
	snd_seq_type_check(ev, SND_SEQ_EVFLG_INSTR)
Packit Service db8eaa
/** event type check: fixed length events */
Packit Service db8eaa
#define snd_seq_ev_is_fixed_type(ev) \
Packit Service db8eaa
	snd_seq_type_check(ev, SND_SEQ_EVFLG_FIXED)
Packit Service db8eaa
/** event type check: variable length events */
Packit Service db8eaa
#define snd_seq_ev_is_variable_type(ev)	\
Packit Service db8eaa
	snd_seq_type_check(ev, SND_SEQ_EVFLG_VARIABLE)
Packit Service db8eaa
/** event type check: user pointer events */
Packit Service db8eaa
#define snd_seq_ev_is_varusr_type(ev) \
Packit Service db8eaa
	snd_seq_type_check(ev, SND_SEQ_EVFLG_VARUSR)
Packit Service db8eaa
/** event type check: reserved for kernel */
Packit Service db8eaa
#define snd_seq_ev_is_reserved(ev) \
Packit Service db8eaa
	(! snd_seq_event_types[(ev)->type])
Packit Service db8eaa
Packit Service db8eaa
/**
Packit Service db8eaa
 * macros to check event flags
Packit Service db8eaa
 */
Packit Service db8eaa
/** prior events */
Packit Service db8eaa
#define snd_seq_ev_is_prior(ev)	\
Packit Service db8eaa
	(((ev)->flags & SND_SEQ_PRIORITY_MASK) == SND_SEQ_PRIORITY_HIGH)
Packit Service db8eaa
Packit Service db8eaa
/** get the data length type */
Packit Service db8eaa
#define snd_seq_ev_length_type(ev) \
Packit Service db8eaa
	((ev)->flags & SND_SEQ_EVENT_LENGTH_MASK)
Packit Service db8eaa
/** fixed length events */
Packit Service db8eaa
#define snd_seq_ev_is_fixed(ev)	\
Packit Service db8eaa
	(snd_seq_ev_length_type(ev) == SND_SEQ_EVENT_LENGTH_FIXED)
Packit Service db8eaa
/** variable length events */
Packit Service db8eaa
#define snd_seq_ev_is_variable(ev) \
Packit Service db8eaa
	(snd_seq_ev_length_type(ev) == SND_SEQ_EVENT_LENGTH_VARIABLE)
Packit Service db8eaa
/** variable length on user-space */
Packit Service db8eaa
#define snd_seq_ev_is_varusr(ev) \
Packit Service db8eaa
	(snd_seq_ev_length_type(ev) == SND_SEQ_EVENT_LENGTH_VARUSR)
Packit Service db8eaa
Packit Service db8eaa
/** time-stamp type */
Packit Service db8eaa
#define snd_seq_ev_timestamp_type(ev) \
Packit Service db8eaa
	((ev)->flags & SND_SEQ_TIME_STAMP_MASK)
Packit Service db8eaa
/** event is in tick time */
Packit Service db8eaa
#define snd_seq_ev_is_tick(ev) \
Packit Service db8eaa
	(snd_seq_ev_timestamp_type(ev) == SND_SEQ_TIME_STAMP_TICK)
Packit Service db8eaa
/** event is in real-time */
Packit Service db8eaa
#define snd_seq_ev_is_real(ev) \
Packit Service db8eaa
	(snd_seq_ev_timestamp_type(ev) == SND_SEQ_TIME_STAMP_REAL)
Packit Service db8eaa
Packit Service db8eaa
/** time-mode type */
Packit Service db8eaa
#define snd_seq_ev_timemode_type(ev) \
Packit Service db8eaa
	((ev)->flags & SND_SEQ_TIME_MODE_MASK)
Packit Service db8eaa
/** scheduled in absolute time */
Packit Service db8eaa
#define snd_seq_ev_is_abstime(ev) \
Packit Service db8eaa
	(snd_seq_ev_timemode_type(ev) == SND_SEQ_TIME_MODE_ABS)
Packit Service db8eaa
/** scheduled in relative time */
Packit Service db8eaa
#define snd_seq_ev_is_reltime(ev) \
Packit Service db8eaa
	(snd_seq_ev_timemode_type(ev) == SND_SEQ_TIME_MODE_REL)
Packit Service db8eaa
Packit Service db8eaa
/** direct dispatched events */
Packit Service db8eaa
#define snd_seq_ev_is_direct(ev) \
Packit Service db8eaa
	((ev)->queue == SND_SEQ_QUEUE_DIRECT)
Packit Service db8eaa
Packit Service db8eaa
/** \} */
Packit Service db8eaa
Packit Service db8eaa
#ifdef __cplusplus
Packit Service db8eaa
}
Packit Service db8eaa
#endif
Packit Service db8eaa
Packit Service db8eaa
#endif /* __ALSA_SEQ_H */
Packit Service db8eaa