alsa-seq: attempt to get more data in timeout

Also emit the NEED_DATA status so that the graph will pull in new
midi data even when we don't output anything.

Fixes #2775
This commit is contained in:
Wim Taymans 2022-10-20 17:44:42 +02:00
parent f7c4909243
commit 4c1115cf1d

View file

@ -803,8 +803,8 @@ static void alsa_on_timeout_event(struct spa_source *source)
update_time(state, state->current_time, false); update_time(state, state->current_time, false);
res = process_read(state); res = process_read(state);
if (res > 0) if (res >= 0)
spa_node_call_ready(&state->callbacks, res); spa_node_call_ready(&state->callbacks, res | SPA_STATUS_NEED_DATA);
set_timeout(state, state->next_time); set_timeout(state, state->next_time);
} }