mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Replaced SND_CARDS with constant.
This commit is contained in:
parent
35cb79860d
commit
22ff96036a
3 changed files with 3 additions and 3 deletions
|
|
@ -192,7 +192,7 @@ int snd_ctl_hw_open(snd_ctl_t **handle, char *name, int card)
|
||||||
|
|
||||||
*handle = NULL;
|
*handle = NULL;
|
||||||
|
|
||||||
assert(card >= 0 && card < SND_CARDS);
|
assert(card >= 0 && card < 32);
|
||||||
sprintf(filename, SND_FILE_CONTROL, card);
|
sprintf(filename, SND_FILE_CONTROL, card);
|
||||||
if ((fd = open(filename, O_RDWR)) < 0) {
|
if ((fd = open(filename, O_RDWR)) < 0) {
|
||||||
snd_card_load(card);
|
snd_card_load(card);
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ int snd_hwdep_open(snd_hwdep_t **handle, int card, int device, int mode)
|
||||||
|
|
||||||
*handle = NULL;
|
*handle = NULL;
|
||||||
|
|
||||||
if (card < 0 || card >= SND_CARDS)
|
if (card < 0 || card >= 32)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
sprintf(filename, SND_FILE_HWDEP, card, device);
|
sprintf(filename, SND_FILE_HWDEP, card, device);
|
||||||
if ((fd = open(filename, mode)) < 0) {
|
if ((fd = open(filename, mode)) < 0) {
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ int snd_rawmidi_hw_open(snd_rawmidi_t **handlep, char *name, int card, int devic
|
||||||
|
|
||||||
*handlep = NULL;
|
*handlep = NULL;
|
||||||
|
|
||||||
assert(card >= 0 && card < SND_CARDS);
|
assert(card >= 0 && card < 32);
|
||||||
|
|
||||||
if ((ret = snd_ctl_hw_open(&ctl, NULL, card)) < 0)
|
if ((ret = snd_ctl_hw_open(&ctl, NULL, card)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue