summaryrefslogtreecommitdiffstats
path: root/media/libeffects/preprocessing/PreProcessing.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'media/libeffects/preprocessing/PreProcessing.cpp')
-rw-r--r--[-rwxr-xr-x]media/libeffects/preprocessing/PreProcessing.cpp54
1 files changed, 15 insertions, 39 deletions
diff --git a/media/libeffects/preprocessing/PreProcessing.cpp b/media/libeffects/preprocessing/PreProcessing.cpp
index 597866a..c56ff72 100755..100644
--- a/media/libeffects/preprocessing/PreProcessing.cpp
+++ b/media/libeffects/preprocessing/PreProcessing.cpp
@@ -1233,8 +1233,8 @@ int PreProcessingFx_Process(effect_handle_t self,
if (session->framesIn < session->frameCount) {
return 0;
}
- size_t frIn = session->framesIn;
- size_t frOut = session->apmFrameCount;
+ spx_uint32_t frIn = session->framesIn;
+ spx_uint32_t frOut = session->apmFrameCount;
if (session->inChannelCount == 1) {
speex_resampler_process_int(session->inResampler,
0,
@@ -1290,8 +1290,8 @@ int PreProcessingFx_Process(effect_handle_t self,
}
if (session->outResampler != NULL) {
- size_t frIn = session->apmFrameCount;
- size_t frOut = session->frameCount;
+ spx_uint32_t frIn = session->apmFrameCount;
+ spx_uint32_t frOut = session->frameCount;
if (session->inChannelCount == 1) {
speex_resampler_process_int(session->outResampler,
0,
@@ -1754,8 +1754,8 @@ int PreProcessingFx_ProcessReverse(effect_handle_t self,
if (session->framesRev < session->frameCount) {
return 0;
}
- size_t frIn = session->framesRev;
- size_t frOut = session->apmFrameCount;
+ spx_uint32_t frIn = session->framesRev;
+ spx_uint32_t frOut = session->apmFrameCount;
if (session->inChannelCount == 1) {
speex_resampler_process_int(session->revResampler,
0,
@@ -1818,30 +1818,6 @@ const struct effect_interface_s sEffectInterfaceReverse = {
// Effect Library Interface Implementation
//------------------------------------------------------------------------------
-int PreProcessingLib_QueryNumberEffects(uint32_t *pNumEffects)
-{
- if (PreProc_Init() != 0) {
- return sInitStatus;
- }
- if (pNumEffects == NULL) {
- return -EINVAL;
- }
- *pNumEffects = PREPROC_NUM_EFFECTS;
- return sInitStatus;
-}
-
-int PreProcessingLib_QueryEffect(uint32_t index, effect_descriptor_t *pDescriptor)
-{
- if (PreProc_Init() != 0) {
- return sInitStatus;
- }
- if (index >= PREPROC_NUM_EFFECTS) {
- return -EINVAL;
- }
- *pDescriptor = *sDescriptors[index];
- return 0;
-}
-
int PreProcessingLib_Create(const effect_uuid_t *uuid,
int32_t sessionId,
int32_t ioId,
@@ -1913,16 +1889,16 @@ int PreProcessingLib_GetDescriptor(const effect_uuid_t *uuid,
return 0;
}
+// 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 : "Audio Preprocessing Library",
- implementor : "The Android Open Source Project",
- query_num_effects : PreProcessingLib_QueryNumberEffects,
- query_effect : PreProcessingLib_QueryEffect,
- create_effect : PreProcessingLib_Create,
- release_effect : PreProcessingLib_Release,
- get_descriptor : PreProcessingLib_GetDescriptor
+ .tag = AUDIO_EFFECT_LIBRARY_TAG,
+ .version = EFFECT_LIBRARY_API_VERSION,
+ .name = "Audio Preprocessing Library",
+ .implementor = "The Android Open Source Project",
+ .create_effect = PreProcessingLib_Create,
+ .release_effect = PreProcessingLib_Release,
+ .get_descriptor = PreProcessingLib_GetDescriptor
};
}; // extern "C"