blob: a1bc3b82d45fdfb51f63f0086274d7ee80fc8cc4 [file] [log] [blame]
Eric Laurent135ad072010-05-21 06:05:13 -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_EFFECTAPI_H_
18#define ANDROID_EFFECTAPI_H_
19
20#include <errno.h>
21#include <stdint.h>
22#include <sys/types.h>
23#include <media/AudioCommon.h>
24
25#if __cplusplus
26extern "C" {
27#endif
28
29/////////////////////////////////////////////////
30// Effect control interface
31/////////////////////////////////////////////////
32
33// The effect control interface is exposed by each effect engine implementation. It consists of
34// a set of functions controlling the configuration, activation and process of the engine.
35// The functions are grouped in a structure of type effect_interface_s:
36// struct effect_interface_s {
37// effect_process_t process;
38// effect_command_t command;
39// };
40
41
42// effect_interface_t: Effect control interface handle.
43// The effect_interface_t serves two purposes regarding the implementation of the effect engine:
44// - 1 it is the address of a pointer to an effect_interface_s structure where the functions
45// of the effect control API for a particular effect are located.
46// - 2 it is the address of the context of a particular effect instance.
47// A typical implementation in the effect library would define a structure as follows:
48// struct effect_module_s {
49// const struct effect_interface_s *itfe;
50// effect_config_t config;
51// effect_context_t context;
52// }
53// The implementation of EffectCreate() function would then allocate a structure of this
54// type and return its address as effect_interface_t
55typedef struct effect_interface_s **effect_interface_t;
56
57
58// Effect API version 1.0
59#define EFFECT_API_VERSION 0x0100 // Format 0xMMmm MM: Major version, mm: minor version
60
61// Maximum length of character strings in structures defines by this API.
62#define EFFECT_STRING_LEN_MAX 64
63
64//
65//--- Effect descriptor structure effect_descriptor_t
66//
67
68// Unique effect ID (can be generated from the following site: http://www.itu.int/ITU-T/asn1/uuid.html)
69// This format is used for both "type" and "uuid" fields of the effect descriptor structure.
70// - When used for effect type and the engine is implementing and effect corresponding to a standard OpenSL ES
71// interface, this ID must be the one defined in OpenSLES_IID.h for that interface.
72// - When used as uuid, it should be a unique UUID for this particular implementation.
73typedef struct effect_uuid_s {
74 uint32_t timeLow;
75 uint16_t timeMid;
76 uint16_t timeHiAndVersion;
77 uint16_t clockSeq;
78 uint8_t node[6];
79} effect_uuid_t;
80
81// NULL UUID definition (matches SL_IID_NULL_)
82#define EFFECT_UUID_INITIALIZER { 0xec7178ec, 0xe5e1, 0x4432, 0xa3f4, { 0x46, 0x57, 0xe6, 0x79, 0x52, 0x10 } }
83static const effect_uuid_t EFFECT_UUID_NULL_ = EFFECT_UUID_INITIALIZER;
84const effect_uuid_t * const EFFECT_UUID_NULL = &EFFECT_UUID_NULL_;
85const char * const EFFECT_UUID_NULL_STR = "ec7178ec-e5e1-4432-a3f4-4657e6795210";
86
87// the effect descriptor contains necessary information to facilitate the enumeration of the effect
88// engines present in a library.
89typedef struct effect_descriptor_s {
90 effect_uuid_t type; // UUID corresponding to the OpenSL ES interface implemented by this effect
91 effect_uuid_t uuid; // UUID for this particular implementation
92 uint16_t apiVersion; // Version of the effect API implemented: must match current EFFECT_API_VERSION
93 uint32_t flags; // effect engine capabilities/requirements flags (see below)
94 char name[EFFECT_STRING_LEN_MAX] ; // human readable effect name
95 char implementor[EFFECT_STRING_LEN_MAX] ; // human readable effect implementor name
96} effect_descriptor_t;
97
98// definitions for flags field of effect descriptor.
99// +---------------------------+-----------+-----------------------------------
100// | description | bits | values
101// +---------------------------+-----------+-----------------------------------
102// | connection mode | 0..1 | 0 insert: after track process
103// | | | 1 auxiliary: connect to track auxiliary
104// | | | output and use send level
105// | | | 2 replace: replaces track process function;
106// | | | must implement SRC, volume and mono to stereo.
107// | | | 3 reserved
108// +---------------------------+-----------+-----------------------------------
109// | insertion preference | 2..4 | 0 none
110// | | | 1 first of the chain
111// | | | 2 last of the chain
112// | | | 3 exclusive (only effect in the insert chain)
113// | | | 4..7 reserved
114// +---------------------------+-----------+-----------------------------------
115// | Volume management | 5..6 | 0 none
116// | | | 1 implements volume control
117// | | | 2..3 reserved
118// +---------------------------+-----------+-----------------------------------
119// | Device management | 7..8 | 0 none
120// | | | 1 requires device updates
121// | | | 2..3 reserved
122// +---------------------------+-----------+-----------------------------------
123// | Sample input mode | 9..10 | 0 direct: process() function or EFFECT_CMD_CONFIGURE
124// | | | command must specify a buffer descriptor
125// | | | 1 provider: process() function uses the
126// | | | bufferProvider indicated by the
127// | | | EFFECT_CMD_CONFIGURE command to request input buffers.
128// | | | 2 both: both input modes are supported
129// | | | 3 reserved
130// +---------------------------+-----------+-----------------------------------
131// | Sample output mode | 11..12 | 0 direct: process() function or EFFECT_CMD_CONFIGURE
132// | | | command must specify a buffer descriptor
133// | | | 1 provider: process() function uses the
134// | | | bufferProvider indicated by the
135// | | | EFFECT_CMD_CONFIGURE command to request output buffers.
136// | | | 2 both: both output modes are supported
137// | | | 3 reserved
138// +---------------------------+-----------+-----------------------------------
139
140// insert mode
141#define EFFECT_FLAG_TYPE_MASK 0x00000003
142#define EFFECT_FLAG_TYPE_INSERT 0x00000000
143#define EFFECT_FLAG_TYPE_AUXILIARY 0x00000001
144#define EFFECT_FLAG_TYPE_REPLACE 0x00000002
145
146// insert preference
147#define EFFECT_FLAG_INSERT_MASK 0x0000001C
148#define EFFECT_FLAG_INSERT_ANY 0x00000000
149#define EFFECT_FLAG_INSERT_FIRST 0x00000004
150#define EFFECT_FLAG_INSERT_LAST 0x00000008
151#define EFFECT_FLAG_INSERT_EXCLUSIVE 0x0000000C
152
153
154// volume control
155#define EFFECT_FLAG_VOLUME_MASK 0x00000060
156#define EFFECT_FLAG_VOLUME_CTRL 0x00000020
157#define EFFECT_FLAG_VOLUME_NONE 0x00000000
158
159// device control
160#define EFFECT_FLAG_DEVICE_MASK 0x00000180
161#define EFFECT_FLAG_DEVICE_IND 0x00000080
162#define EFFECT_FLAG_DEVICE_NONE 0x00000000
163
164// sample input modes
165#define EFFECT_FLAG_INPUT_MASK 0x00000600
166#define EFFECT_FLAG_INPUT_DIRECT 0x00000000
167#define EFFECT_FLAG_INPUT_PROVIDER 0x00000200
168#define EFFECT_FLAG_INPUT_BOTH 0x00000400
169
170// sample output modes
171#define EFFECT_FLAG_OUTPUT_MASK 0x00001800
172#define EFFECT_FLAG_OUTPUT_DIRECT 0x00000000
173#define EFFECT_FLAG_OUTPUT_PROVIDER 0x00000800
174#define EFFECT_FLAG_OUTPUT_BOTH 0x00001000
175
176// forward definition of type audio_buffer_t
177typedef struct audio_buffer_s audio_buffer_t;
178
179////////////////////////////////////////////////////////////////////////////////
180//
181// Function: process
182//
183// Description: Effect process function. Takes input samples as specified
184// (count and location) in input buffer descriptor and output processed
185// samples as specified in output buffer descriptor. If the buffer descriptor
186// is not specified the function must use either the buffer or the
187// buffer provider function installed by the EFFECT_CMD_CONFIGURE command.
188//
189// NOTE: the process() function implementation should be "real-time safe" that is
190// it should not perform blocking calls: malloc/free, sleep, read/write/open/close,
191// pthread_cond_wait/pthread_mutex_lock...
192//
193// Input:
194// effect_interface_t: handle to the effect interface this function
195// is called on.
196// inBuffer: buffer descriptor indicating where to read samples to process.
197// If NULL, use the configuration passed by EFFECT_CMD_CONFIGURE command.
198//
199// inBuffer: buffer descriptor indicating where to write processed samples.
200// If NULL, use the configuration passed by EFFECT_CMD_CONFIGURE command.
201//
202// Output:
203// returned value: 0 successful operation
204// -EINVAL invalid interface handle or
205// invalid input/output buffer description
206////////////////////////////////////////////////////////////////////////////////
207typedef int32_t (*effect_process_t)(effect_interface_t self, audio_buffer_t *inBuffer, audio_buffer_t *outBuffer);
208
209////////////////////////////////////////////////////////////////////////////////
210//
211// Function: command
212//
213// Description: Send a command and receive a response to/from effect engine.
214//
215// Input:
216// effect_interface_t: handle to the effect interface this function
217// is called on.
218// cmdCode: command code: the command can be a standardized command defined in
219// effect_command_e (see below) or a proprietary command.
220// cmdSize: size of command in bytes
221// pCmdData: pointer to command data
222// pReplyData: pointer to reply data
223//
224// Input/Output:
225// replySize: maximum size of reply data as input
226// actual size of reply data as output
227//
228// Output:
229// returned value: 0 successful operation
230// -EINVAL invalid interface handle or
231// invalid command/reply size or format according to command code
232// The return code should be restricted to indicate problems related to the this
233// API specification. Status related to the execution of a particular command should be
234// indicated as part of the reply field.
235//
236// *pReplyData updated with command response
237//
238////////////////////////////////////////////////////////////////////////////////
239typedef int32_t (*effect_command_t)(effect_interface_t self, int32_t cmdCode, int32_t cmdSize, void *pCmdData, int32_t *replySize, void *pReplyData);
240
241
242// Effect control interface definition
243struct effect_interface_s {
244 effect_process_t process;
245 effect_command_t command;
246};
247
248
249//--- Standardized command codes for command function
250// +--------------------------------+-------------------------------+-------------------------------+--------------------------
251// | description | command code | command format | reply format
252// +--------------------------------+-------------------------------+-------------------------------+--------------------------
253// | Initialize effect engine: | EFFECT_CMD_INIT | size: 0 | size: sizeof(int)
254// | All configurations return to | | data: N/A | data: status
255// | default | | |
256// +--------------------------------+-------------------------------+-------------------------------+--------------------------
257// | Apply new audio parameters | EFFECT_CMD_CONFIGURE | size: sizeof(effect_config_t) | size: sizeof(int)
258// | configurations for input and | | data: effect_config_t | data: status
259// | output buffers | | |
260// +--------------------------------+-------------------------------+-------------------------------+--------------------------
261// | Reset effect engine: keep | EFFECT_CMD_RESET | size: 0 | size: 0
262// | configuration but reset state | | data: N/A | data: N/A
263// | and buffer content. | | |
264// | Called by the framework before | | |
265// | enabling the effect | | |
266// +--------------------------------+-------------------------------+-------------------------------+--------------------------
267// | Enable the process | EFFECT_CMD_ENABLE | size: 0 | size: sizeof(int)
268// | Called by the framework before | | data: N/A | data: status
269// | the first call to process() | | |
270// +--------------------------------+-------------------------------+-------------------------------+--------------------------
271// | Disable the process | EFFECT_CMD_DISABLE | size: 0 | size: sizeof(int)
272// | Called by the framework after | | data: N/A | data: status
273// | the last call to process() | | |
274// +--------------------------------+-------------------------------+-------------------------------+--------------------------
275// | Set a parameter and apply it | EFFECT_CMD_SET_PARAM | size: sizeof(effect_param_t) | size: sizeof(int)
276// | immediately | | + size of param + value | data: status
277// | | | data: effect_param_t |
278// +--------------------------------+-------------------------------+-------------------------------+--------------------------
279// | Set a parameter but apply it | EFFECT_CMD_SET_PARAM_DEFERRED | size: sizeof(effect_param_t) | size: 0
280// | only when receiving command | | + size of param + value | data: N/A
281// | EFFECT_CMD_SET_PARAM_COMMIT | | data: effect_param_t |
282// +--------------------------------+-------------------------------+-------------------------------+--------------------------
283// | Apply all previously received | EFFECT_CMD_SET_PARAM_COMMIT | size: 0 | size: sizeof(int)
284// | EFFECT_CMD_SET_PARAM_DEFERRED | | data: N/A | data: status
285// | commands | | |
286// +--------------------------------+-------------------------------+-------------------------------+--------------------------
287// | Get a parameter value | EFFECT_CMD_GET_PARAM | size: sizeof(effect_param_t) | size: sizeof(effect_param_t)
288// | | | + size of param | + size of param + value
289// | | | data: effect_param_t | data: effect_param_t
290// +--------------------------------+-------------------------------+-------------------------------+--------------------------
291// | Set the rendering device the | EFFECT_CMD_SET_DEVICE | size: sizeof(uint32_t) | size: 0
292// | audio output path is connected | | data: audio_device_e | data: N/A
293// | to. See audio_device_e in | | |
294// | AudioCommon.h for device values| | |
295// +--------------------------------+-------------------------------+-------------------------------+--------------------------
296// | Set and get volume. Used by | EFFECT_CMD_SET_VOLUME | size: n * sizeof(uint32_t) | size: n * sizeof(uint32_t)
297// | audio framework to delegate | | data: volume for each channel | data: volume for each channel
298// | volume control to effect engine| | defined in effect_config_t in | defined in effect_config_t in
299// | The engine must return the | | 8.24 fixed point format | 8.24 fixed point format
300// | volume that should be applied | | |
301// | before the effect is processed | | |
302// | The overall volume (the volume | | |
303// | actually applied by the effect | | |
304// | multiplied by the returned | | |
305// | value) should match the | | |
306// | requested value | | |
307// +--------------------------------+-------------------------------+-------------------------------+--------------------------
308// | All proprietary effect commands| EFFECT_CMD_FIRST_PROPRIETARY | |
309// | must use command codes above | | |
310// | this value. The size and format| | |
311// | of command and response fields | | |
312// | is free in this case. | | |
313// +--------------------------------+-------------------------------+-------------------------------+--------------------------
314
315
316enum effect_command_e {
317 EFFECT_CMD_INIT, // initialize effect engine
318 EFFECT_CMD_CONFIGURE, // configure effect engine (see effect_config_t)
319 EFFECT_CMD_RESET, // reset effect engine
320 EFFECT_CMD_ENABLE, // enable effect process
321 EFFECT_CMD_DISABLE, // disable effect process
322 EFFECT_CMD_SET_PARAM, // set parameter immediately (see effect_param_t)
323 EFFECT_CMD_SET_PARAM_DEFERRED, // set parameter deferred
324 EFFECT_CMD_SET_PARAM_COMMIT, // commit previous set parameter deferred
325 EFFECT_CMD_GET_PARAM, // get parameter
326 EFFECT_CMD_SET_DEVICE, // set audio device (see audio_device_e in AudioCommon.h)
327 EFFECT_CMD_SET_VOLUME, // set volume
328 EFFECT_CMD_FIRST_PROPRIETARY = 0x10000 // first proprietary command code
329};
330
331// Audio buffer descriptor used by process(), bufferProvider() functions and buffer_config_t structure
332// Multi-channel audio is always interleaved. The channel order is from LSB to MSB with regard to the
333// channel mask definition in audio_channels_e (AudioCommon.h) e.g :
334// Stereo: left, right
335// 5 point 1: front left, front right, front center, low frequency, back left, back right
336// The buffer size is expressed in frame count, a frame being composed of samples for all
337// channels at a given time
338struct audio_buffer_s {
339 size_t frameCount; // number of frames in buffer
340 union {
341 void* raw; // raw pointer to start of buffer
342 int32_t* s32; // pointer to signed 32 bit data at start of buffer
343 int16_t* s16; // pointer to signed 16 bit data at start of buffer
344 uint8_t* u8; // pointer to unsigned 8 bit data at start of buffer
345 };
346};
347
348// the buffer_provider_s structure contains functions that can be used
349// by the effect engine process() function to query and release input
350// or output audio buffer.
351// The getBuffer() function is called to retrieve a buffer where data
352// should read from or written to by process() function.
353// The releaseBuffer() function MUST be called when the buffer retrieved
354// with getBuffer() is not needed anymore.
355// The process function should use the buffer provider mechanism to retrieve
356// input or output buffer if the inBuffer or outBuffer passed as argument is NULL
357// and the buffer configuration (buffer_config_t) given by the EFFECT_CMD_CONFIGURE
358// command did not specify an audio buffer.
359
360typedef int32_t (* buffer_function_t)(void *cookie, audio_buffer_t *buffer);
361
362typedef struct buffer_provider_s {
363 buffer_function_t getBuffer; // retrieve next buffer
364 buffer_function_t releaseBuffer; // release used buffer
365 void *cookie; // for use by client of buffer provider functions
366} buffer_provider_t;
367
368// The buffer_config_s structure specifies the input or output audio format
369// to be used by the effect engine. It is part of the effect_config_t
370// structure that defines both input and output buffer configurations and is
371// passed by the EFFECT_CMD_CONFIGURE command.
372typedef struct buffer_config_s {
373 audio_buffer_t buffer; // buffer for use by process() function is not passed explicitly
374 uint32_t samplingRate; // sampling rate
375 uint32_t channels; // channel mask (see audio_channels_e in AudioCommon.h)
376 buffer_provider_t bufferProvider; // buffer provider
377 uint8_t format; // PCM format (see audio_format_e in AudioCommon.h)
378 uint8_t accessMode; // read/write or accumulate in buffer (effect_buffer_access_e)
379 uint16_t mask; // indicates which of the above fields is valid
380} buffer_config_t;
381
382// values for "accessMode" field of buffer_config_t:
383// overwrite, read only, accumulate (read/modify/write)
384enum effect_buffer_access_e {
385 EFFECT_BUFFER_ACCESS_WRITE,
386 EFFECT_BUFFER_ACCESS_READ,
387 EFFECT_BUFFER_ACCESS_ACCUMULATE
388
389};
390
391// values for bit field "mask" in buffer_config_t. If a bit is set, the corresponding field
392// in buffer_config_t must be taken into account when executing the EFFECT_CMD_CONFIGURE command
393#define EFFECT_CONFIG_BUFFER 0x0001 // buffer field must be taken into account
394#define EFFECT_CONFIG_SMP_RATE 0x0002 // samplingRate field must be taken into account
395#define EFFECT_CONFIG_CHANNELS 0x0004 // channels field must be taken into account
396#define EFFECT_CONFIG_FORMAT 0x0008 // format field must be taken into account
397#define EFFECT_CONFIG_ACC_MODE 0x0010 // accessMode field must be taken into account
398#define EFFECT_CONFIG_PROVIDER 0x0020 // bufferProvider field must be taken into account
399#define EFFECT_CONFIG_ALL (EFFECT_CONFIG_BUFFER | EFFECT_CONFIG_SMP_RATE | \
400 EFFECT_CONFIG_CHANNELS | EFFECT_CONFIG_FORMAT | \
401 EFFECT_CONFIG_ACC_MODE | EFFECT_CONFIG_PROVIDER)
402
403// effect_config_s structure describes the format of the pCmdData argument of EFFECT_CMD_CONFIGURE command
404// to configure audio parameters and buffers for effect engine input and output.
405typedef struct effect_config_s {
406 buffer_config_t inputCfg;
407 buffer_config_t outputCfg;;
408} effect_config_t;
409
410// effect_param_s structure describes the format of the pCmdData argument of EFFECT_CMD_SET_PARAM
411// command and pCmdData and pReplyData of EFFECT_CMD_GET_PARAM command.
412// psize and vsize represent the actual size of parameter and value.
413//
414// NOTE: the start of value field inside the data field is always on a 32 bit boundary:
415//
416// +-----------+
417// | status | sizeof(int)
418// +-----------+
419// | psize | sizeof(int)
420// +-----------+
421// | vsize | sizeof(int)
422// +-----------+
423// | | | |
424// ~ parameter ~ > psize |
425// | | | > ((psize - 1)/sizeof(int) + 1) * sizeof(int)
426// +-----------+ |
427// | padding | |
428// +-----------+
429// | | |
430// ~ value ~ > vsize
431// | | |
432// +-----------+
433
434typedef struct effect_param_s {
435 int32_t status; // Transaction status (unused for command, used for reply)
436 uint32_t psize; // Parameter size
437 uint32_t vsize; // Value size
438 char data[]; // Start of Parameter + Value data
439} effect_param_t;
440
441
442/////////////////////////////////////////////////
443// Effect library interface
444/////////////////////////////////////////////////
445
446// An effect library is required to implement and expose the following functions
447// to enable effect enumeration and instantiation. The name of these functions must be as
448// specified here as the effect framework will get the function address with dlsym():
449//
450// - effect_QueryNumberEffects_t EffectQueryNumberEffects;
451// - effect_QueryNextEffect_t EffectQueryNext;
452// - effect_CreateEffect_t EffectCreate;
453// - effect_ReleaseEffect_t EffectRelease;
454
455
456////////////////////////////////////////////////////////////////////////////////
457//
458// Function: EffectQueryNumberEffects
459//
460// Description: Returns the number of different effect exposed by the
461// library. Each effect must have a unique effect uuid (see
462// effect_descriptor_t). This function together with EffectQueryNext()
463// is used to enumerate all effects present in the library.
464// Each time EffectQueryNumberEffects() is called, the library must
465// reset the index of the effect descriptor returned by next call to
466// EffectQueryNext() to restart enumeration from the beginning.
467//
468// Input/Output:
469// pNumEffects: address where the number of effects should be returned.
470//
471// Output:
472// returned value: 0 successful operation.
473// -ENODEV library failed to initialize
474// -EINVAL invalid pNumEffects
475// *pNumEffects: updated with number of effects in library
476//
477////////////////////////////////////////////////////////////////////////////////
478typedef int32_t (*effect_QueryNumberEffects_t)(int32_t *pNumEffects);
479
480////////////////////////////////////////////////////////////////////////////////
481//
482// Function: EffectQueryNext
483//
484// Description: Returns a descriptor of the next available effect.
485// See effect_descriptor_t for details on effect descriptors.
486// This function together with EffectQueryNext() is used to enumerate all
487// effects present in the library. The enumeration sequence is:
488// EffectQueryNumberEffects(&num_effects);
489// while (num_effects--)
490// EffectQueryNext();
491//
492// Input/Output:
493// pDescriptor: address where to return the effect descriptor.
494//
495// Output:
496// returned value: 0 successful operation.
497// -ENODEV library failed to initialize
498// -EINVAL invalid pDescriptor
499// -ENOENT no more effect available
500// *pDescriptor: updated with the effect descriptor.
501//
502////////////////////////////////////////////////////////////////////////////////
503typedef int32_t (*effect_QueryNextEffect_t)(effect_descriptor_t *pDescriptor);
504
505////////////////////////////////////////////////////////////////////////////////
506//
507// Function: EffectCreate
508//
509// Description: Creates an effect engine of the specified type and returns an
510// effect control interface on this engine. The function will allocate the
511// resources for an instance of the requested effect engine and return
512// a handle on the effect control interface.
513//
514// Input:
515// pEffectUuid: pointer to the effect uuid.
516//
517// Input/Output:
518// pInterface: address where to return the effect interface.
519//
520// Output:
521// returned value: 0 successful operation.
522// -ENODEV library failed to initialize
523// -EINVAL invalid pEffectUuid or pInterface
524// -ENOENT No effect with this uuid found
525// *pInterface: updated with the effect interface handle.
526//
527////////////////////////////////////////////////////////////////////////////////
528typedef int32_t (*effect_CreateEffect_t)(effect_uuid_t *uuid, effect_interface_t *pInterface);
529
530////////////////////////////////////////////////////////////////////////////////
531//
532// Function: EffectRelease
533//
534// Description: Releases the effect engine whose handle is given as argument.
535// All resources allocated to this particular instance of the effect are
536// released.
537//
538// Input:
539// interface: handle on the effect interface to be released.
540//
541// Output:
542// returned value: 0 successful operation.
543// -ENODEV library failed to initialize
544// -EINVAL invalid interface handle
545//
546////////////////////////////////////////////////////////////////////////////////
547typedef int32_t (*effect_ReleaseEffect_t)(effect_interface_t interface);
548
549
550#if __cplusplus
551} // extern "C"
552#endif
553
554
555#endif /*ANDROID_EFFECTAPI_H_*/