Control API encapsulation. Better names for kernel API. Simpler PCM hw_params API. Added missing const.

This commit is contained in:
Abramo Bagnara 2001-02-06 23:48:10 +00:00
parent ccb399f0cd
commit 8f0cb26fdf
71 changed files with 2001 additions and 694 deletions

View file

@ -23,7 +23,6 @@
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include "local.h"

View file

@ -19,8 +19,6 @@
*
*/
#include <errno.h>
#include <assert.h>
#include "local.h"
size_t snd_hwdep_info_sizeof()
@ -31,7 +29,7 @@ size_t snd_hwdep_info_sizeof()
int snd_hwdep_info_malloc(snd_hwdep_info_t **ptr)
{
assert(ptr);
*ptr = malloc(sizeof(snd_hwdep_info_t));
*ptr = calloc(1, sizeof(snd_hwdep_info_t));
if (!*ptr)
return -ENOMEM;
return 0;
@ -60,13 +58,13 @@ int snd_hwdep_info_get_card(const snd_hwdep_info_t *obj)
return obj->card;
}
const char * snd_hwdep_info_get_id(const snd_hwdep_info_t *obj)
const char *snd_hwdep_info_get_id(const snd_hwdep_info_t *obj)
{
assert(obj);
return obj->id;
}
const char * snd_hwdep_info_get_name(const snd_hwdep_info_t *obj)
const char *snd_hwdep_info_get_name(const snd_hwdep_info_t *obj)
{
assert(obj);
return obj->name;