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

Commit 16bbcf44 authored by Myles Watson's avatar Myles Watson
Browse files

bt_target.h: Remove DUMP_PCM_DATA (always FALSE)

Bug: 327390105
Test: mma -j32
Flag: EXEMPT, build-only change
Change-Id: Ie9f5084dd299833b80a0aa1432796fb3820f923e
parent bf0b0b97
Loading
Loading
Loading
Loading
+0 −20
Original line number Diff line number Diff line
@@ -45,11 +45,6 @@ typedef struct {
  float gain;
} BtifAvrcpAudioTrack;

#if (DUMP_PCM_DATA == TRUE)
FILE* outputPcmSampleFile;
char outputFilename[50] = "/data/misc/bluedroid/output_sample.pcm";
#endif

// Maximum track gain that can be set.
constexpr float kMaxTrackGain = 1.0f;
// Minimum track gain that can be set.
@@ -128,9 +123,6 @@ void* BtifAvrcpAudioTrackCreate(int trackFreq, int bitsPerSample,
  trackHolder->gain = kMaxTrackGain;
  trackHolder->buffer = new float[trackHolder->bufferLength]();

#if (DUMP_PCM_DATA == TRUE)
  outputPcmSampleFile = fopen(outputFilename, "ab");
#endif
  s_AudioEngine.trackFreq = trackFreq;
  s_AudioEngine.channelCount = channelCount;
  s_AudioEngine.trackHandle = (void*)trackHolder;
@@ -174,13 +166,6 @@ void BtifAvrcpAudioTrackDelete(void* handle) {
    delete trackHolder->buffer;
    delete trackHolder;
  }

#if (DUMP_PCM_DATA == TRUE)
  if (outputPcmSampleFile) {
    fclose(outputPcmSampleFile);
  }
  outputPcmSampleFile = NULL;
#endif
}

void BtifAvrcpAudioTrackPause(void* handle) {
@@ -277,11 +262,6 @@ int BtifAvrcpAudioTrackWriteData(void* handle, void* audioBuffer,
  CHECK(trackHolder != NULL);
  CHECK(trackHolder->stream != NULL);
  aaudio_result_t retval = -1;
#if (DUMP_PCM_DATA == TRUE)
  if (outputPcmSampleFile) {
    fwrite((audioBuffer), 1, (size_t)bufferLength, outputPcmSampleFile);
  }
#endif

  size_t sampleSize = sampleSizeFor(trackHolder);
  int transcodedCount = 0;
+0 −10
Original line number Diff line number Diff line
@@ -786,16 +786,6 @@
#define AVCT_NUM_CONN 14  // 2 * MaxDevices + 2
#endif

/******************************************************************************
 *
 * AVRCP
 *
 *****************************************************************************/

#ifndef DUMP_PCM_DATA
#define DUMP_PCM_DATA FALSE
#endif

/******************************************************************************
 *
 * BTA