mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-02 09:01:48 -05:00
Another API cleanups.
Added setup functions for rawmidi and timer interfaces.
This commit is contained in:
parent
40fd003a4d
commit
986c1500d2
4 changed files with 25 additions and 0 deletions
|
|
@ -133,6 +133,17 @@ int snd_rawmidi_channel_params(snd_rawmidi_t *rmidi, snd_rawmidi_params_t * para
|
|||
return 0;
|
||||
}
|
||||
|
||||
int snd_rawmidi_channel_setup(snd_rawmidi_t *rmidi, snd_rawmidi_setup_t * setup)
|
||||
{
|
||||
if (!rmidi || !setup)
|
||||
return -EINVAL;
|
||||
if (setup->channel < 0 || setup->channel > 1)
|
||||
return -EINVAL;
|
||||
if (ioctl(rmidi->fd, SND_RAWMIDI_IOCTL_CHANNEL_SETUP, setup) < 0)
|
||||
return -errno;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int snd_rawmidi_channel_status(snd_rawmidi_t *rmidi, snd_rawmidi_status_t * status)
|
||||
{
|
||||
if (!rmidi || !status)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue