// Music bundle
package {
    default_team: "trendy_team_media_framework_audio",
    default_applicable_licenses: [
        "frameworks_av_media_libeffects_lvm_lib_license",
    ],
}

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

cc_library_static {
    name: "libmusicbundle",

    arch: {
        arm: {
            instruction_set: "arm",
        },
    },

    vendor: true,
    host_supported: true,
    srcs: [
        "Bass/src/LVDBE_Control.cpp",
        "Bass/src/LVDBE_Init.cpp",
        "Bass/src/LVDBE_Process.cpp",
        "Bass/src/LVDBE_Tables.cpp",
        "Bundle/src/LVM_API_Specials.cpp",
        "Bundle/src/LVM_Buffers.cpp",
        "Bundle/src/LVM_Control.cpp",
        "Bundle/src/LVM_Init.cpp",
        "Bundle/src/LVM_Process.cpp",
        "Bundle/src/LVM_Tables.cpp",
        "Common/src/AGC_MIX_VOL_2St1Mon_D32_WRA.cpp",
        "Common/src/Add2_Sat_32x32.cpp",
        "Common/src/Copy_16.cpp",
        "Common/src/DC_2I_D16_TRC_WRA_01.cpp",
        "Common/src/DC_2I_D16_TRC_WRA_01_Init.cpp",
        "Common/src/DelayMix_16x16.cpp",
        "Common/src/From2iToMS_16x16.cpp",
        "Common/src/From2iToMono_32.cpp",
        "Common/src/LVC_Core_MixHard_1St_2i_D16C31_SAT.cpp",
        "Common/src/LVC_Core_MixHard_2St_D16C31_SAT.cpp",
        "Common/src/LVC_Core_MixInSoft_D16C31_SAT.cpp",
        "Common/src/LVC_Core_MixSoft_1St_2i_D16C31_WRA.cpp",
        "Common/src/LVC_Core_MixSoft_1St_D16C31_WRA.cpp",
        "Common/src/LVC_MixInSoft_D16C31_SAT.cpp",
        "Common/src/LVC_MixSoft_1St_2i_D16C31_SAT.cpp",
        "Common/src/LVC_MixSoft_1St_D16C31_SAT.cpp",
        "Common/src/LVC_MixSoft_2St_D16C31_SAT.cpp",
        "Common/src/LVC_Mixer_GetCurrent.cpp",
        "Common/src/LVC_Mixer_GetTarget.cpp",
        "Common/src/LVC_Mixer_Init.cpp",
        "Common/src/LVC_Mixer_SetTarget.cpp",
        "Common/src/LVC_Mixer_SetTimeConstant.cpp",
        "Common/src/LVC_Mixer_VarSlope_SetTimeConstant.cpp",
        "Common/src/LVM_Timer.cpp",
        "Common/src/LVM_Timer_Init.cpp",
        "Common/src/MSTo2i_Sat_16x16.cpp",
        "Common/src/Mac3s_Sat_32x16.cpp",
        "Common/src/MonoTo2I_32.cpp",
        "Common/src/Mult3s_32x16.cpp",
        "Common/src/NonLinComp_D16.cpp",
        "Common/src/Shift_Sat_v16xv16.cpp",
        "Common/src/Shift_Sat_v32xv32.cpp",
        "Common/src/dB_to_Lin32.cpp",
        "Eq/src/LVEQNB_CalcCoef.cpp",
        "Eq/src/LVEQNB_Control.cpp",
        "Eq/src/LVEQNB_Init.cpp",
        "Eq/src/LVEQNB_Process.cpp",
        "Eq/src/LVEQNB_Tables.cpp",
        "SpectrumAnalyzer/src/LVPSA_Control.cpp",
        "SpectrumAnalyzer/src/LVPSA_Init.cpp",
        "SpectrumAnalyzer/src/LVPSA_Process.cpp",
        "SpectrumAnalyzer/src/LVPSA_QPD_Init.cpp",
        "SpectrumAnalyzer/src/LVPSA_QPD_Process.cpp",
        "SpectrumAnalyzer/src/LVPSA_Tables.cpp",
        "StereoWidening/src/LVCS_BypassMix.cpp",
        "StereoWidening/src/LVCS_Control.cpp",
        "StereoWidening/src/LVCS_Equaliser.cpp",
        "StereoWidening/src/LVCS_Init.cpp",
        "StereoWidening/src/LVCS_Process.cpp",
        "StereoWidening/src/LVCS_ReverbGenerator.cpp",
        "StereoWidening/src/LVCS_StereoEnhancer.cpp",
        "StereoWidening/src/LVCS_Tables.cpp",
    ],

    local_include_dirs: [
        "Bass/lib",
        "Bass/src",
        "Bundle/src",
        "Common/src",
        "Eq/lib",
        "Eq/src",
        "SpectrumAnalyzer/lib",
        "SpectrumAnalyzer/src",
        "StereoWidening/lib",
        "StereoWidening/src",
    ],
    export_include_dirs: [
        "Bundle/lib",
        "Common/lib",
    ],
    shared_libs: [
        "liblog",
    ],
    static_libs: [
        "libaudioutils",
    ],
    header_libs: [
        "libhardware_headers",
    ],
    cppflags: [
        "-Wall",
        "-Werror",
        "-fvisibility=hidden",
    ],

}

// Reverb library
cc_library_static {
    name: "libreverb",

    arch: {
        arm: {
            instruction_set: "arm",
        },
    },

    vendor: true,
    host_supported: true,
    srcs: [
        "Common/src/Add2_Sat_32x32.cpp",
        "Common/src/Copy_16.cpp",
        "Common/src/Core_MixHard_2St_D32C31_SAT.cpp",
        "Common/src/Core_MixInSoft_D32C31_SAT.cpp",
        "Common/src/Core_MixSoft_1St_D32C31_WRA.cpp",
        "Common/src/From2iToMono_32.cpp",
        "Common/src/JoinTo2i_32x32.cpp",
        "Common/src/LVM_FO_HPF.cpp",
        "Common/src/LVM_FO_LPF.cpp",
        "Common/src/LVM_GetOmega.cpp",
        "Common/src/LVM_Mixer_TimeConstant.cpp",
        "Common/src/LVM_Polynomial.cpp",
        "Common/src/LVM_Power10.cpp",
        "Common/src/Mac3s_Sat_32x16.cpp",
        "Common/src/MixInSoft_D32C31_SAT.cpp",
        "Common/src/MixSoft_1St_D32C31_WRA.cpp",
        "Common/src/MixSoft_2St_D32C31_SAT.cpp",
        "Common/src/MonoTo2I_32.cpp",
        "Common/src/Mult3s_32x16.cpp",
        "Common/src/Shift_Sat_v32xv32.cpp",
        "Reverb/src/LVREV_ApplyNewSettings.cpp",
        "Reverb/src/LVREV_ClearAudioBuffers.cpp",
        "Reverb/src/LVREV_GetControlParameters.cpp",
        "Reverb/src/LVREV_GetInstanceHandle.cpp",
        "Reverb/src/LVREV_Process.cpp",
        "Reverb/src/LVREV_SetControlParameters.cpp",
        "Reverb/src/LVREV_Tables.cpp",
    ],

    local_include_dirs: [
        "Common/src",
        "Reverb/src",
    ],
    export_include_dirs: [
        "Common/lib",
        "Reverb/lib",
    ],
    static_libs: [
        "libaudioutils",
    ],
    cppflags: [
        "-Wall",
        "-Werror",
        "-fvisibility=hidden",
    ],
}
