Lines Matching defs:string
32 #include <string.h>
127 * \brief Convert a card string to the card index.
131 * \param string A string identifying the card.
135 * The accepted formats for "string" are:
136 * - The index of the card (as listed in /proc/asound/cards), given as string
140 int snd_card_get_index(const char *string)
146 if (!string || *string == '\0')
148 if ((isdigit(*string) && *(string + 1) == 0) ||
149 (isdigit(*string) && isdigit(*(string + 1)) && *(string + 2) == 0)) {
151 if (sscanf(string, "%i", &card) != 1)
160 if (string[0] == '/')
162 return snd_card_load2(string);
176 if (!strcmp((const char *)info.id, string))