Daniel@0: function cl = mirchunklim(lim) Daniel@0: % c = mirchunklim returns the maximal chunk size. Daniel@0: % If the size of a long audio files exceeds that size, it will be Daniel@0: % decomposed into chunks of that size, before being analyzed in the Daniel@0: % different functions on the toolbox. Daniel@0: % mirchunklim(c) specifies a new maximal chunk size. Daniel@0: % If MIRtoolbox tends to use more memory than what is available in the Daniel@0: % RAM of your computer, you should decrease the maximal chunk size. Daniel@0: % mirchunklim(Inf) toggles off the automated chunk decomposition. Daniel@0: Daniel@0: persistent chunklim Daniel@0: Daniel@0: if nargin Daniel@0: if not(isnumeric(lim)) Daniel@0: error('ERROR IN MIRCHUNKLIM: The argument should be a number.') Daniel@0: end Daniel@0: chunklim = lim; Daniel@0: else Daniel@0: if isempty(chunklim) Daniel@0: chunklim = 5e5; Daniel@0: end Daniel@0: end Daniel@0: Daniel@0: cl = chunklim;