コード例 #1
0
    private bool IsPluginInstalled(string PluginName)
    {
        foreach (string LibPath in AkUEPlatformInstance.GetPublicLibraryPaths())
        {
            if (File.Exists(AkUEPlatformInstance.GetLibraryFullPath(PluginName, LibPath)))
            {
                return(true);
            }
        }

        return(false);
    }
コード例 #2
0
    public AkAudio(ReadOnlyTargetRules Target) : base(Target)
    {
        string ThirdPartyFolder = Path.Combine(ModuleDirectory, "../../ThirdParty");

        AkUEPlatformInstance = AkUEPlatform.GetAkUEPlatformInstance(Target, ThirdPartyFolder);
        PCHUsage             = PCHUsageMode.UseExplicitOrSharedPCHs;

        PrivateIncludePathModuleNames.AddRange(new string[] { "Settings", "UMG" });
        PublicDependencyModuleNames.Add("UMG");
        PrivateDependencyModuleNames.AddRange(
            new string[]
        {
            "Core",
            "CoreUObject",
            "Engine",
            "SlateCore",
            "NetworkReplayStreaming",
            "MovieScene",
            "MovieSceneTracks",
            "Projects",
            "Json",
            "Slate",
            "InputCore",
            "Projects"
        });

        if (Target.bBuildEditor)
        {
            PrivateDependencyModuleNames.AddRange(
                new string[]
            {
                "UnrealEd",
                "DesktopPlatform"
            });

            foreach (var Platform in GetAvailablePlatforms(ModuleDirectory))
            {
                PublicDefinitions.Add("AK_PLATFORM_" + Platform.ToUpper());
            }
        }

        PrivateIncludePaths.Add("AkAudio/Private");
        PublicIncludePaths.Add(Path.Combine(ThirdPartyFolder, "include"));

        PublicDefinitions.Add("AK_UNREAL_MAX_CONCURRENT_IO=32");
        PublicDefinitions.Add("AK_UNREAL_IO_GRANULARITY=32768");
        if (Target.Configuration == UnrealTargetConfiguration.Shipping)
        {
            PublicDefinitions.Add("AK_OPTIMIZED");
        }

        if (Target.Configuration != UnrealTargetConfiguration.Shipping && AkUEPlatformInstance.SupportsCommunication)
        {
            AddWwiseLib("CommunicationCentral");
            PublicDefinitions.Add("AK_ENABLE_COMMUNICATION=1");
        }
        else
        {
            PublicDefinitions.Add("AK_ENABLE_COMMUNICATION=0");
        }

        // Platform-specific dependencies
        PublicLibraryPaths.AddRange(AkUEPlatformInstance.GetPublicLibraryPaths());
        PublicAdditionalLibraries.AddRange(AkUEPlatformInstance.GetPublicAdditionalLibraries());
        PublicDefinitions.AddRange(AkUEPlatformInstance.GetPublicDefinitions());

        var Frameworks = AkUEPlatformInstance.GetPublicAdditionalFrameworks();

        foreach (var fw in Frameworks)
        {
#if UE_4_22_OR_LATER
            PublicAdditionalFrameworks.Add(new ModuleRules.Framework(fw));
#else
            PublicAdditionalFrameworks.Add(new UEBuildFramework(fw));
#endif
        }

        AddWwiseLib("AkSoundEngine");
        AddWwiseLib("AkMemoryMgr");
        AddWwiseLib("AkStreamMgr");
        AddWwiseLib("AkMusicEngine");
        AddWwiseLib("AkSpatialAudio");
        AddWwiseLib("AkVorbisDecoder");
        AddWwiseLib("AkSilenceSource");
        AddWwiseLib("AkSineSource");
        AddWwiseLib("AkToneSource");
        AddWwiseLib("AkPeakLimiterFX");
        AddWwiseLib("AkMatrixReverbFX");
        AddWwiseLib("AkParametricEQFX");
        AddWwiseLib("AkDelayFX");
        AddWwiseLib("AkExpanderFX");
        AddWwiseLib("AkFlangerFX");
        AddWwiseLib("AkCompressorFX");
        AddWwiseLib("AkGainFX");
        AddWwiseLib("AkHarmonizerFX");
        AddWwiseLib("AkTimeStretchFX");
        AddWwiseLib("AkPitchShifterFX");
        AddWwiseLib("AkStereoDelayFX");
        AddWwiseLib("AkMeterFX");
        AddWwiseLib("AkGuitarDistortionFX");
        AddWwiseLib("AkTremoloFX");
        AddWwiseLib("AkRoomVerbFX");
        AddWwiseLib("AkAudioInputSource");
        AddWwiseLib("AkSynthOneSource");
        AddWwiseLib("AkRecorderFX");
        AddWwiseLib("AkOpusDecoder");

        AddWwisePlugin("AkReflectFX");
        AddWwisePlugin("AkConvolutionReverbFX");
        AddWwisePlugin("AuroHeadphoneFX");

        if (AkUEPlatformInstance.SupportsAkAutobahn)
        {
            PublicDefinitions.Add("AK_SUPPORT_WAAPI=1");
            AddWwiseLib("AkAutobahn");
        }
        else
        {
            PublicDefinitions.Add("AK_SUPPORT_WAAPI=0");
        }
    }
コード例 #3
0
ファイル: AkAudio.Build.cs プロジェクト: Sagavulin/FPS_demo
    public AkAudio(ReadOnlyTargetRules Target) : base(Target)
    {
        string ThirdPartyFolder = Path.Combine(ModuleDirectory, "../../ThirdParty");

        AkUEPlatformInstance = AkUEPlatform.GetAkUEPlatformInstance(Target, ThirdPartyFolder);
        PCHUsage             = PCHUsageMode.UseExplicitOrSharedPCHs;

        PrivateIncludePathModuleNames.AddRange(new[] { "Settings", "UMG", "TargetPlatform" });

        PublicDependencyModuleNames.AddRange(new[] { "UMG", "PhysX", "APEX" });

        PrivateDependencyModuleNames.AddRange(new[]
        {
            "Core",
            "CoreUObject",
            "Engine",
            "SlateCore",
            "NetworkReplayStreaming",
            "MovieScene",
            "MovieSceneTracks",
            "Projects",
            "Json",
            "Slate",
            "InputCore",
            "Projects"
        });

        if (Target.bBuildEditor)
        {
            PrivateDependencyModuleNames.AddRange(
                new string[]
            {
                "UnrealEd",
                "DesktopPlatform",
                "TargetPlatform"
            });

            foreach (var Platform in GetAvailablePlatforms(ModuleDirectory))
            {
                PublicDefinitions.Add("AK_PLATFORM_" + Platform.ToUpper());
            }
        }

        PrivateIncludePaths.Add("AkAudio/Private");
        PublicIncludePaths.Add(Path.Combine(ThirdPartyFolder, "include"));

        PublicDefinitions.Add("AK_UNREAL_MAX_CONCURRENT_IO=32");
        PublicDefinitions.Add("AK_UNREAL_IO_GRANULARITY=32768");
        if (Target.Configuration == UnrealTargetConfiguration.Shipping)
        {
            PublicDefinitions.Add("AK_OPTIMIZED");
        }

        if (Target.Configuration != UnrealTargetConfiguration.Shipping && AkUEPlatformInstance.SupportsCommunication)
        {
            AkLibs.Add("CommunicationCentral");
            PublicDefinitions.Add("AK_ENABLE_COMMUNICATION=1");
        }
        else
        {
            PublicDefinitions.Add("AK_ENABLE_COMMUNICATION=0");
        }

        if (AkUEPlatformInstance.SupportsAkAutobahn)
        {
            AkLibs.Add("AkAutobahn");
            PublicDefinitions.Add("AK_SUPPORT_WAAPI=1");
        }
        else
        {
            PublicDefinitions.Add("AK_SUPPORT_WAAPI=0");
        }

        if (AkUEPlatformInstance.SupportsOpus)
        {
            AkLibs.Add("AkOpusDecoder");
            PublicDefinitions.Add("AK_SUPPORT_OPUS=1");
        }
        else
        {
            PublicDefinitions.Add("AK_SUPPORT_OPUS=0");
        }

        if (AkUEPlatformInstance.SupportsDeviceMemory)
        {
            PublicDefinitions.Add("AK_SUPPORT_DEVICE_MEMORY=1");
        }
        else
        {
            PublicDefinitions.Add("AK_SUPPORT_DEVICE_MEMORY=0");
        }

        // Platform-specific dependencies
#if UE_4_24_OR_LATER
        PublicSystemLibraries.AddRange(AkUEPlatformInstance.GetPublicSystemLibraries());
#else
        PublicLibraryPaths.AddRange(AkUEPlatformInstance.GetPublicLibraryPaths());
        PublicAdditionalLibraries.AddRange(AkUEPlatformInstance.GetPublicSystemLibraries());
#endif
        AkLibs.AddRange(AkUEPlatformInstance.GetAdditionalWwiseLibs());
        PublicDefinitions.AddRange(AkUEPlatformInstance.GetPublicDefinitions());
        PublicDefinitions.Add(string.Format("AK_CONFIGURATION=\"{0}\"", AkUEPlatformInstance.akConfigurationDir));
        var AdditionalProperty = AkUEPlatformInstance.GetAdditionalPropertyForReceipt(ModuleDirectory);
        if (AdditionalProperty != null)
        {
            AdditionalPropertiesForReceipt.Add(AdditionalProperty.Item1, AdditionalProperty.Item2);
        }

        var Frameworks = AkUEPlatformInstance.GetPublicAdditionalFrameworks();
        foreach (var fw in Frameworks)
        {
#if UE_4_22_OR_LATER
            PublicAdditionalFrameworks.Add(new ModuleRules.Framework(fw));
#else
            PublicAdditionalFrameworks.Add(new UEBuildFramework(fw));
#endif
        }

        PublicAdditionalLibraries.AddRange(AkUEPlatformInstance.GetSanitizedAkLibList(AkLibs));
    }