Added snd_card_type_string_to_enum and snd_card_type_enum_to_string functions.

- the /usr/share/alsa/cards.conf file contains the translation table
Added snd_sctl_build and snd_sctl_free functions.
Recoded the surround plugin to use the surround.conf file.
 - the /usr/share/alsa/surround.conf file contains the surround configuration
This commit is contained in:
Jaroslav Kysela 2001-05-10 08:32:40 +00:00
parent a5ddd2f21f
commit 232d703c23
10 changed files with 780 additions and 340 deletions

View file

@ -1,5 +1,5 @@
check_PROGRAMS=control mixer switches pause pcm pcmtest latency seq \
playmidi1 timer loopback rawmidi midiloop
playmidi1 timer loopback rawmidi midiloop cardid
control_LDADD=../src/libasound.la
mixer_LDADD=../src/libasound.la
@ -14,6 +14,7 @@ timer_LDADD=../src/libasound.la
loopback_LDADD=../src/libasound.la
rawmidi_LDADD=../src/libasound.la
midiloop_LDADD=../src/libasound.la
cardid_LDADD=../src/libasound.la
INCLUDES=-I$(top_srcdir)/include
# CFLAGS=-static -Wall -pipe -g

26
test/cardid.c Normal file
View file

@ -0,0 +1,26 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include "../include/asoundlib.h"
int main(int argc, char *argv[])
{
char *str;
snd_card_type_t type;
int idx, err;
for (idx = 1; idx < argc; idx++) {
if (isdigit(argv[idx][0])) {
type = (snd_card_type_t)atoi(argv[idx]);
err = snd_card_type_enum_to_string(type, &str);
printf("enum_to_string: input %i -> '%s', error %i\n", (int)type, str, err);
} else {
str = argv[idx];
err = snd_card_type_string_to_enum(str, &type);
printf("string_to_enum: input '%s' -> %i, error %i\n", str, (int)type, err);
}
}
return EXIT_SUCCESS;
}