mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-05 13:30:00 -05:00
rawmidi: allow timestamp reads only for the appropriate read mode
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
11f54c2774
commit
5ac6198376
1 changed files with 2 additions and 0 deletions
|
|
@ -1112,5 +1112,7 @@ ssize_t snd_rawmidi_tread(snd_rawmidi_t *rawmidi, struct timespec *tstamp, void
|
|||
assert(rawmidi);
|
||||
assert(rawmidi->stream == SND_RAWMIDI_STREAM_INPUT);
|
||||
assert(buffer || size == 0);
|
||||
if ((rawmidi->params_mode & SNDRV_RAWMIDI_MODE_FRAMING_MASK) == SNDRV_RAWMIDI_MODE_FRAMING_TSTAMP)
|
||||
return -EINVAL;
|
||||
return (rawmidi->ops->tread)(rawmidi, tstamp, buffer, size);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue