~vcs-imports/alsa-utils/trunk

Viewing all changes in revision 1456.

  • Committer: Takashi Iwai
  • Author(s): Prashant Malani
  • Date: 2019-02-11 08:13:47 UTC
  • Revision ID: git-v1:52c9cc9571659377800fea026cf31b24e2f31394
seq: arecordmidi: Add num-events option

Add a command line option to automatically exit after recording a fixed
number of MIDI events. This allows a program using arecordmidi to expect
a MIDI file to be written automatically when the specified number of
events have been received, instead of having to send a SIGINT or SIGTERM
programmatically.

It also avoids the need to have the arecordmidi process running in the
background, and then constantly stat the output file to check if any
bytes have been written to it (this makes for less predictable and
longer-running tests).

This functionality finds use in Chrome OS functional testing, since
having to send SIGTERM/SIGINT programmatically and then wait for the
output file adds unpredictability and delay to the tests.

The addition of this command-line option should (hopefully) not break
any existing usage.

Signed-off-by: Prashant Malani <pmalani@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: