Skip to content
Snippets Groups Projects
Commit cba9ff47 authored by Lab1's avatar Lab1
Browse files

minor improvemnts to avoid confusing error messages when eactually nothing should be loaded

parent 9150d16f
No related branches found
No related tags found
No related merge requests found
...@@ -36,10 +36,15 @@ void FVADirectivityManager::ResetManager() ...@@ -36,10 +36,15 @@ void FVADirectivityManager::ResetManager()
bool FVADirectivityManager::ReadConfigFile(const FString ConfigFileNameN) bool FVADirectivityManager::ReadConfigFile(const FString ConfigFileNameN)
{ {
if (ConfigFileNameN == "")
{
FVAUtils::LogStuff("[FVADirectivityManager::ReadConfigFile()]: DirMappingFileName not specified, so we are not using it.", false);
return false;
}
bool EverythingFine = true; bool EverythingFine = true;
ConfigFileName = ConfigFileNameN; ConfigFileName = ConfigFileNameN;
const FString RelativePath = FPaths::ProjectContentDir(); const FString RelativePath = FPaths::ProjectContentDir();
const FString Dir = IFileManager::Get().ConvertToAbsolutePathForExternalAppForRead(*RelativePath); const FString Dir = IFileManager::Get().ConvertToAbsolutePathForExternalAppForRead(*RelativePath);
......
...@@ -19,7 +19,7 @@ void UVAAudiofileSignalSource::Initialize() ...@@ -19,7 +19,7 @@ void UVAAudiofileSignalSource::Initialize()
return; return;
} }
if (!SetAudiofile(Filename)) if (Filename != "" && !SetAudiofile(Filename))
{ {
FVAUtils::LogStuff("[UVAAudiofileSignalSource::Initialize()]: Error creating Audiofile Signal Source", true); FVAUtils::LogStuff("[UVAAudiofileSignalSource::Initialize()]: Error creating Audiofile Signal Source", true);
return; return;
...@@ -192,7 +192,7 @@ bool UVAAudiofileSignalSource::CopySignalSourceSettings(const std::string& Other ...@@ -192,7 +192,7 @@ bool UVAAudiofileSignalSource::CopySignalSourceSettings(const std::string& Other
} }
int PlayAction = StartingPlayAction; int PlayAction = StartingPlayAction;
if (bInitialized) if (bInitialized && Filename != "")
{ {
PlayAction = GetPlayAction(); PlayAction = GetPlayAction();
if (PlayAction == -1) if (PlayAction == -1)
......
...@@ -93,9 +93,11 @@ protected: ...@@ -93,9 +93,11 @@ protected:
UPROPERTY(EditAnywhere, meta = (DisplayName = "Starting State", Category = "Audio file")) UPROPERTY(EditAnywhere, meta = (DisplayName = "Starting State", Category = "Audio file"))
TEnumAsByte<EPlayAction::Type> StartingPlayAction = EPlayAction::Type::Stop; TEnumAsByte<EPlayAction::Type> StartingPlayAction = EPlayAction::Type::Stop;
// Name of Sound file. Folder are possible too: "folder/soundfile.wav" // Name of Sound file. Subfolders can be used, e.g., "folder/soundfile.wav"
// By default these files are looked for in the data folder of the VAServer
// If the automatic VAServer starter script is used, they are searched relative to the Content dir and then send over to the VAServer
UPROPERTY(EditAnywhere, meta = (DisplayName = "Filename", Category = "Audio file")) UPROPERTY(EditAnywhere, meta = (DisplayName = "Filename", Category = "Audio file"))
FString Filename = "WelcomeToVA.wav"; FString Filename = "";
// Sets Buffer to a specific time stamp when playing back at the first tick (see Action) // Sets Buffer to a specific time stamp when playing back at the first tick (see Action)
UPROPERTY(EditAnywhere, meta = (DisplayName = "Play from x [s]", Category = "Audio file")) UPROPERTY(EditAnywhere, meta = (DisplayName = "Play from x [s]", Category = "Audio file"))
......
...@@ -71,9 +71,10 @@ protected: ...@@ -71,9 +71,10 @@ protected:
UPROPERTY(EditAnywhere, meta = (DisplayName = "Read an initial mapping file?", Category = "Directivity Manager")) UPROPERTY(EditAnywhere, meta = (DisplayName = "Read an initial mapping file?", Category = "Directivity Manager"))
bool bReadInitialMappingFile = true; bool bReadInitialMappingFile = true;
// File name of the Directivity mapping file // File name of the Directivity mapping file (e.g., for chaning directivities dynamically based on phonemes)
// if not specified it will be ignored.
UPROPERTY(EditAnywhere, meta = (DisplayName = "Name of ini file for directivities", Category = "Directivity Manager")) UPROPERTY(EditAnywhere, meta = (DisplayName = "Name of ini file for directivities", Category = "Directivity Manager"))
FString DirMappingFileName = "Study/VADir_default.ini"; FString DirMappingFileName = "";
// Port for remote VAServer starting // Port for remote VAServer starting
UPROPERTY(EditAnywhere, meta = (DisplayName = "Remote VAServer Start Port [0, 65535]", Category = "Connection", UPROPERTY(EditAnywhere, meta = (DisplayName = "Remote VAServer Start Port [0, 65535]", Category = "Connection",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment