Mercurial > hg > ishara
view arrows/audioplay.m @ 61:eff6bddf82e3 tip
Finally implemented perceptual brightness thing.
author | samer |
---|---|
date | Sun, 11 Oct 2015 10:20:42 +0100 |
parents | beb8a3f4a345 |
children |
line wrap: on
line source
function a=audioplay(ch,rate,window,varargin) if nargin<3, window=[]; end opts=options('buffer',1,'queue',4,'dspargs',{},varargin{:}); a=asysobj(@(sz)dsp.AudioPlayer(rate,'BufferSizeSource','Property', ... 'BufferSize', opts.buffer*sz{1}(1), ... 'QueueDuration',opts.queue*sz{1}(1)/rate, ... opts.dspargs{:}), ... 1,0, @(sz){}); if ~isempty(window), a=arr(@(x)x(window,:))*a; end end