mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 17:05:41 +01:00
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:
parent
7a41ac1568
commit
67f54274bd
4 changed files with 17 additions and 15 deletions
|
@ -364,7 +364,7 @@ int soundcard_setup_merge_data(int cardno)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int soundcard_open_ctl(void **ctlhandle, struct soundcard *soundcard)
|
||||
static int soundcard_open_ctl(snd_ctl_t **ctlhandle, struct soundcard *soundcard)
|
||||
{
|
||||
int err;
|
||||
|
||||
|
@ -377,7 +377,7 @@ static int soundcard_open_ctl(void **ctlhandle, struct soundcard *soundcard)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int soundcard_open_mix(void **mixhandle, struct soundcard *soundcard, struct mixer *mixer)
|
||||
static int soundcard_open_mix(snd_mixer_t **mixhandle, struct soundcard *soundcard, struct mixer *mixer)
|
||||
{
|
||||
int err;
|
||||
|
||||
|
@ -393,7 +393,7 @@ static int soundcard_open_mix(void **mixhandle, struct soundcard *soundcard, str
|
|||
int soundcard_setup_process_switches(int cardno)
|
||||
{
|
||||
int err;
|
||||
void *ctlhandle = NULL;
|
||||
snd_ctl_t *ctlhandle = NULL;
|
||||
struct soundcard *soundcard;
|
||||
struct ctl_switch *ctlsw;
|
||||
struct mixer *mixer;
|
||||
|
@ -461,8 +461,8 @@ int soundcard_setup_process_switches(int cardno)
|
|||
int soundcard_setup_process_data(int cardno)
|
||||
{
|
||||
int err;
|
||||
void *ctlhandle = NULL;
|
||||
void *mixhandle = NULL;
|
||||
snd_ctl_t *ctlhandle = NULL;
|
||||
snd_mixer_t *mixhandle = NULL;
|
||||
struct soundcard *soundcard;
|
||||
struct mixer *mixer;
|
||||
struct mixer_element *element;
|
||||
|
|
|
@ -325,7 +325,8 @@ static int determine_switches(void *handle, struct ctl_switch **csw, int interfa
|
|||
|
||||
static int soundcard_setup_collect_switches1(int cardno)
|
||||
{
|
||||
void *handle, *mhandle;
|
||||
snd_ctl_t *handle;
|
||||
snd_mixer_t *mhandle;
|
||||
struct soundcard *card, *first, *prev;
|
||||
int err, device;
|
||||
struct mixer *mixer, *mixerprev;
|
||||
|
@ -495,7 +496,8 @@ int soundcard_setup_collect_switches(int cardno)
|
|||
|
||||
static int soundcard_setup_collect_data1(int cardno)
|
||||
{
|
||||
void *handle, *mhandle;
|
||||
snd_ctl_t *handle;
|
||||
snd_mixer_t *mhandle;
|
||||
struct soundcard *card;
|
||||
int err, idx;
|
||||
struct mixer *mixer;
|
||||
|
|
|
@ -101,7 +101,7 @@ static void help(void)
|
|||
int info(void)
|
||||
{
|
||||
int err;
|
||||
void *handle;
|
||||
snd_mixer_t *handle;
|
||||
snd_mixer_info_t info;
|
||||
|
||||
if ((err = snd_mixer_open(&handle, card, device)) < 0) {
|
||||
|
@ -645,7 +645,7 @@ int show_element_contents(void *handle, snd_mixer_eid_t *eid, const char *space)
|
|||
int elements(void)
|
||||
{
|
||||
int err, idx;
|
||||
void *handle;
|
||||
snd_mixer_t *handle;
|
||||
snd_mixer_elements_t elements;
|
||||
snd_mixer_eid_t *element;
|
||||
|
||||
|
@ -683,7 +683,7 @@ int elements(void)
|
|||
int elements_contents(void)
|
||||
{
|
||||
int err, idx;
|
||||
void *handle;
|
||||
snd_mixer_t *handle;
|
||||
snd_mixer_elements_t elements;
|
||||
snd_mixer_eid_t *element;
|
||||
|
||||
|
@ -761,7 +761,7 @@ int show_group(void *handle, snd_mixer_gid_t *gid, const char *space)
|
|||
int groups(void)
|
||||
{
|
||||
int err, idx;
|
||||
void *handle;
|
||||
snd_mixer_t *handle;
|
||||
snd_mixer_groups_t groups;
|
||||
snd_mixer_gid_t *group;
|
||||
|
||||
|
@ -1091,7 +1091,7 @@ int eset_mux1(int argc, char *argv[], void *handle, snd_mixer_eid_t *eid)
|
|||
int eset(int argc, char *argv[])
|
||||
{
|
||||
int err;
|
||||
void *handle;
|
||||
snd_mixer_t *handle;
|
||||
snd_mixer_eid_t eid;
|
||||
|
||||
if (argc < 1) {
|
||||
|
@ -1147,7 +1147,7 @@ int eset(int argc, char *argv[])
|
|||
int eget(int argc, char *argv[])
|
||||
{
|
||||
int err;
|
||||
void *handle;
|
||||
snd_mixer_t *handle;
|
||||
snd_mixer_eid_t eid;
|
||||
|
||||
if (argc < 1) {
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
/* global data */
|
||||
|
||||
char *command;
|
||||
void *pcm_handle;
|
||||
snd_pcm_t *pcm_handle;
|
||||
struct snd_pcm_playback_info pinfo;
|
||||
struct snd_pcm_record_info rinfo;
|
||||
snd_pcm_format_t rformat, format;
|
||||
|
@ -160,7 +160,7 @@ static void usage(char *command)
|
|||
|
||||
static void device_list(void)
|
||||
{
|
||||
void *handle;
|
||||
snd_ctl_t *handle;
|
||||
int card, err, dev, idx;
|
||||
unsigned int mask;
|
||||
struct snd_ctl_hw_info info;
|
||||
|
|
Loading…
Reference in a new issue