Commit 27d07c8f authored by Josefa Oberem's avatar Josefa Oberem

Merge branch 'master' of http://git.rwth-aachen.de/ita/toolbox

parents 044fb6ff cf124a13
......@@ -134,7 +134,7 @@ classdef itaListeningTestStimulus
try
this.HRTFFile = value;
HRTF = ita_read(value);
this.mHRTF = ita_read(value);
catch e
......
......@@ -1088,7 +1088,7 @@ classdef itaVA < handle
[dGain] = VAMatlab('getRenderingModuleGain', this.handle, sModuleID);
end
function [] = getRenderingModules(this, bFilterEnabled)
function [renderers] = getRenderingModules(this, bFilterEnabled)
% Get list of rendering modules
%
% Parameters:
......@@ -1097,13 +1097,13 @@ classdef itaVA < handle
%
% Return values:
%
% None
% renderers [cell-array of struct-1x1] Renderer infos (names, descriptions, etc.)
%
if this.handle==0, error('Not connected.'); end;
if ~exist('bFilterEnabled','var'), bFilterEnabled = 1; end
VAMatlab('getRenderingModules', this.handle, bFilterEnabled);
[renderers] = VAMatlab('getRenderingModules', this.handle, bFilterEnabled);
end
function [dGain] = getReproductionModuleGain(this, sModuleID)
......@@ -1123,7 +1123,7 @@ classdef itaVA < handle
[dGain] = VAMatlab('getReproductionModuleGain', this.handle, sModuleID);
end
function [] = getReproductionModules(this, bFilterEnabled)
function [reproductionmodules] = getReproductionModules(this, bFilterEnabled)
% Get list of rendering modules
%
% Parameters:
......@@ -1132,13 +1132,13 @@ classdef itaVA < handle
%
% Return values:
%
% None
% reproductionmodules [cell-array of struct-1x1] Reproduction module infos (names, descriptions, etc.)
%
if this.handle==0, error('Not connected.'); end;
if ~exist('bFilterEnabled','var'), bFilterEnabled = 1; end
VAMatlab('getReproductionModules', this.handle, bFilterEnabled);
[reproductionmodules] = VAMatlab('getReproductionModules', this.handle, bFilterEnabled);
end
function [info] = getSceneInfo(this)
......
%% itaVA quick connect
va = itaVA( 'localhost' );
%% Also add current dir to VA search path
va.addSearchPath( pwd );
\ No newline at end of file
......@@ -105,6 +105,7 @@ else
end
varargout = {};
pos_num = 0; % needed for meaningful error messages
notFoundCell = {};
%% check field names for fixed position tokens
field_token = fieldnames(inStruct);
......@@ -115,7 +116,7 @@ for idx = 1:length(field_token)
token = field_token{idx};
if numel(token) >= 5 % RSC - support for arguments shorter than 5 elements
if strcmpi(token(1:3),'pos') && strcmpi(token(5),'_')
pos_num = sscanf(token(4),'%d'); %this is the fixed position number in the argument list
pos_num = sscanf(token(4),'%d'); %this is the fixed position number in the argument list
token_new = token(6:end); %get rid off prefix
if pos_num <= numel(Arguments) % rsc - check if enough arguments are given
value = Arguments{pos_num}; %get value/object
......@@ -237,6 +238,8 @@ Arguments = newArguments;
nArguments = length(Arguments);
fieldNamesInStruct = fieldnames(inStruct);
idx = 1;
notFoundArguments = 0;
while (idx <= nArguments) % go through all arguments
% if ~ischar(Arguments{idx}), error([thisFuncStr 'The arguments specified to call "' callFuncStr '" are not correct. Check the arguments, the corresponding values and the order.']); end;
if ~ischar(Arguments{idx})
......@@ -285,13 +288,26 @@ while (idx <= nArguments) % go through all arguments
end
end
else
error([thisFuncStr callFuncStr 'There is no entry in the struct for this argument: ' lower(Arguments{idx})]);
notFoundArguments = 1;
% this handles the case that some arguments are not found
notFoundCell{end+1} = Arguments{idx};
idx = idx + 1;
if idx <= nArguments
notFoundCell{end+1} = Arguments{idx};
idx = idx + 1;
end
end
end
if notFoundArguments == 1
ita_verbose_info([thisFuncStr callFuncStr 'Some arguments could not be found in the struct. They are returned separately.'],0);
end
%% search for pseudo boolean - also done when no arguments specified
cFieldNames = fieldnames(inStruct);
for idx = 1:length(cFieldNames);
for idx = 1:length(cFieldNames)
if ischar(inStruct.(cFieldNames{idx}))
if sum(strcmpi(inStruct.(cFieldNames{idx}),{'on','true'}))
inStruct.(cFieldNames{idx}) = true;
......@@ -302,6 +318,6 @@ for idx = 1:length(cFieldNames);
end
%% Output parameters
varargout = [varargout {inStruct}]; %#ok<VARARG>
varargout = [varargout {inStruct} {notFoundCell}]; %#ok<VARARG>
end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment