% frameProcessing.m This function adjust length of signal for video analysis

function [ DoA ] = frameProcessing_ambisonics_td( ambixFormat, blockIndex, stepSize, bufferSize, grid_dirs, ...
                                                  M_sh2pv )

    % take a buffer
    ambixFormatChunk    = ambixFormat( (blockIndex-1) * stepSize + 1 : (blockIndex-1) * stepSize + bufferSize, : );

    intVecSignal        = intVectAnalysis( ambixFormatChunk, M_sh2pv, 0.5 );
    [ DoA, ~ ]          = sphIntensityHist( intVecSignal, grid_dirs, 0 );

end