#include <algorithm>
#include "pbd/error.h"
-#include "ardour/ardour.h"
+#include "ardour/types.h"
#include "time_selection.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
using namespace ARDOUR;
using namespace PBD;
}
}
fatal << string_compose (_("programming error: request for non-existent audio range (%1)!"), which) << endmsg;
- /*NOTREACHED*/
+ abort(); /*NOTREACHED*/
return *(new AudioRange(0,0,0)); /* keep the compiler happy; never called */
}
framecnt_t
TimeSelection::length()
{
+ if (empty()) {
+ return 0;
+ }
+
return end_frame() - start() + 1;
}