📄 asequenc.h
字号:
/* misc. conditioning flags */#define SNDRV_SEQ_PORT_FLG_GIVEN_PORT (1<<0)#define SNDRV_SEQ_PORT_FLG_TIMESTAMP (1<<1)#define SNDRV_SEQ_PORT_FLG_TIME_REAL (1<<2)struct sndrv_seq_port_info { struct sndrv_seq_addr addr; /* client/port numbers */ char name[64]; /* port name */ unsigned int capability; /* port capability bits */ unsigned int type; /* port type bits */ int midi_channels; /* channels per MIDI port */ int midi_voices; /* voices per MIDI port */ int synth_voices; /* voices per SYNTH port */ int read_use; /* R/O: subscribers for output (from this port) */ int write_use; /* R/O: subscribers for input (to this port) */ void *kernel; /* reserved for kernel use (must be NULL) */ unsigned int flags; /* misc. conditioning */ unsigned char time_queue; /* queue # for timestamping */ char reserved[59]; /* for future use */};/* queue flags */#define SNDRV_SEQ_QUEUE_FLG_SYNC (1<<0) /* sync enabled *//* queue information */struct sndrv_seq_queue_info { int queue; /* queue id */ /* * security settings, only owner of this queue can start/stop timer * etc. if the queue is locked for other clients */ int owner; /* client id for owner of the queue */ int locked:1; /* timing queue locked for other queues */ char name[64]; /* name of this queue */ unsigned int flags; /* flags */ char reserved[60]; /* for future use */};/* queue info/status */struct sndrv_seq_queue_status { int queue; /* queue id */ int events; /* read-only - queue size */ sndrv_seq_tick_time_t tick; /* current tick */ struct sndrv_seq_real_time time; /* current time */ int running; /* running state of queue */ int flags; /* various flags */ char reserved[64]; /* for the future */};/* queue tempo */struct sndrv_seq_queue_tempo { int queue; /* sequencer queue */ unsigned int tempo; /* current tempo, us/tick */ int ppq; /* time resolution, ticks/quarter */ unsigned int skew_value; /* queue skew */ unsigned int skew_base; /* queue skew base */ char reserved[24]; /* for the future */};/* sequencer timer sources */#define SNDRV_SEQ_TIMER_ALSA 0 /* ALSA timer */#define SNDRV_SEQ_TIMER_MIDI_CLOCK 1 /* Midi Clock (CLOCK event) */#define SNDRV_SEQ_TIMER_MIDI_TICK 2 /* Midi Timer Tick (TICK event) *//* queue timer info */struct sndrv_seq_queue_timer { int queue; /* sequencer queue */ int type; /* source timer type */ union { struct { struct sndrv_timer_id id; /* ALSA's timer ID */ unsigned int resolution; /* resolution in Hz */ } alsa; } u; char reserved[64]; /* for the future use */};struct sndrv_seq_queue_client { int queue; /* sequencer queue */ int client; /* sequencer client */ int used; /* queue is used with this client (must be set for accepting events) */ /* per client watermarks */ char reserved[64]; /* for future use */};#define SNDRV_SEQ_PORT_SUBS_EXCLUSIVE (1<<0) /* exclusive connection */#define SNDRV_SEQ_PORT_SUBS_TIMESTAMP (1<<1)#define SNDRV_SEQ_PORT_SUBS_TIME_REAL (1<<2)struct sndrv_seq_port_subscribe { struct sndrv_seq_addr sender; /* sender address */ struct sndrv_seq_addr dest; /* destination address */ unsigned int voices; /* number of voices to be allocated (0 = don't care) */ unsigned int flags; /* modes */ unsigned char queue; /* input time-stamp queue (optional) */ unsigned char pad[3]; /* reserved */ char reserved[64];};/* type of query subscription */#define SNDRV_SEQ_QUERY_SUBS_READ 0#define SNDRV_SEQ_QUERY_SUBS_WRITE 1struct sndrv_seq_query_subs { struct sndrv_seq_addr root; /* client/port id to be searched */ int type; /* READ or WRITE */ int index; /* 0..N-1 */ int num_subs; /* R/O: number of subscriptions on this port */ struct sndrv_seq_addr addr; /* R/O: result */ unsigned char queue; /* R/O: result */ unsigned int flags; /* R/O: result */ char reserved[64]; /* for future use */};/* * Instrument abstraction layer * - based on events *//* instrument types */#define SNDRV_SEQ_INSTR_ATYPE_DATA 0 /* instrument data */#define SNDRV_SEQ_INSTR_ATYPE_ALIAS 1 /* instrument alias *//* instrument ASCII identifiers */#define SNDRV_SEQ_INSTR_ID_DLS1 "DLS1"#define SNDRV_SEQ_INSTR_ID_DLS2 "DLS2"#define SNDRV_SEQ_INSTR_ID_SIMPLE "Simple Wave"#define SNDRV_SEQ_INSTR_ID_SOUNDFONT "SoundFont"#define SNDRV_SEQ_INSTR_ID_GUS_PATCH "GUS Patch"#define SNDRV_SEQ_INSTR_ID_INTERWAVE "InterWave FFFF"#define SNDRV_SEQ_INSTR_ID_OPL2_3 "OPL2/3 FM"#define SNDRV_SEQ_INSTR_ID_OPL4 "OPL4"/* instrument types */#define SNDRV_SEQ_INSTR_TYPE0_DLS1 (1<<0) /* MIDI DLS v1 */#define SNDRV_SEQ_INSTR_TYPE0_DLS2 (1<<1) /* MIDI DLS v2 */#define SNDRV_SEQ_INSTR_TYPE1_SIMPLE (1<<0) /* Simple Wave */#define SNDRV_SEQ_INSTR_TYPE1_SOUNDFONT (1<<1) /* EMU SoundFont */#define SNDRV_SEQ_INSTR_TYPE1_GUS_PATCH (1<<2) /* Gravis UltraSound Patch */#define SNDRV_SEQ_INSTR_TYPE1_INTERWAVE (1<<3) /* InterWave FFFF */#define SNDRV_SEQ_INSTR_TYPE2_OPL2_3 (1<<0) /* Yamaha OPL2/3 FM */#define SNDRV_SEQ_INSTR_TYPE2_OPL4 (1<<1) /* Yamaha OPL4 *//* put commands */#define SNDRV_SEQ_INSTR_PUT_CMD_CREATE 0#define SNDRV_SEQ_INSTR_PUT_CMD_REPLACE 1#define SNDRV_SEQ_INSTR_PUT_CMD_MODIFY 2#define SNDRV_SEQ_INSTR_PUT_CMD_ADD 3#define SNDRV_SEQ_INSTR_PUT_CMD_REMOVE 4/* get commands */#define SNDRV_SEQ_INSTR_GET_CMD_FULL 0#define SNDRV_SEQ_INSTR_GET_CMD_PARTIAL 1/* query flags */#define SNDRV_SEQ_INSTR_QUERY_FOLLOW_ALIAS (1<<0)/* free commands */#define SNDRV_SEQ_INSTR_FREE_CMD_ALL 0#define SNDRV_SEQ_INSTR_FREE_CMD_PRIVATE 1#define SNDRV_SEQ_INSTR_FREE_CMD_CLUSTER 2#define SNDRV_SEQ_INSTR_FREE_CMD_SINGLE 3/* size of ROM/RAM */typedef unsigned int sndrv_seq_instr_size_t;/* INSTR_INFO */struct sndrv_seq_instr_info { int result; /* operation result */ unsigned int formats[8]; /* bitmap of supported formats */ int ram_count; /* count of RAM banks */ sndrv_seq_instr_size_t ram_sizes[16]; /* size of RAM banks */ int rom_count; /* count of ROM banks */ sndrv_seq_instr_size_t rom_sizes[8]; /* size of ROM banks */ char reserved[128];};/* INSTR_STATUS */struct sndrv_seq_instr_status { int result; /* operation result */ sndrv_seq_instr_size_t free_ram[16]; /* free RAM in banks */ int instrument_count; /* count of downloaded instruments */ char reserved[128];};/* INSTR_FORMAT_INFO */struct sndrv_seq_instr_format_info { char format[16]; /* format identifier - SNDRV_SEQ_INSTR_ID_* */ unsigned int len; /* max data length (without this structure) */};struct sndrv_seq_instr_format_info_result { int result; /* operation result */ char format[16]; /* format identifier */ unsigned int len; /* filled data length (without this structure) */};/* instrument data */struct sndrv_seq_instr_data { char name[32]; /* instrument name */ char reserved[16]; /* for the future use */ int type; /* instrument type */ union { char format[16]; /* format identifier */ struct sndrv_seq_instr alias; } data;};/* INSTR_PUT/GET, data are stored in one block (extended), header + data */struct sndrv_seq_instr_header { union { struct sndrv_seq_instr instr; sndrv_seq_instr_cluster_t cluster; } id; /* instrument identifier */ unsigned int cmd; /* get/put/free command */ unsigned int flags; /* query flags (only for get) */ unsigned int len; /* real instrument data length (without header) */ int result; /* operation result */ char reserved[16]; /* for the future */ struct sndrv_seq_instr_data data; /* instrument data (for put/get result) */};/* INSTR_CLUSTER_SET */struct sndrv_seq_instr_cluster_set { sndrv_seq_instr_cluster_t cluster; /* cluster identifier */ char name[32]; /* cluster name */ int priority; /* cluster priority */ char reserved[64]; /* for the future use */};/* INSTR_CLUSTER_GET */struct sndrv_seq_instr_cluster_get { sndrv_seq_instr_cluster_t cluster; /* cluster identifier */ char name[32]; /* cluster name */ int priority; /* cluster priority */ char reserved[64]; /* for the future use */};/* * IOCTL commands */#define SNDRV_SEQ_IOCTL_PVERSION _IOR ('S', 0x00, int)#define SNDRV_SEQ_IOCTL_CLIENT_ID _IOR ('S', 0x01, int)#define SNDRV_SEQ_IOCTL_SYSTEM_INFO _IOWR('S', 0x02, struct sndrv_seq_system_info)#define SNDRV_SEQ_IOCTL_RUNNING_MODE _IOWR('S', 0x03, struct sndrv_seq_running_info)#define SNDRV_SEQ_IOCTL_GET_CLIENT_INFO _IOWR('S', 0x10, struct sndrv_seq_client_info)#define SNDRV_SEQ_IOCTL_SET_CLIENT_INFO _IOW ('S', 0x11, struct sndrv_seq_client_info)#define SNDRV_SEQ_IOCTL_CREATE_PORT _IOWR('S', 0x20, struct sndrv_seq_port_info)#define SNDRV_SEQ_IOCTL_DELETE_PORT _IOW ('S', 0x21, struct sndrv_seq_port_info)#define SNDRV_SEQ_IOCTL_GET_PORT_INFO _IOWR('S', 0x22, struct sndrv_seq_port_info)#define SNDRV_SEQ_IOCTL_SET_PORT_INFO _IOW ('S', 0x23, struct sndrv_seq_port_info)#define SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT _IOW ('S', 0x30, struct sndrv_seq_port_subscribe)#define SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT _IOW ('S', 0x31, struct sndrv_seq_port_subscribe)#define SNDRV_SEQ_IOCTL_CREATE_QUEUE _IOWR('S', 0x32, struct sndrv_seq_queue_info)#define SNDRV_SEQ_IOCTL_DELETE_QUEUE _IOW ('S', 0x33, struct sndrv_seq_queue_info)#define SNDRV_SEQ_IOCTL_GET_QUEUE_INFO _IOWR('S', 0x34, struct sndrv_seq_queue_info)#define SNDRV_SEQ_IOCTL_SET_QUEUE_INFO _IOWR('S', 0x35, struct sndrv_seq_queue_info)#define SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE _IOWR('S', 0x36, struct sndrv_seq_queue_info)#define SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS _IOWR('S', 0x40, struct sndrv_seq_queue_status)#define SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO _IOWR('S', 0x41, struct sndrv_seq_queue_tempo)#define SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO _IOW ('S', 0x42, struct sndrv_seq_queue_tempo)#define SNDRV_SEQ_IOCTL_GET_QUEUE_OWNER _IOWR('S', 0x43, struct sndrv_seq_queue_owner)#define SNDRV_SEQ_IOCTL_SET_QUEUE_OWNER _IOW ('S', 0x44, struct sndrv_seq_queue_owner)#define SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER _IOWR('S', 0x45, struct sndrv_seq_queue_timer)#define SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER _IOW ('S', 0x46, struct sndrv_seq_queue_timer)/* XXX#define SNDRV_SEQ_IOCTL_GET_QUEUE_SYNC _IOWR('S', 0x53, struct sndrv_seq_queue_sync)#define SNDRV_SEQ_IOCTL_SET_QUEUE_SYNC _IOW ('S', 0x54, struct sndrv_seq_queue_sync)*/#define SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT _IOWR('S', 0x49, struct sndrv_seq_queue_client)#define SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT _IOW ('S', 0x4a, struct sndrv_seq_queue_client)#define SNDRV_SEQ_IOCTL_GET_CLIENT_POOL _IOWR('S', 0x4b, struct sndrv_seq_client_pool)#define SNDRV_SEQ_IOCTL_SET_CLIENT_POOL _IOW ('S', 0x4c, struct sndrv_seq_client_pool)#define SNDRV_SEQ_IOCTL_REMOVE_EVENTS _IOW ('S', 0x4e, struct sndrv_seq_remove_events)#define SNDRV_SEQ_IOCTL_QUERY_SUBS _IOWR('S', 0x4f, struct sndrv_seq_query_subs)#define SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION _IOWR('S', 0x50, struct sndrv_seq_port_subscribe)#define SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT _IOWR('S', 0x51, struct sndrv_seq_client_info)#define SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT _IOWR('S', 0x52, struct sndrv_seq_port_info)#endif /* __SOUND_ASEQUENCER_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -