% pipesink - sink which writes audio signal to shell pipeline.
% pipesink :: C:natural, R:nonneg, string, options(wavsink) -> sink(C,R).
function s=pipesink(ch,rate,cmd,varargin)
	str=sprintf('pipesink(''%s'')',cmd);
	s=wavsink(ch,rate,@()pipeout(cmd),@()str,varargin{:});
end


