Package: android.hardware.audio.effect@2.0

IVisualizerEffect

interface IVisualizerEffect extends IEffect

Properties

CaptureSizeRange

enum CaptureSizeRange: int32_t
Details
Members
MAX = 1024
MIN = 128

ScalingMode

enum ScalingMode: int32_t
Details
Members
NORMALIZED = 0
AS_PLAYED = 1

MeasurementMode

enum MeasurementMode: int32_t
Details
Members
NONE = 0x0
PEAK_RMS = 0x1

Measurement

struct Measurement {MeasurementMode mode; union Values value}
Details
Members
mode
value

Methods

setCaptureSize

setCaptureSize (uint16_t captureSize)
generates (Result retval)

Sets the number PCM samples in the capture.

Details
Parameters
captureSize
Generates
retval

getCaptureSize

getCaptureSize ()
generates (Result retval, uint16_t captureSize)

Gets the number PCM samples in the capture.

Details
Generates
retval
captureSize

setScalingMode

setScalingMode (ScalingMode scalingMode)
generates (Result retval)

Specifies the way the captured data is scaled.

Details
Parameters
scalingMode
Generates
retval

getScalingMode

getScalingMode ()
generates (Result retval, ScalingMode scalingMode)

Retrieves the way the captured data is scaled.

Details
Generates
retval
scalingMode

setLatency

setLatency (uint32_t latencyMs)
generates (Result retval)

Informs the visualizer about the downstream latency.

Details
Parameters
latencyMs
Generates
retval

getLatency

getLatency ()
generates (Result retval, uint32_t latencyMs)

Gets the downstream latency.

Details
Generates
retval
latencyMs

setMeasurementMode

setMeasurementMode (MeasurementMode measurementMode)
generates (Result retval)

Specifies which measurements are to be made.

Details
Parameters
measurementMode
Generates
retval

getMeasurementMode

getMeasurementMode ()
generates (Result retval, MeasurementMode measurementMode)

Retrieves which measurements are to be made.

Details
Generates
retval
measurementMode

capture

capture ()
generates (Result retval, vec<uint8_t> samples)

Retrieves the latest PCM snapshot captured by the visualizer engine.The number of samples to capture is specified by 'setCaptureSize' parameter.

Details
Generates
retval
operation completion status.
samples
samples in 8 bit unsigned format(0 = 0x80 )

measure

measure ()
generates (Result retval, Measurement result)

Retrieves the latest measurements.The measurements to be made are specified by 'setMeasurementMode' parameter.

Details
Generates
retval
operation completion status.
result
measurement.