wolffd@0: function p = mirparallel(s) wolffd@0: % mirparallel(1) toggles on parallel processing: (BETA) wolffd@0: % When ?Folder? or ?Folders? is used, several audio files can be analysed wolffd@0: % in parallel using several parallel Matlab sessions running on the wolffd@0: % different processors and/or processor cores of your computer. wolffd@0: % (Requires MathWorks? Parallel Computing Toolbox.) wolffd@0: % mirparallel(0) toggles back off parallel processing. wolffd@0: wolffd@0: persistent mir_parallel wolffd@0: wolffd@0: if nargin wolffd@0: warning('MIRtoolbox Parallel computing is currently in Beta Version.'); wolffd@0: if s wolffd@0: try wolffd@0: matlabpool size; wolffd@0: catch wolffd@0: mirerror('mirparallel','Are you sure Parallel Processing Toolbox is installed?'); wolffd@0: end wolffd@0: end wolffd@0: mir_parallel = s; wolffd@0: else wolffd@0: if isempty(mir_parallel) wolffd@0: mir_parallel = 0; wolffd@0: end wolffd@0: end wolffd@0: wolffd@0: p = mir_parallel;