diff options
Diffstat (limited to 'audio')
-rw-r--r-- | audio/audio_hw.c | 5 |
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(¶m->data, &ed, sizeof(uint32_t)); + memcpy((void*)(¶m->data) + sizeof(int32_t), &delay_us, sizeof(int32_t)); return set_preprocessor_param(handle, param); } |