Merged pcm2 branch.

This commit is contained in:
Jaroslav Kysela 2000-05-08 18:53:38 +00:00
parent 986c1500d2
commit 1cd6778173
40 changed files with 5053 additions and 3045 deletions

View file

@ -91,15 +91,6 @@ int snd_mixer_element_info_build(snd_mixer_t *handle, snd_mixer_element_info_t *
if ((err = snd_mixer_element_info(handle, element)) < 0)
return err;
break;
case SND_MIXER_ETYPE_SWITCH3:
element->data.switch3.voices_size = element->data.switch3.voices_over;
element->data.switch3.voices = element->data.switch3.voices_over = 0;
element->data.switch3.pvoices = (snd_mixer_voice_t *)malloc(element->data.switch3.voices_size * sizeof(snd_mixer_voice_t));
if (!element->data.switch3.pvoices)
return -ENOMEM;
if ((err = snd_mixer_element_info(handle, element)) < 0)
return err;
break;
case SND_MIXER_ETYPE_VOLUME1:
element->data.volume1.range_size = element->data.volume1.range_over;
element->data.volume1.range = element->data.volume1.range_over = 0;
@ -176,9 +167,6 @@ int snd_mixer_element_info_free(snd_mixer_element_info_t *element)
case SND_MIXER_ETYPE_PLAYBACK1:
safe_free((void **)&element->data.pcm1.pdevices);
break;
case SND_MIXER_ETYPE_SWITCH3:
safe_free((void **)&element->data.switch3.pvoices);
break;
case SND_MIXER_ETYPE_VOLUME1:
safe_free((void **)&element->data.volume1.prange);
break;

View file

@ -32,7 +32,7 @@
#include <search.h>
#define SND_FILE_MIXER "/dev/snd/mixerC%iD%i"
#define SND_MIXER_VERSION_MAX SND_PROTOCOL_VERSION(1, 0, 1)
#define SND_MIXER_VERSION_MAX SND_PROTOCOL_VERSION(2, 0, 0)
struct snd_mixer {
int card;
@ -335,7 +335,7 @@ void snd_mixer_sort_gid(snd_mixer_gid_t *list, int count,
/* Compare using name and index */
int snd_mixer_compare_gid_name_index(const snd_mixer_gid_t *a,
const snd_mixer_gid_t *b,
void* ignored)
void *ignored UNUSED)
{
int r = strcmp(a->name, b->name);
if (r != 0)
@ -426,7 +426,7 @@ void snd_mixer_sort_eid(snd_mixer_eid_t *list, int count,
/* Compare using name and index */
int snd_mixer_compare_eid_name_index(const snd_mixer_eid_t *a,
const snd_mixer_eid_t *b,
void* ignored)
void *ignored UNUSED)
{
int r = strcmp(a->name, b->name);
if (r != 0)