⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 asequencer.h

📁 unxi下共享内存的使用
💻 H
📖 第 1 页 / 共 3 页
字号:
typedef snd_seq_queue_info_t snd_seq_queue_owner_t; /* alias *//* queue flags */#ifdef use_seqsync#define SND_SEQ_QUEUE_FLG_SYNC_LOST	(1<<0)	/* synchronization was lost */#endif/* queue info/status */typedef struct {	int queue;			/* queue id */	int events;			/* read-only - queue size */	snd_seq_tick_time_t tick;	/* current tick */	snd_seq_real_time_t time;	/* current time */				int running;			/* running state of queue */			int flags;			/* various flags */	char reserved[64];		/* for the future */} snd_seq_queue_status_t;/* queue tempo */typedef struct {	int queue;			/* sequencer queue */	unsigned int tempo;		/* current tempo, us/tick */	int ppq;			/* time resolution, ticks/quarter */	char reserved[32];		/* for the future */} snd_seq_queue_tempo_t;/* sequencer timer sources */#define SND_SEQ_TIMER_MASTER		0	/* master timer */#define SND_SEQ_TIMER_SLAVE		1	/* slave timer */#define SND_SEQ_TIMER_MIDI_CLOCK	2	/* Midi Clock (CLOCK event) */#define SND_SEQ_TIMER_MIDI_TICK		3	/* Midi Timer Tick (TICK event) *//* queue timer info */typedef struct {	int queue;			/* sequencer queue */	/* source timer selection */	int type;			/* timer type */	int slave;			/* timer slave type */	int number;			/* timer number/identification */	int resolution;			/* timer resolution in Hz */#ifdef use_seqsync	/* MIDI timer parameters */	int midi_client;		/* sequencer client */	int midi_port;			/* sequencer port */	/* tick & real-time queue synchronization */	long int sync_tick_resolution;	/* resolution per 10ms midi tick (TICK event) (ticks * 1000000) */	long int sync_real_resolution;	/* resolution per midi tick (CLOCK event) or zero (nanoseconds) */#endif	char reserved[64];		/* for the future use */} snd_seq_queue_timer_t;#ifdef use_seqsync/* synchronization types */#define SND_SEQ_SYNC_NONE		0	/* none synchronization */#define SND_SEQ_SYNC_MTC		1	/* Midi Time Code synchronization */typedef struct {	int queue;			/* sequencer queue */	/* synchronization */	int sync_client;		/* sequencer client */	int sync_port;			/* sequencer port */	int sync_type;			/* synchronization type */	snd_seq_tick_time_t sync_tick;	/* last synchronization tick */	snd_seq_real_time_t sync_time;	/* last synchronization time */	char reserved[64];		/* for the future use */} snd_seq_queue_sync_t;#endiftypedef struct {	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 */} snd_seq_queue_client_t;typedef struct {	snd_seq_addr_t sender;		/* sender address */	snd_seq_addr_t dest;		/* destination address */	unsigned char queue;		/* input time-stamp queue (optional) */	unsigned int exclusive: 1,	/* exclusive mode */	    realtime: 1,		/* realtime timestamp */	    convert_time: 1;		/* convert timestamp */	int midi_channels;		/* midi channels setup, zero = do not care */	int midi_voices;		/* midi voices setup, zero = do not care */	int synth_voices;		/* synth voices setup, zero = do not care */	char reserved[32];		/* for future use */} snd_seq_port_subscribe_t;/* type of query subscription */#define SND_SEQ_QUERY_SUBS_READ		0#define SND_SEQ_QUERY_SUBS_WRITE	1typedef struct {	int client;	int port;	int type;		/* READ or WRITE */	int index;		/* 0..N-1 */	int num_subs;		/* R/O: number of subscriptions on this port */	snd_seq_addr_t addr;	/* R/O: result */	unsigned char queue;	/* R/O: result */	int exclusive: 1;	/* R/O: result */	int realtime: 1;	/* R/O: result */	int convert_time: 1;	/* R/O: result */	char reserved[64];	/* for future use */} snd_seq_query_subs_t;/* *  Instrument abstraction layer *     - based on events *//* instrument types */#define SND_SEQ_INSTR_ATYPE_DATA	0	/* instrument data */#define SND_SEQ_INSTR_ATYPE_ALIAS	1	/* instrument alias *//* instrument ASCII identifiers */#define SND_SEQ_INSTR_ID_DLS1		"DLS1"#define SND_SEQ_INSTR_ID_DLS2		"DLS2"#define SND_SEQ_INSTR_ID_SIMPLE		"Simple Wave"#define SND_SEQ_INSTR_ID_SOUNDFONT	"SoundFont"#define SND_SEQ_INSTR_ID_GUS_PATCH	"GUS Patch"#define SND_SEQ_INSTR_ID_INTERWAVE	"InterWave FFFF"#define SND_SEQ_INSTR_ID_OPL2		"OPL2"#define SND_SEQ_INSTR_ID_OPL3		"OPL3"#define SND_SEQ_INSTR_ID_OPL4		"OPL4"/* instrument types */#define SND_SEQ_INSTR_TYPE0_DLS1	(1<<0)	/* MIDI DLS v1 */#define SND_SEQ_INSTR_TYPE0_DLS2	(1<<1)	/* MIDI DLS v2 */#define SND_SEQ_INSTR_TYPE1_SIMPLE	(1<<0)	/* Simple Wave */#define SND_SEQ_INSTR_TYPE1_SOUNDFONT	(1<<1)	/* EMU SoundFont */#define SND_SEQ_INSTR_TYPE1_GUS_PATCH	(1<<2)	/* Gravis UltraSound Patch */#define SND_SEQ_INSTR_TYPE1_INTERWAVE	(1<<3)	/* InterWave FFFF */#define SND_SEQ_INSTR_TYPE2_OPL2	(1<<0)	/* Yamaha OPL2 */#define SND_SEQ_INSTR_TYPE2_OPL3	(1<<1)	/* Yamaha OPL3 */#define SND_SEQ_INSTR_TYPE2_OPL4	(1<<2)	/* Yamaha OPL4 *//* put commands */#define SND_SEQ_INSTR_PUT_CMD_CREATE	0#define SND_SEQ_INSTR_PUT_CMD_REPLACE	1#define SND_SEQ_INSTR_PUT_CMD_MODIFY	2#define SND_SEQ_INSTR_PUT_CMD_ADD	3#define SND_SEQ_INSTR_PUT_CMD_REMOVE	4/* get commands */#define SND_SEQ_INSTR_GET_CMD_FULL	0#define SND_SEQ_INSTR_GET_CMD_PARTIAL	1/* query flags */#define SND_SEQ_INSTR_QUERY_FOLLOW_ALIAS (1<<0)/* free commands */#define SND_SEQ_INSTR_FREE_CMD_ALL	0#define SND_SEQ_INSTR_FREE_CMD_PRIVATE	1#define SND_SEQ_INSTR_FREE_CMD_CLUSTER	2#define SND_SEQ_INSTR_FREE_CMD_SINGLE	3/* INSTR_INFO */typedef struct {	int result;			/* operation result */	unsigned int formats[8];	/* bitmap of supported formats */	int ram_count;			/* count of RAM banks */	long ram_sizes[16];		/* size of RAM banks */	int rom_count;			/* count of ROM banks */	long rom_sizes[8];		/* size of ROM banks */	char reserved[128];}  snd_seq_instr_info_t;/* INSTR_STATUS */typedef struct {	int result;			/* operation result */	long free_ram[16];		/* free RAM in banks */	int instrument_count;		/* count of downloaded instruments */	char reserved[128];} snd_seq_instr_status_t;/* INSTR_FORMAT_INFO */typedef struct {	char format[16];		/* format identifier - SND_SEQ_INSTR_ID_* */		long len;			/* max data length (without this structure) */} snd_seq_instr_format_info_t;typedef struct {	int result;			/* operation result */	char format[16];		/* format identifier */	long len;			/* filled data length (without this structure) */} snd_seq_instr_format_info_result_t;/* instrument data */typedef struct {	char name[32];			/* instrument name */	char reserved[16];		/* for the future use */	int type;			/* instrument type */	union {		char format[16];	/* format identifier */		snd_seq_instr_t alias;	} data;} snd_seq_instr_data_t;/* INSTR_PUT, data are stored in one block (extended or IPC), header + data */typedef struct {	snd_seq_instr_t id;		/* instrument identifier */	int cmd;			/* put command */	char reserved[16];		/* for the future */	long len;			/* real instrument data length (without header) */	snd_seq_instr_data_t data;	/* instrument data */} snd_seq_instr_put_t;/* INSTR_GET, data are stored in one block (extended or IPC), header + data */typedef struct {	snd_seq_instr_t id;		/* instrument identifier */	unsigned int flags;		/* query flags */	int cmd;			/* query command */	char reserved[16];		/* reserved for the future use */	long len;			/* real instrument data length (without header) */} snd_seq_instr_get_t;typedef struct {	int result;			/* operation result */	snd_seq_instr_t id;		/* requested instrument identifier */	char reserved[16];		/* reserved for the future use */	long len;			/* real instrument data length (without header) */	snd_seq_instr_data_t data;	/* instrument data */} snd_seq_instr_get_result_t;/* INSTR_FREE */typedef struct {	char reserved[16];		/* for the future use */	unsigned int cmd;               /* SND_SEQ_INSTR_FREE_CMD_* */	union {		snd_seq_instr_t instr;		snd_seq_instr_cluster_t cluster;		char data8[16];	} data;} snd_seq_instr_free_t;/* INSTR_CLUSTER_SET */typedef struct {	snd_seq_instr_cluster_t cluster;  /* cluster identifier */	char name[32];			/* cluster name */	int priority;			/* cluster priority */	char reserved[64];		/* for the future use */} snd_seq_instr_cluster_set_t;/* INSTR_CLUSTER_GET */typedef struct {	snd_seq_instr_cluster_t cluster;  /* cluster identifier */	char name[32];			/* cluster name */	int priority;			/* cluster priority */	char reserved[64];		/* for the future use */} snd_seq_instr_cluster_get_t;/* *  IOCTL commands */#define SND_SEQ_IOCTL_PVERSION		_IOR ('S', 0x00, int)#define SND_SEQ_IOCTL_CLIENT_ID		_IOR ('S', 0x01, int)#define SND_SEQ_IOCTL_SYSTEM_INFO	_IOWR('S', 0x02, snd_seq_system_info_t)#define SND_SEQ_IOCTL_GET_CLIENT_INFO	_IOWR('S', 0x10, snd_seq_client_info_t)#define SND_SEQ_IOCTL_SET_CLIENT_INFO	_IOW ('S', 0x11, snd_seq_client_info_t)#define SND_SEQ_IOCTL_CREATE_PORT	_IOWR('S', 0x20, snd_seq_port_info_t)#define SND_SEQ_IOCTL_DELETE_PORT	_IOW ('S', 0x21, snd_seq_port_info_t)#define SND_SEQ_IOCTL_GET_PORT_INFO	_IOWR('S', 0x22, snd_seq_port_info_t)#define SND_SEQ_IOCTL_SET_PORT_INFO	_IOW ('S', 0x23, snd_seq_port_info_t)#define SND_SEQ_IOCTL_SUBSCRIBE_PORT	_IOW ('S', 0x30, snd_seq_port_subscribe_t)#define SND_SEQ_IOCTL_UNSUBSCRIBE_PORT	_IOW ('S', 0x31, snd_seq_port_subscribe_t)#define SND_SEQ_IOCTL_CREATE_QUEUE	_IOWR('S', 0x32, snd_seq_queue_info_t)#define SND_SEQ_IOCTL_DELETE_QUEUE	_IOW ('S', 0x33, snd_seq_queue_info_t)#define SND_SEQ_IOCTL_GET_QUEUE_INFO	_IOWR('S', 0x34, snd_seq_queue_info_t)#define SND_SEQ_IOCTL_SET_QUEUE_INFO	_IOWR('S', 0x35, snd_seq_queue_info_t)#define SND_SEQ_IOCTL_GET_NAMED_QUEUE	_IOWR('S', 0x36, snd_seq_queue_info_t)#define SND_SEQ_IOCTL_GET_QUEUE_STATUS	_IOWR('S', 0x40, snd_seq_queue_status_t)#define SND_SEQ_IOCTL_GET_QUEUE_TEMPO	_IOWR('S', 0x41, snd_seq_queue_tempo_t)#define SND_SEQ_IOCTL_SET_QUEUE_TEMPO	_IOW ('S', 0x42, snd_seq_queue_tempo_t)#define SND_SEQ_IOCTL_GET_QUEUE_OWNER	_IOWR('S', 0x43, snd_seq_queue_owner_t)#define SND_SEQ_IOCTL_SET_QUEUE_OWNER	_IOW ('S', 0x44, snd_seq_queue_owner_t)#define SND_SEQ_IOCTL_GET_QUEUE_TIMER   _IOWR('S', 0x45, snd_seq_queue_timer_t)#define SND_SEQ_IOCTL_SET_QUEUE_TIMER	_IOW ('S', 0x46, snd_seq_queue_timer_t)#ifdef use_seqsync#define SND_SEQ_IOCTL_GET_QUEUE_SYNC	_IOWR('S', 0x47, snd_seq_queue_sync_t)#define SND_SEQ_IOCTL_SET_QUEUE_SYNC	_IOW ('S', 0x48, snd_seq_queue_sync_t)#endif#define SND_SEQ_IOCTL_GET_QUEUE_CLIENT	_IOWR('S', 0x49, snd_seq_queue_client_t)#define SND_SEQ_IOCTL_SET_QUEUE_CLIENT	_IOW ('S', 0x4a, snd_seq_queue_client_t)#define SND_SEQ_IOCTL_GET_CLIENT_POOL	_IOWR('S', 0x4b, snd_seq_client_pool_t)#define SND_SEQ_IOCTL_SET_CLIENT_POOL	_IOW ('S', 0x4c, snd_seq_client_pool_t)#define SND_SEQ_IOCTL_REMOVE_EVENTS	_IOW ('S', 0x4e, snd_seq_remove_events_t)#define SND_SEQ_IOCTL_QUERY_SUBS	_IOWR('S', 0x4f, snd_seq_query_subs_t)#define SND_SEQ_IOCTL_GET_SUBSCRIPTION	_IOWR('S', 0x50, snd_seq_port_subscribe_t)#define SND_SEQ_IOCTL_QUERY_NEXT_CLIENT	_IOWR('S', 0x51, snd_seq_client_info_t)#define SND_SEQ_IOCTL_QUERY_NEXT_PORT	_IOWR('S', 0x52, snd_seq_port_info_t)#endif /* __SND_ASEQUENCER_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -