mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-12-18 08:56:42 -05:00
Added support for async. Added error callback (and begun to use it). First implementation of pcm_share
This commit is contained in:
parent
d07934a537
commit
dcc88ffaa7
20 changed files with 1363 additions and 32 deletions
|
|
@ -26,14 +26,19 @@
|
|||
#define SND_PCM_IOCTL_MUNMAP_DATA _IO ('A', 0xf4)
|
||||
#define SND_PCM_IOCTL_MUNMAP_CONTROL _IO ('A', 0xf5)
|
||||
#define SND_PCM_IOCTL_MUNMAP_STATUS _IO ('A', 0xf6)
|
||||
#define SND_PCM_IOCTL_MMAP_FORWARD _IOW('A', 0xf7, size_t)
|
||||
#define SND_PCM_IOCTL_MMAP_FORWARD _IO ('A', 0xf7)
|
||||
#define SND_PCM_IOCTL_AVAIL_UPDATE _IO ('A', 0xf8)
|
||||
#define SND_PCM_IOCTL_CLOSE _IO ('A', 0xf9)
|
||||
#define SND_PCM_IOCTL_ASYNC _IO ('A', 0xf9)
|
||||
#define SND_PCM_IOCTL_CLOSE _IO ('A', 0xfa)
|
||||
|
||||
typedef struct {
|
||||
long result;
|
||||
int cmd;
|
||||
union {
|
||||
struct {
|
||||
int sig;
|
||||
pid_t pid;
|
||||
} async;
|
||||
snd_pcm_info_t info;
|
||||
snd_pcm_params_t params;
|
||||
snd_pcm_params_info_t params_info;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
#define SND_PCM_NONBLOCK 0x0001
|
||||
#define SND_PCM_ASYNC 0x0002
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
@ -117,6 +118,7 @@ typedef enum {
|
|||
SND_PCM_TYPE_LBSERVER,
|
||||
} snd_pcm_type_t;
|
||||
|
||||
extern void (*snd_pcm_error)(const char *file, int line, const char *function, const char *fmt, ...);
|
||||
|
||||
int snd_pcm_open(snd_pcm_t **handle, char *name,
|
||||
int stream, int mode);
|
||||
|
|
@ -136,6 +138,7 @@ snd_pcm_type_t snd_pcm_type(snd_pcm_t *pcm);
|
|||
int snd_pcm_close(snd_pcm_t *pcm);
|
||||
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue