Commit 7c35b97b authored by Jan-Gerrit Richter's avatar Jan-Gerrit Richter

small speed improvement during daff creation

parent 752e1787
......@@ -662,6 +662,10 @@ classdef itaHRTF < itaAudio
%HRTFout = this.direction(idxCoord);
end
function this = buildsearchdatabase(this)
this.dirCoord = this.dirCoord.build_search_database;
end
function obj = direction(this, idxCoord)
idxDir = zeros(numel(idxCoord)*2,1);
idxDir(1:2:numel(idxCoord)*2,:) = 2*idxCoord-1;
......
......@@ -414,6 +414,7 @@ function [] = daffv17_write( varargin )
% note: use round here to avoid errors if alphapoints are not exactly
% integers but within epsilon
x = cell( round( args.alphapoints ), round( args.betapoints ), args.channels );
args.userdata = args.userdata.buildsearchdatabase;
for b=1:args.betapoints
beta = betastart + (b-1)*args.betares;
......@@ -423,12 +424,10 @@ function [] = daffv17_write( varargin )
else
points = args.alphapoints;
end
for a=1:points
alpha = alphastart + (a-1)*args.alphares;
% --= Impulse responses =--
if strcmp( args.content, 'IR' )
% Get the data
[ data, samplerate, metadata ] = args.datafunc( alpha, beta, args.userdata );
......
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