public abstract class DbmHandler<TData> extends Object
onDataReceived(Object) method.| Modifier and Type | Class and Description |
|---|---|
static class |
DbmHandler.Factory |
| Constructor and Description |
|---|
DbmHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
calmDownAndStopRendering()
Post empty values to renderer and stop rendering thread after waves calm down.
|
void |
onDataReceived(TData data)
Call this method when your data is available for conversion.
|
protected abstract void |
onDataReceivedImpl(TData data,
int layersCount,
float[] dBmArray,
float[] ampsArray)
Implement your own data conversion.
|
void |
onPause()
Called after
AudioVisualization.onPause() call. |
void |
onResume()
Called after
AudioVisualization.onResume() call. |
void |
release()
Called after
AudioVisualization.release() ()} call. |
protected void |
startRendering()
Start rendering thread.
|
protected void |
stopRendering()
Stop rendering thread.
|
public final void onDataReceived(TData data)
data - any dataprotected final void startRendering()
protected final void stopRendering()
protected final void calmDownAndStopRendering()
public void onResume()
AudioVisualization.onResume() call.public void onPause()
AudioVisualization.onPause() call.public void release()
AudioVisualization.release() ()} call.protected abstract void onDataReceivedImpl(TData data, int layersCount, float[] dBmArray, float[] ampsArray)
data - any datalayersCount - layers countdBmArray - array of normalized (in range [0..1]) dBm values that should be populated by you.
Array size is equals to layersCount value.ampsArray - array of amplitude values that should be populated by you.
Array size is equals to layersCount value.