示例#1
0
void general_init (void)
{
    g_return_if_fail (! running);
    running = TRUE;

    plugin_for_enabled (PLUGIN_TYPE_GENERAL, (PluginForEachFunc)
     general_init_cb, NULL);
}
示例#2
0
static void stop_plugins (int type)
{
    if (headless && type == PLUGIN_TYPE_IFACE)
        return;

    plugin_for_enabled (type, misc_cleanup_cb, GINT_TO_POINTER (type));

    if (table[type].is_single)
    {
        AUDDBG ("Shutting down %s.\n", plugin_get_name
         (table[type].u.s.get_current ()));
        table[type].u.s.set_current (NULL);
    }
    else
    {
        if (table[type].u.m.stop)
            plugin_for_enabled (type, stop_multi_cb, GINT_TO_POINTER (type));
    }
}
示例#3
0
static void start_plugins (int type)
{
    if (headless && type == PLUGIN_TYPE_IFACE)
        return;

    if (table[type].is_single)
        start_single (type);
    else
    {
        if (table[type].u.m.start)
            plugin_for_enabled (type, start_multi_cb, GINT_TO_POINTER (type));
    }
}
示例#4
0
文件: effect.c 项目: suaff/audacious
void effect_start (int * channels, int * rate)
{
    pthread_mutex_lock (& mutex);

    AUDDBG ("Starting effects.\n");
    g_list_foreach (running_effects, (GFunc) g_free, NULL);
    g_list_free (running_effects);
    running_effects = NULL;

    input_channels = * channels;
    input_rate = * rate;

    EffectStartState state = {channels, rate};
    plugin_for_enabled (PLUGIN_TYPE_EFFECT, (PluginForEachFunc) effect_start_cb,
     & state);
    running_effects = g_list_reverse (running_effects);

    pthread_mutex_unlock (& mutex);
}
示例#5
0
static PluginHandle * find_enabled (int type)
{
    PluginHandle * p = NULL;
    plugin_for_enabled (type, find_enabled_cb, & p);
    return p;
}