
let vis = app.player.visualization;
if (vis && isFunction(vis.getWAVisPlugins)) {
    let waPlugins = vis.getWAVisPlugins();
    waPlugins.locked(() => {
        ODS('--- Winamp visualization plugins found: ' + waPlugins.count);
        for (let i = 0; i < waPlugins.count; i++) {
            let wp = waPlugins.getValue(i);
            ODS('--- getting plugin: ' + i);
            let cnt = wp.moduleCount;
            for (let j = 0; j < cnt; j++) {
                let mod = wp.getModule(j);
                ODS('--- Winamp visualization plugin found: ' + (mod.description || mod.filename));
                visualizations.push({
                    visName: mod.description || mod.filename,
                    className: 'Vis_winamp',
                    classParams: {
                        waPluginIndex: i,
                        waModuleIndex: j
                    },
                    ownWindow: true,
                    jsFile: 'vis_winamp/vis_winamp',
                    showConfig: function () {
                        mod.showConfig();
                    }
                });
            }
        }
    });
} else {
    ODS('--- Winamp visualization plugins are not present');
}
