Package org.videolan.libvlc
Class MediaPlayer.Equalizer
- java.lang.Object
-
- org.videolan.libvlc.MediaPlayer.Equalizer
-
- Enclosing class:
- MediaPlayer
public static class MediaPlayer.Equalizer extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MediaPlayer.Equalizercreate()Create a new default equalizer, with all frequency values zeroed.static MediaPlayer.EqualizercreateFromPreset(int index)Create a new equalizer, with initial frequency values copied from an existing preset.protected voidfinalize()floatgetAmp(int index)Get the amplification value for a particular equalizer frequency band.static intgetBandCount()Get the number of distinct frequency bands for an equalizer.static floatgetBandFrequency(int index)Get a particular equalizer band frequency.floatgetPreAmp()Get the current pre-amplification value from an equalizer.static intgetPresetCount()Get the number of equalizer presets.static StringgetPresetName(int index)Get the name of a particular equalizer preset.booleansetAmp(int index, float amp)Set a new amplification value for a particular equalizer frequency band.booleansetPreAmp(float preamp)Set a new pre-amplification value for an equalizer.
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
create
public static MediaPlayer.Equalizer create()
Create a new default equalizer, with all frequency values zeroed. The new equalizer can subsequently be applied to a media player by invokingMediaPlayer.setEqualizer(org.videolan.libvlc.MediaPlayer.Equalizer).
-
createFromPreset
public static MediaPlayer.Equalizer createFromPreset(int index)
Create a new equalizer, with initial frequency values copied from an existing preset. The new equalizer can subsequently be applied to a media player by invokingMediaPlayer.setEqualizer(org.videolan.libvlc.MediaPlayer.Equalizer).
-
getPresetCount
public static int getPresetCount()
Get the number of equalizer presets.
-
getPresetName
public static String getPresetName(int index)
Get the name of a particular equalizer preset. This name can be used, for example, to prepare a preset label or menu in a user interface.- Parameters:
index- index of the preset, counting from zero.- Returns:
- preset name, or NULL if there is no such preset
-
getBandCount
public static int getBandCount()
Get the number of distinct frequency bands for an equalizer.
-
getBandFrequency
public static float getBandFrequency(int index)
Get a particular equalizer band frequency. This value can be used, for example, to create a label for an equalizer band control in a user interface.- Parameters:
index- index of the band, counting from zero.- Returns:
- equalizer band frequency (Hz), or -1 if there is no such band
-
getPreAmp
public float getPreAmp()
Get the current pre-amplification value from an equalizer.- Returns:
- preamp value (Hz)
-
setPreAmp
public boolean setPreAmp(float preamp)
Set a new pre-amplification value for an equalizer. The new equalizer settings are subsequently applied to a media player by invokingMediaPlayer.setEqualizer(org.videolan.libvlc.MediaPlayer.Equalizer). The supplied amplification value will be clamped to the -20.0 to +20.0 range.- Parameters:
preamp- value (-20.0 to 20.0 Hz)- Returns:
- true on success.
-
getAmp
public float getAmp(int index)
Get the amplification value for a particular equalizer frequency band.- Parameters:
index- counting from zero, of the frequency band to get.- Returns:
- amplification value (Hz); NaN if there is no such frequency band.
-
setAmp
public boolean setAmp(int index, float amp)Set a new amplification value for a particular equalizer frequency band. The new equalizer settings are subsequently applied to a media player by invokingMediaPlayer.setEqualizer(org.videolan.libvlc.MediaPlayer.Equalizer). The supplied amplification value will be clamped to the -20.0 to +20.0 range.- Parameters:
index- counting from zero, of the frequency band to set.amp- amplification value (-20.0 to 20.0 Hz). \return true on success.
-
-