Package uk.co.caprica.vlcj.player

Examples of uk.co.caprica.vlcj.player.Equalizer


    @Override
    public final void itemStateChanged(ItemEvent e) {
        String presetName = (String)presetComboBox.getSelectedItem();
        if(e.getStateChange() == ItemEvent.SELECTED) {
            if(presetName != null) {
                Equalizer presetEqualizer = mediaPlayerFactory.newEqualizer(presetName);
                if(presetEqualizer != null) {
                    applyingPreset = true;
                    preampControl.getSlider().setValue((int)(presetEqualizer.getPreamp() * 100f)); // FIXME
                    float[] amps = presetEqualizer.getAmps();
                    for(int i = 0; i < amps.length; i++) {
                        bandControls[i].getSlider().setValue((int)(amps[i] * 100f));
                    }

                    applyingPreset = false;
View Full Code Here


        // You can get individual presets by name, or get them all in one call as is done here...

        Map<String, Equalizer> allPresets = factory.getAllPresetEqualizers();
        for(String presetName : allPresets.keySet()) {
            System.out.printf("%s:%n", presetName);
            Equalizer preset = allPresets.get(presetName);
            System.out.printf("%10s : %f Hz%n", "preamp", preset.getPreamp());
            float[] amps = preset.getAmps();
            for(int i = 0; i < amps.length; i++) {
                float freq = bandFrequencies.get(i);
                String unit;
                if(freq < 1000f) {
                    unit = "Hz";
View Full Code Here

TOP

Related Classes of uk.co.caprica.vlcj.player.Equalizer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.