annotate audio/filesink.m @ 61:eff6bddf82e3
tip
Finally implemented perceptual brightness thing.
author |
samer |
date |
Sun, 11 Oct 2015 10:20:42 +0100 |
parents |
62e31e7980e6 |
children |
|
rev |
line source |
samer@43
|
1 % filesink - sink which writes a signal to a WAV file
|
samer@43
|
2 % filesink :: C:natural, R:real, path, options {...} -> sink(C,R).
|
samer@0
|
3 function s=filesink(ch,rate,file,varargin)
|
samer@0
|
4 str=sprintf('filesink(''%s'')',file);
|
samer@0
|
5 s=wavsink(ch,rate,@()filestream(file),@()str,varargin{:});
|
samer@0
|
6 end
|
samer@0
|
7
|
samer@0
|
8 function [str,disp]=filestream(file)
|
samer@0
|
9 import java.io.*;
|
samer@0
|
10 str=BufferedOutputStream(FileOutputStream(jfile(file)));
|
samer@0
|
11 disp=@nop;
|
samer@0
|
12 end
|