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

Commit 9824241d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "leaudio: Fix buzz sound when one earbud connected" into tm-d1-dev

parents 045537e5 52f3c017
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2018,8 +2018,8 @@ class LeAudioClientImpl : public LeAudioClient {

    if (bytes_per_sample == 2) {
      int16_t* out = (int16_t*)mono_out.data();
      for (size_t i = 0; i < frames; ++i) {
      const int16_t* in = (int16_t*)(buf.data());
      for (size_t i = 0; i < frames; ++i) {
        int accum = 0;
        accum += *in++;
        accum += *in++;
@@ -2028,8 +2028,8 @@ class LeAudioClientImpl : public LeAudioClient {
      }
    } else if (bytes_per_sample == 4) {
      int32_t* out = (int32_t*)mono_out.data();
      for (size_t i = 0; i < frames; ++i) {
      const int32_t* in = (int32_t*)(buf.data());
      for (size_t i = 0; i < frames; ++i) {
        int accum = 0;
        accum += *in++;
        accum += *in++;