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

Commit 4ea00a25 authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Add mPrimaryOutputSampleRate

Change-Id: I46b527fc3f2b5a5720a74b4f0b9a8f2e0d570b09
parent 43466a13
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -169,7 +169,8 @@ AudioFlinger::AudioFlinger()
      mBtNrecIsOff(false),
      mIsLowRamDevice(true),
      mIsDeviceTypeKnown(false),
      mGlobalEffectEnableTime(0)
      mGlobalEffectEnableTime(0),
      mPrimaryOutputSampleRate(0)
{
    getpid_cached = getpid();
    char value[PROPERTY_VALUE_MAX];
@@ -1679,6 +1680,8 @@ audio_io_handle_t AudioFlinger::openOutput(audio_module_handle_t module,
            mHardwareStatus = AUDIO_HW_SET_MODE;
            hwDevHal->set_mode(hwDevHal, mMode);
            mHardwareStatus = AUDIO_HW_IDLE;

            mPrimaryOutputSampleRate = config.sample_rate;
        }
        return id;
    }
+3 −0
Original line number Diff line number Diff line
@@ -691,6 +691,9 @@ private:
    nsecs_t mGlobalEffectEnableTime;  // when a global effect was last enabled

    sp<PatchPanel> mPatchPanel;

    uint32_t    mPrimaryOutputSampleRate;   // sample rate of the primary output, or zero if none
                                            // protected by mHardwareLock
};

#undef INCLUDING_FROM_AUDIOFLINGER_H