[audio] Lock to ensure atomicity of the operation

Bug: 388307205

Lock to ensure atomicity of the operation, to avoid the mHandle set to a null pointer after the operation of the effect.

Change-Id: I2bcd016356e5e3ffc055cd051991da0ba7384f6f
Signed-off-by: xialei6 <xialei6@xiaomi.com>
3 files changed