function P = extraphase(PB,FB,FBI,FPlen,sr)

%Hop size in seconds
T = 128/sr;



phi = zeros(1,FPlen);
ftemp=FB(end)+FBI(1);

phi(1) = PB(end)+pi*T*(ftemp);

for n=2:FPlen
    
    ftemp=ftemp+FBI(n-1)+FBI(n);
    phi(n)=phi(1)+pi*T*ftemp;
    
end
P=mod(phi,2*pi);


