Aufgrund einer Wartung wird GitLab am 29.10. zwischen 9:00 und 10:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 29.10. between 9:00 and 10:00 am.

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