Tools: Test: Audio: Add exist check for array configuration files

The added check and print helps the user to generate the array
configuration data and other beam pattern test related binary files
to carry out this test for TDFB (beamformer) component.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
Seppo Ingalsuo 2020-10-02 16:45:19 +03:00 committed by Liam Girdwood
parent ae70f19092
commit 43923e1fc9
1 changed files with 8 additions and 1 deletions

View File

@ -88,7 +88,14 @@ end
function test_beampattern(cfg, config_fn, simcap_fn);
load(fullfile(cfg.tunepath, config_fn));
fn = fullfile(cfg.tunepath, config_fn);
if isfile(fn)
load(fn);
else
fprintf(1, 'Array configuration file %s does not exist.\n', config_fn);
fprintf(1, 'Please run the script example_line_array in tools/tune/tdfb directory.\n');
error('Stopping.');
end
% Create input file
test = test_defaults(bf);