dfitaHRIRDAFFDataFunc.m 410 Bytes
Newer Older
1
function [ data, samplerate, metadata ] = dfitaHRIRDAFFDataFunc( alpha, beta, itaHRTF_obj )
2 3 4 5 6 7 8

    samplerate = itaHRTF_obj.samplingRate;    
    
    hrtf = itaHRTF_obj.findnearestHRTF( 180 - beta, alpha );
    
    % DAFF requires data alignment by multiple of 4
    nResidual = mod( hrtf.nSamples, 4 );
9
    data = [ hrtf.timeData', zeros( hrtf.nChannels, mod(4 - nResidual,4) ) ];
10 11 12
    
    metadata = [];
end