summaryrefslogtreecommitdiff
path: root/libs/ardour/region.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-09-17 16:24:22 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-09-17 16:24:22 +0000
commit10bdce85a0e7381d1b5db38e3640600c6fd3ec79 (patch)
tree5e6fd6a2e69e972ada31018cbe6761e5ec5c77a7 /libs/ardour/region.cc
parente84c3fe5552bc5cf2ed23812c41e7e3b19fbdb84 (diff)
megaopus commit: (1) add __STD_(LIMIT|FORMAT)_MACROS to command line flags for cc and c++ builds, remove them from source (2) add new Property::midi_data used by MidiRegion to signal that its (MIDI) contents have changed (3) massive switch from nframes_t to framepos_t/framecnt_t including removal of ARDOUR::max_frames (replaced by ARDOUR::max_frame{pos,cnt} (lots more to do but this set was driven by changes to the Diskstream API to use framepos_t
git-svn-id: svn://localhost/ardour2/branches/3.0@7791 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/region.cc')
-rw-r--r--libs/ardour/region.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc
index 9a54139d09..13576ff11a 100644
--- a/libs/ardour/region.cc
+++ b/libs/ardour/region.cc
@@ -452,7 +452,7 @@ Region::set_length (framecnt_t len, void */*src*/)
length impossible.
*/
- if (max_frames - len < _position) {
+ if (max_framepos - len < _position) {
return;
}
@@ -602,9 +602,9 @@ Region::set_position_internal (framepos_t pos, bool allow_bbt_recompute)
XXX is this the right thing to do?
*/
- if (max_frames - _length < _position) {
+ if (max_framepos - _length < _position) {
_last_length = _length;
- _length = max_frames - _position;
+ _length = max_framepos - _position;
}
if (allow_bbt_recompute) {
@@ -667,8 +667,8 @@ Region::nudge_position (frameoffset_t n, void* /*src*/)
_last_position = _position;
if (n > 0) {
- if (_position > max_frames - n) {
- _position = max_frames;
+ if (_position > max_framepos - n) {
+ _position = max_framepos;
} else {
_position += n;
}
@@ -735,8 +735,8 @@ Region::trim_start (framepos_t new_position, void */*src*/)
if (start_shift > 0) {
- if (_start > max_frames - start_shift) {
- new_start = max_frames;
+ if (_start > max_framepos - start_shift) {
+ new_start = max_framepos;
} else {
new_start = _start + start_shift;
}
@@ -895,8 +895,8 @@ Region::trim_to_internal (framepos_t position, framecnt_t length, void */*src*/)
if (start_shift > 0) {
- if (_start > max_frames - start_shift) {
- new_start = max_frames;
+ if (_start > max_framepos - start_shift) {
+ new_start = max_framepos;
} else {
new_start = _start + start_shift;
}
@@ -1077,7 +1077,7 @@ Region::adjust_to_sync (framepos_t pos) const
pos = 0;
}
} else {
- if (max_frames - pos > offset) {
+ if (max_framepos - pos > offset) {
pos += offset;
}
}