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

Commit e9f825a0 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "aaudio: fix ramp for volume smoothing"

parents 6b0e0f02 9eba2100
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -219,8 +219,7 @@ aaudio_result_t AudioStreamInternalPlay::writeNowWithConversion(const void *buff
            // Data conversion.
            float levelFrom;
            float levelTo;
            bool ramping = mVolumeRamp.nextSegment(framesToWrite * getSamplesPerFrame(),
                                                   &levelFrom, &levelTo);
            bool ramping = mVolumeRamp.nextSegment(framesToWrite, &levelFrom, &levelTo);
            // The formats are validated when the stream is opened so we do not have to
            // check for illegal combinations here.
            // TODO factor this out into a utility function
+1 −1
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ private:

    std::atomic<float>   mTarget;

    int32_t mLengthInFrames  = 48000 / 50; // 20 msec at 48000 Hz
    int32_t mLengthInFrames  = 48000 / 100; // 10 msec at 48000 Hz
    int32_t mRemaining       = 0;
    float   mLevelFrom       = 0.0f;
    float   mLevelTo         = 0.0f;