function y = seltime(x,sr,tstart,tend)
% y = seltime(x,sr,tstart,tend)
%     Select a certain time range from within a soundfile
% 2010-04-13 Dan Ellis dpwe@ee.columbia.edu

if min(size(x)) == 1
  y = x(max(1,round(tstart*sr)):round(tend*sr));
else
  % Assume channels are in columns
  y = x(max(1,round(tstart*sr)):round(tend*sr),:);
end

  