From 6b990410ef9cbac438ff1c0b4f91da1157c6530b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 28 Feb 2009 02:37:49 +0000 Subject: Make machina work sort of a little bit maybe. git-svn-id: http://svn.drobilla.net/lad/trunk/raul@1945 a436a847-0d15-0410-975c-d299462d15a1 --- raul/TimeSlice.hpp | 12 ++++++------ raul/TimeStamp.hpp | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/raul/TimeSlice.hpp b/raul/TimeSlice.hpp index c2f1da3..05ed170 100644 --- a/raul/TimeSlice.hpp +++ b/raul/TimeSlice.hpp @@ -58,23 +58,23 @@ public: , _offset_ticks(TimeUnit(TimeUnit::FRAMES, rate), 0, 0) {} - /** Set the start and length of the slice. * * Note that external offset is not affected by this, don't forget to reset * the offset each cycle! */ - void set_window(TimeStamp start, TimeDuration length) { + void set_slice(TimeStamp start, TimeDuration length) { + assert(start.unit() == ticks_unit()); + assert(length.unit() == ticks_unit()); _start_ticks = start; _length_ticks = length; update_beat_time(); } - void set_slice(TimeStamp start, TimeDuration length) { - assert(start.unit() == length.unit()); - _start_ticks = start; + void set_length(TimeDuration length) { + assert(length.unit() == ticks_unit()); _length_ticks = length; - update_beat_time(); + _length_beats = ticks_to_beats(_length_ticks); } bool contains(TimeStamp time) { diff --git a/raul/TimeStamp.hpp b/raul/TimeStamp.hpp index c108fd6..820a8bf 100644 --- a/raul/TimeStamp.hpp +++ b/raul/TimeStamp.hpp @@ -78,7 +78,6 @@ private: */ class TimeStamp { public: - inline TimeStamp(TimeUnit unit, uint32_t ticks=0, uint32_t subticks=0) : _ticks(ticks) , _subticks(subticks) -- cgit v1.2.1