当前位置: 首页>>代码示例>>C++>>正文


C++ FAkAudioDevice::SetMaxAuxBus方法代码示例

本文整理汇总了C++中FAkAudioDevice::SetMaxAuxBus方法的典型用法代码示例。如果您正苦于以下问题:C++ FAkAudioDevice::SetMaxAuxBus方法的具体用法?C++ FAkAudioDevice::SetMaxAuxBus怎么用?C++ FAkAudioDevice::SetMaxAuxBus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FAkAudioDevice的用法示例。


在下文中一共展示了FAkAudioDevice::SetMaxAuxBus方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: PostEditChangeProperty

void UAkSettings::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
{
	const FName PropertyName = (PropertyChangedEvent.Property != nullptr) ? PropertyChangedEvent.Property->GetFName() : NAME_None;
	const FName MemberPropertyName = (PropertyChangedEvent.Property != nullptr) ? PropertyChangedEvent.MemberProperty->GetFName() : NAME_None;

	if ( PropertyName == GET_MEMBER_NAME_CHECKED(UAkSettings, MaxSimultaneousReverbVolumes) )
	{
		MaxSimultaneousReverbVolumes = FMath::Clamp<uint8>( MaxSimultaneousReverbVolumes, 0, AK_MAX_AUX_PER_OBJ );
		FAkAudioDevice* AkAudioDevice = FAkAudioDevice::Get();
		if( AkAudioDevice )
		{
			AkAudioDevice->SetMaxAuxBus(MaxSimultaneousReverbVolumes);
		}
	}
	else if (MemberPropertyName == GET_MEMBER_NAME_CHECKED(UAkSettings, WwiseWindowsInstallationPath))
	{
		WwiseWindowsInstallationPath.Path = WwiseWindowsInstallationPath.Path.Trim();
		WwiseWindowsInstallationPath.Path = WwiseWindowsInstallationPath.Path.TrimTrailing();

		FText FailReason;
		if (!FPaths::ValidatePath(WwiseWindowsInstallationPath.Path, &FailReason))
		{
			FMessageDialog::Open(EAppMsgType::Ok, FailReason);
			WwiseWindowsInstallationPath.Path = PreviousWwiseWindowsPath;
		}

		if (!FPaths::DirectoryExists(WwiseWindowsInstallationPath.Path))
		{
			FMessageDialog::Open(EAppMsgType::Ok, FText::FromString("Please enter a valid Wwise Authoring Windows executable path"));
			WwiseWindowsInstallationPath.Path = PreviousWwiseWindowsPath;
		}
	}
	else if (MemberPropertyName == GET_MEMBER_NAME_CHECKED(UAkSettings, WwiseMacInstallationPath))
	{
		WwiseMacInstallationPath.FilePath = WwiseMacInstallationPath.FilePath.Trim();
		WwiseMacInstallationPath.FilePath = WwiseMacInstallationPath.FilePath.TrimTrailing();

		FText FailReason;
		if (!FPaths::ValidatePath(WwiseMacInstallationPath.FilePath, &FailReason))
		{
			FMessageDialog::Open(EAppMsgType::Ok, FailReason);
			WwiseMacInstallationPath.FilePath = PreviousWwiseMacPath;
		}

		if (!FPaths::DirectoryExists(WwiseMacInstallationPath.FilePath))
		{
			FMessageDialog::Open(EAppMsgType::Ok, FText::FromString("Please enter a valid Wwise Authoring Mac executable path"));
			WwiseMacInstallationPath.FilePath = PreviousWwiseMacPath;
		}
	}
	else if (MemberPropertyName == GET_MEMBER_NAME_CHECKED(UAkSettings, WwiseProjectPath))
	{
		WwiseProjectPath.FilePath = WwiseProjectPath.FilePath.Trim();
		WwiseProjectPath.FilePath = WwiseProjectPath.FilePath.TrimTrailing();

		FString TempPath = IFileManager::Get().ConvertToAbsolutePathForExternalAppForWrite(*WwiseProjectPath.FilePath);
		
		FText FailReason;
		if (!FPaths::ValidatePath(TempPath, &FailReason))
		{
            if(EAppReturnType::Ok == FMessageDialog::Open(EAppMsgType::Ok, FailReason))
            {
                WwiseProjectPath.FilePath = PreviousWwiseProjectPath;
                return;
            }
		}

		if (!FPaths::FileExists(TempPath))
		{
			// Path might be a valid one (relative to game) entered manually. Check that.
			TempPath = FPaths::ConvertRelativePathToFull(FPaths::GameDir(), WwiseProjectPath.FilePath);

			if (!FPaths::FileExists(TempPath))
			{
				if (EAppReturnType::Ok == FMessageDialog::Open(EAppMsgType::Ok, FText::FromString("Please enter a valid Wwise project")))
				{
					WwiseProjectPath.FilePath = PreviousWwiseProjectPath;
					return;
				}
			}
		}

		// Make the path relative to the game dir
		FPaths::MakePathRelativeTo(TempPath, *FPaths::GameDir());
        WwiseProjectPath.FilePath = TempPath;

		if (WwiseProjectPath.FilePath != PreviousWwiseProjectPath)
		{
			TSharedRef<SDockTab> WwisePickerTab = FGlobalTabmanager::Get()->InvokeTab(FName("WwisePicker"));
            bRequestRefresh = true;
		}
	}

	Super::PostEditChangeProperty(PropertyChangedEvent);
}
开发者ID:MatrIsCool,项目名称:WwiseUE4Plugin,代码行数:95,代码来源:AkSettings.cpp


注:本文中的FAkAudioDevice::SetMaxAuxBus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。