java.lang.Object | |
↳ | com.h6ah4i.android.media.opensl.audiofx.OpenSLHQVisualizer |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.h6ah4i.android.media.audiofx.IHQVisualizer
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
OpenSLHQVisualizer(OpenSLMediaPlayerContext context) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int |
getCaptureSize()
Returns current capture size.
| ||||||||||
int[] |
getCaptureSizeRange()
Returns the capture size range.
| ||||||||||
boolean |
getEnabled()
Get current activation state of the visualizer.
| ||||||||||
int |
getMaxCaptureRate()
Returns the maximum capture rate for the callback capture method.
| ||||||||||
int |
getNumChannels()
Returns the number of channels of the captured audio.
| ||||||||||
int |
getSamplingRate()
Returns the sampling rate of the captured audio.
| ||||||||||
int |
getWindowFunction()
Returns current window function type.
| ||||||||||
void |
release()
Release associated resources.
| ||||||||||
static int[] | sGetCaptureSizeRange() | ||||||||||
static int | sGetMaxCaptureRate() | ||||||||||
int |
setCaptureSize(int size)
Sets the capture size, i.e.
| ||||||||||
int |
setDataCaptureListener(IHQVisualizer.OnDataCaptureListener listener, int rate, boolean waveform, boolean fft)
Registers an OnDataCaptureListener interface and specifies the rate at
which the capture should be updated as well as the type of capture
requested.
| ||||||||||
int |
setEnabled(boolean enabled)
Enable or disable the visualization engine.
| ||||||||||
int |
setWindowFunction(int windowType)
Sets the window function type.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void | finalize() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.h6ah4i.android.media.IReleasable
| |||||||||||
From interface
com.h6ah4i.android.media.audiofx.IHQVisualizer
|
Returns current capture size.
IllegalStateException |
---|
Returns the capture size range.
IllegalStateException |
---|
Get current activation state of the visualizer.
Returns the maximum capture rate for the callback capture method. This is
the maximum value for the rate parameter of the
setDataCaptureListener(OnDataCaptureListener, int, boolean, boolean)
method.
IllegalStateException |
---|
Returns the number of channels of the captured audio.
IllegalStateException |
---|
Returns the sampling rate of the captured audio.
IllegalStateException |
---|
Returns current window function type.
IllegalStateException |
---|
Release associated resources.
Sets the capture size, i.e. the number of frames captured by
OnDataCaptureListener event. The capture size must be a power of 2 in the
range returned by getCaptureSizeRange()
. This method must
not be called when the Visualizer is enabled.
size | requested capture size |
---|
SUCCESS
in case of success, ERROR_BAD_VALUE
in
case of failure.IllegalStateException |
---|
Registers an OnDataCaptureListener interface and specifies the rate at which the capture should be updated as well as the type of capture requested.
Call this method with a null listener to stop receiving the capture updates.
listener | OnDataCaptureListener registered |
---|---|
rate | rate in milliHertz at which the capture should be updated |
waveform | true if a waveform capture is requested: the onWaveFormDataCapture() method will be called on the OnDataCaptureListener interface. |
fft | true if a frequency capture is requested: the onFftDataCapture() method will be called on the OnDataCaptureListener interface. |
SUCCESS
in case of success, ERROR_NO_INIT
or
ERROR_BAD_VALUE
in case of failure.
Enable or disable the visualization engine.
enabled | requested enable state |
---|
SUCCESS
in case of success,
ERROR_INVALID_OPERATION
or ERROR_DEAD_OBJECT
in
case of failure.IllegalStateException |
---|
Sets the window function type.
windowType | window function type. One of the
= 0 , WINDOW_HANN ,
WINDOW_HAMMING , WINDOW_BLACKMAN ,
WINDOW_FLAT_TOP with optional WINDOW_OPT_APPLY_FOR_WAVEFORM flag. |
---|
SUCCESS
in case of success,
ERROR_INVALID_OPERATION
or ERROR_DEAD_OBJECT
in
case of failure.IllegalStateException |
---|
Throwable |
---|