summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorMWisBest <repinski23@gmail.com>2013-08-28 03:56:47 -0500
committerZiyan <jaraidaniel@gmail.com>2016-01-15 12:23:40 +0100
commit0d513b93097790dc06121352c4822bf9cce363f5 (patch)
tree1169b6087dcc2f6e5d4fa7fe78c5b20e1392ff85 /audio
parentecc67d5e44b6bf1faceca75dbd92afda8cf5db7d (diff)
downloaddevice_samsung_tuna-0d513b93097790dc06121352c4822bf9cce363f5.zip
device_samsung_tuna-0d513b93097790dc06121352c4822bf9cce363f5.tar.gz
device_samsung_tuna-0d513b93097790dc06121352c4822bf9cce363f5.tar.bz2
audio: Fix aliasing violation.
Diffstat (limited to 'audio')
-rw-r--r--audio/audio_hw.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index 58254cd..c4c4b76 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -2492,8 +2492,9 @@ static int set_preprocessor_echo_delay(effect_handle_t handle,
param->psize = sizeof(uint32_t);
param->vsize = sizeof(uint32_t);
- *(uint32_t *)param->data = AEC_PARAM_ECHO_DELAY;
- *((int32_t *)param->data + 1) = delay_us;
+ uint32_t ed = AEC_PARAM_ECHO_DELAY;
+ memcpy(&param->data, &ed, sizeof(uint32_t));
+ memcpy((void*)(&param->data) + sizeof(int32_t), &delay_us, sizeof(int32_t));
return set_preprocessor_param(handle, param);
}