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

Commit 24f9a421 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski Committed by Automerger Merge Worker
Browse files

Merge "audio_hal_interface: Remove reduntant read" into main am: 694a8a71

parents deeb910f 694a8a71
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -538,6 +538,10 @@ void BluetoothAudioClientInterface::FlushAudioData() {
    return;
  }
  size_t size = data_mq_->availableToRead();
  if (size == 0) {
    return;
  }

  std::vector<MqDataType> buffer(size);

  if (data_mq_->read(buffer.data(), size) != size) {
+3 −0
Original line number Diff line number Diff line
@@ -162,8 +162,10 @@ BluetoothAudioCtrlAck LeAudioTransport::SuspendRequest() {
  log::info("");
  if (stream_cb_.on_suspend_()) {
    flush_();
    log::info("completed with a success");
    return BluetoothAudioCtrlAck::SUCCESS_FINISHED;
  } else {
    log::info("completed with a failure");
    return BluetoothAudioCtrlAck::FAILURE;
  }
}
@@ -172,6 +174,7 @@ void LeAudioTransport::StopRequest() {
  log::info("");
  if (stream_cb_.on_suspend_()) {
    flush_();
    log::info("completed with a success");
  }
}

+5 −0
Original line number Diff line number Diff line
@@ -751,6 +751,11 @@ void BluetoothAudioClientInterface::FlushAudioData() {
    return;
  }
  size_t size = mDataMQ->availableToRead();

  if (size == 0) {
    return;
  }

  uint8_t p_buf[size];

  if (mDataMQ->read(p_buf, size) != size)
+3 −0
Original line number Diff line number Diff line
@@ -166,8 +166,10 @@ BluetoothAudioCtrlAck LeAudioTransport::SuspendRequest() {
  log::info("");
  if (stream_cb_.on_suspend_()) {
    flush_();
    log::info("completed with a success");
    return BluetoothAudioCtrlAck::SUCCESS_FINISHED;
  } else {
    log::info("completed with a failure");
    return BluetoothAudioCtrlAck::FAILURE;
  }
}
@@ -176,6 +178,7 @@ void LeAudioTransport::StopRequest() {
  log::info("");
  if (stream_cb_.on_suspend_()) {
    flush_();
    log::info("completed with a success");
  }
}