summaryrefslogtreecommitdiffstats
path: root/media/libeffects/downmix
diff options
context:
space:
mode:
Diffstat (limited to 'media/libeffects/downmix')
-rw-r--r--media/libeffects/downmix/Android.mk6
-rw-r--r--media/libeffects/downmix/EffectDownmix.c41
-rw-r--r--media/libeffects/downmix/EffectDownmix.h3
3 files changed, 15 insertions, 35 deletions
diff --git a/media/libeffects/downmix/Android.mk b/media/libeffects/downmix/Android.mk
index 95ca6fd..2bb6dbe 100644
--- a/media/libeffects/downmix/Android.mk
+++ b/media/libeffects/downmix/Android.mk
@@ -7,13 +7,13 @@ LOCAL_SRC_FILES:= \
EffectDownmix.c
LOCAL_SHARED_LIBRARIES := \
- libcutils
+ libcutils liblog
LOCAL_MODULE:= libdownmix
LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/soundfx
+LOCAL_MODULE_RELATIVE_PATH := soundfx
ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
LOCAL_LDLIBS += -ldl
@@ -25,4 +25,6 @@ LOCAL_C_INCLUDES := \
LOCAL_PRELINK_MODULE := false
+LOCAL_CFLAGS += -fvisibility=hidden
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/media/libeffects/downmix/EffectDownmix.c b/media/libeffects/downmix/EffectDownmix.c
index 366a78b..d25dc9b 100644
--- a/media/libeffects/downmix/EffectDownmix.c
+++ b/media/libeffects/downmix/EffectDownmix.c
@@ -58,16 +58,16 @@ const struct effect_interface_s gDownmixInterface = {
NULL /* no process_reverse function, no reference stream needed */
};
+// This is the only symbol that needs to be exported
+__attribute__ ((visibility ("default")))
audio_effect_library_t AUDIO_EFFECT_LIBRARY_INFO_SYM = {
- tag : AUDIO_EFFECT_LIBRARY_TAG,
- version : EFFECT_LIBRARY_API_VERSION,
- name : "Downmix Library",
- implementor : "The Android Open Source Project",
- query_num_effects : DownmixLib_QueryNumberEffects,
- query_effect : DownmixLib_QueryEffect,
- create_effect : DownmixLib_Create,
- release_effect : DownmixLib_Release,
- get_descriptor : DownmixLib_GetDescriptor,
+ .tag = AUDIO_EFFECT_LIBRARY_TAG,
+ .version = EFFECT_LIBRARY_API_VERSION,
+ .name = "Downmix Library",
+ .implementor = "The Android Open Source Project",
+ .create_effect = DownmixLib_Create,
+ .release_effect = DownmixLib_Release,
+ .get_descriptor = DownmixLib_GetDescriptor,
};
@@ -159,25 +159,6 @@ void Downmix_testIndexComputation(uint32_t mask) {
/*--- Effect Library Interface Implementation ---*/
-int32_t DownmixLib_QueryNumberEffects(uint32_t *pNumEffects) {
- ALOGV("DownmixLib_QueryNumberEffects()");
- *pNumEffects = kNbEffects;
- return 0;
-}
-
-int32_t DownmixLib_QueryEffect(uint32_t index, effect_descriptor_t *pDescriptor) {
- ALOGV("DownmixLib_QueryEffect() index=%d", index);
- if (pDescriptor == NULL) {
- return -EINVAL;
- }
- if (index >= (uint32_t)kNbEffects) {
- return -EINVAL;
- }
- memcpy(pDescriptor, gDescriptors[index], sizeof(effect_descriptor_t));
- return 0;
-}
-
-
int32_t DownmixLib_Create(const effect_uuid_t *uuid,
int32_t sessionId,
int32_t ioId,
@@ -728,7 +709,7 @@ int Downmix_setParameter(downmix_object_t *pDownmixer, int32_t param, size_t siz
case DOWNMIX_PARAM_TYPE:
if (size != sizeof(downmix_type_t)) {
- ALOGE("Downmix_setParameter(DOWNMIX_PARAM_TYPE) invalid size %d, should be %d",
+ ALOGE("Downmix_setParameter(DOWNMIX_PARAM_TYPE) invalid size %zu, should be %zu",
size, sizeof(downmix_type_t));
return -EINVAL;
}
@@ -781,7 +762,7 @@ int Downmix_getParameter(downmix_object_t *pDownmixer, int32_t param, size_t *pS
case DOWNMIX_PARAM_TYPE:
if (*pSize < sizeof(int16_t)) {
- ALOGE("Downmix_getParameter invalid parameter size %d for DOWNMIX_PARAM_TYPE", *pSize);
+ ALOGE("Downmix_getParameter invalid parameter size %zu for DOWNMIX_PARAM_TYPE", *pSize);
return -EINVAL;
}
pValue16 = (int16_t *)pValue;
diff --git a/media/libeffects/downmix/EffectDownmix.h b/media/libeffects/downmix/EffectDownmix.h
index be3ca3f..cb6b957 100644
--- a/media/libeffects/downmix/EffectDownmix.h
+++ b/media/libeffects/downmix/EffectDownmix.h
@@ -65,9 +65,6 @@ const uint32_t kUnsupported =
* Effect API
*------------------------------------
*/
-int32_t DownmixLib_QueryNumberEffects(uint32_t *pNumEffects);
-int32_t DownmixLib_QueryEffect(uint32_t index,
- effect_descriptor_t *pDescriptor);
int32_t DownmixLib_Create(const effect_uuid_t *uuid,
int32_t sessionId,
int32_t ioId,