forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tools: Test: Audio: Add to process_test.m option to show plots
This change replaces 6th argument with show_plots. If it is set to 1, the plots are not hidden. If set to 2, also the temporary sound files are not deleted that is useful for debugging. Signed-off-by: Seppo Ingalsuo <[email protected]>
- Loading branch information
Showing
1 changed file
with
22 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,26 @@ | ||
% process_test - test objective audio quality parameters | ||
% | ||
% process_test(comp, bits_in_list, bits_out_list, fs, fulltest, xtrun) | ||
% process_test(comp, bits_in_list, bits_out_list, fs, fulltest, show_plots, xtrun) | ||
% | ||
% Inputs | ||
% comp - component to test | ||
% bits_in_list - input word lengths | ||
% bits_out_list - output workd lengths | ||
% fs - sample rate | ||
% fulltest - 0 perform only chirp test, 1 perform all | ||
% show_plots - use 1 to show, defaults to hidden with 0 | ||
% with value 2 also temporary sound files are preserved | ||
% xtrun - set to 'xt-run' or 'xt-run --turbo' to test with xt-testbench | ||
% | ||
% E.g. | ||
% process_test('eq-iir', 32, 32, 48000, 0, 'xt-run --turbo'); | ||
% process_test('eq-iir', 32, 32, 48000, 0, 0, 'xt-run --turbo'); | ||
% process_test('eq-iir', 32, 32); | ||
|
||
% SPDX-License-Identifier: BSD-3-Clause | ||
% Copyright(c) 2017-2022 Intel Corporation. All rights reserved. | ||
% Author: Seppo Ingalsuo <[email protected]> | ||
|
||
function [n_fail, n_pass, n_na] = process_test(comp, bits_in_list, bits_out_list, fs, fulltest, xtrun) | ||
function [n_fail, n_pass, n_na] = process_test(comp, bits_in_list, bits_out_list, fs, fulltest, show_plots, xtrun) | ||
%% Defaults for call parameters | ||
if nargin < 1 | ||
comp = 'EQIIR'; | ||
|
@@ -41,6 +43,10 @@ | |
end | ||
|
||
if nargin < 6 | ||
show_plots = 0; | ||
end | ||
|
||
if nargin < 7 | ||
xtrun = ''; | ||
end | ||
|
||
|
@@ -68,9 +74,19 @@ | |
% visibility set to 0 only console text is seen. The plots are | ||
% exported into plots directory in png format and can be viewed from | ||
% there. | ||
t.plot_close_windows = 1; % Workaround for visible windows if Octave hangs | ||
t.plot_visible = 'off'; % Use off for batch tests and on for interactive | ||
t.files_delete = 1; % Set to 0 to inspect the audio data files | ||
if show_plots > 0 | ||
t.plot_close_windows = 0; % Workaround for visible windows if Octave hangs | ||
t.plot_visible = 'on'; % Use off for batch tests and on for interactive | ||
else | ||
t.plot_close_windows = 1; | ||
t.plot_visible = 'off'; | ||
end | ||
|
||
if show_plots > 1 | ||
t.files_delete = 0; % Set to 0 to inspect the audio data files | ||
else | ||
t.files_delete = 1; | ||
end | ||
|
||
%% Prepare | ||
process_test_paths(true); | ||
|