• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2018 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
17package android.hardware.audio.effect@4.0;
18
19import android.hardware.audio.common@4.0;
20import IEffect;
21
22interface IEffectsFactory {
23    /**
24     * Returns descriptors of different effects in all loaded libraries.
25     *
26     * @return retval operation completion status.
27     * @return result list of effect descriptors.
28     */
29    getAllDescriptors() generates(Result retval, vec<EffectDescriptor> result);
30
31    /**
32     * Returns a descriptor of a particular effect.
33     *
34     * @return retval operation completion status.
35     * @return result effect descriptor.
36     */
37    getDescriptor(Uuid uid) generates(Result retval, EffectDescriptor result);
38
39    /**
40     * Creates an effect engine of the specified type.  To release the effect
41     * engine, it is necessary to release references to the returned effect
42     * object.
43     *
44     * @param uid effect uuid.
45     * @param session audio session to which this effect instance will be
46     *                attached.  All effects created with the same session ID
47     *                are connected in series and process the same signal
48     *                stream.
49     * @param ioHandle identifies the output or input stream this effect is
50     *                 directed to in audio HAL.
51     * @return retval operation completion status.
52     * @return result the interface for the created effect.
53     * @return effectId the unique ID of the effect to be used with
54     *                  IStream::addEffect and IStream::removeEffect methods.
55     */
56    createEffect(Uuid uid, AudioSession session, AudioIoHandle ioHandle)
57        generates (Result retval, IEffect result, uint64_t effectId);
58};
59