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

Commit f66b4224 authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Make tee sink work again

It was broken by this earlier change to NBAIO:
  > Change-Id: I5eda412648b094358f5eefc38300e9ec8a734cd3
But the code was not being compiled, so the error was not caught earlier.

Also increase the default size of per-track pipe to a reasonable value.

Change-Id: Ica05017e6c6533e1fea9df379a9b204eebed4a1f
parent 56df9ff3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -183,6 +183,7 @@ AudioFlinger::AudioFlinger()
        (void) property_get("af.tee", value, "0");
        teeEnabled = atoi(value);
    }
    // FIXME symbolic constants here
    if (teeEnabled & 1) {
        mTeeSinkInputEnabled = true;
    }
@@ -1810,7 +1811,7 @@ audio_io_handle_t AudioFlinger::openInput(audio_module_handle_t module,
            kind = TEE_SINK_NEW;
        } else if (mRecordTeeSink->getStrongCount() != 1) {
            kind = TEE_SINK_NO;
        } else if (format == mRecordTeeSink->format()) {
        } else if (Format_isEqual(format, mRecordTeeSink->format())) {
            kind = TEE_SINK_OLD;
        } else {
            kind = TEE_SINK_NEW;
+1 −1
Original line number Diff line number Diff line
@@ -638,7 +638,7 @@ public:
    // 0x200000 stereo 16-bit PCM frames = 47.5 seconds at 44.1 kHz, 8 megabytes
    static const size_t kTeeSinkInputFramesDefault = 0x200000;
    static const size_t kTeeSinkOutputFramesDefault = 0x200000;
    static const size_t kTeeSinkTrackFramesDefault = 0x1000;
    static const size_t kTeeSinkTrackFramesDefault = 0x200000;
#endif

    // This method reads from a variable without mLock, but the variable is updated under mLock.  So