From ca2685b2a0a695a7c4ac78883e750a92dcad0515 Mon Sep 17 00:00:00 2001 From: wjiang Date: Tue, 18 Mar 2014 06:43:48 +0800 Subject: [PATCH] post_proc: reverb preset id is not mapped correctly Array index is not correct and causes uninitialized value being used when 'Plate' is chosen. Correct index to retrieve the right preset id. Change-Id: I2ad058bc7dc5d9b74882da2f5d4c0e3570f9e952 CRs-Fixed: 630429 --- post_proc/effect_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/post_proc/effect_api.c b/post_proc/effect_api.c index 0b77969a..b7cf469a 100644 --- a/post_proc/effect_api.c +++ b/post_proc/effect_api.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -391,7 +391,7 @@ void offload_reverb_set_preset(struct reverb_params *reverb, int preset) { ALOGV("%s", __func__); if (preset && (preset <= NUM_OSL_REVERB_PRESETS_SUPPORTED)) - reverb->preset = map_reverb_opensl_preset_2_offload_preset[preset][1]; + reverb->preset = map_reverb_opensl_preset_2_offload_preset[preset-1][1]; } void offload_reverb_set_wet_mix(struct reverb_params *reverb, int wet_mix)