projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix generic plugin UI for plugins with only properties
[ardour.git]
/
gtk2_ardour
/
time_selection.cc
diff --git
a/gtk2_ardour/time_selection.cc
b/gtk2_ardour/time_selection.cc
index 419d82dbccfde06c06c0c9788803f3ea573538f3..ba9918d1165bf9ea6476d01b977d5a21fe778972 100644
(file)
--- a/
gtk2_ardour/time_selection.cc
+++ b/
gtk2_ardour/time_selection.cc
@@
-24,7
+24,7
@@
#include "time_selection.h"
#include "time_selection.h"
-#include "i18n.h"
+#include "
pbd/
i18n.h"
using namespace ARDOUR;
using namespace PBD;
using namespace ARDOUR;
using namespace PBD;
@@
-38,7
+38,7
@@
TimeSelection::operator[] (uint32_t which)
}
}
fatal << string_compose (_("programming error: request for non-existent audio range (%1)!"), which) << endmsg;
}
}
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 */
}
return *(new AudioRange(0,0,0)); /* keep the compiler happy; never called */
}
@@
-68,14
+68,14
@@
TimeSelection::consolidate ()
return changed;
}
return changed;
}
-
fram
epos_t
+
sampl
epos_t
TimeSelection::start ()
{
if (empty()) {
return 0;
}
TimeSelection::start ()
{
if (empty()) {
return 0;
}
-
framepos_t first = max_fram
epos;
+
samplepos_t first = max_sampl
epos;
for (std::list<AudioRange>::iterator i = begin(); i != end(); ++i) {
if ((*i).start < first) {
for (std::list<AudioRange>::iterator i = begin(); i != end(); ++i) {
if ((*i).start < first) {
@@
-85,10
+85,10
@@
TimeSelection::start ()
return first;
}
return first;
}
-
fram
epos_t
-TimeSelection::end_
fram
e ()
+
sampl
epos_t
+TimeSelection::end_
sampl
e ()
{
{
-
fram
epos_t last = 0;
+
sampl
epos_t last = 0;
/* XXX make this work like RegionSelection: no linear search needed */
/* XXX make this work like RegionSelection: no linear search needed */
@@
-100,8
+100,12
@@
TimeSelection::end_frame ()
return last;
}
return last;
}
-
fram
ecnt_t
+
sampl
ecnt_t
TimeSelection::length()
{
TimeSelection::length()
{
- return end_frame() - start() + 1;
+ if (empty()) {
+ return 0;
+ }
+
+ return end_sample() - start() + 1;
}
}