view arrows/@asink/asink.m @ 61:eff6bddf82e3 tip

Finally implemented perceptual brightness thing.
author samer
date Sun, 11 Oct 2015 10:20:42 +0100
parents 672052bd81f8
children
line wrap: on
line source
% asink - output arrow using sink object
%
% asink :: 
%    sink(C,R) ~'signal sink'
% -> arrow({[[N,1]]]},{},empty).
%
% asink :: 
%    sink(C,R) ~'signal sink',
%    [[1,M]]   ~'indices of samples to select from input'
% -> arrow({[[N,1]]]},{},empty).
%
% This unit will accept vectors of any size and send them to an audio output
% device or destination. If 2nd argument is specified as I and data is supplied
% in array x, then only samples x(I) are played.
function o=asink(sink,window)
	if nargin==0, sink=sinknull; end
	if nargin<2, window=[]; end
	s.sink=sink;
	s.window=window;
	o=class(s,'asink',arrow(1,0));
end