function [L,T] = loadlabs_mirex(A)
% [L,T] = loadlabs_mirex(A)
%     Read in labels for data items defined by a file or cell list.
%     A is the name of a list file defining a set of tracks
%     (or a cell array containing all the file ID strings).
%     L returns as one 1xN matrix of label indices.
%     T is a vector of the start frames of each individual track.
% 2008-08-11 Dan Ellis dpwe@ee.columbia.edu

% optional common filename prefix
dataroot = '';

if iscell(A)
  trks = A;
else
  trks = listfileread(A);
end

ntrks = length(trks);
F = []; 
L = [];

for i=1:ntrks; 
  LL=load(fullfile(dataroot, trks{i}));
  L=[L;LL.L];
  T(i) = size(LL,2);
end


