Mercurial > hg > ishara
view audio/sndread.m @ 61:eff6bddf82e3 tip
Finally implemented perceptual brightness thing.
author | samer |
---|---|
date | Sun, 11 Oct 2015 10:20:42 +0100 |
parents | 62e31e7980e6 |
children |
line wrap: on
line source
% sndread - read entire contents of any audo file readable by sndfile function X=sndread(file,FS,varargin) opts=options('bs',1024,varargin{:}); sig=sndfile(file,opts); i=info(sig); if isfinite(i.length), init=ceil(1.01*i.length*rate(sig)/opts.bs); else init=fs; end X=gather(sig,'chunk',opts.bs,'init',init);