Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 65580f9a authored by Eric Laurent's avatar Eric Laurent
Browse files

Removed interface to load audio effects libraries

Removed unused functions allowing dynamic loading of audio effects libraries
from effects factory API.

Change-Id: I06cc5a51dc10aca87c7a8687bbb874babd711eca
parent e1315cf0
Loading
Loading
Loading
Loading
+0 −44
Original line number Diff line number Diff line
@@ -43,50 +43,6 @@ class AudioEffect : public RefBase
{
public:

    /*
     *  Static methods for effect libraries management.
     */

    /*
     *   Loads the effect library which path is given as first argument.
     *   This must be the full path of a dynamic library (.so) implementing one or
     *   more effect engines and exposing the effect library interface described in
     *   EffectApi.h. The function returns a handle on the library for use by
     *   further call to unloadEffectLibrary() to unload the library.
     *
     *   Parameters:
     *          libPath:    full path of the dynamic library file in the file system.
     *          handle:     address where to return the library handle
     *
     *   Returned status (from utils/Errors.h) can be:
     *          NO_ERROR    successful operation.
     *          PERMISSION_DENIED could not get AudioFlinger interface or
     *                      application does not have permission to configure audio
     *          NO_INIT     effect factory not initialized or
     *                      library could not be loaded or
     *                      library does not implement required functions
     *          BAD_VALUE   invalid libPath string or handle
     *
     *   Returned value:
     *          *handle updated with library handle
     */
    static status_t loadEffectLibrary(const char *libPath, int *handle);

    /*
     *   Unloads the effect library which handle is given as argument.
     *
     *   Parameters:
     *          handle: library handle
     *
     *   Returned status (from utils/Errors.h) can be:
     *          NO_ERROR    successful operation.
     *          PERMISSION_DENIED could not get AudioFlinger interface or
     *                      application does not have permission to configure audio
     *          NO_INIT     effect factory not initialized
     *          BAD_VALUE   invalid handle
     */
    static status_t unloadEffectLibrary(int handle);

    /*
     *  Static methods for effects enumeration.
     */
+0 −44
Original line number Diff line number Diff line
@@ -130,50 +130,6 @@ int EffectCreate(effect_uuid_t *pEffectUuid, int32_t sessionId, int32_t ioId, ef
////////////////////////////////////////////////////////////////////////////////
int EffectRelease(effect_handle_t handle);

////////////////////////////////////////////////////////////////////////////////
//
//    Function:       EffectLoadLibrary
//
//    Description:    Loads the effect library which path is given as first argument.
//          This must be the full path of a dynamic library (.so) implementing one or
//          more effect engines and exposing the effect library interface described in
//          EffectApi.h. The function returns a handle on the library for used by
//          further call to EffectUnloadLibrary() to unload the library.
//
//    Input:
//          libPath:    full path of the dynamic library file in the file system.
//
//          handle:     address where to return the library handle
//
//    Output:
//        returned value:    0          successful operation.
//                          -ENODEV     effect factory not initialized or
//                                      library could not be loaded or
//                                      library does not implement required functions
//                          -EINVAL     invalid libPath string or handle
//
////////////////////////////////////////////////////////////////////////////////
int EffectLoadLibrary(const char *libPath, int *handle);

////////////////////////////////////////////////////////////////////////////////
//
//    Function:       EffectUnloadLibrary
//
//    Description:  Unloads the effect library which handle is given as argument.
//
//    Input:
//          handle: library handle
//
//    Output:
//        returned value:    0          successful operation.
//                          -ENODEV     effect factory not initialized
//                          -ENOENT     invalid handle
//
////////////////////////////////////////////////////////////////////////////////
int EffectUnloadLibrary(int handle);



////////////////////////////////////////////////////////////////////////////////
//
//    Function:       EffectGetDescriptor
+0 −4
Original line number Diff line number Diff line
@@ -139,10 +139,6 @@ public:

    virtual int newAudioSessionId() = 0;

    virtual status_t loadEffectLibrary(const char *libPath, int *handle) = 0;

    virtual status_t unloadEffectLibrary(int handle) = 0;

    virtual status_t queryNumberEffects(uint32_t *numEffects) = 0;

    virtual status_t queryEffect(uint32_t index, effect_descriptor_t *pDescriptor) = 0;
+0 −12
Original line number Diff line number Diff line
@@ -332,18 +332,6 @@ exit:
    return ret;
}

int EffectLoadLibrary(const char *libPath, int *handle)
{
    // TODO: see if this interface still makes sense with the use of config files
    return -ENOSYS;
}

int EffectUnloadLibrary(int handle)
{
    // TODO: see if this interface still makes sense with the use of config files
    return -ENOSYS;
}

int EffectIsNullUuid(effect_uuid_t *uuid)
{
    if (memcmp(uuid, EFFECT_UUID_NULL, sizeof(effect_uuid_t))) {
+0 −14
Original line number Diff line number Diff line
@@ -398,20 +398,6 @@ void AudioEffect::commandExecuted(uint32_t cmdCode,

// -------------------------------------------------------------------------

status_t AudioEffect::loadEffectLibrary(const char *libPath, int *handle)
{
    const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger();
    if (af == 0) return PERMISSION_DENIED;
    return af->loadEffectLibrary(libPath, handle);
}

status_t AudioEffect::unloadEffectLibrary(int handle)
{
    const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger();
    if (af == 0) return PERMISSION_DENIED;
    return af->unloadEffectLibrary(handle);
}

status_t AudioEffect::queryNumberEffects(uint32_t *numEffects)
{
    const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger();
Loading