summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2005-07-21 08:01:22 +0200
committerJaroslav Kysela <perex@suse.cz>2005-07-28 12:22:34 +0200
commitd06e4c4001cf26147a6af0718703368944f0df32 (patch)
tree292c421927434fab4a5e6017b6b842b633d6e51b /sound
parent7858ffa062886706026cfff3ba80b8400b520501 (diff)
[ALSA] seq-midi - silently ignore non-MIDI events
ALSA sequencer When non-MIDI sequencer events are sent to a RawMIDI port, silently ignore them instead of returning a confusing error code which may upset the sequencer and abort the current write() to /dev/snd/seq. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/seq/seq_midi.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c
index 57be9155eb62..4374829ea770 100644
--- a/sound/core/seq/seq_midi.c
+++ b/sound/core/seq/seq_midi.c
@@ -134,7 +134,7 @@ static int event_process_midi(snd_seq_event_t * ev, int direct,
seq_midisynth_t *msynth = (seq_midisynth_t *) private_data;
unsigned char msg[10]; /* buffer for constructing midi messages */
snd_rawmidi_substream_t *substream;
- int res;
+ int len;
snd_assert(msynth != NULL, return -EINVAL);
substream = msynth->output_rfile.output;
@@ -146,20 +146,16 @@ static int event_process_midi(snd_seq_event_t * ev, int direct,
snd_printd("seq_midi: invalid sysex event flags = 0x%x\n", ev->flags);
return 0;
}
- res = snd_seq_dump_var_event(ev, (snd_seq_dump_func_t)dump_midi, substream);
+ snd_seq_dump_var_event(ev, (snd_seq_dump_func_t)dump_midi, substream);
snd_midi_event_reset_decode(msynth->parser);
- if (res < 0)
- return res;
} else {
if (msynth->parser == NULL)
return -EIO;
- res = snd_midi_event_decode(msynth->parser, msg, sizeof(msg), ev);
- if (res < 0)
- return res;
- if ((res = dump_midi(substream, msg, res)) < 0) {
+ len = snd_midi_event_decode(msynth->parser, msg, sizeof(msg), ev);
+ if (len < 0)
+ return 0;
+ if (dump_midi(substream, msg, len) < 0)
snd_midi_event_reset_decode(msynth->parser);
- return res;
- }
}
return 0;
}
lue='libreoffice-4-3-2'>libreoffice-4-3-2 Unnamed repository; edit this file to name it for gitweb.root
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2020-05-27 13:41:26 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2020-05-27 13:51:17 +0200
commit13d55bb42d2f5617f568fd8b000e3d0c8bc4be6b (patch)
tree02b3b1e0eb9d8c674f39a80375f862a5565622ff
parent3d85ba95fa37f794cb08d0c4adce45621c1d8a4d (diff)
update translations for 7.0.0 beta1libreoffice-7-0-branch-point
and force-fix errors using pocheck Change-Id: I1adc224071cce4a7e0b21209890b3777f9e2539b
Diffstat