diff options
Diffstat (limited to 'media/libeffects/testlibs')
-rw-r--r-- | media/libeffects/testlibs/EffectEqualizer.cpp | 10 | ||||
-rw-r--r-- | media/libeffects/testlibs/EffectReverb.c | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/media/libeffects/testlibs/EffectEqualizer.cpp b/media/libeffects/testlibs/EffectEqualizer.cpp index 35a4a61..90ebe1f 100644 --- a/media/libeffects/testlibs/EffectEqualizer.cpp +++ b/media/libeffects/testlibs/EffectEqualizer.cpp @@ -136,7 +136,7 @@ extern "C" int EffectQueryEffect(uint32_t index, if (index > 0) { return -EINVAL; } - memcpy(pDescriptor, &gEqualizerDescriptor, sizeof(effect_descriptor_t)); + *pDescriptor = gEqualizerDescriptor; return 0; } /* end EffectQueryNext */ @@ -204,7 +204,7 @@ extern "C" int EffectGetDescriptor(const effect_uuid_t *uuid, } if (memcmp(uuid, &gEqualizerDescriptor.uuid, sizeof(effect_uuid_t)) == 0) { - memcpy(pDescriptor, &gEqualizerDescriptor, sizeof(effect_descriptor_t)); + *pDescriptor = gEqualizerDescriptor; return 0; } @@ -262,7 +262,7 @@ int Equalizer_setConfig(EqualizerContext *pContext, effect_config_t *pConfig) } CHECK_ARG(channelCount <= AudioBiquadFilter::MAX_CHANNELS); - memcpy(&pContext->config, pConfig, sizeof(effect_config_t)); + pContext->config = *pConfig; pContext->pEqualizer->configure(channelCount, pConfig->inputCfg.samplingRate); @@ -290,7 +290,7 @@ int Equalizer_setConfig(EqualizerContext *pContext, effect_config_t *pConfig) void Equalizer_getConfig(EqualizerContext *pContext, effect_config_t *pConfig) { - memcpy(pConfig, &pContext->config, sizeof(effect_config_t)); + *pConfig = pContext->config; } // end Equalizer_getConfig @@ -752,7 +752,7 @@ extern "C" int Equalizer_getDescriptor(effect_handle_t self, return -EINVAL; } - memcpy(pDescriptor, &android::gEqualizerDescriptor, sizeof(effect_descriptor_t)); + *pDescriptor = android::gEqualizerDescriptor; return 0; } diff --git a/media/libeffects/testlibs/EffectReverb.c b/media/libeffects/testlibs/EffectReverb.c index 8351712..a87a834 100644 --- a/media/libeffects/testlibs/EffectReverb.c +++ b/media/libeffects/testlibs/EffectReverb.c @@ -194,7 +194,7 @@ int EffectGetDescriptor(const effect_uuid_t *uuid, for (i = 0; i < length; i++) { if (memcmp(uuid, &gDescriptors[i]->uuid, sizeof(effect_uuid_t)) == 0) { - memcpy(pDescriptor, gDescriptors[i], sizeof(effect_descriptor_t)); + *pDescriptor = *gDescriptors[i]; ALOGV("EffectGetDescriptor - UUID matched Reverb type %d, UUID = %x", i, gDescriptors[i]->uuid.timeLow); return 0; @@ -440,7 +440,7 @@ int Reverb_GetDescriptor(effect_handle_t self, } } - memcpy(pDescriptor, desc, sizeof(effect_descriptor_t)); + *pDescriptor = *desc; return 0; } /* end Reverb_getDescriptor */ @@ -546,7 +546,7 @@ int Reverb_setConfig(reverb_module_t *pRvbModule, effect_config_t *pConfig, return -EINVAL; } - memcpy(&pRvbModule->config, pConfig, sizeof(effect_config_t)); + pRvbModule->config = *pConfig; pReverb->m_nSamplingRate = pRvbModule->config.outputCfg.samplingRate; @@ -644,7 +644,7 @@ int Reverb_setConfig(reverb_module_t *pRvbModule, effect_config_t *pConfig, void Reverb_getConfig(reverb_module_t *pRvbModule, effect_config_t *pConfig) { - memcpy(pConfig, &pRvbModule->config, sizeof(effect_config_t)); + *pConfig = pRvbModule->config; } /*---------------------------------------------------------------------------- |