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

Commit 37dad738 authored by Phil Burk's avatar Phil Burk
Browse files

aaudio: fix mixer volume to match AudioTrack



Bug: 62033564
Test: write_sine.cpp - play with MMAP and with Legacy and compare by ear

Change-Id: I4d142f872fabb732cab01bec8c17d821232ab2d1
Signed-off-by: default avatarPhil Burk <philburk@google.com>
parent 0556a236
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -141,7 +141,7 @@ void *AAudioServiceEndpoint::callbackLoop() {
            std::lock_guard<std::mutex> lock(mLockStreams);
            for(AAudioServiceStreamShared *sharedStream : mRunningStreams) {
                FifoBuffer *fifo = sharedStream->getDataFifoBuffer();
                float volume = 0.5; // TODO get from system
                const float volume = 1.0f; // to match the perceived volume from AudioTrack
                bool underflowed = mMixer.mix(fifo, volume);
                underflowCount += underflowed ? 1 : 0;
                // TODO log underflows in each stream