blob: 1155db8139d1504bf072b0b8d8e2eba60c04138f [file] [log] [blame]
Eric Laurentda7581b2010-07-02 08:12:41 -07001/*
2 * Copyright (C) 2010 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ANDROID_EFFECTVISUALIZERAPI_H_
18#define ANDROID_EFFECTVISUALIZERAPI_H_
19
20#include <media/EffectApi.h>
21
22#if __cplusplus
23extern "C" {
24#endif
25
26//TODO replace by openSL ES include when available
27static const effect_uuid_t SL_IID_VISUALIZATION_ =
28 { 0xe46b26a0, 0xdddd, 0x11db, 0x8afd, { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } };
29const effect_uuid_t * const SL_IID_VISUALIZATION = &SL_IID_VISUALIZATION_;
30
31#define VISUALIZER_CAPTURE_SIZE_MAX 1024 // maximum capture size in samples
32#define VISUALIZER_CAPTURE_SIZE_MIN 128 // minimum capture size in samples
33
34/* enumerated parameters for Visualizer effect */
35typedef enum
36{
37 VISU_PARAM_CAPTURE_SIZE, // Sets the number PCM samples in the capture.
38} t_visualizer_params;
39
40/* commands */
41typedef enum
42{
43 VISU_CMD_CAPTURE = EFFECT_CMD_FIRST_PROPRIETARY, // Gets the latest PCM capture.
44}t_visualizer_cmds;
45
46// VISU_CMD_CAPTURE retrieves the latest PCM snapshot captured by the visualizer engine.
47// It returns the number of samples specified by VISU_PARAM_CAPTURE_SIZE
48// in 8 bit unsigned format (0 = 0x80)
49
50#if __cplusplus
51} // extern "C"
52#endif
53
54
55#endif /*ANDROID_EFFECTVISUALIZERAPI_H_*/