classdef sigresample < signal
	properties (GetAccess=private, SetAccess=immutable)
		fs
		source
		opts
	end
	methods
		function s=sigresample(fs,sig1,varargin)
			if fs==rate(sig1), sig2=sig1;
			else
				opts=prefs('bs',1024,varargin{:});
				s.source=sig1;
				s.fs=fs;
				s.opts=opts;
			end
		end

		function s=tostring(sig)
			s=sprintf('resample(%g,%s)',sig.rate,tostring(sig.source));
		end

		function c=channels(s), c=channels(s.source); end
		function r=rate(s), r=s.fs; end
	end
end
