Commit 24f75312 authored by Hark Simon Braren's avatar Hark Simon Braren Committed by Hark Simon Braren

make itaAnthroHrtf work when input HRTF has only two channels at poles

problem occured when input HRTF had only 2 channels at poles, not 2 channels for each phi angle, as resulting from arc measurements
parent 409d86bb
...@@ -153,6 +153,15 @@ try ...@@ -153,6 +153,15 @@ try
ellipsoidCoord(2:2:end) = rSphere_R(idxCoord); ellipsoidCoord(2:2:end) = rSphere_R(idxCoord);
end end
if an.channelCoordinates.nPoints ~= numel(ellipsoidCoord)
% Problem when HRTF has only 2 Channels at poles and not nPhi channels
% in the 'same' location - 17.04.18 - hbr
idx = coord.findnearest(an.dirCoord);
chIdx = [2*idx-1, 2*idx].';
ellipsoidCoord = ellipsoidCoord(chIdx(:));
%, ellipsoidRi) %, ellipsoidRi)
%,ellipsoidCoord(1:2:end)) %,ellipsoidCoord(1:2:end))
end end
\ No newline at end of file
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