Mercurial > hg > ishara
view arrows/abufsink.m @ 2:7357e1dc2ad6
Simplified scheduler library with new schedule representation.
author | samer |
---|---|
date | Sat, 22 Dec 2012 16:17:51 +0000 |
parents | 672052bd81f8 |
children |
line wrap: on
line source
% abufsink - output arrow using sink object % % abufsink :: % sink(C,R) ~'signal sink' % -> arrow({[[N,L]]]},{},empty). % % abufsink :: % sink(C,R) ~'signal sink' % [[M]->[N]] ~'array of indices into input to select samples to send' % -> arrow({[[N,L]]]},{},empty). % % This unit will accept vectors of any size and send them to an audio output % device or destination. % function o=abufsink(sink,window) if nargin<2, window=[]; end ch=channels(sink); if isempty(window) o=arr(@rshp)*asink(sink); else o=arr(@wnd)*asink(sink); end function y=rshp(x), y=reshape(x,ch,[]); end function y=wnd(x), y=reshape(x(window,:),ch,[]); end end