mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
Merged pcmfinal branch.
This commit is contained in:
parent
3cc2b957fb
commit
41bb7068f2
57 changed files with 5189 additions and 3088 deletions
|
|
@ -28,7 +28,6 @@
|
|||
#define SND_PCM_IOCTL_AVAIL_UPDATE _IO ('A', 0xf8)
|
||||
#define SND_PCM_IOCTL_ASYNC _IO ('A', 0xf9)
|
||||
#define SND_PCM_IOCTL_CLOSE _IO ('A', 0xfa)
|
||||
#define SND_PCM_IOCTL_MMAP_INFO _IO ('A', 0xfb)
|
||||
#define SND_PCM_IOCTL_POLL_DESCRIPTOR _IO ('A', 0xfc)
|
||||
#define SND_PCM_IOCTL_SET_AVAIL_MIN _IO ('A', 0xfd)
|
||||
|
||||
|
|
@ -42,11 +41,12 @@ typedef struct {
|
|||
int sig;
|
||||
pid_t pid;
|
||||
} async;
|
||||
snd_pcm_mmap_info_t mmap_info;
|
||||
snd_pcm_info_t info;
|
||||
snd_pcm_params_t params;
|
||||
snd_pcm_params_info_t params_info;
|
||||
snd_pcm_setup_t setup;
|
||||
snd_pcm_hw_info_t hw_info;
|
||||
snd_pcm_hw_params_t hw_params;
|
||||
snd_pcm_sw_params_t sw_params;
|
||||
snd_pcm_dig_params_t dig_params;
|
||||
snd_pcm_dig_info_t dig_info;
|
||||
snd_pcm_status_t status;
|
||||
struct {
|
||||
ssize_t frames;
|
||||
|
|
@ -55,8 +55,6 @@ typedef struct {
|
|||
int enable;
|
||||
} pause;
|
||||
snd_pcm_channel_info_t channel_info;
|
||||
snd_pcm_channel_params_t channel_params;
|
||||
snd_pcm_channel_setup_t channel_setup;
|
||||
struct {
|
||||
ssize_t frames;
|
||||
} rewind;
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
|
||||
typedef enum {
|
||||
typedef enum _snd_config_type {
|
||||
SND_CONFIG_TYPE_INTEGER,
|
||||
SND_CONFIG_TYPE_REAL,
|
||||
SND_CONFIG_TYPE_STRING,
|
||||
SND_CONFIG_TYPE_COMPOUND,
|
||||
} snd_config_type_t;
|
||||
|
||||
typedef struct snd_config snd_config_t;
|
||||
typedef struct _snd_config snd_config_t;
|
||||
|
||||
struct snd_config {
|
||||
struct _snd_config {
|
||||
char *id;
|
||||
snd_config_type_t type;
|
||||
union {
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@
|
|||
* *
|
||||
****************************************************************************/
|
||||
|
||||
typedef struct snd_ctl snd_ctl_t;
|
||||
typedef struct _snd_ctl snd_ctl_t;
|
||||
|
||||
typedef enum { SND_CTL_TYPE_HW,
|
||||
typedef enum _snd_ctl_type { SND_CTL_TYPE_HW,
|
||||
SND_CTL_TYPE_SHM,
|
||||
SND_CTL_TYPE_INET
|
||||
} snd_ctl_type_t;
|
||||
|
||||
typedef struct snd_ctl_callbacks {
|
||||
typedef struct _snd_ctl_callbacks {
|
||||
void *private_data; /* may be used by an application */
|
||||
void (*rebuild) (snd_ctl_t *handle, void *private_data);
|
||||
void (*value) (snd_ctl_t *handle, void *private_data, snd_control_id_t * id);
|
||||
|
|
@ -40,8 +40,6 @@ int snd_defaults_pcm_device(void);
|
|||
int snd_defaults_rawmidi_card(void);
|
||||
int snd_defaults_rawmidi_device(void);
|
||||
|
||||
int snd_ctl_hw_open(snd_ctl_t **handle, char *name, int card);
|
||||
int snd_ctl_shm_open(snd_ctl_t **handlep, char *name, char *socket, char *sname);
|
||||
snd_ctl_type_t snd_ctl_type(snd_ctl_t *handle);
|
||||
int snd_ctl_open(snd_ctl_t **handle, char *name);
|
||||
int snd_ctl_close(snd_ctl_t *handle);
|
||||
|
|
@ -82,10 +80,10 @@ struct list_head {
|
|||
((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))
|
||||
|
||||
|
||||
typedef struct snd_hcontrol_list_stru snd_hcontrol_list_t;
|
||||
typedef struct snd_hcontrol_stru snd_hcontrol_t;
|
||||
typedef struct _snd_hcontrol_list snd_hcontrol_list_t;
|
||||
typedef struct _snd_hcontrol snd_hcontrol_t;
|
||||
|
||||
struct snd_hcontrol_list_stru {
|
||||
struct _snd_hcontrol_list {
|
||||
unsigned int controls_offset; /* W: first control ID to get */
|
||||
unsigned int controls_request; /* W: count of control IDs to get */
|
||||
unsigned int controls_count; /* R: count of available (set) controls */
|
||||
|
|
@ -93,7 +91,7 @@ struct snd_hcontrol_list_stru {
|
|||
snd_control_id_t *pids; /* W: IDs */
|
||||
};
|
||||
|
||||
struct snd_hcontrol_stru {
|
||||
struct _snd_hcontrol {
|
||||
snd_control_id_t id; /* must be always on top */
|
||||
struct list_head list; /* links for list of all hcontrols */
|
||||
int change: 1, /* structure change */
|
||||
|
|
|
|||
|
|
@ -46,3 +46,5 @@
|
|||
#define SND_TRANSPORT_TYPE_SHM 0
|
||||
#define SND_TRANSPORT_TYPE_TCP 1
|
||||
|
||||
extern void snd_lib_error(const char *file, int line, const char *function, int err, const char *fmt, ...) __attribute__ ((weak, format (printf, 5, 6)));
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct snd_hwdep snd_hwdep_t;
|
||||
typedef struct _snd_hwdep snd_hwdep_t;
|
||||
|
||||
int snd_hwdep_open(snd_hwdep_t **handle, int card, int device, int mode);
|
||||
int snd_hwdep_close(snd_hwdep_t *handle);
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ int snd_instr_simple_free(snd_instr_simple_t *simple);
|
|||
/* InterWave FFFF support */
|
||||
|
||||
typedef void snd_instr_iwffff_t;
|
||||
typedef struct snd_iwffff_handle snd_iwffff_handle_t;
|
||||
typedef struct _snd_iwffff_handle snd_iwffff_handle_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* *
|
||||
****************************************************************************/
|
||||
|
||||
typedef struct snd_mixer snd_mixer_t;
|
||||
typedef struct _snd_mixer snd_mixer_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
@ -23,7 +23,7 @@ int snd_mixer_poll_descriptor(snd_mixer_t *handle);
|
|||
* Simple (legacy) mixer API
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
typedef enum _snd_mixer_channel_id {
|
||||
SND_MIXER_CHN_FRONT_LEFT = 0,
|
||||
SND_MIXER_CHN_FRONT_RIGHT,
|
||||
SND_MIXER_CHN_FRONT_CENTER,
|
||||
|
|
@ -51,12 +51,12 @@ typedef enum {
|
|||
#define SND_MIXER_SCTCAP_JOINTLY_CAPTURE (1<<5)
|
||||
#define SND_MIXER_SCTCAP_EXCL_CAPTURE (1<<6)
|
||||
|
||||
typedef struct snd_mixer_sid {
|
||||
typedef struct _snd_mixer_sid {
|
||||
unsigned char name[60];
|
||||
unsigned int index;
|
||||
} snd_mixer_sid_t;
|
||||
|
||||
typedef struct snd_mixer_simple_control_list {
|
||||
typedef struct _snd_mixer_simple_control_list {
|
||||
unsigned int controls_offset; /* W: first control ID to get */
|
||||
unsigned int controls_request; /* W: count of control IDs to get */
|
||||
unsigned int controls_count; /* R: count of available (set) IDs */
|
||||
|
|
@ -65,7 +65,7 @@ typedef struct snd_mixer_simple_control_list {
|
|||
char reserved[50];
|
||||
} snd_mixer_simple_control_list_t;
|
||||
|
||||
typedef struct snd_mixer_simple_control {
|
||||
typedef struct _snd_mixer_simple_control {
|
||||
snd_mixer_sid_t sid; /* WR: simple control identification */
|
||||
unsigned int caps; /* RO: capabilities */
|
||||
unsigned int channels; /* RO: bitmap of active channels */
|
||||
|
|
@ -88,7 +88,7 @@ typedef struct snd_mixer_simple_control {
|
|||
} volume; /* RW */
|
||||
} snd_mixer_simple_control_t;
|
||||
|
||||
typedef struct snd_mixer_simple_callbacks {
|
||||
typedef struct _snd_mixer_simple_callbacks {
|
||||
void *private_data; /* may be used by an application */
|
||||
void (*rebuild) (snd_mixer_t *handle, void *private_data);
|
||||
void (*value) (snd_mixer_t *handle, void *private_data, snd_mixer_sid_t *id);
|
||||
|
|
|
|||
144
include/pcm.h
144
include/pcm.h
|
|
@ -12,94 +12,9 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef unsigned int bitset_t;
|
||||
typedef struct _snd_pcm snd_pcm_t;
|
||||
|
||||
static inline size_t bitset_size(size_t nbits)
|
||||
{
|
||||
return (nbits + sizeof(bitset_t) * 8 - 1) / (sizeof(bitset_t) * 8);
|
||||
}
|
||||
|
||||
static inline bitset_t *bitset_alloc(size_t nbits)
|
||||
{
|
||||
return (bitset_t*) calloc(bitset_size(nbits), sizeof(bitset_t));
|
||||
}
|
||||
|
||||
static inline void bitset_set(bitset_t *bitmap, unsigned int pos)
|
||||
{
|
||||
size_t bits = sizeof(*bitmap) * 8;
|
||||
bitmap[pos / bits] |= 1U << (pos % bits);
|
||||
}
|
||||
|
||||
static inline void bitset_reset(bitset_t *bitmap, unsigned int pos)
|
||||
{
|
||||
size_t bits = sizeof(*bitmap) * 8;
|
||||
bitmap[pos / bits] &= ~(1U << (pos % bits));
|
||||
}
|
||||
|
||||
static inline int bitset_get(bitset_t *bitmap, unsigned int pos)
|
||||
{
|
||||
size_t bits = sizeof(*bitmap) * 8;
|
||||
return !!(bitmap[pos / bits] & (1U << (pos % bits)));
|
||||
}
|
||||
|
||||
static inline void bitset_copy(bitset_t *dst, bitset_t *src, size_t nbits)
|
||||
{
|
||||
memcpy(dst, src, bitset_size(nbits) * sizeof(bitset_t));
|
||||
}
|
||||
|
||||
static inline void bitset_and(bitset_t *dst, bitset_t *bs, size_t nbits)
|
||||
{
|
||||
bitset_t *end = dst + bitset_size(nbits);
|
||||
while (dst < end)
|
||||
*dst++ &= *bs++;
|
||||
}
|
||||
|
||||
static inline void bitset_or(bitset_t *dst, bitset_t *bs, size_t nbits)
|
||||
{
|
||||
bitset_t *end = dst + bitset_size(nbits);
|
||||
while (dst < end)
|
||||
*dst++ |= *bs++;
|
||||
}
|
||||
|
||||
static inline void bitset_zero(bitset_t *dst, size_t nbits)
|
||||
{
|
||||
bitset_t *end = dst + bitset_size(nbits);
|
||||
while (dst < end)
|
||||
*dst++ = 0;
|
||||
}
|
||||
|
||||
static inline void bitset_one(bitset_t *dst, size_t nbits)
|
||||
{
|
||||
bitset_t *end = dst + bitset_size(nbits);
|
||||
while (dst < end)
|
||||
*dst++ = ~(bitset_t)0;
|
||||
}
|
||||
|
||||
static inline size_t hweight32(bitset_t v)
|
||||
{
|
||||
v = (v & 0x55555555) + ((v >> 1) & 0x55555555);
|
||||
v = (v & 0x33333333) + ((v >> 2) & 0x33333333);
|
||||
v = (v & 0x0F0F0F0F) + ((v >> 4) & 0x0F0F0F0F);
|
||||
v = (v & 0x00FF00FF) + ((v >> 8) & 0x00FF00FF);
|
||||
return (v & 0x0000FFFF) + ((v >> 16) & 0x0000FFFF);
|
||||
}
|
||||
|
||||
/* Count bits set */
|
||||
static inline size_t bitset_count(bitset_t *bitset, size_t nbits)
|
||||
{
|
||||
bitset_t *end = bitset + bitset_size(nbits) - 1;
|
||||
size_t bits = sizeof(*bitset) * 8;
|
||||
size_t count = 0;
|
||||
while (bitset < end)
|
||||
count += hweight32(*bitset++);
|
||||
count += hweight32(*bitset & ((1U << (nbits % bits)) - 1));
|
||||
return count;
|
||||
}
|
||||
|
||||
typedef struct snd_pcm snd_pcm_t;
|
||||
typedef struct snd_pcm_loopback snd_pcm_loopback_t;
|
||||
|
||||
typedef enum {
|
||||
typedef enum _snd_pcm_type {
|
||||
SND_PCM_TYPE_HW,
|
||||
SND_PCM_TYPE_MULTI,
|
||||
SND_PCM_TYPE_FILE,
|
||||
|
|
@ -119,16 +34,28 @@ typedef enum {
|
|||
SND_PCM_TYPE_LBSERVER,
|
||||
} snd_pcm_type_t;
|
||||
|
||||
extern void snd_pcm_error(const char *file, int line, const char *function, int err, const char *fmt, ...) __attribute__ ((weak, format (printf, 5, 6)));
|
||||
enum {
|
||||
SND_PCM_RULE_PAR_MASK = 0x00ff,
|
||||
SND_PCM_RULE_REL_LT = 0x100,
|
||||
SND_PCM_RULE_REL_GT = 0x200,
|
||||
SND_PCM_RULE_REL_EQ = 0x300,
|
||||
SND_PCM_RULE_REL_LE = 0x400,
|
||||
SND_PCM_RULE_REL_GE = 0x500,
|
||||
SND_PCM_RULE_REL_NEAR = 0x600,
|
||||
SND_PCM_RULE_REL_BITS = 0x700,
|
||||
SND_PCM_RULE_REL_MASK = 0xff00
|
||||
};
|
||||
|
||||
typedef struct _snd_pcm_channel_area {
|
||||
void *addr; /* base address of channel samples */
|
||||
unsigned int first; /* offset to first sample in bits */
|
||||
unsigned int step; /* samples distance in bits */
|
||||
} snd_pcm_channel_area_t;
|
||||
|
||||
int snd_pcm_open(snd_pcm_t **pcm, char *name,
|
||||
int stream, int mode);
|
||||
|
||||
/* Obsolete functions */
|
||||
int snd_pcm_hw_open_subdevice(snd_pcm_t **pcm, int card, int device, int subdevice, int stream, int mode);
|
||||
int snd_pcm_hw_open_device(snd_pcm_t **pcm, int card, int device, int stream, int mode);
|
||||
int snd_pcm_plug_open_subdevice(snd_pcm_t **pcm, int card, int device, int subdevice, int stream, int mode);
|
||||
int snd_pcm_plug_open_device(snd_pcm_t **pcm, int card, int device, int stream, int mode);
|
||||
#define snd_pcm_write snd_pcm_writei
|
||||
#define snd_pcm_read snd_pcm_readi
|
||||
ssize_t snd_pcm_writev(snd_pcm_t *pcm, const struct iovec *vector, int count);
|
||||
|
|
@ -141,12 +68,11 @@ int snd_pcm_poll_descriptor(snd_pcm_t *pcm);
|
|||
int snd_pcm_nonblock(snd_pcm_t *pcm, int nonblock);
|
||||
int snd_pcm_async(snd_pcm_t *pcm, int sig, pid_t pid);
|
||||
int snd_pcm_info(snd_pcm_t *pcm, snd_pcm_info_t *info);
|
||||
int snd_pcm_params_info(snd_pcm_t *pcm, snd_pcm_params_info_t *info);
|
||||
int snd_pcm_params(snd_pcm_t *pcm, snd_pcm_params_t *params);
|
||||
int snd_pcm_setup(snd_pcm_t *pcm, snd_pcm_setup_t *setup);
|
||||
int snd_pcm_channel_info(snd_pcm_t *pcm, snd_pcm_channel_info_t *info);
|
||||
int snd_pcm_channel_params(snd_pcm_t *pcm, snd_pcm_channel_params_t *params);
|
||||
int snd_pcm_channel_setup(snd_pcm_t *pcm, snd_pcm_channel_setup_t *setup);
|
||||
int snd_pcm_hw_info(snd_pcm_t *pcm, snd_pcm_hw_info_t *info);
|
||||
int snd_pcm_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
|
||||
int snd_pcm_sw_params(snd_pcm_t *pcm, snd_pcm_sw_params_t *params);
|
||||
int snd_pcm_dig_info(snd_pcm_t *pcm, snd_pcm_dig_info_t *info);
|
||||
int snd_pcm_dig_params(snd_pcm_t *pcm, snd_pcm_dig_params_t *params);
|
||||
int snd_pcm_status(snd_pcm_t *pcm, snd_pcm_status_t *status);
|
||||
int snd_pcm_prepare(snd_pcm_t *pcm);
|
||||
int snd_pcm_start(snd_pcm_t *pcm);
|
||||
|
|
@ -160,23 +86,35 @@ ssize_t snd_pcm_writei(snd_pcm_t *pcm, const void *buffer, size_t size);
|
|||
ssize_t snd_pcm_readi(snd_pcm_t *pcm, void *buffer, size_t size);
|
||||
ssize_t snd_pcm_writen(snd_pcm_t *pcm, void **bufs, size_t size);
|
||||
ssize_t snd_pcm_readn(snd_pcm_t *pcm, void **bufs, size_t size);
|
||||
|
||||
int snd_pcm_dump_hw_setup(snd_pcm_t *pcm, FILE *fp);
|
||||
int snd_pcm_dump_sw_setup(snd_pcm_t *pcm, FILE *fp);
|
||||
int snd_pcm_dump_setup(snd_pcm_t *pcm, FILE *fp);
|
||||
int snd_pcm_dump_hw_params_fail(snd_pcm_hw_params_t *params, FILE *fp);
|
||||
int snd_pcm_dump_sw_params_fail(snd_pcm_sw_params_t *params, FILE *fp);
|
||||
int snd_pcm_dump(snd_pcm_t *pcm, FILE *fp);
|
||||
int snd_pcm_dump_status(snd_pcm_status_t *status, FILE *fp);
|
||||
int snd_pcm_link(snd_pcm_t *pcm1, snd_pcm_t *pcm2);
|
||||
int snd_pcm_unlink(snd_pcm_t *pcm);
|
||||
|
||||
int snd_pcm_channels_mask(snd_pcm_t *pcm, bitset_t *cmask);
|
||||
int snd_pcm_wait(snd_pcm_t *pcm, int timeout);
|
||||
ssize_t snd_pcm_avail_update(snd_pcm_t *pcm);
|
||||
int snd_pcm_set_avail_min(snd_pcm_t *pcm, size_t size);
|
||||
|
||||
int snd_pcm_hw_params_rules(snd_pcm_t *pcm, snd_pcm_hw_params_t *params,
|
||||
unsigned int count, int *rules);
|
||||
int snd_pcm_hw_params_rulesv(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, ...);
|
||||
int snd_pcm_hw_info_rules(snd_pcm_t *pcm,
|
||||
snd_pcm_hw_info_t *info,
|
||||
snd_pcm_hw_params_t *params,
|
||||
unsigned int count, int *rules);
|
||||
int snd_pcm_hw_info_rulesv(snd_pcm_t *pcm,
|
||||
snd_pcm_hw_info_t *info,
|
||||
snd_pcm_hw_params_t *params, ...);
|
||||
|
||||
/* mmap */
|
||||
int snd_pcm_mmap(snd_pcm_t *pcm);
|
||||
int snd_pcm_munmap(snd_pcm_t *pcm);
|
||||
snd_pcm_channel_area_t *snd_pcm_mmap_areas(snd_pcm_t *pcm);
|
||||
int snd_pcm_mmap_get_areas(snd_pcm_t *pcm, snd_pcm_channel_area_t *stopped_areas, snd_pcm_channel_area_t *running_areas);
|
||||
snd_pcm_channel_area_t *snd_pcm_mmap_running_areas(snd_pcm_t *pcm);
|
||||
snd_pcm_channel_area_t *snd_pcm_mmap_stopped_areas(snd_pcm_t *pcm);
|
||||
ssize_t snd_pcm_mmap_forward(snd_pcm_t *pcm, size_t size);
|
||||
size_t snd_pcm_mmap_offset(snd_pcm_t *pcm);
|
||||
size_t snd_pcm_mmap_xfer(snd_pcm_t *pcm, size_t size);
|
||||
|
|
|
|||
|
|
@ -5,31 +5,37 @@
|
|||
* *
|
||||
****************************************************************************/
|
||||
|
||||
#define SND_RAWMIDI_OPEN_OUTPUT (O_WRONLY)
|
||||
#define SND_RAWMIDI_OPEN_OUTPUT_APPEND (O_WRONLY|O_APPEND|O_NONBLOCK)
|
||||
#define SND_RAWMIDI_OPEN_INPUT (O_RDONLY)
|
||||
#define SND_RAWMIDI_OPEN_DUPLEX (O_RDWR)
|
||||
#define SND_RAWMIDI_OPEN_DUPLEX_APPEND (O_RDWR|O_APPEND|O_NONBLOCK)
|
||||
#define SND_RAWMIDI_OPEN_NONBLOCK (O_NONBLOCK)
|
||||
#define SND_RAWMIDI_OPEN_OUTPUT (1<<SND_RAWMIDI_STREAM_OUTPUT)
|
||||
#define SND_RAWMIDI_OPEN_INPUT (1<<SND_RAWMIDI_STREAM_INPUT)
|
||||
#define SND_RAWMIDI_OPEN_DUPLEX (SND_RAWMIDI_OPEN_OUTPUT|SND_RAWMIDI_OPEN_INPUT)
|
||||
|
||||
#define SND_RAWMIDI_APPEND 1
|
||||
#define SND_RAWMIDI_NONBLOCK 2
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct snd_rawmidi snd_rawmidi_t;
|
||||
typedef struct _snd_rawmidi snd_rawmidi_t;
|
||||
|
||||
int snd_rawmidi_open_subdevice(snd_rawmidi_t **handle, int card, int device, int subdevice, int mode);
|
||||
int snd_rawmidi_open(snd_rawmidi_t **handle, int card, int device, int mode);
|
||||
typedef enum _snd_rawmidi_type {
|
||||
SND_RAWMIDI_TYPE_HW,
|
||||
SND_RAWMIDI_TYPE_SHM,
|
||||
SND_RAWMIDI_TYPE_INET,
|
||||
} snd_rawmidi_type_t;
|
||||
|
||||
int snd_rawmidi_open(snd_rawmidi_t **handle, char *name, int streams, int mode);
|
||||
int snd_rawmidi_close(snd_rawmidi_t *handle);
|
||||
int snd_rawmidi_poll_descriptor(snd_rawmidi_t *handle);
|
||||
int snd_rawmidi_block_mode(snd_rawmidi_t *handle, int enable);
|
||||
int snd_rawmidi_nonblock(snd_rawmidi_t *handle, int nonblock);
|
||||
int snd_rawmidi_info(snd_rawmidi_t *handle, snd_rawmidi_info_t * info);
|
||||
int snd_rawmidi_params(snd_rawmidi_t *handle, snd_rawmidi_params_t * params);
|
||||
int snd_rawmidi_status(snd_rawmidi_t *handle, snd_rawmidi_status_t * status);
|
||||
int snd_rawmidi_output_drop(snd_rawmidi_t *handle);
|
||||
int snd_rawmidi_output_drain(snd_rawmidi_t *handle);
|
||||
int snd_rawmidi_input_drain(snd_rawmidi_t *handle);
|
||||
int snd_rawmidi_stream_drain(snd_rawmidi_t *handle, int channel);
|
||||
int snd_rawmidi_drain(snd_rawmidi_t *handle, int channel);
|
||||
int snd_rawmidi_drop(snd_rawmidi_t *handle, int channel);
|
||||
ssize_t snd_rawmidi_write(snd_rawmidi_t *handle, const void *buffer, size_t size);
|
||||
ssize_t snd_rawmidi_read(snd_rawmidi_t *handle, void *buffer, size_t size);
|
||||
|
||||
|
|
|
|||
|
|
@ -5,20 +5,28 @@
|
|||
* *
|
||||
****************************************************************************/
|
||||
|
||||
#define SND_SEQ_OPEN_OUT (O_WRONLY)
|
||||
#define SND_SEQ_OPEN_IN (O_RDONLY)
|
||||
#define SND_SEQ_OPEN (O_RDWR)
|
||||
#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 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct snd_seq snd_seq_t;
|
||||
typedef enum _snd_seq_type {
|
||||
SND_SEQ_TYPE_HW,
|
||||
SND_SEQ_TYPE_SHM,
|
||||
SND_SEQ_TYPE_INET,
|
||||
} snd_seq_type_t;
|
||||
|
||||
int snd_seq_open(snd_seq_t **handle, int mode);
|
||||
typedef struct _snd_seq snd_seq_t;
|
||||
|
||||
int snd_seq_open(snd_seq_t **handle, char *name, int streams, int mode);
|
||||
int snd_seq_close(snd_seq_t *handle);
|
||||
int snd_seq_poll_descriptor(snd_seq_t *handle);
|
||||
int snd_seq_block_mode(snd_seq_t *handle, int enable);
|
||||
int snd_seq_nonblock(snd_seq_t *handle, int nonblock);
|
||||
int snd_seq_client_id(snd_seq_t *handle);
|
||||
int snd_seq_output_buffer_size(snd_seq_t *handle);
|
||||
int snd_seq_input_buffer_size(snd_seq_t *handle);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct snd_timer snd_timer_t;
|
||||
typedef struct _snd_timer snd_timer_t;
|
||||
|
||||
int snd_timer_open(snd_timer_t **handle);
|
||||
int snd_timer_close(snd_timer_t *handle);
|
||||
|
|
@ -18,7 +18,6 @@ int snd_timer_general_info(snd_timer_t *handle, snd_timer_general_info_t * info)
|
|||
int snd_timer_select(snd_timer_t *handle, snd_timer_select_t *tselect);
|
||||
int snd_timer_info(snd_timer_t *handle, snd_timer_info_t *timer);
|
||||
int snd_timer_params(snd_timer_t *handle, snd_timer_params_t *params);
|
||||
int snd_timer_setup(snd_timer_t *handle, snd_timer_setup_t *setup);
|
||||
int snd_timer_status(snd_timer_t *handle, snd_timer_status_t *status);
|
||||
int snd_timer_start(snd_timer_t *handle);
|
||||
int snd_timer_stop(snd_timer_t *handle);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue