1%% Function window for streaming catch 2 3% tWin:Window size for block processing 4% nWin:Audio window size in samples 5% hwin: after adjustment windows 6function [hwin]=windows(nWin) 7 8% nWin = round(tWin*fs); % Audio window size in samples 9hwin=coder.const(@hann,nWin); 10% hwin = hann(nWin); 11% hwin = hann(nWin); 12% % if nWin/2 ~= fix(nWin/2) % Ensure samples are even for overlap and add 13% % nWin = nWin+1; 14% % hwin = hann(nWin); 15% % end 16% nInc = round(nWin/2); % Window increment %50 overlap 17% % hnWin=nWin+1; 18% % nWin=int16(nWin); 19% % hwin = hann(nWin); % Tappering window for overlap and add 20% hwin = hwin(1:end-1); % Make adjustment so even windows align 21% % hWin=repmat(hWin,1,nmic); % repeat to match number mic 22% inx=zeros(nWin,nmic); % initial window 23 24end