1*4d7e907cSAndroid Build Coastguard Worker/* 2*4d7e907cSAndroid Build Coastguard Worker * Copyright (C) 2019 The Android Open Source Project 3*4d7e907cSAndroid Build Coastguard Worker * 4*4d7e907cSAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License"); 5*4d7e907cSAndroid Build Coastguard Worker * you may not use this file except in compliance with the License. 6*4d7e907cSAndroid Build Coastguard Worker * You may obtain a copy of the License at 7*4d7e907cSAndroid Build Coastguard Worker * 8*4d7e907cSAndroid Build Coastguard Worker * http://www.apache.org/licenses/LICENSE-2.0 9*4d7e907cSAndroid Build Coastguard Worker * 10*4d7e907cSAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software 11*4d7e907cSAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS, 12*4d7e907cSAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*4d7e907cSAndroid Build Coastguard Worker * See the License for the specific language governing permissions and 14*4d7e907cSAndroid Build Coastguard Worker * limitations under the License. 15*4d7e907cSAndroid Build Coastguard Worker */ 16*4d7e907cSAndroid Build Coastguard Worker 17*4d7e907cSAndroid Build Coastguard Workerpackage [email protected]; 18*4d7e907cSAndroid Build Coastguard Worker 19*4d7e907cSAndroid Build Coastguard Workerimport [email protected]; 20*4d7e907cSAndroid Build Coastguard Workerimport IEffect; 21*4d7e907cSAndroid Build Coastguard Worker 22*4d7e907cSAndroid Build Coastguard Workerinterface IEffectsFactory { 23*4d7e907cSAndroid Build Coastguard Worker /** 24*4d7e907cSAndroid Build Coastguard Worker * Returns descriptors of different effects in all loaded libraries. 25*4d7e907cSAndroid Build Coastguard Worker * 26*4d7e907cSAndroid Build Coastguard Worker * @return retval operation completion status. 27*4d7e907cSAndroid Build Coastguard Worker * @return result list of effect descriptors. 28*4d7e907cSAndroid Build Coastguard Worker */ 29*4d7e907cSAndroid Build Coastguard Worker getAllDescriptors() generates(Result retval, vec<EffectDescriptor> result); 30*4d7e907cSAndroid Build Coastguard Worker 31*4d7e907cSAndroid Build Coastguard Worker /** 32*4d7e907cSAndroid Build Coastguard Worker * Returns a descriptor of a particular effect. 33*4d7e907cSAndroid Build Coastguard Worker * 34*4d7e907cSAndroid Build Coastguard Worker * @return retval operation completion status. 35*4d7e907cSAndroid Build Coastguard Worker * @return result effect descriptor. 36*4d7e907cSAndroid Build Coastguard Worker */ 37*4d7e907cSAndroid Build Coastguard Worker getDescriptor(Uuid uid) generates(Result retval, EffectDescriptor result); 38*4d7e907cSAndroid Build Coastguard Worker 39*4d7e907cSAndroid Build Coastguard Worker /** 40*4d7e907cSAndroid Build Coastguard Worker * Creates an effect engine of the specified type. To release the effect 41*4d7e907cSAndroid Build Coastguard Worker * engine, it is necessary to release references to the returned effect 42*4d7e907cSAndroid Build Coastguard Worker * object. 43*4d7e907cSAndroid Build Coastguard Worker * 44*4d7e907cSAndroid Build Coastguard Worker * @param uid effect uuid. 45*4d7e907cSAndroid Build Coastguard Worker * @param session audio session to which this effect instance will be 46*4d7e907cSAndroid Build Coastguard Worker * attached. All effects created with the same session ID 47*4d7e907cSAndroid Build Coastguard Worker * are connected in series and process the same signal 48*4d7e907cSAndroid Build Coastguard Worker * stream. 49*4d7e907cSAndroid Build Coastguard Worker * @param ioHandle identifies the output or input stream this effect is 50*4d7e907cSAndroid Build Coastguard Worker * directed to in audio HAL. 51*4d7e907cSAndroid Build Coastguard Worker * @param device identifies the sink or source device this effect is directed to in the 52*4d7e907cSAndroid Build Coastguard Worker * audio HAL. Must be specified if session is AudioSessionConsts.DEVICE. 53*4d7e907cSAndroid Build Coastguard Worker * "device" is the AudioPortHandle used for the device when the audio 54*4d7e907cSAndroid Build Coastguard Worker * patch is created at the audio HAL. 55*4d7e907cSAndroid Build Coastguard Worker * @return retval operation completion status. 56*4d7e907cSAndroid Build Coastguard Worker * @return result the interface for the created effect. 57*4d7e907cSAndroid Build Coastguard Worker * @return effectId the unique ID of the effect to be used with 58*4d7e907cSAndroid Build Coastguard Worker * IStream::addEffect and IStream::removeEffect methods. 59*4d7e907cSAndroid Build Coastguard Worker */ 60*4d7e907cSAndroid Build Coastguard Worker createEffect(Uuid uid, AudioSession session, AudioIoHandle ioHandle, AudioPortHandle device) 61*4d7e907cSAndroid Build Coastguard Worker generates (Result retval, IEffect result, uint64_t effectId); 62*4d7e907cSAndroid Build Coastguard Worker}; 63