Skip to content

Commit b647d9a

Browse files
singalsulgirdwood
authored andcommitted
Audio: DCblock: Fix search path to common functions
A function dcblock_paths.m is added to handle add and remove of path. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
1 parent 8225205 commit b647d9a

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
function dcblock_paths(enable)
2+
3+
% dcblock_paths(enable)
4+
% enable - set to true to enable needed search path
5+
% set to false to disable the search paths
6+
%
7+
8+
% SPDX-License-Identifier: BSD-3-Clause
9+
%
10+
% Copyright (c) 2024, Intel Corporation. All rights reserved.
11+
12+
common = '../../../../tools/tune/common';
13+
if enable
14+
addpath(common);
15+
else
16+
rmpath(common);
17+
end
18+
end

src/audio/dcblock/tune/example_dcblock.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function dcblock_blob_calculate(prm)
4949
R_coeffs = R * ones(1, channels);
5050
end
5151

52-
addpath ./../common
52+
dcblock_paths(true);
5353

5454
blob8 = dcblock_build_blob(R_coeffs, endian);
5555
blob8_ipc4 = dcblock_build_blob(R_coeffs, endian, 4);
@@ -74,7 +74,7 @@ function dcblock_blob_calculate(prm)
7474
figure
7575
dcblock_plot_stepfn(R_coeffs(1), fs);
7676

77-
rmpath ./../common
77+
dcblock_paths(false);
7878

7979
end
8080

0 commit comments

Comments
 (0)