-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.m
64 lines (58 loc) · 2.15 KB
/
template.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
function [f_audio_out,timepositions_afterDegr] = template(f_audio, samplingFreq, timepositions_beforeDegr, parameter)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Name: template
% Date: 2020-12
% Programmer: Your Name
%
% Description:
% - a description
%
% Input:
% f_audio - audio signal \in [-1,1]^{NxC} with C being the number of
% channels
% timepositions_beforeDegr - some degradations delay the input signal. If
% some points in time are given via this
% parameter, timepositions_afterDegr will
% return the corresponding positions in the
% output. Set to [] if unavailable. Set f_audio
% and samplingFreq to [] to compute only
% timepositions_afterDegr.
%
% Input (optional): parameter
% .someParameter = 'defaultValue' - a description
%
% timepositions_beforeDegr - some degradations delay the input signal. If
% some points in time are given via this
% parameter, timepositions_afterDegr will
% return the corresponding positions in the
% output
%
% Output:
% f_audio_out - audio output signal
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Check parameters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if nargin<4
parameter=[];
end
if nargin<3
timepositions_beforeDegr=[];
end
if nargin<2
error('Please specify input data');
end
if isfield(parameter,'someParameter')==0
parameter.someParameter = 'defaultValue';
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Main program
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
f_audio_out = [];
if ~isempty(f_audio)
f_audio_out = f_audio;
end
% This degradation does not impose a delay
timepositions_afterDegr = timepositions_beforeDegr;
end