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

Commit ebb67822 authored by Mikhail Naganov's avatar Mikhail Naganov Committed by Automerger Merge Worker
Browse files

audio VTS: CompressedOffloadOutputStream to check the vendor API level am:...

audio VTS: CompressedOffloadOutputStream to check the vendor API level am: 3f2e3309 am: b9b5652f

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/19340462



Change-Id: I7b3b66c57707a2e028a24ba872427600269a142c
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 9d171af8 b9b5652f
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#include <numeric>

#include <android-base/chrono_utils.h>
#include <cutils/properties.h>

#include "Generators.h"

@@ -900,11 +901,17 @@ class CompressedOffloadOutputStreamTest : public PcmOnlyConfigOutputStreamTest {
TEST_P(CompressedOffloadOutputStreamTest, Mp3FormatGaplessOffload) {
    doc::test("Check that compressed offload mix ports for MP3 implement gapless offload");
    const auto& flags = getOutputFlags();
    const bool isNewDeviceLaunchingOnTPlus = property_get_int32("ro.vendor.api_level", 0) >= 33;
    if (std::find_if(flags.begin(), flags.end(), [](const auto& flag) {
            return flag == toString(xsd::AudioInOutFlag::AUDIO_OUTPUT_FLAG_GAPLESS_OFFLOAD);
        }) == flags.end()) {
        if (isNewDeviceLaunchingOnTPlus) {
            FAIL() << "New devices launching on Android T+ must support gapless offload, "
                   << "see VSR-4.3-001";
        } else {
            GTEST_SKIP() << "Compressed offload mix port does not support gapless offload";
        }
    }
    // FIXME: The presentation position is not updated if there is no zero padding in data.
    std::vector<uint8_t> offloadData(stream->getBufferSize());
    ASSERT_NO_FATAL_FAILURE(loadData("/data/local/tmp/sine882hz3s.mp3", &offloadData));
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ cc_defaults {
    ],
    shared_libs: [
        "libbinder",
        "libcutils",
        "libfmq",
        "libxml2",
    ],