mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-02 09:01:48 -05:00
rawmidi: do not abort when seeing the hint node
Add the hint node to the nodes that are allowed in rawmidi definitions, and factor out the detection of such nodes into a common function.
This commit is contained in:
parent
ddf9599542
commit
252fd43461
4 changed files with 20 additions and 6 deletions
|
|
@ -987,3 +987,19 @@ ssize_t snd_rawmidi_read(snd_rawmidi_t *rawmidi, void *buffer, size_t size)
|
|||
assert(buffer || size == 0);
|
||||
return (rawmidi->ops->read)(rawmidi, buffer, size);
|
||||
}
|
||||
|
||||
int snd_rawmidi_conf_generic_id(const char *id)
|
||||
{
|
||||
static const char *ids[] = {
|
||||
"comment",
|
||||
"type",
|
||||
"hint",
|
||||
};
|
||||
unsigned int k;
|
||||
|
||||
for (k = 0; k < sizeof ids / sizeof *ids; ++k) {
|
||||
if (strcmp(id, ids[k]) == 0)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue