Better PCM mmap API. Fixed pcm_multi

This commit is contained in:
Abramo Bagnara 2001-04-13 15:40:53 +00:00
parent c4f95f48c3
commit 6a3b962d06
16 changed files with 279 additions and 279 deletions

View file

@ -42,7 +42,7 @@ typedef enum _snd_transport_type {
#define SND_PCM_IOCTL_STATE _IO ('A', 0xf1)
#define SND_PCM_IOCTL_MMAP _IO ('A', 0xf2)
#define SND_PCM_IOCTL_MUNMAP _IO ('A', 0xf3)
#define SND_PCM_IOCTL_MMAP_FORWARD _IO ('A', 0xf4)
#define SND_PCM_IOCTL_MMAP_COMMIT _IO ('A', 0xf4)
#define SND_PCM_IOCTL_AVAIL_UPDATE _IO ('A', 0xf5)
#define SND_PCM_IOCTL_ASYNC _IO ('A', 0xf6)
#define SND_PCM_IOCTL_CLOSE _IO ('A', 0xf7)
@ -77,8 +77,9 @@ typedef struct {
int fd;
} link;
struct {
snd_pcm_uframes_t offset;
snd_pcm_uframes_t frames;
} mmap_forward;
} mmap_commit;
} u;
char data[0];
} snd_pcm_shm_ctrl_t;
@ -101,7 +102,7 @@ typedef struct {
} async;
int device;
struct {
int type;
snd_pcm_surround_type_t type;
int device;
} surround;
int subscribe_events;

View file

@ -381,16 +381,12 @@ int snd_pcm_sw_params_dump(snd_pcm_sw_params_t *params, snd_output_t *out);
int snd_pcm_status_dump(snd_pcm_status_t *status, snd_output_t *out);
/* mmap */
const snd_pcm_channel_area_t *snd_pcm_mmap_areas(snd_pcm_t *pcm);
const snd_pcm_channel_area_t *snd_pcm_mmap_running_areas(snd_pcm_t *pcm);
const snd_pcm_channel_area_t *snd_pcm_mmap_stopped_areas(snd_pcm_t *pcm);
snd_pcm_sframes_t snd_pcm_mmap_forward(snd_pcm_t *pcm, snd_pcm_uframes_t size);
snd_pcm_uframes_t snd_pcm_mmap_offset(snd_pcm_t *pcm);
snd_pcm_uframes_t snd_pcm_mmap_xfer(snd_pcm_t *pcm, snd_pcm_uframes_t size);
snd_pcm_sframes_t snd_pcm_mmap_writei(snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size);
snd_pcm_sframes_t snd_pcm_mmap_readi(snd_pcm_t *pcm, void *buffer, snd_pcm_uframes_t size);
snd_pcm_sframes_t snd_pcm_mmap_writen(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size);
snd_pcm_sframes_t snd_pcm_mmap_readn(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size);
int snd_pcm_mmap_begin(snd_pcm_t *pcm,
const snd_pcm_channel_area_t **areas,
snd_pcm_uframes_t *offset,
snd_pcm_uframes_t *frames);
int snd_pcm_mmap_commit(snd_pcm_t *pcm, snd_pcm_uframes_t offset,
snd_pcm_uframes_t frames);
const char *snd_pcm_stream_name(snd_pcm_stream_t stream);
const char *snd_pcm_access_name(snd_pcm_access_t _access);