mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
audiomixer: small improvements
Improve the audiomixer state handling Improve PortIO status handling.
This commit is contained in:
parent
e734d239b9
commit
fe68ca1be3
9 changed files with 109 additions and 97 deletions
|
|
@ -163,11 +163,26 @@ make_node (AppData *data, SpaNode **node, const char *lib, const char *name)
|
|||
return SPA_RESULT_ERROR;
|
||||
}
|
||||
|
||||
static void
|
||||
handle_events (AppData *data)
|
||||
{
|
||||
SDL_Event event;
|
||||
while (SDL_PollEvent (&event)) {
|
||||
switch (event.type) {
|
||||
case SDL_QUIT:
|
||||
exit (0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
on_source_event (SpaNode *node, SpaEvent *event, void *user_data)
|
||||
{
|
||||
AppData *data = user_data;
|
||||
|
||||
handle_events (data);
|
||||
|
||||
if (SPA_EVENT_TYPE (event) == data->type.event_node.HaveOutput) {
|
||||
SpaResult res;
|
||||
SpaBuffer *b;
|
||||
|
|
@ -496,7 +511,7 @@ run_async_source (AppData *data)
|
|||
data->running = false;
|
||||
}
|
||||
|
||||
sleep (10);
|
||||
sleep (10000);
|
||||
|
||||
if (data->running) {
|
||||
data->running = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue