mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
idxset: Add pa_idxset_remove_all()
Slightly nicer than using pa_idxset_steal_first() in a loop.
This commit is contained in:
parent
31ee1a7d54
commit
2c666e3e16
6 changed files with 25 additions and 37 deletions
|
|
@ -746,19 +746,11 @@ void pa__done(pa_module*m) {
|
|||
if (u->jacks)
|
||||
pa_hashmap_free(u->jacks, NULL);
|
||||
|
||||
if (u->card && u->card->sinks) {
|
||||
pa_sink *s;
|
||||
if (u->card && u->card->sinks)
|
||||
pa_idxset_remove_all(u->card->sinks, (pa_free_cb_t) pa_alsa_sink_free);
|
||||
|
||||
while ((s = pa_idxset_steal_first(u->card->sinks, NULL)))
|
||||
pa_alsa_sink_free(s);
|
||||
}
|
||||
|
||||
if (u->card && u->card->sources) {
|
||||
pa_source *s;
|
||||
|
||||
while ((s = pa_idxset_steal_first(u->card->sources, NULL)))
|
||||
pa_alsa_source_free(s);
|
||||
}
|
||||
if (u->card && u->card->sources)
|
||||
pa_idxset_remove_all(u->card->sources, (pa_free_cb_t) pa_alsa_source_free);
|
||||
|
||||
if (u->card)
|
||||
pa_card_free(u->card);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue