Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 953da0b2 authored by Sanket Agarwal's avatar Sanket Agarwal Committed by android-build-merger
Browse files

Merge "Audio pops due to queue not flushed when focus taken off"

am: 19f5984b

Change-Id: I8d330883afc4c593ab615250be435ca71c95b199
parents 39fa176b 19f5984b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -573,6 +573,12 @@ static void btif_a2dp_sink_set_focus_state_event(
  if (!btif_av_is_connected()) return;
  APPL_TRACE_DEBUG("%s: setting focus state to %d", __func__, state);
  btif_a2dp_sink_cb.rx_focus_state = state;
  if (btif_a2dp_sink_cb.rx_focus_state == BTIF_A2DP_SINK_FOCUS_NOT_GRANTED) {
    fixed_queue_flush(btif_a2dp_sink_cb.rx_audio_queue, osi_free);
    btif_a2dp_sink_cb.rx_flush = true;
  } else if (btif_a2dp_sink_cb.rx_focus_state == BTIF_A2DP_SINK_FOCUS_GRANTED) {
    btif_a2dp_sink_cb.rx_flush = false;
  }
}

void btif_a2dp_sink_set_audio_track_gain(float gain) {