diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2013-09-20 12:14:40 -0700 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2013-09-23 11:58:28 -0700 |
commit | 6885c47626141c086af6669e85c81515c5b8ec40 (patch) | |
tree | f5ea33c417734dbc784a49ac985d2ef0ea918900 | |
parent | 5515a81fdd79177df61f76de57b8c851e9c1d130 (diff) | |
download | android_system_media-6885c47626141c086af6669e85c81515c5b8ec40.tar.gz android_system_media-6885c47626141c086af6669e85c81515c5b8ec40.tar.bz2 android_system_media-6885c47626141c086af6669e85c81515c5b8ec40.zip |
Visualizer header update for level monitoring
Definition and command for measurement mode, and performing a
measurement
Bug 8413913
Change-Id: Id4e3cc6be89f6f706adb933fe14e3df7241236a9
-rw-r--r-- | audio_effects/include/audio_effects/effect_visualizer.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/audio_effects/include/audio_effects/effect_visualizer.h b/audio_effects/include/audio_effects/effect_visualizer.h index 7c74f35a..cfd99f50 100644 --- a/audio_effects/include/audio_effects/effect_visualizer.h +++ b/audio_effects/include/audio_effects/effect_visualizer.h @@ -36,24 +36,35 @@ const effect_uuid_t * const SL_IID_VISUALIZATION = &SL_IID_VISUALIZATION_; #define VISUALIZER_SCALING_MODE_NORMALIZED 0 #define VISUALIZER_SCALING_MODE_AS_PLAYED 1 +#define MEASUREMENT_MODE_NONE 0x0 +#define MEASUREMENT_MODE_PEAK_RMS 0x1 + +#define MEASUREMENT_IDX_PEAK 0 +#define MEASUREMENT_IDX_RMS 1 + /* enumerated parameters for Visualizer effect */ typedef enum { VISUALIZER_PARAM_CAPTURE_SIZE, // Sets the number PCM samples in the capture. VISUALIZER_PARAM_SCALING_MODE, // Sets the way the captured data is scaled VISUALIZER_PARAM_LATENCY, // Informs the visualizer about the downstream latency + VISUALIZER_PARAM_MEASUREMENT_MODE, // Sets which measurements are to be made } t_visualizer_params; /* commands */ typedef enum { VISUALIZER_CMD_CAPTURE = EFFECT_CMD_FIRST_PROPRIETARY, // Gets the latest PCM capture. + VISUALIZER_CMD_MEASURE, // Gets the current measurements }t_visualizer_cmds; // VISUALIZER_CMD_CAPTURE retrieves the latest PCM snapshot captured by the visualizer engine. // It returns the number of samples specified by VISUALIZER_PARAM_CAPTURE_SIZE // in 8 bit unsigned format (0 = 0x80) +// VISUALIZER_CMD_MEASURE retrieves the lastest measurements as int32_t saved in the +// MEASUREMENT_IDX_* array index order. + #if __cplusplus } // extern "C" #endif |