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


C++ FAkAudioDevice类代码示例

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


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

示例1: UE_LOG

void UAkGameplayStatics::PostEvent(class UAkAudioEvent* in_pAkEvent, class AActor* in_pActor, bool in_stopWhenAttachedToDestroyed, FString EventName)
{
	if (in_pAkEvent == NULL && EventName.IsEmpty())
	{
		UE_LOG(LogScript, Warning, TEXT("UAkGameplayStatics::PostEvent: No Event specified!"));
		return;
	}

	if ( in_pActor == NULL )
	{
		UE_LOG(LogScript, Warning, TEXT("UAkGameplayStatics::PostEvent: NULL Actor specified!"));
		return;
	}

	FAkAudioDevice * AkAudioDevice = FAkAudioDevice::Get();
	UWorld* CurrentWorld = in_pActor->GetWorld();
	if( CurrentWorld->AllowAudioPlayback() && AkAudioDevice )
	{
		if (in_pAkEvent != NULL)
		{
			AkAudioDevice->PostEvent(in_pAkEvent, in_pActor, 0, NULL, NULL, in_stopWhenAttachedToDestroyed);
		}
		else
		{
			AkAudioDevice->PostEvent(EventName, in_pActor, 0, NULL, NULL, in_stopWhenAttachedToDestroyed);
		}
	}
}
开发者ID:bozaro,项目名称:WwiseUE4Plugin,代码行数:28,代码来源:AkGameplayStatics.cpp

示例2: UnloadBankByName

void UAkGameplayStatics::UnloadBankByName(const FString& BankName)
{
	FAkAudioDevice * AudioDevice = FAkAudioDevice::Get();
	if( AudioDevice )
	{
		if(AudioDevice->GetAkBankManager() != NULL )
		{
			for ( TObjectIterator<UAkAudioBank> Iter; Iter; ++Iter )
			{
				if( Iter->GetName() == BankName )
				{
					Iter->Unload();
					return;
				}
			}

			
			// Bank not found in the assets, unload it by name anyway
			AudioDevice->UnloadBank(BankName);
		}
		else
		{
			AudioDevice->UnloadBank(BankName);
		}
	}
}
开发者ID:bozaro,项目名称:WwiseUE4Plugin,代码行数:26,代码来源:AkGameplayStatics.cpp

示例3: LoadBankByName

void UAkGameplayStatics::LoadBankByName(const FString& BankName)
{
	
	FAkAudioDevice * AudioDevice = FAkAudioDevice::Get();
	if( AudioDevice )
	{
		if(AudioDevice->GetAkBankManager() != NULL )
		{
			for ( TObjectIterator<UAkAudioBank> Iter; Iter; ++Iter )
			{
				if( Iter->GetName() == BankName )
				{
					Iter->Load();
					return;
				}
			}

			// Bank not found in the assets, load it by name anyway
			AkUInt32 bankID;
			AudioDevice->LoadBank(BankName, AK_DEFAULT_POOL_ID, bankID);
		}
		else
		{
			AkUInt32 bankID;
			AudioDevice->LoadBank(BankName, AK_DEFAULT_POOL_ID, bankID);
		}
	}
}
开发者ID:bozaro,项目名称:WwiseUE4Plugin,代码行数:28,代码来源:AkGameplayStatics.cpp

示例4: StopProfilerCapture

void UAkGameplayStatics::StopProfilerCapture()
{
	FAkAudioDevice * AudioDevice = FAkAudioDevice::Get();
	if( AudioDevice )
	{
		AudioDevice->StopProfilerCapture();
	}
}
开发者ID:bozaro,项目名称:WwiseUE4Plugin,代码行数:8,代码来源:AkGameplayStatics.cpp

示例5: LoadInitBank

void UAkGameplayStatics::LoadInitBank()
{
	FAkAudioDevice * AudioDevice = FAkAudioDevice::Get();
	if( AudioDevice )
	{
		AudioDevice->LoadInitBank();
	}
}
开发者ID:bozaro,项目名称:WwiseUE4Plugin,代码行数:8,代码来源:AkGameplayStatics.cpp

示例6: LoadInitBank

void FAssetTypeActions_AkAudioBank::LoadInitBank(TArray<TWeakObjectPtr<UAkAudioBank>> Objects)
{
	FAkAudioDevice* AudioDevice = FAkAudioDevice::Get();
	if ( AudioDevice )
	{
		AudioDevice->LoadInitBank();
	}
}
开发者ID:MatrIsCool,项目名称:WwiseUE4Plugin,代码行数:8,代码来源:AssetTypeActions_AkAudioBank.cpp

示例7: StopAll

void UAkGameplayStatics::StopAll()
{
	FAkAudioDevice * AudioDevice = FAkAudioDevice::Get();
	if( AudioDevice )
	{
		AudioDevice->StopAllSounds();
	}
}
开发者ID:bozaro,项目名称:WwiseUE4Plugin,代码行数:8,代码来源:AkGameplayStatics.cpp

示例8: ClearBanks

void UAkGameplayStatics::ClearBanks()
{
	FAkAudioDevice * AudioDevice = FAkAudioDevice::Get();
	if( AudioDevice )
	{
		AudioDevice->ClearBanks();
	}
}
开发者ID:bozaro,项目名称:WwiseUE4Plugin,代码行数:8,代码来源:AkGameplayStatics.cpp

示例9: RefreshAllBanks

void FAssetTypeActions_AkAudioBank::RefreshAllBanks(TArray<TWeakObjectPtr<UAkAudioBank>> Objects)
{
	FAkAudioDevice* AudioDevice = FAkAudioDevice::Get();
	if ( AudioDevice )
	{
		AudioDevice->ReloadAllReferencedBanks();
	}
}
开发者ID:MatrIsCool,项目名称:WwiseUE4Plugin,代码行数:8,代码来源:AssetTypeActions_AkAudioBank.cpp

