Commit 6935219f authored by Markus Mueller-Trapet's avatar Markus Mueller-Trapet

enable multi-object input

parent bb8e71c5
......@@ -41,7 +41,7 @@ end
%% Initialization and Input Parsing
sArgs = struct('pos1_a','itaAudio');
[Data, sArgs] = ita_parse_arguments(sArgs,varargin(1)); %#ok<NASGU>
[Data, sArgs] = ita_parse_arguments(sArgs,varargin(1)); %#ok<ASGLU>
if nargin == 1
NewSamplingRate = 44100;
......@@ -50,6 +50,16 @@ else
NewSamplingRate = varargin{2};
end
if numel(Data) > 1
ita_verbose_info('Calling for all instances.',1)
result = itaAudio(size(Data));
for idx = 1:numel(Data)
result(idx) = ita_resample(Data(idx),NewSamplingRate);
end
varargout{1} = result;
return
end
OldSamplingRate = Data.samplingRate;
if OldSamplingRate == NewSamplingRate
ita_verbose_info('ITA_RESAMPLE:The Sampling Rate is already fine.',1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment