mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-25 08:57:05 -05:00
try to vacuum a little when nothing is going on
This commit is contained in:
parent
e8d7c50c00
commit
620bf84573
4 changed files with 17 additions and 0 deletions
|
|
@ -250,3 +250,14 @@ int pa_core_exit(pa_core *c, pa_bool_t force, int retval) {
|
|||
c->mainloop->quit(c->mainloop, retval);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void pa_core_maybe_vacuum(pa_core *c) {
|
||||
pa_assert(c);
|
||||
|
||||
if (!pa_idxset_isempty(c->sink_inputs) ||
|
||||
!pa_idxset_isempty(c->source_outputs))
|
||||
return;
|
||||
|
||||
pa_log_debug("Hmm, no streams around, trying to vacuum.");
|
||||
pa_mempool_vacuum(c->mempool);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue