Commit graph

14 commits

Author SHA1 Message Date
John K. Luebs
4cb3e3a7b5 aplaymidi: Set event completely for tempo event
After UMP support was added in b399fb8 ev.type setting was inadvertently
dropped in the code path handling tempo meta event.
This is causing tempo meta events to not be handled at all.
Moreover, snd_seq_ev_set_fixed is also missing so MIDI files with
variable events such as SYSEX before the tempo meta event usually are
causing a segfault.

Fixes: b399fb85a9 ("aplaymidi: Add UMP support")
Closes: https://github.com/alsa-project/alsa-utils/issues/241
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-01-08 09:52:55 +01:00
Jaroslav Kysela
feb9c4cdec reshuffle included files to include config.h as first
config.h may contain defines like _FILE_OFFSET_BITS which influence
the system wide include files (off_t types, open -> open64 function
usage etc.).

Related: https://github.com/alsa-project/alsa-utils/pull/223
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 18:48:23 +02:00
Jaroslav Kysela
181e19017d aplaymidi: fix the verbose compilation warnings for latest gcc
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 15:42:19 +02:00
Takashi Iwai
b399fb85a9 aplaymidi: Add UMP support
By switching via the new option -u, aplaymidi can behave as a UMP
client and output UMP packets instead of legacy sequencer events.
As of now, the only supported version is 1.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-06 15:44:58 +02:00
Michael Forney
cb47f6dcf4 Avoid empty initializer list
To zero-initialize an object, use `{0}` instead.

Signed-off-by: Michael Forney <mforney@mforney.org>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-02-10 12:39:43 +01:00
Michael Forney
62a765087e Avoid pointer arithmetic on void *
The pointer operand to the binary `+` operator must be to a complete
object type.

Signed-off-by: Michael Forney <mforney@mforney.org>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-02-10 12:38:52 +01:00
Jaroslav Kysela
b1e3d945b7 Change FSF address (Franklin Street)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2017-11-14 14:28:53 +01:00
Clemens Ladisch
d94ab95c0d 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>
2009-08-17 12:29:11 +02:00
Diego E. 'Flameeyes' Pettenò
6232f1c96c Make some static tables and strings constants.
By doing this we move them from the .data section to .rodata setion,
or from .data.rel to .data.rel.ro.

The .rodata section is mapped directly from the on-disk file, which is
always a save, while .data.rel.ro is mapped directly when using
prelink, which is a save in a lot of cases.

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
2008-11-21 13:10:02 +01:00
Clemens Ladisch
4de3d5a273 aplaymidi: handle big SysEx commands
Make sure that the sequencer output buffer is big enough to handle all
events that we send, and split large SysEx commands into one-second
chunks so that the sequencer kernel code can handle them.
2006-12-04 18:01:23 +01:00
Clemens Ladisch
3a7f46c00f aplaymidi: list only MIDI-capable ports
When listing ports with aplaymidi/arecordmidi, show only
ports that understand MIDI messages, i.e., that have the
SND_SEQ_PORT_TYPE_MIDI_GENERIC flag set.
2006-05-02 15:43:07 +02:00
Takashi Iwai
39ff48b437 Output help messages to stdout
Output help messages and lists to stdout instead of stderr.
2005-06-23 10:39:16 +00:00
Takashi Iwai
cae569e10e Remove unused variable
Removed unused variable.
2005-05-13 17:30:50 +00:00
Jaroslav Kysela
1ae3fa8532 Clemens Ladisch <clemens@ladisch.de>
add aplaymidi & arecordmidi utilities
2004-02-23 10:58:34 +00:00