summaryrefslogtreecommitdiff
path: root/src/seq/seq_midi_event.c
Commit message (Collapse)AuthorAgeFilesLines
* add NetBSD/OpenBSD build support (except test/)SASANO Takayoshi2022-10-171-0/+2
| | | | | | Fixes: https://github.com/alsa-project/alsa-lib/pull/250 Signed-off-by: SASANO Takayoshi <uaa@uaa.org.uk> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* seq: Fix signedness in MIDI encoder/decoderTakashi Iwai2018-08-231-1/+3
| | | | | | | | | | | | | | | | | | | The qlen field of struct snd_midi_event was declared as size_t while status_events[] assigns the qlen to -1 indicating to skip. This leads to the misinterpretation since size_t is unsigned, hence it passes the check "dev.qlen > 0" incorrectly in snd_midi_event_encode_byte(), which eventually results in a memory corruption. Also, snd_midi_event_decode() doesn't consider about a negative qlen value and tries to copy the size as is. This patch fixes these issues: the first one is addressed by simply replacing size_t with ssize_t in snd_midi_event struct. For the latter, a check "qlen <= 0" is added to bail out; this is also good as a slight optimization. Reported-by: Prashant Malani <pmalani@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Change FSF address (Franklin Street)Jaroslav Kysela2017-11-141-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* more midi_event documentationClemens Ladisch2009-07-061-54/+194
| | | | | | Expand the documentation for the snd_midi_event_* functions. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
* seq_midi_event: fix decoding of (N)RPN eventsClemens Ladisch2009-06-221-4/+4
| | | | | | | | When decoding (N)RPN sequencer events into raw MIDI commands, the extra_decode_xrpn() function had accidentally swapped the MSB and LSB controller values of both the parameter number and the data value. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
* MIDI event decoder: prevent running status after sysexClemens Ladisch2009-06-221-0/+1
| | | | | | | | Running status cannot be using in the command immediately following a system exclusive command, so we have to reset the running status state in that case. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
* Make some static tables and strings constants.Diego E. 'Flameeyes' Pettenò2008-11-211-5/+5
| | | | | | | | | | | 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>
* Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.czJaroslav Kysela2007-10-151-2/+2
|
* seq_midi_event: fix parsing of F9/FD bytesClemens Ladisch2007-08-101-1/+1
| | | | | Check for a valid event type when encoding a system real-time message to prevent the bytes F9 or FD resulting in an empty sequencer message.
* seq_midi_event: fix parsing of missing data bytesClemens Ladisch2007-08-101-39/+41
| | | | | Reorganize the encoder logic to prevent status bytes that appear where data bytes are expected from being interpreted as data bytes.
* seq_midi_event: prevent running status after system messagesClemens Ladisch2007-08-101-0/+2
| | | | | | Reset the event type after encoding a system message to prevent any following data bytes from being interpreted as data for a running status system message, which is not allowed in MIDI.
* seq_midi_event: fix encoding of data bytes after end of sysexClemens Ladisch2007-08-101-7/+8
| | | | | | Create a new state ST_INVALID for the encoder to prevent data bytes at the beginning of a stream or after a sysex message being interpreted as note-off parameters.
* remove superfluous free() checksClemens Ladisch2006-02-271-4/+2
| | | | | free() correctly handles NULL pointers, so we can omit explicit checks for that condition.
* Fix type-punningTakashi Iwai2005-09-291-10/+10
| | | | | Fixed compile warnings on the latest gcc about type-punning. Removed unnecessary casts.
* Fix doxygen documentsTakashi Iwai2005-05-241-3/+3
| | | | | Fix the warnings of doxygen parsing. Add some missing documentation.
* fixed compile warnings regarding const.Takashi Iwai2004-02-251-16/+16
|
* added const modifier to some function argumentsTakashi Iwai2003-07-291-2/+2
|
* Reverted back (N)RPN decoding - it is difficult to do this job hereJaroslav Kysela2003-06-161-86/+8
|
* Added proper handling of nonregistered and registered MIDI parametersJaroslav Kysela2003-06-161-14/+131
|
* Fixed encoding of sysex sequencer eventJaroslav Kysela2002-12-051-1/+1
|
* Reverted back the PCM API.Jaroslav Kysela2002-09-191-0/+7
| | | | | | New snd_pcm_hw_params_* functions are available only explicitly when ALSA_PCM_NEW_HW_PARAMS_API is defined. Updated documentation and test code to new API.
* Fixed sysex event encodingJaroslav Kysela2002-05-111-0/+1
|
* Added snd_midi_event_no_status()Jaroslav Kysela2002-04-191-15/+36
|
* Removed IPC code from sequencer codeJaroslav Kysela2002-04-171-1/+0
|
* Fixed initialization of snd_midi_event_t structure seq_midi_event_tJaroslav Kysela2002-03-041-1/+2
|
* Updated GNU GPL license (address).Jaroslav Kysela2001-12-301-5/+5
| | | | Changed GNU LGPL licence from 2.0 to 2.1.
* Changed GPL to LGPL as agreed by TakashiJaroslav Kysela2001-09-131-7/+8
|
* More documentation updates.Jaroslav Kysela2001-07-181-0/+1
|
* More documentation enhancements / removal of non-existent functions.Jaroslav Kysela2001-07-111-0/+2
|
* Added documentation for instrument and midi event functions.Jaroslav Kysela2001-07-111-44/+108
| | | | | Removed snd_enum_() macros. Documentation changes in asoundlib.h.
* Major change to sequencer API.Jaroslav Kysela2001-07-041-38/+38
| | | | | | | | | | | | | | | | | | | | | | | The sequencer API is totally recoded with the style of "encapsulation" in other api. The structure becomes opaque and accessed only via functions. Other changes: - There is no longer group in client and port info. - snd_seq_query_subs_t is renamed to snd_seq_query_subscribe_t. - snd_seq_delete_port takes only the port id argument instead of port_info structure. - snd_seq_input/output_buffer_size are renamed as snd_seq_get_input/output_buffer_size. Similarly snd_seq_resize_input/output_buffer are renamed as snd_seq_set_input/output_buffer_size. - snd_seq_get_named_queue is renamed to snd_seq_query_named_queue. - Sync codes are removed temporarily from API. - Subscription conditions are accessed via the corresponding functions. convert_time is named now as time_update. - snd_seq_get/set_queue_owner are removed. Use snd_seq_get/set_queue_info instead. - Instrument put/get/remove structure is unified as snd_instr_header_t.
* Lot of cleanings with the help of gcc3Abramo Bagnara2001-03-291-5/+5
|
* Control API encapsulation. Better names for kernel API. Simpler PCM ↵Abramo Bagnara2001-02-061-1/+0
| | | | hw_params API. Added missing const.
* Removed card type from devices info. Added card number to devices info. ↵Abramo Bagnara2001-01-311-1/+1
| | | | Completed encapsulation of PCM API. Removed snd_pcm_card(). All copy functions now have the form copy(dst, src).
* First step toward encapsulationAbramo Bagnara2001-01-291-6/+6
|
* Added sequencer event <-> MIDI byte stream coder from the kernel spaceJaroslav Kysela2000-11-261-0/+448