annotate toolboxes/MIRtoolbox1.3.2/MIRToolbox/mirchunklim.m @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1 function cl = mirchunklim(lim)
Daniel@0 2 % c = mirchunklim returns the maximal chunk size.
Daniel@0 3 % If the size of a long audio files exceeds that size, it will be
Daniel@0 4 % decomposed into chunks of that size, before being analyzed in the
Daniel@0 5 % different functions on the toolbox.
Daniel@0 6 % mirchunklim(c) specifies a new maximal chunk size.
Daniel@0 7 % If MIRtoolbox tends to use more memory than what is available in the
Daniel@0 8 % RAM of your computer, you should decrease the maximal chunk size.
Daniel@0 9 % mirchunklim(Inf) toggles off the automated chunk decomposition.
Daniel@0 10
Daniel@0 11 persistent chunklim
Daniel@0 12
Daniel@0 13 if nargin
Daniel@0 14 if not(isnumeric(lim))
Daniel@0 15 error('ERROR IN MIRCHUNKLIM: The argument should be a number.')
Daniel@0 16 end
Daniel@0 17 chunklim = lim;
Daniel@0 18 else
Daniel@0 19 if isempty(chunklim)
Daniel@0 20 chunklim = 5e5;
Daniel@0 21 end
Daniel@0 22 end
Daniel@0 23
Daniel@0 24 cl = chunklim;