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

📄 asound.h

📁 unxi下共享内存的使用
💻 H
📖 第 1 页 / 共 5 页
字号:
#define SND_MIXER_ETYPE_3D_EFFECT1	600/* predefined effect */#define SND_MIXER_ETYPE_PRE_EFFECT1	610/* *  voice definitions */#define SND_MIXER_VOICE_UNUSED		0#define SND_MIXER_VOICE_MONO		1#define SND_MIXER_VOICE_LEFT		2#define SND_MIXER_VOICE_RIGHT		3#define SND_MIXER_VOICE_CENTER		4#define SND_MIXER_VOICE_REAR_LEFT	5#define SND_MIXER_VOICE_REAR_RIGHT	6#define SND_MIXER_VOICE_WOOFER		7typedef struct {	unsigned short voice: 15,		       vindex: 1;} snd_mixer_voice_t;typedef struct {	unsigned char name[24];	int index;			/* 0..N */	int type;			/* element type - SND_MIXER_ETYPE_ */} snd_mixer_eid_t;typedef struct {	unsigned char name[24];	int index;			/* 0..N */	int reserved;} snd_mixer_gid_t;/* *  General information. */typedef struct snd_mixer_info {	unsigned int type;	/* type of soundcard - SND_CARD_TYPE_XXXX */	unsigned int attrib;	/* attributes, not used */	unsigned char id[64];	/* ID of this mixer */	unsigned char name[80];	/* name of this device */	int elements;		/* count of elements */	int groups;		/* count of element groups */	char reserved[32];	/* reserved for future use */} snd_mixer_info_t;/* *  Element information. */typedef struct snd_mixer_elements {	int elements_size;	/* WR: size in element identifiers */	int elements;		/* WR: count of filled element identifiers */	int elements_over;	/* RO: missing element identifiers */	snd_mixer_eid_t *pelements; /* WR: array */} snd_mixer_elements_t;/* *  Route information. */typedef struct snd_mixer_routes {	snd_mixer_eid_t eid;	/* WR: element identifier */	int routes_size;	/* WR: size in element identifiers */	int routes;		/* RO: count of filled element identifiers */	int routes_over;	/* RO: missing element identifiers */	snd_mixer_eid_t *proutes; /* WR: array */} snd_mixer_routes_t;/* *  Group information. */typedef struct snd_mixer_groups {	int groups_size;	/* WR: size in group identifiers */	int groups;		/* RO: count of filled group identifiers */	int groups_over;	/* RO: missing group identifiers */	snd_mixer_gid_t *pgroups; /* WR: array */} snd_mixer_groups_t;typedef enum {	SND_MIXER_CHN_FRONT_LEFT,	SND_MIXER_CHN_FRONT_RIGHT,	SND_MIXER_CHN_FRONT_CENTER,	SND_MIXER_CHN_REAR_LEFT,	SND_MIXER_CHN_REAR_RIGHT,	SND_MIXER_CHN_WOOFER,	SND_MIXER_CHN_LAST = 31,	SND_MIXER_CHN_MONO = SND_MIXER_CHN_FRONT_LEFT} snd_mixer_channel_t;#define SND_MIXER_CHN_MASK_MONO		(1<<SND_MIXER_CHN_MONO)#define SND_MIXER_CHN_MASK_FRONT_LEFT	(1<<SND_MIXER_CHN_FRONT_LEFT)#define SND_MIXER_CHN_MASK_FRONT_RIGHT	(1<<SND_MIXER_CHN_FRONT_RIGHT)#define SND_MIXER_CHN_MASK_FRONT_CENTER	(1<<SND_MIXER_CHN_FRONT_CENTER)#define SND_MIXER_CHN_MASK_REAR_LEFT	(1<<SND_MIXER_CHN_REAR_LEFT)#define SND_MIXER_CHN_MASK_REAR_RIGHT	(1<<SND_MIXER_CHN_REAR_RIGHT)#define SND_MIXER_CHN_MASK_WOOFER	(1<<SND_MIXER_CHN_WOOFER)#define SND_MIXER_CHN_MASK_STEREO	(SND_MIXER_CHN_MASK_FRONT_LEFT|SND_MIXER_CHN_MASK_FRONT_RIGHT)#define SND_MIXER_GRPCAP_VOLUME		(1<<0)#define SND_MIXER_GRPCAP_JOINTLY_VOLUME	(1<<1)#define SND_MIXER_GRPCAP_MUTE		(1<<2)#define SND_MIXER_GRPCAP_JOINTLY_MUTE	(1<<3)#define SND_MIXER_GRPCAP_CAPTURE	(1<<4)#define SND_MIXER_GRPCAP_JOINTLY_CAPTURE (1<<5)#define SND_MIXER_GRPCAP_EXCL_CAPTURE	(1<<6)typedef struct snd_mixer_group {	snd_mixer_gid_t gid;		/* WR: group identification */	int elements_size;		/* WR: size in element identifiers */	int elements;			/* RO: count of filled element identifiers */	int elements_over;		/* RO: missing element identifiers */	snd_mixer_eid_t *pelements;	/* WR: array */	unsigned int caps;		/* RO: capabilities */	unsigned int channels;		/* RO: bitmap of active channels */		unsigned int mute;		/* RW: bitmap of muted channels */	unsigned int capture;		/* RW: bitmap of capture channels */	int capture_group;		/* RO: capture group (for exclusive capture source) */	int min;			/* RO: minimum value */	int max;			/* RO: maximum value */	union {		struct {			int front_left;		/* front left value */			int front_right;	/* front right value */			int front_center;	/* front center */			int rear_left;		/* left rear */			int rear_right;		/* right rear */			int woofer;		/* woofer */		} names;		int values[32];		/* RW */	} volume;} snd_mixer_group_t;/* *  INPUT/OUTPUT - read only * *    The input element describes input voices. */#define SND_MIXER_EIO_DIGITAL		(0<<1)struct snd_mixer_element_io_info {	unsigned int attrib;		/* RO: SND_MIXER_EIO_* */	int voices_size;		/* WR: size in voice descriptors */	int voices;			/* RO: count of filled voice descriptors */	int voices_over;		/* RO: missing voice descriptors */	snd_mixer_voice_t *pvoices;	/* WR: array */};/* *  PCM CAPTURE/PLAYBACK - read only * *    The element controls a playback or capture endpoint. */struct snd_mixer_element_pcm1_info {	int devices_size;		/* WR: size in device descriptors */	int devices;			/* RO: count of filled device descriptors */	int devices_over;		/* RO: missing device descriptors */	int *pdevices;			/* WR: PCM devices - array */};struct snd_mixer_element_pcm2_info {	int device;			/* RO: device index */	int subdevice;			/* RO: subdevice index */};/* *  ADC/DAC - read only * *    The element controls an analog-digital/digital-analog converter. */struct snd_mixer_element_converter_info {	unsigned int resolution;	/* RO: resolution in bits (usually 16) */};/* *  Simple on/off switch - read write * *    This switch turns on or off the voice route for a group of voices. */struct snd_mixer_element_switch1 {	int sw_size;			/* WR: size of bitmap (in bits) */	int sw;				/* RO: count of filled bits */	int sw_over;			/* RO: missing bits */	unsigned int *psw;		/* WR: bitmap!!! */};/* *  Simple on/off switch for each voices - read write * *    This switch turns on or off the voice route for group of voices. */struct snd_mixer_element_switch2 {	unsigned int sw:1;		/* WR */};/* *  Simple voice route switch - read write * *    This switch determines route from input voices to output voices. */#define SND_MIXER_SWITCH3_FULL_FEATURED			0#define SND_MIXER_SWITCH3_ALWAYS_DESTINATION		1#define SND_MIXER_SWITCH3_ONE_DESTINATION		2#define SND_MIXER_SWITCH3_ALWAYS_ONE_DESTINATION	3struct snd_mixer_element_switch3_info {	unsigned int type;		/* RO: SND_MIXER_SWITCH3_* */	/* X = output / Y = input voice descriptors */	int voices_size;		/* size in voice descriptors */	int voices;			/* count of filled voice descriptors */	int voices_over;		/* missing voice descriptors */	snd_mixer_voice_t *pvoices;	/* array */};struct snd_mixer_element_switch3 {	/* two dimensional matrix of voice route switch */	int rsw_size;			/* WR: size in voice route descriptors (must be voice_size * voice_size bits !!!) */	int rsw;			/* RO: count of filled voice route descriptors */	int rsw_over;			/* RO: missing voice descriptors */	unsigned int *prsw;		/* WR: array */};/* *  Volume (attenuation/gain) control - read write * *    The volume must be always linear!!! */struct snd_mixer_element_volume1_range {	int min, max;		/* RO: linear volume */	int min_dB, max_dB;	/* RO: negative - attenuation, positive - amplification */};struct snd_mixer_element_volume1_info {	int range_size;		/* WR: size of range descriptors */	int range;		/* RO: count of filled range descriptors */	int range_over;		/* RO: missing range descriptors */	struct snd_mixer_element_volume1_range *prange;	/* WR: array */};struct snd_mixer_element_volume1 {	int voices_size;	/* WR: size of voice descriptors */		int voices;		/* RO: count of filled voice descriptors */	int voices_over;	/* RO: missing voice descriptors */	int *pvoices;		/* WR: array of volumes */};/* *  Volume (balance) control - read write * *    The volume must be always linear!!! */struct snd_mixer_element_volume2_range {	int min, max;		/* linear volume */	int min_dB, max_dB;	/* negative - attenuation, positive - amplification */	snd_mixer_voice_t dvoice; /* destonation voice */};struct snd_mixer_element_volume2_info {	/* source voices */	int svoices_size;	/* WR: size of source voices */	int svoices;		/* RO: count of filled voice descriptors */	int svoices_over;	/* RO: missing voice descriptors */	snd_mixer_voice_t *psvoices; /* WR: array of voices */	/* destonation ranges */	int range_size;		/* WR: size of range descriptors */	int range;		/* RO: count of filled range descriptors */	int range_over;		/* RO: missing range descriptors */	struct snd_mixer_element_volume2_range *prange;	/* WR: array */};/* avoices means the array of voices which describes volume offsets for *//* each outputs, the size of this array is info->svoices * info->range */struct snd_mixer_element_volume2 {	int avoices_size;	/* WR: size of voice descriptors */		int avoices;		/* RO: count of filled voice descriptors */	int avoices_over;	/* RO: missing voice descriptors */	int *pavoices;		/* WR: array of volumes */};/* *  Simple accumulator */struct snd_mixer_element_accu1_info {	int attenuation;		/* RO: in dB */};/* *  Simple accumulator with the MONO output */struct snd_mixer_element_accu2_info {	int attenuation;		/* RO: in dB */};/*  *  Simple accumulator with programmable attenuation */struct snd_mixer_element_accu3_range {	int min, max;		/* RO: linear volume */	int min_dB, max_dB;	/* RO: negative - attenuation, positive - amplification */};struct snd_mixer_element_accu3_info {	int range_size;		/* WR: size of range descriptors */	int range;		/* RO: count of filled range descriptors */	int range_over;		/* RO: missing range descriptors */	struct snd_mixer_element_accu3_range *prange;	/* WR: array */};struct snd_mixer_element_accu3 {	int voices_size;	/* WR: size of voice descriptors */		int voices;		/* RO: count of filled voice descriptors */	int voices_over;	/* RO: missing voice descriptors */	int *pvoices;		/* WR: array of volumes */};/* *  Simple MUX * *     This mux allows selection of exactly one (or none - optional) source *     per each voice. */#define SND_MIXER_MUX1_NONE		(1<<0)struct snd_mixer_element_mux1_info {	unsigned int attrib;		/* RO: SND_MIXER_MUX1_ */};

⌨️ 快捷键说明

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