Mercurial > hg > camir-aes2014
annotate 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 |
rev | line source |
---|---|
wolffd@0 | 1 function cl = mirchunklim(lim) |
wolffd@0 | 2 % c = mirchunklim returns the maximal chunk size. |
wolffd@0 | 3 % If the size of a long audio files exceeds that size, it will be |
wolffd@0 | 4 % decomposed into chunks of that size, before being analyzed in the |
wolffd@0 | 5 % different functions on the toolbox. |
wolffd@0 | 6 % mirchunklim(c) specifies a new maximal chunk size. |
wolffd@0 | 7 % If MIRtoolbox tends to use more memory than what is available in the |
wolffd@0 | 8 % RAM of your computer, you should decrease the maximal chunk size. |
wolffd@0 | 9 % mirchunklim(Inf) toggles off the automated chunk decomposition. |
wolffd@0 | 10 |
wolffd@0 | 11 persistent chunklim |
wolffd@0 | 12 |
wolffd@0 | 13 if nargin |
wolffd@0 | 14 if not(isnumeric(lim)) |
wolffd@0 | 15 error('ERROR IN MIRCHUNKLIM: The argument should be a number.') |
wolffd@0 | 16 end |
wolffd@0 | 17 chunklim = lim; |
wolffd@0 | 18 else |
wolffd@0 | 19 if isempty(chunklim) |
wolffd@0 | 20 chunklim = 5e5; |
wolffd@0 | 21 end |
wolffd@0 | 22 end |
wolffd@0 | 23 |
wolffd@0 | 24 cl = chunklim; |