int slot_index, bit_index, table_index;
table_index = 0;
- int num_written = 0;
for (slot_index = 0; slot_index < num_slots && table_index < table_size; slot_index++) {
unsigned bit_mask = 1;
for (bit_index = 0; bit_index < bits_per_slot && table_index < table_size; bit_index++) {
return ar->mixer_state[ctl_index].ctl;
}
+#if 0
static void path_print(struct audio_route *ar, struct mixer_path *path)
{
unsigned int i;
}
}
}
+#endif
static void path_free(struct audio_route *ar)
{
}
}
free(ar->mixer_path);
+ ar->mixer_path = NULL;
+ ar->mixer_path_size = 0;
}
static struct mixer_path *path_get_by_name(struct audio_route *ar,
static int path_reset(struct audio_route *ar, struct mixer_path *path)
{
unsigned int i;
- unsigned int j;
unsigned int ctl_index;
struct mixer_ctl *ctl;
enum mixer_ctl_type type;
static int alloc_mixer_state(struct audio_route *ar)
{
unsigned int i;
- unsigned int j;
unsigned int num_values;
struct mixer_ctl *ctl;
enum mixer_ctl_type type;
FILE *file;
int bytes_read;
void *buf;
- int i;
struct audio_route *ar;
ar = calloc(1, sizeof(struct audio_route));
return ar;
err_parse:
+ path_free(ar);
XML_ParserFree(parser);
err_parser_create:
fclose(file);
{
free_mixer_state(ar);
mixer_close(ar->mixer);
+ path_free(ar);
free(ar);
}