mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 17:15:43 +01:00
aplaymidi: reduce bandwidth for big SysEx messages
When throttling the data rate for big SysEx messages, use the bandwidth that devices use in practice instead of the theoretical maximum. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
This commit is contained in:
parent
077467a87e
commit
d94ab95c0d
1 changed files with 6 additions and 1 deletions
|
@ -31,7 +31,12 @@
|
|||
#include "aconfig.h"
|
||||
#include "version.h"
|
||||
|
||||
#define MIDI_BYTES_PER_SEC 3125
|
||||
/*
|
||||
* 31.25 kbaud, one start bit, eight data bits, two stop bits.
|
||||
* (The MIDI spec says one stop bit, but every transmitter uses two, just to be
|
||||
* sure, so we better not exceed that to avoid overflowing the output buffer.)
|
||||
*/
|
||||
#define MIDI_BYTES_PER_SEC (31250 / (1 + 8 + 2))
|
||||
|
||||
/*
|
||||
* A MIDI event after being parsed/loaded from the file.
|
||||
|
|
Loading…
Reference in a new issue