mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
alsa-seq: warn when receive fails
This can happen when allocation fails or the message is too long.
This commit is contained in:
parent
cdc150a2c3
commit
ea0ba1162e
1 changed files with 3 additions and 1 deletions
|
|
@ -503,7 +503,7 @@ static int process_read(struct seq_state *state)
|
|||
int res;
|
||||
|
||||
/* copy all new midi events into their port buffers */
|
||||
while (snd_seq_event_input(state->event.hndl, &ev) > 0) {
|
||||
while ((res = snd_seq_event_input(state->event.hndl, &ev)) > 0) {
|
||||
const snd_seq_addr_t *addr = &ev->source;
|
||||
struct seq_port *port;
|
||||
uint64_t ev_time, diff;
|
||||
|
|
@ -561,6 +561,8 @@ static int process_read(struct seq_state *state)
|
|||
MAX_EVENT_SIZE > port->buffer->buf->datas[0].maxsize)
|
||||
break;
|
||||
}
|
||||
if (res < 0 && res != -EAGAIN)
|
||||
spa_log_warn(state->log, "event read failed: %s", snd_strerror(res));
|
||||
|
||||
/* prepare a buffer on each port, some ports might have their
|
||||
* buffer filled above */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue