Tools: Test: Audio: Add missing test utility function

The script to load back to Matlab or Octave the test input data
was missing from previous patch that introduced TDFB (beamformer)
component.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
Seppo Ingalsuo 2020-10-02 16:39:51 +03:00 committed by Liam Girdwood
parent 242be345ca
commit 51fc4e1220
1 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,26 @@
function [x, nx] = load_test_input(test)
%% [x, n] = load_test_input(t)
%
% Input
% t.fn_in - file name to load
% t.bits_in - word length of data
% t.fmt - file format 'raw' or 'txt
% t.ch - channel to extract
% t.nch - number of channels in (interleaved) data
%
% Output
% x - samples
% n - number of samples
%
% SPDX-License-Identifier: BSD-3-Clause
% Copyright(c) 2020 Intel Corporation. All rights reserved.
% Author: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
tmp = test;
tmp.fn_out = test.fn_in;
tmp.bits_out = test.bits_in;
[x, nx] = load_test_output(tmp);
end