Commit 4ea806be authored by Jonas Stienen's avatar Jonas Stienen

Fixing wrong usage of residual values during alignment on 4 samples for daffv17_write.

parent 959ee34c
function [ data, samplerate, metadata ] = dfitaHRIR( alpha, beta, itaHRTF_obj )
function [ data, samplerate, metadata ] = dfitaHRIRDAFFDataFunc( alpha, beta, itaHRTF_obj )
samplerate = itaHRTF_obj.samplingRate;
......@@ -6,7 +6,7 @@ function [ data, samplerate, metadata ] = dfitaHRIR( alpha, beta, itaHRTF_obj )
% DAFF requires data alignment by multiple of 4
nResidual = mod( hrtf.nSamples, 4 );
data = [ hrtf.timeData', zeros( hrtf.nChannels, nResidual ) ];
data = [ hrtf.timeData', zeros( hrtf.nChannels, 4 - nResidual ) ];
metadata = [];
end
function [ data, samplerate, isSymetric, metadata ] = dfitaHRTF( alpha, beta, itaHRTF_obj )
function [ data, samplerate, isSymetric, metadata ] = dfitaHRTFDAFFDataFunc( alpha, beta, itaHRTF_obj )
samplerate = itaHRTF_obj.samplingRate;
isSymetric = false;
......@@ -9,7 +9,7 @@ function [ data, samplerate, isSymetric, metadata ] = dfitaHRTF( alpha, beta, it
% in time domain
nResidual = mod( hrtf.nSamples, 4 );
if nResidual ~= 0
data = ifft( [ hrtf.timeData', zeros( hrtf.nChannels, nResidual ) ] );
data = ifft( [ hrtf.timeData', zeros( hrtf.nChannels, 4 - nResidual ) ] );
else
data = hrtf.freqData';
end
......
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