diff options
Diffstat (limited to 'src/pulsecore/core.c')
-rw-r--r-- | src/pulsecore/core.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/pulsecore/core.c b/src/pulsecore/core.c index eef967a6..06573f17 100644 --- a/src/pulsecore/core.c +++ b/src/pulsecore/core.c @@ -6,7 +6,7 @@ PulseAudio is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published - by the Free Software Foundation; either version 2 of the License, + by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. PulseAudio is distributed in the hope that it will be useful, but @@ -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); +} |