view sinks/@sinkbase/sinkbase.m @ 61:eff6bddf82e3 tip

Finally implemented perceptual brightness thing.
author samer
date Sun, 11 Oct 2015 10:20:42 +0100
parents f7fb679637ff
children
line wrap: on
line source
% 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