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

Commit 68074625 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "leaudio: Fix buzz sound when one earbud connected"

parents d8f263bd e112faf9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1997,8 +1997,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++;
@@ -2007,8 +2007,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++;