When a2dp using LDAC ecoding PCM,if encoding thread is runned by deley after 2 secends,
btstack will overflow .System will abort to crash by arm gcc code.
Bug:
172590955
Tag: #stability
Test: compile & verify basic functions working
Test: pair to a support LDAC ecode BT headset
Change-Id: Ie470bd51bfd7951d0c674b37aa6af7554cf9faa8
a2dp_ldac_encoder_cb.ldac_feeding_state.last_frame_us = now_us;
a2dp_ldac_encoder_cb.ldac_feeding_state.counter +=
- a2dp_ldac_encoder_cb.ldac_feeding_state.bytes_per_tick * us_this_tick /
- (A2DP_LDAC_ENCODER_INTERVAL_MS * 1000);
+ a2dp_ldac_encoder_cb.ldac_feeding_state.bytes_per_tick * (us_this_tick /
+ (float) (A2DP_LDAC_ENCODER_INTERVAL_MS * 1000));
result =
a2dp_ldac_encoder_cb.ldac_feeding_state.counter / pcm_bytes_per_frame;