view toolboxes/MIRtoolbox1.3.2/MIRToolbox/mirchunklim.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
line wrap: on
line source
function cl = mirchunklim(lim)
% c = mirchunklim returns the maximal chunk size.
%   If the size of a long audio files exceeds that size, it will be
%   decomposed into chunks of that size, before being analyzed in the 
%   different functions on the toolbox.
% mirchunklim(c) specifies a new maximal chunk size.
%   If MIRtoolbox tends to use more memory than what is available in the
%   RAM of your computer, you should decrease the maximal chunk size.
% mirchunklim(Inf) toggles off the automated chunk decomposition.

persistent chunklim

if nargin
    if not(isnumeric(lim))
        error('ERROR IN MIRCHUNKLIM: The argument should be a number.')
    end
    chunklim = lim;
else
    if isempty(chunklim)
        chunklim = 5e5;
    end
end

cl = chunklim;