From 65580f9adf6c4d98449ad0716488f9fe3869aa5a Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Fri, 27 May 2011 17:51:52 -0700 Subject: Removed interface to load audio effects libraries Removed unused functions allowing dynamic loading of audio effects libraries from effects factory API. Change-Id: I06cc5a51dc10aca87c7a8687bbb874babd711eca --- media/libeffects/factory/EffectsFactory.c | 12 -------- media/libmedia/AudioEffect.cpp | 14 --------- media/libmedia/IAudioFlinger.cpp | 48 ------------------------------- 3 files changed, 74 deletions(-) (limited to 'media') diff --git a/media/libeffects/factory/EffectsFactory.c b/media/libeffects/factory/EffectsFactory.c index b541be5..b0e8585 100644 --- a/media/libeffects/factory/EffectsFactory.c +++ b/media/libeffects/factory/EffectsFactory.c @@ -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))) { diff --git a/media/libmedia/AudioEffect.cpp b/media/libmedia/AudioEffect.cpp index a043329..8d98900 100644 --- a/media/libmedia/AudioEffect.cpp +++ b/media/libmedia/AudioEffect.cpp @@ -398,20 +398,6 @@ void AudioEffect::commandExecuted(uint32_t cmdCode, // ------------------------------------------------------------------------- -status_t AudioEffect::loadEffectLibrary(const char *libPath, int *handle) -{ - const sp& af = AudioSystem::get_audio_flinger(); - if (af == 0) return PERMISSION_DENIED; - return af->loadEffectLibrary(libPath, handle); -} - -status_t AudioEffect::unloadEffectLibrary(int handle) -{ - const sp& af = AudioSystem::get_audio_flinger(); - if (af == 0) return PERMISSION_DENIED; - return af->unloadEffectLibrary(handle); -} - status_t AudioEffect::queryNumberEffects(uint32_t *numEffects) { const sp& af = AudioSystem::get_audio_flinger(); diff --git a/media/libmedia/IAudioFlinger.cpp b/media/libmedia/IAudioFlinger.cpp index eec47c0..158d2f5 100644 --- a/media/libmedia/IAudioFlinger.cpp +++ b/media/libmedia/IAudioFlinger.cpp @@ -63,8 +63,6 @@ enum { GET_RENDER_POSITION, GET_INPUT_FRAMES_LOST, NEW_AUDIO_SESSION_ID, - LOAD_EFFECT_LIBRARY, - UNLOAD_EFFECT_LIBRARY, QUERY_NUM_EFFECTS, QUERY_EFFECT, GET_EFFECT_DESCRIPTOR, @@ -528,37 +526,6 @@ public: return id; } - virtual status_t loadEffectLibrary(const char *libPath, int *handle) - { - if (libPath == NULL || handle == NULL) { - return BAD_VALUE; - } - *handle = 0; - Parcel data, reply; - data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor()); - data.writeCString(libPath); - status_t status = remote()->transact(LOAD_EFFECT_LIBRARY, data, &reply); - if (status == NO_ERROR) { - status = reply.readInt32(); - if (status == NO_ERROR) { - *handle = reply.readInt32(); - } - } - return status; - } - - virtual status_t unloadEffectLibrary(int handle) - { - Parcel data, reply; - data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor()); - data.writeInt32(handle); - status_t status = remote()->transact(UNLOAD_EFFECT_LIBRARY, data, &reply); - if (status == NO_ERROR) { - status = reply.readInt32(); - } - return status; - } - virtual status_t queryNumberEffects(uint32_t *numEffects) { Parcel data, reply; @@ -952,21 +919,6 @@ status_t BnAudioFlinger::onTransact( reply->writeInt32(newAudioSessionId()); return NO_ERROR; } break; - case LOAD_EFFECT_LIBRARY: { - CHECK_INTERFACE(IAudioFlinger, data, reply); - int handle; - status_t status = loadEffectLibrary(data.readCString(), &handle); - reply->writeInt32(status); - if (status == NO_ERROR) { - reply->writeInt32(handle); - } - return NO_ERROR; - } - case UNLOAD_EFFECT_LIBRARY: { - CHECK_INTERFACE(IAudioFlinger, data, reply); - reply->writeInt32(unloadEffectLibrary(data.readInt32())); - return NO_ERROR; - } case QUERY_NUM_EFFECTS: { CHECK_INTERFACE(IAudioFlinger, data, reply); uint32_t numEffects; -- cgit v1.1