com.h6ah4i.android.media.audiofx.IHQVisualizer |
Known Indirect Subclasses |
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | IHQVisualizer.OnDataCaptureListener | The OnDataCaptureListener interface defines methods called by the Visualizer to periodically update the audio visualization capture. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | ALREADY_EXISTS | Internal operation status. | |||||||||
int | ERROR | Unspecified error. | |||||||||
int | ERROR_BAD_VALUE | Operation failed due to bad parameter value. | |||||||||
int | ERROR_DEAD_OBJECT | Operation failed due to dead remote object. | |||||||||
int | ERROR_INVALID_OPERATION | Operation failed because it was requested in wrong state. | |||||||||
int | ERROR_NO_INIT | Operation failed due to bad object initialization. | |||||||||
int | ERROR_NO_MEMORY | Operation failed due to lack of memory. | |||||||||
int | STATE_ENABLED | State of a Visualizer object that is active. | |||||||||
int | STATE_INITIALIZED | State of a Visualizer object that is ready to be used. | |||||||||
int | STATE_UNINITIALIZED | State of a Visualizer object that was not successfully initialized upon creation | |||||||||
int | SUCCESS | Successful operation. | |||||||||
int | WINDOW_BLACKMAN | Blackman window. | |||||||||
int | WINDOW_FLAT_TOP | Flat top window. | |||||||||
int | WINDOW_HAMMING | Hamming window. | |||||||||
int | WINDOW_HANN | Hann window. | |||||||||
int | WINDOW_OPT_APPLY_FOR_WAVEFORM | Option flag to specify whether the window function is also effects to thecaptured waveform data. | |||||||||
int | WINDOW_RECTANGULAR | Rectangular window. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract int |
getCaptureSize()
Returns current capture size.
| ||||||||||
abstract int[] |
getCaptureSizeRange()
Returns the capture size range.
| ||||||||||
abstract boolean |
getEnabled()
Get current activation state of the visualizer.
| ||||||||||
abstract int |
getMaxCaptureRate()
Returns the maximum capture rate for the callback capture method.
| ||||||||||
abstract int |
getNumChannels()
Returns the number of channels of the captured audio.
| ||||||||||
abstract int |
getSamplingRate()
Returns the sampling rate of the captured audio.
| ||||||||||
abstract int |
getWindowFunction()
Returns current window function type.
| ||||||||||
abstract int |
setCaptureSize(int size)
Sets the capture size, i.e.
| ||||||||||
abstract 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.
| ||||||||||
abstract int |
setEnabled(boolean enabled)
Enable or disable the visualization engine.
| ||||||||||
abstract int |
setWindowFunction(int windowType)
Sets the window function type.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.h6ah4i.android.media.IReleasable
|
Internal operation status. Not returned by any method.
Unspecified error.
Operation failed due to bad parameter value.
Operation failed due to dead remote object.
Operation failed because it was requested in wrong state.
Operation failed due to bad object initialization.
Operation failed due to lack of memory.
State of a Visualizer object that is active.
State of a Visualizer object that is ready to be used.
State of a Visualizer object that was not successfully initialized upon creation
Successful operation.
Blackman window.
Flat top window.
Hamming window.
Hann window.
Option flag to specify whether the window function is also effects to thecaptured waveform data.
Rectangular window.
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 |
---|
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 |
---|