DEFAULT_BACKGROUND_COLOR
public static final Color DEFAULT_BACKGROUND_COLOR
DEFAULT_FPS
public static final int DEFAULT_FPS
DEFAULT_HEIGHT
public static final int DEFAULT_HEIGHT
DEFAULT_SCOPE_COLOR
public static final Color DEFAULT_SCOPE_COLOR
DEFAULT_SPECTRUM_ANALYSER_BAND_COUNT
public static final int DEFAULT_SPECTRUM_ANALYSER_BAND_COUNT
DEFAULT_SPECTRUM_ANALYSER_DECAY
public static final float DEFAULT_SPECTRUM_ANALYSER_DECAY
DEFAULT_SPECTRUM_ANALYSER_FFT_SAMPLE_SIZE
public static final int DEFAULT_SPECTRUM_ANALYSER_FFT_SAMPLE_SIZE
DEFAULT_SPECTRUM_ANALYSER_PEAK_DELAY
public static final int DEFAULT_SPECTRUM_ANALYSER_PEAK_DELAY
DEFAULT_SPECTRUM_ANALYSER_PEAK_DELAY_FPS_RATIO
public static final float DEFAULT_SPECTRUM_ANALYSER_PEAK_DELAY_FPS_RATIO
DEFAULT_SPECTRUM_ANALYSER_PEAK_DELAY_FPS_RATIO_RANGE
public static final float DEFAULT_SPECTRUM_ANALYSER_PEAK_DELAY_FPS_RATIO_RANGE
DEFAULT_VU_METER_DECAY
public static final float DEFAULT_VU_METER_DECAY
DEFAULT_WIDTH
public static final int DEFAULT_WIDTH
DISPLAY_MODE_OFF
public static final int DISPLAY_MODE_OFF
DISPLAY_MODE_SCOPE
public static final int DISPLAY_MODE_SCOPE
DISPLAY_MODE_SPECTRUM_ANALYSER
public static final int DISPLAY_MODE_SPECTRUM_ANALYSER
MAX_SPECTRUM_ANALYSER_DECAY
public static final float MAX_SPECTRUM_ANALYSER_DECAY
MIN_SPECTRUM_ANALYSER_DECAY
public static final float MIN_SPECTRUM_ANALYSER_DECAY
closeDSP
public void closeDSP()
Close DSP
getColor
public Color getColor(String linecolor)
Convert string to color.
getDSP
public KJDigitalSignalProcessingAudioDataConsumer getDSP()
Return DSP.
getDefaultSpectrumAnalyserColors
public static Color[] getDefaultSpectrumAnalyserColors()
getDisplayMode
public int getDisplayMode()
- Returns the current display mode, DISPLAY_MODE_SCOPE or DISPLAY_MODE_SPECTRUM_ANALYSER.
getFps
public int getFps()
getPeakDelay
public int getPeakDelay()
Return peak falloff delay
getScopeColor
public Color getScopeColor()
- Returns the color the scope is rendered in.
getSpectrumAnalyserBandCount
public int getSpectrumAnalyserBandCount()
- Returns the current number of bands displayed by the spectrum analyser.
getSpectrumAnalyserColors
public Color[] getSpectrumAnalyserColors()
- Returns the color scale used to render the spectrum analyser bars.
getSpectrumAnalyserDecay
public float getSpectrumAnalyserDecay()
- Returns the decay rate of the spectrum analyser's bands.
isPeaksEnabled
public boolean isPeaksEnabled()
isShowingFPS
public boolean isShowingFPS()
- Returns 'true' if "Frames Per Second" are being calculated and displayed.
paintComponent
public void paintComponent(Graphics pGraphics)
process
public void process(float[] pLeft,
float[] pRight,
float pFrameRateRatioHint)
setDisplayMode
public void setDisplayMode(int pMode)
Sets the current display mode.
pMode
- Must be either DISPLAY_MODE_SCOPE or DISPLAY_MODE_SPECTRUM_ANALYSER.
setFps
public void setFps(int fps)
setPeakColor
public void setPeakColor(Color c)
Set visual peak color.
setPeakDelay
public void setPeakDelay(int framestowait)
Set peak falloff delay.
setPeaksEnabled
public void setPeaksEnabled(boolean peaksEnabled)
setScopeColor
public void setScopeColor(Color pColor)
Sets the color of the scope.
setShowFPS
public void setShowFPS(boolean pState)
When 'true' is passed as a parameter, will overlay the "Frames Per Seconds"
achieved by the component.
setSpectrumAnalyserBandCount
public void setSpectrumAnalyserBandCount(int pCount)
Sets the numbers of bands rendered by the spectrum analyser.
pCount
- Cannot be more than half the "FFT sample size".
setSpectrumAnalyserColors
public void setSpectrumAnalyserColors(Color[] pColors)
Sets the spectrum analyser color scale.
pColors
- Any amount of colors may be used. Must not be null.
setSpectrumAnalyserDecay
public void setSpectrumAnalyserDecay(float pDecay)
Sets the spectrum analyser band decay rate.
pDecay
- Must be a number between 0.0 and 1.0 exclusive.
setSpectrumAnalyserFFTSampleSize
public void setSpectrumAnalyserFFTSampleSize(int pSize)
Sets the FFT sample size to be just for calculating the spectrum analyser
values. The default is 512.
pSize
- Cannot be more than the size of the sample provided by the DSP.
setVisColor
public void setVisColor(String viscolor)
Set visual colors from skin.
setupDSP
public void setupDSP(SourceDataLine line)
Setup DSP.
startDSP
public void startDSP(SourceDataLine line)
Starts DSP.
stopDSP
public void stopDSP()
Stop DSP.
writeDSP
public void writeDSP(byte[] pcmdata)
Write PCM data to DSP.