Mercurial > hg > ishara
diff audio/filesink.m @ 0:672052bd81f8
Initial partial import.
author | samer |
---|---|
date | Wed, 19 Dec 2012 22:38:28 +0000 |
parents | |
children | 62e31e7980e6 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/audio/filesink.m Wed Dec 19 22:38:28 2012 +0000 @@ -0,0 +1,10 @@ +function s=filesink(ch,rate,file,varargin) + str=sprintf('filesink(''%s'')',file); + s=wavsink(ch,rate,@()filestream(file),@()str,varargin{:}); +end + +function [str,disp]=filestream(file) + import java.io.*; + str=BufferedOutputStream(FileOutputStream(jfile(file))); + disp=@nop; +end