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

Commit d279b8e4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Vary tee sink frame count based on sample rate" into main am: b5034c24

parents 86639507 b5034c24
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -199,8 +199,8 @@ private:

            // determine number of frames for Tee
            if (frames == 0) {
                // TODO: consider varying frame count based on type.
                frames = DEFAULT_TEE_FRAMES;
                frames = (static_cast<long long>(DEFAULT_TEE_DURATION_MS) * format.mSampleRate)
                            / MILLIS_PER_SECOND;
            }

            // TODO: should we check minimum number of frames?
@@ -261,8 +261,7 @@ private:
        static NBAIO_SinkSource makeSinkSource(
                const NBAIO_Format &format, size_t frames, bool *enabled);

        // 0x200000 stereo 16-bit PCM frames = 47.5 seconds at 44.1 kHz, 8 megabytes
        static constexpr size_t DEFAULT_TEE_FRAMES = 0x200000;
        static constexpr size_t DEFAULT_TEE_DURATION_MS = 60'000;

        // atomic status checking
        std::atomic<bool> mEnabled{false};