void AUD_del_capture (CaptureVoiceOut *cap, void *cb_opaque)

{

    struct capture_callback *cb;



    for (cb = cap->cb_head.lh_first; cb; cb = cb->entries.le_next) {

        if (cb->opaque == cb_opaque) {

            cb->ops.destroy (cb_opaque);

            QLIST_REMOVE (cb, entries);

            g_free (cb);



            if (!cap->cb_head.lh_first) {

                SWVoiceOut *sw = cap->hw.sw_head.lh_first, *sw1;



                while (sw) {

                    SWVoiceCap *sc = (SWVoiceCap *) sw;

#ifdef DEBUG_CAPTURE

                    dolog ("freeing %s\n", sw->name);

#endif



                    sw1 = sw->entries.le_next;

                    if (sw->rate) {

                        st_rate_stop (sw->rate);

                        sw->rate = NULL;

                    }

                    QLIST_REMOVE (sw, entries);

                    QLIST_REMOVE (sc, entries);

                    g_free (sc);

                    sw = sw1;

                }

                QLIST_REMOVE (cap, entries);



                g_free (cap);

            }

            return;

        }

    }

}
void AUD_del_capture (CaptureVoiceOut *cap, void *cb_opaque)

{

    struct capture_callback *cb;



    for (cb = cap->cb_head.lh_first; cb; cb = cb->entries.le_next) {

        if (cb->opaque == cb_opaque) {

            cb->ops.destroy (cb_opaque);

            QLIST_REMOVE (cb, entries);

            g_free (cb);



            if (!cap->cb_head.lh_first) {

                SWVoiceOut *sw = cap->hw.sw_head.lh_first, *sw1;



                while (sw) {

                    SWVoiceCap *sc = (SWVoiceCap *) sw;

#ifdef DEBUG_CAPTURE

                    dolog ("freeing %s\n", sw->name);

#endif



                    sw1 = sw->entries.le_next;

                    if (sw->rate) {

                        st_rate_stop (sw->rate);

                        sw->rate = NULL;

                    }

                    QLIST_REMOVE (sw, entries);

                    QLIST_REMOVE (sc, entries);

                    g_free (sc);

                    sw = sw1;

                }

                QLIST_REMOVE (cap, entries);



                g_free (cap);

            }

            return;

        }

    }

}
void FUNC_0 (CaptureVoiceOut *VAR_0, void *VAR_1)

{

    struct capture_callback *VAR_2;



    for (VAR_2 = VAR_0->cb_head.lh_first; VAR_2; VAR_2 = VAR_2->entries.le_next) {

        if (VAR_2->opaque == VAR_1) {

            VAR_2->ops.destroy (VAR_1);

            QLIST_REMOVE (VAR_2, entries);

            g_free (VAR_2);



            if (!VAR_0->cb_head.lh_first) {

                SWVoiceOut *sw = VAR_0->hw.sw_head.lh_first, *sw1;



                while (sw) {

                    SWVoiceCap *sc = (SWVoiceCap *) sw;

#ifdef DEBUG_CAPTURE

                    dolog ("freeing %s\n", sw->name);

#endif



                    sw1 = sw->entries.le_next;

                    if (sw->rate) {

                        st_rate_stop (sw->rate);

                        sw->rate = NULL;

                    }

                    QLIST_REMOVE (sw, entries);

                    QLIST_REMOVE (sc, entries);

                    g_free (sc);

                    sw = sw1;

                }

                QLIST_REMOVE (VAR_0, entries);



                g_free (VAR_0);

            }

            return;

        }

    }

}
void FUNC_0 (CaptureVoiceOut *VAR_0, void *VAR_1)
{ struct capture_callback *VAR_2; for (VAR_2 = VAR_0->cb_head.lh_first; VAR_2; VAR_2 = VAR_2->entries.le_next) { if (VAR_2->opaque == VAR_1) { VAR_2->ops.destroy (VAR_1); QLIST_REMOVE (VAR_2, entries); g_free (VAR_2); if (!VAR_0->cb_head.lh_first) { SWVoiceOut *sw = VAR_0->hw.sw_head.lh_first, *sw1; while (sw) { SWVoiceCap *sc = (SWVoiceCap *) sw; #ifdef DEBUG_CAPTURE
dolog ("freeing %s\n", sw->name); #endif
sw1 = sw->entries.le_next; if (sw->rate) { st_rate_stop (sw->rate); sw->rate = NULL; } QLIST_REMOVE (sw, entries); QLIST_REMOVE (sc, entries); g_free (sc); sw = sw1; } QLIST_REMOVE (VAR_0, entries); g_free (VAR_0); } return; } } }