示例10: SetState

void UAkGameplayStatics::SetState( FName stateGroup, FName state )
{
	FAkAudioDevice * AudioDevice = FAkAudioDevice::Get();
	if( AudioDevice && stateGroup.IsValid() && state.IsValid() )
	{
		AudioDevice->SetState( *stateGroup.ToString() , *state.ToString() );
	}
}
开发者ID:bozaro,项目名称:WwiseUE4Plugin,代码行数:8,代码来源:AkGameplayStatics.cpp

示例11: AddOutputCaptureMarker

void UAkGameplayStatics::AddOutputCaptureMarker(const FString& MarkerText)
{
	FAkAudioDevice * AudioDevice = FAkAudioDevice::Get();
	if( AudioDevice )
	{
		AudioDevice->AddOutputCaptureMarker(MarkerText);
	} 
}
开发者ID:bozaro,项目名称:WwiseUE4Plugin,代码行数:8,代码来源:AkGameplayStatics.cpp

示例12: SetRTPCValue

void UAkGameplayStatics::SetRTPCValue( FName RTPC, float Value, int32 InterpolationTimeMs = 0, class AActor* Actor = NULL )
{
	FAkAudioDevice * AudioDevice = FAkAudioDevice::Get();
	if( AudioDevice && RTPC.IsValid() )
	{
		AudioDevice->SetRTPCValue( *RTPC.ToString(), Value, InterpolationTimeMs, Actor );
	}
}
开发者ID:bozaro,项目名称:WwiseUE4Plugin,代码行数:8,代码来源:AkGameplayStatics.cpp

示例13: PostEventAtLocationByName

void UAkGameplayStatics::PostEventAtLocationByName( const FString& EventName, FVector Location, FRotator Orientation, UObject* WorldContextObject )
{
	FAkAudioDevice * AkAudioDevice = FAkAudioDevice::Get();
	UWorld* CurrentWorld = GEngine->GetWorldFromContextObject(WorldContextObject);
	if( CurrentWorld->AllowAudioPlayback() && AkAudioDevice )
	{
		AkAudioDevice->PostEventAtLocation(EventName, Location, Orientation.Vector(), GEngine->GetWorldFromContextObject(WorldContextObject) );
	}
}
开发者ID:bozaro,项目名称:WwiseUE4Plugin,代码行数:9,代码来源:AkGameplayStatics.cpp

示例14: InputBankSet

void UAkGameplayStatics::LoadBanks(const TArray<UAkAudioBank *>& SoundBanks, bool SynchronizeSoundBanks)
{
	if( SynchronizeSoundBanks )
	{
		TSet<UAkAudioBank*> BanksToUnload;
		TSet<UAkAudioBank*> BanksToLoad;
		TSet<UAkAudioBank*> InputBankSet(SoundBanks);
		FAkAudioDevice * AkAudioDevice = FAkAudioDevice::Get();
		if( AkAudioDevice )
		{
			FAkBankManager* BankManager = AkAudioDevice->GetAkBankManager();
			if( BankManager )
			{
				FScopeLock Lock(&BankManager->m_BankManagerCriticalSection);
				const TSet<UAkAudioBank *>* LoadedBanks = BankManager->GetLoadedBankList();

				// We load what's in the input set, but not in the already loaded set
				BanksToLoad = InputBankSet.Difference(*LoadedBanks);

				// We unload what's in the loaded set but not in the input set
				BanksToUnload = LoadedBanks->Difference(InputBankSet);
			}
			else
			{
				UE_LOG(LogScript, Warning, TEXT("UAkGameplayStatics::LoadBanks: Bank Manager unused, and CleanUpBanks set to true!"));
			}
		}
		for(TSet<UAkAudioBank*>::TConstIterator LoadIter(BanksToLoad); LoadIter; ++LoadIter)
		{
			if( *LoadIter != NULL )
			{
				(*LoadIter)->Load();
			}
		}

		for(TSet<UAkAudioBank*>::TConstIterator UnloadIter(BanksToUnload); UnloadIter; ++UnloadIter)
		{
			if( *UnloadIter != NULL )
			{
				(*UnloadIter)->Unload();
			}
		}
	}
	else
	{
		for(TArray<UAkAudioBank*>::TConstIterator LoadIter(SoundBanks); LoadIter; ++LoadIter)
		{
			if( *LoadIter != NULL )
			{
				(*LoadIter)->Load();
			}
		}
	}


}
开发者ID:bozaro,项目名称:WwiseUE4Plugin,代码行数:56,代码来源:AkGameplayStatics.cpp

示例15: SpawnAkComponentAtLocation

UAkComponent* UAkGameplayStatics::SpawnAkComponentAtLocation(UObject* WorldContextObject, class UAkAudioEvent* AkEvent, FVector Location, FRotator Orientation, bool AutoPost, const FString& EventName, bool AutoDestroy /* = true*/ )
{
	FAkAudioDevice * AkAudioDevice = FAkAudioDevice::Get();
	UWorld* CurrentWorld = GEngine->GetWorldFromContextObject(WorldContextObject);
	if( CurrentWorld && CurrentWorld->AllowAudioPlayback() && AkAudioDevice )
	{
		return AkAudioDevice->SpawnAkComponentAtLocation(AkEvent, Location, Orientation, AutoPost, EventName, AutoDestroy, CurrentWorld );
	}

	return nullptr;
}
开发者ID:bozaro,项目名称:WwiseUE4Plugin,代码行数:11,代码来源:AkGameplayStatics.cpp


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