Commit 62d2146d authored by Jaroslav Kysela's avatar Jaroslav Kysela

[ALSA] fix counting of MIDI input overruns

RawMidi Midlevel
Do not throw away the old value of the overrun counter when
more than one byte is received.
Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
parent f6d1f14c
......@@ -872,7 +872,7 @@ int snd_rawmidi_receive(snd_rawmidi_substream_t * substream, const unsigned char
count1 = count;
if (count1 > (int)(runtime->buffer_size - runtime->avail)) {
count1 = runtime->buffer_size - runtime->avail;
runtime->xruns = count - count1;
runtime->xruns += count - count1;
}
if (count1 > 0) {
memcpy(runtime->buffer, buffer, count1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment