static void effect_enable (PluginHandle * plugin, EffectPlugin * ep, bool_t enable) { if (ep->preserves_format) { pthread_mutex_lock (& mutex); if (enable) effect_insert (plugin, ep); else effect_remove (plugin); pthread_mutex_unlock (& mutex); } else { AUDDBG ("Reset to add/remove %s.\n", plugin_get_name (plugin)); output_reset (OUTPUT_RESET_EFFECTS_ONLY); } }
static void effect_enable (PluginHandle * plugin, EffectPlugin * ep, bool_t enable) { if (ep->preserves_format) { pthread_mutex_lock (& mutex); if (enable) effect_insert (plugin, ep); else effect_remove (plugin); pthread_mutex_unlock (& mutex); } else { AUDDBG ("Reset to add/remove %s.\n", plugin_get_name (plugin)); int time = playback_get_time (); bool_t paused = playback_get_paused (); playback_stop (); playback_play (time, paused); } }