alsa-lib/include/pcm.h

64 lines
2.7 KiB
C
Raw Normal View History

1998-08-13 15:42:56 +00:00
/****************************************************************************
* *
* pcm.h *
* Digital Audio Interface *
* *
****************************************************************************/
1998-11-27 15:06:26 +00:00
1998-08-13 15:42:56 +00:00
#define SND_PCM_OPEN_PLAYBACK (O_WRONLY)
#define SND_PCM_OPEN_RECORD (O_RDONLY)
#define SND_PCM_OPEN_DUPLEX (O_RDWR)
1998-11-27 15:06:26 +00:00
1998-08-13 15:42:56 +00:00
#ifdef __cplusplus
extern "C" {
#endif
typedef struct snd_pcm snd_pcm_t;
typedef struct snd_pcm_loopback snd_pcm_loopback_t;
int snd_pcm_open(snd_pcm_t **handle, int card, int device, int mode);
int snd_pcm_close(snd_pcm_t *handle);
int snd_pcm_file_descriptor(snd_pcm_t *handle);
int snd_pcm_block_mode(snd_pcm_t *handle, int enable);
int snd_pcm_info(snd_pcm_t *handle, snd_pcm_info_t * info);
int snd_pcm_playback_info(snd_pcm_t *handle, snd_pcm_playback_info_t * info);
int snd_pcm_record_info(snd_pcm_t *handle, snd_pcm_record_info_t * info);
int snd_pcm_playback_format(snd_pcm_t *handle, snd_pcm_format_t * format);
int snd_pcm_record_format(snd_pcm_t *handle, snd_pcm_format_t * format);
int snd_pcm_playback_params(snd_pcm_t *handle, snd_pcm_playback_params_t * params);
int snd_pcm_record_params(snd_pcm_t *handle, snd_pcm_record_params_t * params);
int snd_pcm_playback_status(snd_pcm_t *handle, snd_pcm_playback_status_t * status);
int snd_pcm_record_status(snd_pcm_t *handle, snd_pcm_record_status_t * status);
int snd_pcm_drain_playback(snd_pcm_t *handle);
int snd_pcm_flush_playback(snd_pcm_t *handle);
int snd_pcm_flush_record(snd_pcm_t *handle);
int snd_pcm_playback_pause(snd_pcm_t *handle, int enable);
int snd_pcm_playback_time(snd_pcm_t *handle, int enable);
int snd_pcm_record_time(snd_pcm_t *handle, int enable);
ssize_t snd_pcm_write(snd_pcm_t *handle, const void *buffer, size_t size);
ssize_t snd_pcm_read(snd_pcm_t *handle, void *buffer, size_t size);
1998-08-13 15:42:56 +00:00
#ifdef __cplusplus
}
#endif
1998-11-10 13:26:25 +00:00
#define SND_PCM_LB_OPEN_PLAYBACK 0
#define SND_PCM_LB_OPEN_RECORD 1
#ifdef __cplusplus
extern "C" {
#endif
int snd_pcm_loopback_open(snd_pcm_loopback_t **handle, int card, int device, int mode);
int snd_pcm_loopback_close(snd_pcm_loopback_t *handle);
int snd_pcm_loopback_file_descriptor(snd_pcm_loopback_t *handle);
int snd_pcm_loopback_block_mode(snd_pcm_loopback_t *handle, int enable);
int snd_pcm_loopback_stream_mode(snd_pcm_loopback_t *handle, int mode);
int snd_pcm_loopback_format(snd_pcm_loopback_t *handle, snd_pcm_format_t * format);
ssize_t snd_pcm_loopback_read(snd_pcm_loopback_t *handle, void *buffer, size_t size);
1998-11-10 13:26:25 +00:00
#ifdef __cplusplus
}
#endif
1998-11-27 15:06:26 +00:00