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

Commit 1f7e6bbc authored by Jaideep Sharma's avatar Jaideep Sharma Committed by Mikhail Naganov
Browse files

av: Initialize offload info properly

Set remaining params of offload info like usage/bit_width
from known params.

Bug: 393531112
Test: run cts -m android.media.audio.cts.AudioTrackTest
Change-Id: I7856467926e98e6bf6e4d412c8741e382d831e1d
parent 6018d613
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -602,6 +602,8 @@ status_t AudioTrack::set(
        mOffloadInfoCopy.sample_rate = sampleRate;
        mOffloadInfoCopy.channel_mask = channelMask;
        mOffloadInfoCopy.stream_type = streamType;
        mOffloadInfoCopy.usage = mAttributes.usage;
        mOffloadInfoCopy.bit_width = audio_bytes_per_sample(format) * 8;
    }

    mVolume[AUDIO_INTERLEAVE_LEFT] = 1.0f;