
function s=construct(sig)
	sc=construct(sig.sig);
	length=uint32(sig.len);

	s.start   = sc.start;
	s.stop    = sc.stop;
	s.dispose = sc.dispose;
	s.reader = @reader;

	function r=reader(n)
		rc=sc.reader(n);
		r = @next;
		n=uint32(n);
		function [x,rem]=next
			[x,rem]=rc();
			if length>n
				length=length-n;
			elseif length>0
				rem=max(rem,n-length);
				length=0;
				last=x(:,end);
			else
				rem=n;
			end
		end
	end
end
