Mercurial > hg > ishara
annotate arrows/@asink/asink.m @ 0:672052bd81f8
Initial partial import.
author | samer |
---|---|
date | Wed, 19 Dec 2012 22:38:28 +0000 |
parents | |
children |
rev | line source |
---|---|
samer@0 | 1 % asink - output arrow using sink object |
samer@0 | 2 % |
samer@0 | 3 % asink :: |
samer@0 | 4 % sink(C,R) ~'signal sink' |
samer@0 | 5 % -> arrow({[[N,1]]]},{},empty). |
samer@0 | 6 % |
samer@0 | 7 % asink :: |
samer@0 | 8 % sink(C,R) ~'signal sink', |
samer@0 | 9 % [[1,M]] ~'indices of samples to select from input' |
samer@0 | 10 % -> arrow({[[N,1]]]},{},empty). |
samer@0 | 11 % |
samer@0 | 12 % This unit will accept vectors of any size and send them to an audio output |
samer@0 | 13 % device or destination. If 2nd argument is specified as I and data is supplied |
samer@0 | 14 % in array x, then only samples x(I) are played. |
samer@0 | 15 function o=asink(sink,window) |
samer@0 | 16 if nargin==0, sink=sinknull; end |
samer@0 | 17 if nargin<2, window=[]; end |
samer@0 | 18 s.sink=sink; |
samer@0 | 19 s.window=window; |
samer@0 | 20 o=class(s,'asink',arrow(1,0)); |
samer@0 | 21 end |
samer@0 | 22 |