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

Commit 9c130566 authored by Michael Bestas's avatar Michael Bestas
Browse files

AudioTrack: Align with CAF

* This was part of a merge commit and not a separate commit

Change-Id: I44ef122dc7e9be4f4f252e25ba4ddb7790e88d0d
parent 136ea987
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -563,14 +563,18 @@ status_t AudioTrack::set(
    mAuxEffectId = 0;
    mFlags = flags;
    mCbf = cbf;

#ifdef QCOM_DIRECTTRACK
    status_t status;
    audio_io_handle_t output = AUDIO_IO_HANDLE_NONE;
   

    if (flags & AUDIO_OUTPUT_FLAG_LPA || flags & AUDIO_OUTPUT_FLAG_TUNNEL) {
        audio_io_handle_t output = AudioSystem::getOutputForAttr(&mAttributes, &output,
         AudioSystem::getOutputForAttr(&mAttributes, &output,
                                            (audio_session_t)mSessionId, &streamType, 
                                             mSampleRate, mFormat,mChannelMask, 
                                             mFlags, mOffloadInfo); 
    if (output == AUDIO_IO_HANDLE_NONE) {

    if (status != NO_ERROR && output == AUDIO_IO_HANDLE_NONE) {
        ALOGE("Could not get audio output for stream type %d, usage %d, sample rate %u, format %#x,"
              " channel mask %#x, flags %#x",
              mStreamType, mAttributes.usage, mSampleRate, mFormat, mChannelMask, mFlags);