static void xmms_vocoder_destroy (xmms_xform_t *xform) { xmms_vocoder_data_t *data; xmms_config_property_t *config; g_return_if_fail (xform); data = xmms_xform_private_data_get (xform); g_return_if_fail (data); config = xmms_xform_config_lookup (xform, "enabled"); xmms_config_property_callback_remove (config, xmms_vocoder_config_changed, data); config = xmms_xform_config_lookup (xform, "speed"); xmms_config_property_callback_remove (config, xmms_vocoder_config_changed, data); config = xmms_xform_config_lookup (xform, "pitch"); xmms_config_property_callback_remove (config, xmms_vocoder_config_changed, data); config = xmms_xform_config_lookup (xform, "attack_detection"); xmms_config_property_callback_remove (config, xmms_vocoder_config_changed, data); pvocoder_close (data->pvoc); src_delete (data->resampler); g_string_free (data->outbuf, TRUE); g_free (data->resbuf); g_free (data->procbuf); g_free (data->iobuf); g_free (data); }
static void xmms_playlist_destroy (xmms_object_t *object) { xmms_config_property_t *val; xmms_playlist_t *playlist = (xmms_playlist_t *) object; XMMS_DBG ("Deactivating playlist object"); g_return_if_fail (playlist); val = xmms_config_lookup ("playlist.repeat_one"); xmms_config_property_callback_remove (val, on_playlist_r_one_changed, playlist); val = xmms_config_lookup ("playlist.repeat_all"); xmms_config_property_callback_remove (val, on_playlist_r_all_changed, playlist); xmms_object_disconnect (XMMS_OBJECT (playlist->medialib), XMMS_IPC_SIGNAL_MEDIALIB_ENTRY_REMOVED, on_medialib_entry_removed, playlist); xmms_object_disconnect (XMMS_OBJECT (playlist->colldag), XMMS_IPC_SIGNAL_COLLECTION_CHANGED, on_collection_changed, playlist); xmms_object_unref (playlist->colldag); xmms_object_unref (playlist->medialib); g_mutex_free (playlist->mutex); xmms_playlist_unregister_ipc_commands (); }
static void xmms_replaygain_destroy (xmms_xform_t *xform) { xmms_config_property_t *cfgv; g_return_if_fail (xform); g_free (xmms_xform_private_data_get (xform)); cfgv = xmms_xform_config_lookup (xform, "mode"); xmms_config_property_callback_remove (cfgv, xmms_replaygain_config_changed, xform); cfgv = xmms_xform_config_lookup (xform, "use_anticlip"); xmms_config_property_callback_remove (cfgv, xmms_replaygain_config_changed, xform); cfgv = xmms_xform_config_lookup (xform, "preamp"); xmms_config_property_callback_remove (cfgv, xmms_replaygain_config_changed, xform); cfgv = xmms_xform_config_lookup (xform, "enabled"); xmms_config_property_callback_remove (cfgv, xmms_replaygain_config_changed, xform); }
static void xmms_normalize_destroy (xmms_xform_t *xform) { xmms_normalize_data_t *data; xmms_config_property_t *cfgv; int i; g_return_if_fail (xform); data = xmms_xform_private_data_get (xform); g_return_if_fail (data); compress_free (data->compress); for (i = 0; i < G_N_ELEMENTS (config_params); i++) { cfgv = xmms_xform_config_lookup (xform, config_params[i].key); xmms_config_property_callback_remove (cfgv, xmms_normalize_config_changed, data); } g_free (data); }
static void xmms_modplug_destroy (xmms_xform_t *xform) { xmms_modplug_data_t *data; xmms_config_property_t *cfgv; int i; g_return_if_fail (xform); data = xmms_xform_private_data_get (xform); g_return_if_fail (data); if (data->buffer) g_string_free (data->buffer, TRUE); if (data->mod) ModPlug_Unload (data->mod); for (i = 0; i < G_N_ELEMENTS (config_params); i++) { cfgv = xmms_xform_config_lookup (xform, config_params[i].key); xmms_config_property_callback_remove (cfgv, xmms_modplug_config_changed, data); } g_free (data); }
static void xmms_eq_destroy (xmms_xform_t *xform) { xmms_config_property_t *config; gpointer priv; gchar buf[16]; gint i; g_return_if_fail (xform); priv = xmms_xform_private_data_get (xform); config = xmms_xform_config_lookup (xform, "enabled"); xmms_config_property_callback_remove (config, xmms_eq_config_changed, priv); config = xmms_xform_config_lookup (xform, "bands"); xmms_config_property_callback_remove (config, xmms_eq_config_changed, priv); config = xmms_xform_config_lookup (xform, "extra_filtering"); xmms_config_property_callback_remove (config, xmms_eq_config_changed, priv); config = xmms_xform_config_lookup (xform, "use_legacy"); xmms_config_property_callback_remove (config, xmms_eq_config_changed, priv); config = xmms_xform_config_lookup (xform, "preamp"); xmms_config_property_callback_remove (config, xmms_eq_gain_changed, priv); for (i=0; i<EQ_BANDS_LEGACY; i++) { g_snprintf (buf, sizeof (buf), "legacy%d", i); config = xmms_xform_config_lookup (xform, buf); xmms_config_property_callback_remove (config, xmms_eq_gain_changed, priv); } for (i=0; i<EQ_MAX_BANDS; i++) { g_snprintf (buf, sizeof (buf), "gain%02d", i); config = xmms_xform_config_lookup (xform, buf); xmms_config_property_callback_remove (config, xmms_eq_gain_changed, priv); } g_free (priv); }