function u=construct(s,sizes_in)
	u=mkunit(s);
	if ~isa(s.sink,'sink')
		snk=construct(s.sink(sizes_in{1}(1)));
	else
		if sizes_in{1}(1)~=channels(s.sink)
			error('Number of rows in input does not match channels in sink');
		end
		snk=construct(s.sink);
	end
	
	if isempty(s.window), 
		write=snk.writer(sizes_in{1}(2));
		u.process=@proc1;
	else 
		WIN=s.window; 
		write=snk.writer(length(WIN)); 
		u.process=@proc2;
	end

	u.sizes_out = {};
	u.dispose   = snk.dispose;
	u.starting  = snk.start;
	u.stopping  = snk.stop;

	function proc1(x), write(x); end
	function proc2(x), write(x(:,WIN)); end
end

