% sinkbase - A useful base class for sinks
%
% sinkbase :: C:natural -> sink(C,_).
% sinkbase :: C:natural, R:nonneg -> sink(C,R).
classdef sinkbase < sink
	properties (GetAccess=private,SetAccess=immutable)
		chans
		fs
	end
	methods
		function s=sinkbase(channels,rate)
			if nargin<2, rate=nan; end
			if nargin<1, channels=nan; end
			s.chans=channels;
			s.fs=rate;
		end
		function c=rate(s), c=s.fs; end
		function c=channels(s), c=s.chans; end
	end
end
