mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-06 13:29:59 -05:00
Control API encapsulation. Better names for kernel API. Simpler PCM hw_params API. Added missing const.
This commit is contained in:
parent
ccb399f0cd
commit
8f0cb26fdf
71 changed files with 2001 additions and 694 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue