]> git.alsa-project.org Git - alsa-lib.git/commit
rawmidi: define more abstract API for the timestamp reads
authorJaroslav Kysela <perex@perex.cz>
Tue, 24 Aug 2021 09:36:30 +0000 (11:36 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 28 Oct 2021 06:40:20 +0000 (08:40 +0200)
commit5a5c2953ea15ad10027619b0609d8873e4e66bbe
tree6f21f1dade76428b0d4453941b75a613d90712c2
parent42eeb5eca03accb9711698e3991551a22e762543
rawmidi: define more abstract API for the timestamp reads

The frame structure is a bit internal thing for the kernel
data transfer implementation. Introduce snd_rawmidi_tread()
function which is straight for the application usage and hides
the framing data transfers (kernel space API).

The current code implements the read cache and does the merging
of the frame reads with the similar timestamps (opposite
to the kernel data split for big chunks).

If the application wants to use super-duper-lighting-fast reads,
the snd_rawmidi_read() may be used, but the structure must be
defined on it's own, because this mechanism is not preferred
and unsupported.

BugLink: https://github.com/alsa-project/alsa-lib/issues/172
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
include/rawmidi.h
src/rawmidi/rawmidi.c
src/rawmidi/rawmidi_hw.c
src/rawmidi/rawmidi_local.h
test/rawmidi.c