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

Commit b4e4f9da authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

LE Audio: pass left/right microphone audio in proper order

Test: compile, record stereo audio, play back, ensure left channel is
played from left speaker
Bug: 150670922

Change-Id: I2c38fc565ae2222dba97340509ba3070a52fad2f
parent 2987f418
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -2316,8 +2316,8 @@ class LeAudioClientImpl : public LeAudioClient {
      std::vector<uint16_t> mixed(left->size() * 2);

      for (size_t i = 0; i < left->size(); i++) {
        mixed[2 * i] = (*left)[i];
        mixed[2 * i + 1] = (*right)[i];
        mixed[2 * i] = (*right)[i];
        mixed[2 * i + 1] = (*left)[i];
      }
      to_write = sizeof(int16_t) * mixed.size();
      written =
@@ -2338,8 +2338,8 @@ class LeAudioClientImpl : public LeAudioClient {
      std::vector<uint16_t> mixed(mono_size * 2);

      for (size_t i = 0; i < mono_size; i++) {
        mixed[2 * i] = left ? (*left)[i] : 0;
        mixed[2 * i + 1] = right ? (*right)[i] : 0;
        mixed[2 * i] = right ? (*right)[i] : 0;
        mixed[2 * i + 1] = left ? (*left)[i] : 0;
      }
      to_write = sizeof(int16_t) * mixed.size();
      written =