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

Commit 24e3c2f2 authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge "audiopolicy: get rid of hardcoded attributes <--> stream types"

parents adf7c857 713f0e4a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -276,6 +276,7 @@ cc_library_shared {
        "libmediametrics",
        "libmeminfo",
        "libaudioclient",
        "libaudiopolicy",
        "libjpeg",
        "libusbhost",
        "libharfbuzz_ng",
+2 −2
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@
#include <media/AudioTrack.h>
#include "SoundPool.h"
#include "SoundPoolThread.h"
#include <media/AudioPolicyHelper.h>
#include <media/NdkMediaCodec.h>
#include <media/NdkMediaExtractor.h>
#include <media/NdkMediaFormat.h>
@@ -746,7 +745,8 @@ void SoundChannel::play(const sp<Sample>& sample, int nextChannelID, float leftV
        // initialize track
        size_t afFrameCount;
        uint32_t afSampleRate;
        audio_stream_type_t streamType = audio_attributes_to_stream_type(mSoundPool->attributes());
        audio_stream_type_t streamType =
                AudioSystem::attributesToStreamType(*mSoundPool->attributes());
        if (AudioSystem::getOutputFrameCount(&afFrameCount, streamType) != NO_ERROR) {
            afFrameCount = kDefaultFrameCount;
        }