Changed data type of alsa-lib handles from 'void *' to the specific type for

the handle in use. This should be more type-safe as the compiler will perform
checking on type now.
This commit is contained in:
Frank van de Pol 1999-06-02 00:40:30 +00:00
parent 9679707a00
commit 19811bb9b4
15 changed files with 417 additions and 404 deletions

View file

@ -13,27 +13,30 @@
extern "C" {
#endif
int snd_pcm_open(void **handle, int card, int device, int mode);
int snd_pcm_close(void *handle);
int snd_pcm_file_descriptor(void *handle);
int snd_pcm_block_mode(void *handle, int enable);
int snd_pcm_info(void *handle, snd_pcm_info_t * info);
int snd_pcm_playback_info(void *handle, snd_pcm_playback_info_t * info);
int snd_pcm_record_info(void *handle, snd_pcm_record_info_t * info);
int snd_pcm_playback_format(void *handle, snd_pcm_format_t * format);
int snd_pcm_record_format(void *handle, snd_pcm_format_t * format);
int snd_pcm_playback_params(void *handle, snd_pcm_playback_params_t * params);
int snd_pcm_record_params(void *handle, snd_pcm_record_params_t * params);
int snd_pcm_playback_status(void *handle, snd_pcm_playback_status_t * status);
int snd_pcm_record_status(void *handle, snd_pcm_record_status_t * status);
int snd_pcm_drain_playback(void *handle);
int snd_pcm_flush_playback(void *handle);
int snd_pcm_flush_record(void *handle);
int snd_pcm_playback_pause(void *handle, int enable);
int snd_pcm_playback_time(void *handle, int enable);
int snd_pcm_record_time(void *handle, int enable);
ssize_t snd_pcm_write(void *handle, const void *buffer, size_t size);
ssize_t snd_pcm_read(void *handle, void *buffer, size_t size);
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);
#ifdef __cplusplus
}
@ -46,13 +49,13 @@ ssize_t snd_pcm_read(void *handle, void *buffer, size_t size);
extern "C" {
#endif
int snd_pcm_loopback_open(void **handle, int card, int device, int mode);
int snd_pcm_loopback_close(void *handle);
int snd_pcm_loopback_file_descriptor(void *handle);
int snd_pcm_loopback_block_mode(void *handle, int enable);
int snd_pcm_loopback_stream_mode(void *handle, int mode);
int snd_pcm_loopback_format(void *handle, snd_pcm_format_t * format);
ssize_t snd_pcm_loopback_read(void *handle, void *buffer, size_t size);
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);
#ifdef __cplusplus
}