Skip to content
Snippets Groups Projects
Commit 29d2fceb authored by Philipp Schäfer's avatar Philipp Schäfer
Browse files

VALauncher: removing default reproduction module setting

parent 77958ab7
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
"nLauncherPort": 41578, "nLauncherPort": 41578,
"nVAServerPort": 12340, "nVAServerPort": 12340,
"nWaitForVAServerStart": 5, "nWaitForVAServerStart": 5,
"lsDefaultReproductionModules": ["TalkthroughHP", "CTC"],
"lsBinauralReproductionModules": ["TalkthroughHP", "CTC"], "lsBinauralReproductionModules": ["TalkthroughHP", "CTC"],
"dVAServerDirectories" = { "dVAServerDirectories" = {
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
"nLauncherPort": 41578, "nLauncherPort": 41578,
"nVAServerPort": 12340, "nVAServerPort": 12340,
"nWaitForVAServerStart": 3, "nWaitForVAServerStart": 3,
"lsDefaultReproductionModules": ["TalkthroughHP", "CTC"],
"lsBinauralReproductionModules": ["TalkthroughHP"], "lsBinauralReproductionModules": ["TalkthroughHP"],
"lsAmbisonicsReproductionModules": ["AmbisonicsBinauralMixdown"], "lsAmbisonicsReproductionModules": ["AmbisonicsBinauralMixdown"],
......
...@@ -36,7 +36,6 @@ class LauncherConfig: ...@@ -36,7 +36,6 @@ class LauncherConfig:
conf.nLauncherPort = json_config["nLauncherPort"] conf.nLauncherPort = json_config["nLauncherPort"]
conf.nVAServerPort = json_config["nVAServerPort"] conf.nVAServerPort = json_config["nVAServerPort"]
conf.nWaitForVAServerStart = json_config["nWaitForVAServerStart"] conf.nWaitForVAServerStart = json_config["nWaitForVAServerStart"]
conf.lsDefaultReproductionModules = json_config["lsDefaultReproductionModules"]
except KeyError as e: except KeyError as e:
print( "ERROR reading the json config. Missing " + str(e.args[0]) ) print( "ERROR reading the json config. Missing " + str(e.args[0]) )
sys.exit( ErrorCodes.ERROR_INCOMPLETE_CONFIG ) sys.exit( ErrorCodes.ERROR_INCOMPLETE_CONFIG )
...@@ -57,7 +56,6 @@ class LauncherConfig: ...@@ -57,7 +56,6 @@ class LauncherConfig:
class VAComposedIniParser: class VAComposedIniParser:
def __init__(self, oLauncherConf : LauncherConfig): def __init__(self, oLauncherConf : LauncherConfig):
self.lsDefaultReproductionModules = oLauncherConf.lsDefaultReproductionModules
self.lsBinauralReproductionModules = oLauncherConf.lsBinauralReproductionModules self.lsBinauralReproductionModules = oLauncherConf.lsBinauralReproductionModules
self.lsAmbisonicsReproductionModules = oLauncherConf.lsAmbisonicsReproductionModules self.lsAmbisonicsReproductionModules = oLauncherConf.lsAmbisonicsReproductionModules
self.lsCustomReproductionModules = oLauncherConf.lsCustomReproductionModules self.lsCustomReproductionModules = oLauncherConf.lsCustomReproductionModules
...@@ -76,7 +74,7 @@ class VAComposedIniParser: ...@@ -76,7 +74,7 @@ class VAComposedIniParser:
def prepare_inis(self): def prepare_inis(self):
print("Parsing VA ini-files") print("Parsing VA ini-files")
self.link_renderer_ini() self.link_renderer_ini()
self.prepare_reproduction_ini() return self.prepare_reproduction_ini()
def link_renderer_ini(self): def link_renderer_ini(self):
if not self.sRendererIniPath: if not self.sRendererIniPath:
...@@ -113,22 +111,24 @@ class VAComposedIniParser: ...@@ -113,22 +111,24 @@ class VAComposedIniParser:
print( "ERROR: " + str(e) ) print( "ERROR: " + str(e) )
sys.exit( ErrorCodes.ERROR_INCOMPLETE_VA_INI ) sys.exit( ErrorCodes.ERROR_INCOMPLETE_VA_INI )
lsReproductionModuleIDs = self.lsDefaultReproductionModules
if self.eReproductionInput == ReproductionInput.BINAURAL: if self.eReproductionInput == ReproductionInput.BINAURAL:
if self.lsBinauralReproductionModules: if self.lsBinauralReproductionModules:
lsReproductionModuleIDs = self.lsBinauralReproductionModules lsReproductionModuleIDs = self.lsBinauralReproductionModules
else: else:
print("WARNING: Requested BINAURAL reproduction modules are not specified, using default") print("ERROR: Requested BINAURAL reproduction modules are not specified")
return False
elif self.eReproductionInput == ReproductionInput.AMBISONICS: elif self.eReproductionInput == ReproductionInput.AMBISONICS:
if self.lsAmbisonicsReproductionModules: if self.lsAmbisonicsReproductionModules:
lsReproductionModuleIDs = self.lsAmbisonicsReproductionModules lsReproductionModuleIDs = self.lsAmbisonicsReproductionModules
else: else:
print("WARNING: Requested AMBISONICS reproduction modules are not specified, using default") print("ERROR: Requested AMBISONICS reproduction modules are not specified")
return False
elif self.eReproductionInput == ReproductionInput.CUSTOM: elif self.eReproductionInput == ReproductionInput.CUSTOM:
if self.lsCustomReproductionModules: if self.lsCustomReproductionModules:
lsReproductionModuleIDs = self.lsCustomReproductionModules lsReproductionModuleIDs = self.lsCustomReproductionModules
else: else:
print("WARNING: Requested CUSTOM reproduction modules are not specified, using default") print("ERROR: Requested CUSTOM reproduction modules are not specified")
return False
for sReproductionID in lsReproductionModuleIDs: for sReproductionID in lsReproductionModuleIDs:
sSection = "Reproduction:" + sReproductionID sSection = "Reproduction:" + sReproductionID
...@@ -139,6 +139,8 @@ class VAComposedIniParser: ...@@ -139,6 +139,8 @@ class VAComposedIniParser:
with open( sFileToWrite, 'w' ) as inifile: with open( sFileToWrite, 'w' ) as inifile:
reproductionIni.write(inifile) reproductionIni.write(inifile)
return True
#Main class representing the VA Launcher app #Main class representing the VA Launcher app
...@@ -262,7 +264,9 @@ class VirtualAcousticsLauncher: ...@@ -262,7 +264,9 @@ class VirtualAcousticsLauncher:
self.oVAProcess = None self.oVAProcess = None
self.receive_va_start_info() self.receive_va_start_info()
self.vaIniParser.prepare_inis() if not self.vaIniParser.prepare_inis():
print( "Resetting launcher connection" )
self._reset_connection()
#Checks for a message containing the ID of the VAServer instance to be started and returns the respective VAServer directory #Checks for a message containing the ID of the VAServer instance to be started and returns the respective VAServer directory
...@@ -332,8 +336,6 @@ class VirtualAcousticsLauncher: ...@@ -332,8 +336,6 @@ class VirtualAcousticsLauncher:
print( "ERROR: Invalid config for " + self.sVAServerID + " -- file " + sVAExecutableFile + " does not exist" ) print( "ERROR: Invalid config for " + self.sVAServerID + " -- file " + sVAExecutableFile + " does not exist" )
self.oLauncherConnection.send( b'n' ) #answer 'binary file cannot be found or invalid' self.oLauncherConnection.send( b'n' ) #answer 'binary file cannot be found or invalid'
return return
elif self.sVAServerDir == None:
self.sVAServerDir = os.path.dirname( sVAExecutableFile ) #TODO-PSC: VAServer should always be started from its main directory, not the "bin" folder
except KeyError: except KeyError:
sVAExecutableFile = None sVAExecutableFile = None
print( "ERROR: config for " + self.sVAServerID + " has no valid \"file\" entry" ) print( "ERROR: config for " + self.sVAServerID + " has no valid \"file\" entry" )
......
...@@ -39,7 +39,6 @@ The VAServerLauncher can be configured by adjusting the settings in `./LaunchScr ...@@ -39,7 +39,6 @@ The VAServerLauncher can be configured by adjusting the settings in `./LaunchScr
| nLauncherPort | Port used for communication with launcher | 41578 | | nLauncherPort | Port used for communication with launcher | 41578 |
| nVAServerPort | Port used for communication with VAServer | 12340 | | nVAServerPort | Port used for communication with VAServer | 12340 |
| nWaitForVAServerStart | Time to wait for VAServer to start [seconds] | 3 | | nWaitForVAServerStart | Time to wait for VAServer to start [seconds] | 3 |
| lsDefaultReproductionModules | [Reproduction modules](#audio-reproduction) used if [Reproduction input signal type](#unreal-project-configuration) is not specified by client (Unreal) | ["TalkthroughHP", "CTC"] |
| lsBinauralReproductionModules | [Reproduction modules](#audio-reproduction) used for [binaural](#unreal-project-configuration) input signals | ["TalkthroughHP"] | | lsBinauralReproductionModules | [Reproduction modules](#audio-reproduction) used for [binaural](#unreal-project-configuration) input signals | ["TalkthroughHP"] |
| lsAmbisonicsReproductionModules | [Reproduction modules](#audio-reproduction) used for [ambisonics](#unreal-project-configuration) input signals | ["AmbisonicsBinauralMixdown"] | | lsAmbisonicsReproductionModules | [Reproduction modules](#audio-reproduction) used for [ambisonics](#unreal-project-configuration) input signals | ["AmbisonicsBinauralMixdown"] |
| lsCustomReproductionModules | [Reproduction modules](#audio-reproduction) used for [custom](#unreal-project-configuration) purposes (e.g. multiple renderers with different signal types) | e.g. ["TalkthroughHP", "AmbisonicsBinauralMixdown"] | | lsCustomReproductionModules | [Reproduction modules](#audio-reproduction) used for [custom](#unreal-project-configuration) purposes (e.g. multiple renderers with different signal types) | e.g. ["TalkthroughHP", "AmbisonicsBinauralMixdown"] |
...@@ -70,7 +69,7 @@ You can add additional modules, if you want. However, you should *not* rename th ...@@ -70,7 +69,7 @@ You can add additional modules, if you want. However, you should *not* rename th
In any case, especially for the loudspeaker-based modules, you will have to update the `Outputs` setting according to what you defined in the `VASetup.Launcher.ini`. In any case, especially for the loudspeaker-based modules, you will have to update the `Outputs` setting according to what you defined in the `VASetup.Launcher.ini`.
### Audio rendering ### Audio rendering
The [rendering settings](https://www.virtualacoustics.org/VA/documentation/rendering/) specify, how audio is rendered based on the virtual sources and the receiver in your scene. Typically, this should live in your Unreal project (see [Unreal project configuration](#unreal-project-configuration)). However, the file `VARendering.Default.ini` is provided in case the Unreal project does not provide such a file. The [rendering settings](https://www.virtualacoustics.org/VA/documentation/rendering/) specify, how audio is rendered based on the virtual sources and the receiver in your scene. Typically, this should live in your Unreal project (see [Unreal project configuration](#unreal-project-configuration)). However, the file `VARenderer.Default.ini` is provided in case the Unreal project does not provide such a file.
## Unreal project configuration ## Unreal project configuration
...@@ -82,4 +81,4 @@ When working with the [Unreal VA plugin](https://git-ce.rwth-aachen.de/vr-vis/VR ...@@ -82,4 +81,4 @@ When working with the [Unreal VA plugin](https://git-ce.rwth-aachen.de/vr-vis/VR
| VAServerLauncher Port | Port used for communication with launcher | 41578 | | VAServerLauncher Port | Port used for communication with launcher | 41578 |
| VAServer Version ID | ID used to specify which VAServer version should be started. This must match a value in the dictionary `dVAServerDirectories` in the [Launcher config](#launcher-configuration). | "2022.a" | | VAServer Version ID | ID used to specify which VAServer version should be started. This must match a value in the dictionary `dVAServerDirectories` in the [Launcher config](#launcher-configuration). | "2022.a" |
| VARenderer.ini file | Filename of the ini file including the audio rendering settings for this project. If specified, the file will be sent to the VAServerLauncher on startup. | "" | | VARenderer.ini file | Filename of the ini file including the audio rendering settings for this project. If specified, the file will be sent to the VAServerLauncher on startup. | "" |
| Reproduction input signal type | Depending on this setting a different set of reproduction modules (see [Launcher config](#launcher-configuration)) is used by the VAServerLauncher, the group [Default / Binaural / Ambisonics / Custom] | Binaural | | Reproduction input signal type | Depending on this setting a different set of reproduction modules (see [Launcher config](#launcher-configuration)) is used by the VAServerLauncher, the group [Binaural / Ambisonics / Custom] | Binaural |
\ No newline at end of file \ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment