// audio preprocessing wrapper
package {
    default_team: "trendy_team_media_framework_audio",
    default_applicable_licenses: [
        "frameworks_av_media_libeffects_preprocessing_license",
    ],
}

// Added automatically by a large-scale-change
// See: http://go/android-license-faq
license {
    name: "frameworks_av_media_libeffects_preprocessing_license",
    visibility: [":__subpackages__"],
    license_kinds: [
        "SPDX-license-identifier-Apache-2.0",
    ],
    license_text: [
        "NOTICE",
    ],
}

cc_defaults {
    name: "libaudiopreprocessing-defaults",
    vendor: true,
    host_supported: true,
    cflags: [
        "-Wall",
        "-Werror",
        "-Wextra",
        "-Wno-unused-parameter",
    ],

    shared_libs: [
        "liblog",
        "libutils",
    ],

    static_libs: [
        "webrtc_audio_processing",
    ],

    header_libs: [
        "libaudioeffects",
        "libhardware_headers",
    ],
    target: {
        darwin: {
            enabled: false,
        },
    },
}

cc_library {
    name: "libaudiopreprocessing",
    defaults: ["libaudiopreprocessing-defaults"],
    relative_install_path: "soundfx",
    srcs: ["PreProcessing.cpp"],
    static_libs: [
        "libabsl",
    ],
}

cc_library_shared {
    name: "libpreprocessingaidl",
    srcs: [
        ":effectCommonFile",
        "aidl/EffectPreProcessing.cpp",
        "aidl/PreProcessingContext.cpp",
    ],
    defaults: [
        "aidlaudioeffectservice_defaults",
    ],
    local_include_dirs: ["aidl"],
    shared_libs: [
        "libaudioutils",
        "liblog",
        "libutils",
    ],
    static_libs: [
        "libabsl",
        "webrtc_audio_processing",
    ],
    header_libs: [
        "libaudioeffects",
        "libhardware_headers",
        "libwebrtc_absl_headers",
    ],
    cflags: [
        "-Wno-unused-parameter",
        "-Wthread-safety",
    ],
    relative_install_path: "soundfx",
    visibility: [
        "//hardware/interfaces/audio/aidl/default:__subpackages__",
    ],
}
