mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +01:00
megaopus patch #2 for today: remove nframes64_t and sframes_t from source
git-svn-id: svn://localhost/ardour2/branches/3.0@7792 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
10bdce85a0
commit
ede4ecbb00
118 changed files with 1012 additions and 1000 deletions
|
|
@ -1457,7 +1457,7 @@ ARDOUR_UI::transport_goto_wallclock ()
|
||||||
|
|
||||||
time_t now;
|
time_t now;
|
||||||
struct tm tmnow;
|
struct tm tmnow;
|
||||||
nframes64_t frames;
|
framepos_t frames;
|
||||||
|
|
||||||
time (&now);
|
time (&now);
|
||||||
localtime_r (&now, &tmnow);
|
localtime_r (&now, &tmnow);
|
||||||
|
|
|
||||||
|
|
@ -668,7 +668,7 @@ AudioClock::set_bbt (nframes_t when, bool force)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bbt_upper_info_label) {
|
if (bbt_upper_info_label) {
|
||||||
nframes64_t pos;
|
framepos_t pos;
|
||||||
|
|
||||||
if (bbt_reference_time < 0) {
|
if (bbt_reference_time < 0) {
|
||||||
pos = when;
|
pos = when;
|
||||||
|
|
@ -2078,7 +2078,7 @@ AudioClock::set_size_requests ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioClock::set_bbt_reference (nframes64_t pos)
|
AudioClock::set_bbt_reference (framepos_t pos)
|
||||||
{
|
{
|
||||||
bbt_reference_time = pos;
|
bbt_reference_time = pos;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ class AudioClock : public Gtk::HBox, public ARDOUR::SessionHandlePtr
|
||||||
void set_from_playhead ();
|
void set_from_playhead ();
|
||||||
void locate ();
|
void locate ();
|
||||||
void set_mode (Mode);
|
void set_mode (Mode);
|
||||||
void set_bbt_reference (nframes64_t);
|
void set_bbt_reference (framepos_t);
|
||||||
|
|
||||||
void set_widget_name (std::string);
|
void set_widget_name (std::string);
|
||||||
|
|
||||||
|
|
@ -162,7 +162,7 @@ class AudioClock : public Gtk::HBox, public ARDOUR::SessionHandlePtr
|
||||||
Gtk::EventBox clock_base;
|
Gtk::EventBox clock_base;
|
||||||
Gtk::Frame clock_frame;
|
Gtk::Frame clock_frame;
|
||||||
|
|
||||||
nframes64_t bbt_reference_time;
|
framepos_t bbt_reference_time;
|
||||||
nframes_t last_when;
|
nframes_t last_when;
|
||||||
bool last_pdelta;
|
bool last_pdelta;
|
||||||
bool last_sdelta;
|
bool last_sdelta;
|
||||||
|
|
|
||||||
|
|
@ -272,7 +272,7 @@ AudioRegionView::~AudioRegionView ()
|
||||||
delete *i;
|
delete *i;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (list<std::pair<nframes64_t, ArdourCanvas::SimpleLine*> >::iterator i = feature_lines.begin(); i != feature_lines.end(); ++i) {
|
for (list<std::pair<framepos_t, ArdourCanvas::SimpleLine*> >::iterator i = feature_lines.begin(); i != feature_lines.end(); ++i) {
|
||||||
delete ((*i).second);
|
delete ((*i).second);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -411,7 +411,7 @@ AudioRegionView::region_resized (const PropertyChange& what_changed)
|
||||||
|
|
||||||
/* hide transient lines that extend beyond the region end */
|
/* hide transient lines that extend beyond the region end */
|
||||||
|
|
||||||
list<std::pair<nframes64_t, ArdourCanvas::SimpleLine*> >::iterator l;
|
list<std::pair<framepos_t, ArdourCanvas::SimpleLine*> >::iterator l;
|
||||||
|
|
||||||
for (l = feature_lines.begin(); l != feature_lines.end(); ++l) {
|
for (l = feature_lines.begin(); l != feature_lines.end(); ++l) {
|
||||||
if ((*l).first > _region->length()- 1){
|
if ((*l).first > _region->length()- 1){
|
||||||
|
|
@ -447,7 +447,7 @@ AudioRegionView::reset_width_dependent_items (double pixel_width)
|
||||||
|
|
||||||
AnalysisFeatureList analysis_features = _region->transients();
|
AnalysisFeatureList analysis_features = _region->transients();
|
||||||
AnalysisFeatureList::const_iterator i;
|
AnalysisFeatureList::const_iterator i;
|
||||||
list<std::pair<nframes64_t, ArdourCanvas::SimpleLine*> >::iterator l;
|
list<std::pair<framepos_t, ArdourCanvas::SimpleLine*> >::iterator l;
|
||||||
|
|
||||||
for (i = analysis_features.begin(), l = feature_lines.begin(); i != analysis_features.end() && l != feature_lines.end(); ++i, ++l) {
|
for (i = analysis_features.begin(), l = feature_lines.begin(); i != analysis_features.end() && l != feature_lines.end(); ++i, ++l) {
|
||||||
(*l).second->property_x1() = trackview.editor().frame_to_pixel (*i);
|
(*l).second->property_x1() = trackview.editor().frame_to_pixel (*i);
|
||||||
|
|
@ -529,7 +529,7 @@ AudioRegionView::set_height (gdouble height)
|
||||||
reset_fade_shapes ();
|
reset_fade_shapes ();
|
||||||
|
|
||||||
/* Update hights for any active feature lines */
|
/* Update hights for any active feature lines */
|
||||||
list<std::pair<nframes64_t, ArdourCanvas::SimpleLine*> >::iterator l;
|
list<std::pair<framepos_t, ArdourCanvas::SimpleLine*> >::iterator l;
|
||||||
|
|
||||||
for (l = feature_lines.begin(); l != feature_lines.end(); ++l) {
|
for (l = feature_lines.begin(); l != feature_lines.end(); ++l) {
|
||||||
(*l).second->property_y2() = _height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE - 1;
|
(*l).second->property_y2() = _height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE - 1;
|
||||||
|
|
@ -1433,7 +1433,7 @@ AudioRegionView::show_region_editor ()
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioRegionView::show_fade_line (nframes64_t pos)
|
AudioRegionView::show_fade_line (framepos_t pos)
|
||||||
{
|
{
|
||||||
fade_position_line->property_x1() = trackview.editor().frame_to_pixel (pos);
|
fade_position_line->property_x1() = trackview.editor().frame_to_pixel (pos);
|
||||||
fade_position_line->property_x2() = trackview.editor().frame_to_pixel (pos);
|
fade_position_line->property_x2() = trackview.editor().frame_to_pixel (pos);
|
||||||
|
|
@ -1466,7 +1466,7 @@ AudioRegionView::transients_changed ()
|
||||||
}
|
}
|
||||||
|
|
||||||
AnalysisFeatureList::const_iterator i;
|
AnalysisFeatureList::const_iterator i;
|
||||||
list<std::pair<nframes64_t, ArdourCanvas::SimpleLine*> >::iterator l;
|
list<std::pair<framepos_t, ArdourCanvas::SimpleLine*> >::iterator l;
|
||||||
|
|
||||||
for (i = analysis_features.begin(), l = feature_lines.begin(); i != analysis_features.end() && l != feature_lines.end(); ++i, ++l) {
|
for (i = analysis_features.begin(), l = feature_lines.begin(); i != analysis_features.end() && l != feature_lines.end(); ++i, ++l) {
|
||||||
(*l).first = *i;
|
(*l).first = *i;
|
||||||
|
|
@ -1486,14 +1486,14 @@ void
|
||||||
AudioRegionView::update_transient(float /*old_pos*/, float new_pos)
|
AudioRegionView::update_transient(float /*old_pos*/, float new_pos)
|
||||||
{
|
{
|
||||||
/* Find frame at old pos, calulate new frame then update region transients*/
|
/* Find frame at old pos, calulate new frame then update region transients*/
|
||||||
list<std::pair<nframes64_t, ArdourCanvas::SimpleLine*> >::iterator l;
|
list<std::pair<framepos_t, ArdourCanvas::SimpleLine*> >::iterator l;
|
||||||
|
|
||||||
for (l = feature_lines.begin(); l != feature_lines.end(); ++l) {
|
for (l = feature_lines.begin(); l != feature_lines.end(); ++l) {
|
||||||
/* Simple line x1 has been updated in drag so we compare to new_pos */
|
/* Simple line x1 has been updated in drag so we compare to new_pos */
|
||||||
if (rint(new_pos) == rint((*l).second->property_x1())) {
|
if (rint(new_pos) == rint((*l).second->property_x1())) {
|
||||||
|
|
||||||
nframes64_t old_frame = (*l).first;
|
framepos_t old_frame = (*l).first;
|
||||||
nframes64_t new_frame = trackview.editor().pixel_to_frame (new_pos);
|
framepos_t new_frame = trackview.editor().pixel_to_frame (new_pos);
|
||||||
|
|
||||||
_region->update_transient (old_frame, new_frame);
|
_region->update_transient (old_frame, new_frame);
|
||||||
|
|
||||||
|
|
@ -1506,7 +1506,7 @@ void
|
||||||
AudioRegionView::remove_transient(float pos)
|
AudioRegionView::remove_transient(float pos)
|
||||||
{
|
{
|
||||||
/* Find frame at old pos, calulate new frame then update region transients*/
|
/* Find frame at old pos, calulate new frame then update region transients*/
|
||||||
list<std::pair<nframes64_t, ArdourCanvas::SimpleLine*> >::iterator l;
|
list<std::pair<framepos_t, ArdourCanvas::SimpleLine*> >::iterator l;
|
||||||
|
|
||||||
for (l = feature_lines.begin(); l != feature_lines.end(); ++l) {
|
for (l = feature_lines.begin(); l != feature_lines.end(); ++l) {
|
||||||
/* Simple line x1 has been updated in drag so we compare to new_pos */
|
/* Simple line x1 has been updated in drag so we compare to new_pos */
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ class AudioRegionView : public RegionView
|
||||||
void reset_fade_in_shape_width (nframes_t);
|
void reset_fade_in_shape_width (nframes_t);
|
||||||
void reset_fade_out_shape_width (nframes_t);
|
void reset_fade_out_shape_width (nframes_t);
|
||||||
|
|
||||||
void show_fade_line(nframes64_t pos);
|
void show_fade_line(framepos_t pos);
|
||||||
void hide_fade_line();
|
void hide_fade_line();
|
||||||
|
|
||||||
void set_fade_visibility (bool);
|
void set_fade_visibility (bool);
|
||||||
|
|
@ -134,7 +134,7 @@ class AudioRegionView : public RegionView
|
||||||
std::vector<ArdourCanvas::WaveView *> waves;
|
std::vector<ArdourCanvas::WaveView *> waves;
|
||||||
std::vector<ArdourCanvas::WaveView *> tmp_waves; ///< see ::create_waves()
|
std::vector<ArdourCanvas::WaveView *> tmp_waves; ///< see ::create_waves()
|
||||||
|
|
||||||
std::list<std::pair<nframes64_t, ArdourCanvas::SimpleLine*> > feature_lines;
|
std::list<std::pair<framepos_t, ArdourCanvas::SimpleLine*> > feature_lines;
|
||||||
|
|
||||||
ArdourCanvas::Polygon* sync_mark; ///< polgyon for sync position
|
ArdourCanvas::Polygon* sync_mark; ///< polgyon for sync position
|
||||||
ArdourCanvas::SimpleLine* zero_line;
|
ArdourCanvas::SimpleLine* zero_line;
|
||||||
|
|
|
||||||
|
|
@ -55,11 +55,11 @@ using namespace PBD;
|
||||||
using namespace Editing;
|
using namespace Editing;
|
||||||
using namespace Gnome; // for Canvas
|
using namespace Gnome; // for Canvas
|
||||||
|
|
||||||
static const Evoral::IdentityConverter<double, sframes_t> default_converter;
|
static const Evoral::IdentityConverter<double, framepos_t> default_converter;
|
||||||
|
|
||||||
AutomationLine::AutomationLine (const string& name, TimeAxisView& tv, ArdourCanvas::Group& parent,
|
AutomationLine::AutomationLine (const string& name, TimeAxisView& tv, ArdourCanvas::Group& parent,
|
||||||
boost::shared_ptr<AutomationList> al,
|
boost::shared_ptr<AutomationList> al,
|
||||||
const Evoral::TimeConverter<double, sframes_t>* converter)
|
const Evoral::TimeConverter<double, framepos_t>* converter)
|
||||||
: trackview (tv)
|
: trackview (tv)
|
||||||
, _name (name)
|
, _name (name)
|
||||||
, alist (al)
|
, alist (al)
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulDestructible
|
||||||
public:
|
public:
|
||||||
AutomationLine (const std::string& name, TimeAxisView&, ArdourCanvas::Group&,
|
AutomationLine (const std::string& name, TimeAxisView&, ArdourCanvas::Group&,
|
||||||
boost::shared_ptr<ARDOUR::AutomationList>,
|
boost::shared_ptr<ARDOUR::AutomationList>,
|
||||||
const Evoral::TimeConverter<double, ARDOUR::sframes_t>* converter = 0);
|
const Evoral::TimeConverter<double, ARDOUR::framepos_t>* converter = 0);
|
||||||
virtual ~AutomationLine ();
|
virtual ~AutomationLine ();
|
||||||
|
|
||||||
void queue_reset ();
|
void queue_reset ();
|
||||||
|
|
@ -134,7 +134,7 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulDestructible
|
||||||
|
|
||||||
virtual MementoCommandBinder<ARDOUR::AutomationList>* memento_command_binder ();
|
virtual MementoCommandBinder<ARDOUR::AutomationList>* memento_command_binder ();
|
||||||
|
|
||||||
const Evoral::TimeConverter<double, ARDOUR::sframes_t>& time_converter () const {
|
const Evoral::TimeConverter<double, ARDOUR::framepos_t>& time_converter () const {
|
||||||
return _time_converter;
|
return _time_converter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -201,7 +201,7 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulDestructible
|
||||||
double _last_drag_fraction; ///< last y position of the drag, as a fraction
|
double _last_drag_fraction; ///< last y position of the drag, as a fraction
|
||||||
std::list<double> _always_in_view;
|
std::list<double> _always_in_view;
|
||||||
|
|
||||||
const Evoral::TimeConverter<double, ARDOUR::sframes_t>& _time_converter;
|
const Evoral::TimeConverter<double, ARDOUR::framepos_t>& _time_converter;
|
||||||
|
|
||||||
void reset_line_coords (ControlPoint&);
|
void reset_line_coords (ControlPoint&);
|
||||||
void add_visible_control_point (uint32_t, uint32_t, double, double, ARDOUR::AutomationList::iterator, uint32_t);
|
void add_visible_control_point (uint32_t, uint32_t, double, double, ARDOUR::AutomationList::iterator, uint32_t);
|
||||||
|
|
|
||||||
|
|
@ -179,7 +179,7 @@ AutomationRegionView::set_height (double h)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
AutomationRegionView::set_position (nframes64_t pos, void* src, double* ignored)
|
AutomationRegionView::set_position (framepos_t pos, void* src, double* ignored)
|
||||||
{
|
{
|
||||||
if (_line) {
|
if (_line) {
|
||||||
_line->set_maximum_time (_region->length ());
|
_line->set_maximum_time (_region->length ());
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void create_line(boost::shared_ptr<ARDOUR::AutomationList> list);
|
void create_line(boost::shared_ptr<ARDOUR::AutomationList> list);
|
||||||
bool set_position(nframes64_t pos, void* src, double* ignored);
|
bool set_position(framepos_t pos, void* src, double* ignored);
|
||||||
void region_resized (const PBD::PropertyChange&);
|
void region_resized (const PBD::PropertyChange&);
|
||||||
bool canvas_event(GdkEvent* ev);
|
bool canvas_event(GdkEvent* ev);
|
||||||
void add_automation_event (GdkEvent* event, nframes_t when, double y);
|
void add_automation_event (GdkEvent* event, nframes_t when, double y);
|
||||||
|
|
|
||||||
|
|
@ -637,7 +637,7 @@ AutomationTimeAxisView::cut_copy_clear_one (AutomationLine& line, Selection& sel
|
||||||
XMLNode &before = alist->get_state();
|
XMLNode &before = alist->get_state();
|
||||||
|
|
||||||
/* convert time selection to automation list model coordinates */
|
/* convert time selection to automation list model coordinates */
|
||||||
const Evoral::TimeConverter<double, ARDOUR::sframes_t>& tc = line.time_converter ();
|
const Evoral::TimeConverter<double, ARDOUR::framepos_t>& tc = line.time_converter ();
|
||||||
double const start = tc.from (selection.time.front().start - tc.origin_b ());
|
double const start = tc.from (selection.time.front().start - tc.origin_b ());
|
||||||
double const end = tc.from (selection.time.front().end - tc.origin_b ());
|
double const end = tc.from (selection.time.front().end - tc.origin_b ());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -866,10 +866,10 @@ Editor::zoom_adjustment_changed ()
|
||||||
|
|
||||||
if (fpu < 1.0) {
|
if (fpu < 1.0) {
|
||||||
fpu = 1.0;
|
fpu = 1.0;
|
||||||
zoom_range_clock.set ((nframes64_t) floor (fpu * _canvas_width));
|
zoom_range_clock.set ((framepos_t) floor (fpu * _canvas_width));
|
||||||
} else if (fpu > _session->current_end_frame() / _canvas_width) {
|
} else if (fpu > _session->current_end_frame() / _canvas_width) {
|
||||||
fpu = _session->current_end_frame() / _canvas_width;
|
fpu = _session->current_end_frame() / _canvas_width;
|
||||||
zoom_range_clock.set ((nframes64_t) floor (fpu * _canvas_width));
|
zoom_range_clock.set ((framepos_t) floor (fpu * _canvas_width));
|
||||||
}
|
}
|
||||||
|
|
||||||
temporal_zoom (fpu);
|
temporal_zoom (fpu);
|
||||||
|
|
@ -889,7 +889,7 @@ Editor::control_scroll (float fraction)
|
||||||
/*
|
/*
|
||||||
_control_scroll_target is an optional<T>
|
_control_scroll_target is an optional<T>
|
||||||
|
|
||||||
it acts like a pointer to an nframes64_t, with
|
it acts like a pointer to an framepos_t, with
|
||||||
a operator conversion to boolean to check
|
a operator conversion to boolean to check
|
||||||
that it has a value could possibly use
|
that it has a value could possibly use
|
||||||
playhead_cursor->current_frame to store the
|
playhead_cursor->current_frame to store the
|
||||||
|
|
@ -902,12 +902,12 @@ Editor::control_scroll (float fraction)
|
||||||
_dragging_playhead = true;
|
_dragging_playhead = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((fraction < 0.0f) && (*_control_scroll_target < (nframes64_t) fabs(step))) {
|
if ((fraction < 0.0f) && (*_control_scroll_target < (framepos_t) fabs(step))) {
|
||||||
*_control_scroll_target = 0;
|
*_control_scroll_target = 0;
|
||||||
} else if ((fraction > 0.0f) && (max_framepos - *_control_scroll_target < step)) {
|
} else if ((fraction > 0.0f) && (max_framepos - *_control_scroll_target < step)) {
|
||||||
*_control_scroll_target = max_framepos - (current_page_frames()*2); // allow room for slop in where the PH is on the screen
|
*_control_scroll_target = max_framepos - (current_page_frames()*2); // allow room for slop in where the PH is on the screen
|
||||||
} else {
|
} else {
|
||||||
*_control_scroll_target += (nframes64_t) floor (step);
|
*_control_scroll_target += (framepos_t) floor (step);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* move visuals, we'll catch up with it later */
|
/* move visuals, we'll catch up with it later */
|
||||||
|
|
@ -938,7 +938,7 @@ Editor::control_scroll (float fraction)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Editor::deferred_control_scroll (nframes64_t /*target*/)
|
Editor::deferred_control_scroll (framepos_t /*target*/)
|
||||||
{
|
{
|
||||||
_session->request_locate (*_control_scroll_target, _session->transport_rolling());
|
_session->request_locate (*_control_scroll_target, _session->transport_rolling());
|
||||||
// reset for next stream
|
// reset for next stream
|
||||||
|
|
@ -972,7 +972,7 @@ Editor::on_realize ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::map_position_change (nframes64_t frame)
|
Editor::map_position_change (framepos_t frame)
|
||||||
{
|
{
|
||||||
ENSURE_GUI_THREAD (*this, &Editor::map_position_change, frame)
|
ENSURE_GUI_THREAD (*this, &Editor::map_position_change, frame)
|
||||||
|
|
||||||
|
|
@ -988,7 +988,7 @@ Editor::map_position_change (nframes64_t frame)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::center_screen (nframes64_t frame)
|
Editor::center_screen (framepos_t frame)
|
||||||
{
|
{
|
||||||
double page = _canvas_width * frames_per_unit;
|
double page = _canvas_width * frames_per_unit;
|
||||||
|
|
||||||
|
|
@ -1001,12 +1001,12 @@ Editor::center_screen (nframes64_t frame)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::center_screen_internal (nframes64_t frame, float page)
|
Editor::center_screen_internal (framepos_t frame, float page)
|
||||||
{
|
{
|
||||||
page /= 2;
|
page /= 2;
|
||||||
|
|
||||||
if (frame > page) {
|
if (frame > page) {
|
||||||
frame -= (nframes64_t) page;
|
frame -= (framepos_t) page;
|
||||||
} else {
|
} else {
|
||||||
frame = 0;
|
frame = 0;
|
||||||
}
|
}
|
||||||
|
|
@ -1356,10 +1356,10 @@ Editor::popup_fade_context_menu (int button, int32_t time, ArdourCanvas::Item* i
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::popup_track_context_menu (int button, int32_t time, ItemType item_type, bool with_selection, nframes64_t frame)
|
Editor::popup_track_context_menu (int button, int32_t time, ItemType item_type, bool with_selection, framepos_t frame)
|
||||||
{
|
{
|
||||||
using namespace Menu_Helpers;
|
using namespace Menu_Helpers;
|
||||||
Menu* (Editor::*build_menu_function)(nframes64_t);
|
Menu* (Editor::*build_menu_function)(framepos_t);
|
||||||
Menu *menu;
|
Menu *menu;
|
||||||
|
|
||||||
switch (item_type) {
|
switch (item_type) {
|
||||||
|
|
@ -1476,7 +1476,7 @@ Editor::popup_track_context_menu (int button, int32_t time, ItemType item_type,
|
||||||
}
|
}
|
||||||
|
|
||||||
Menu*
|
Menu*
|
||||||
Editor::build_track_context_menu (nframes64_t)
|
Editor::build_track_context_menu (framepos_t)
|
||||||
{
|
{
|
||||||
using namespace Menu_Helpers;
|
using namespace Menu_Helpers;
|
||||||
|
|
||||||
|
|
@ -1488,7 +1488,7 @@ Editor::build_track_context_menu (nframes64_t)
|
||||||
}
|
}
|
||||||
|
|
||||||
Menu*
|
Menu*
|
||||||
Editor::build_track_bus_context_menu (nframes64_t)
|
Editor::build_track_bus_context_menu (framepos_t)
|
||||||
{
|
{
|
||||||
using namespace Menu_Helpers;
|
using namespace Menu_Helpers;
|
||||||
|
|
||||||
|
|
@ -1500,7 +1500,7 @@ Editor::build_track_bus_context_menu (nframes64_t)
|
||||||
}
|
}
|
||||||
|
|
||||||
Menu*
|
Menu*
|
||||||
Editor::build_track_region_context_menu (nframes64_t frame)
|
Editor::build_track_region_context_menu (framepos_t frame)
|
||||||
{
|
{
|
||||||
using namespace Menu_Helpers;
|
using namespace Menu_Helpers;
|
||||||
MenuList& edit_items = track_region_context_menu.items();
|
MenuList& edit_items = track_region_context_menu.items();
|
||||||
|
|
@ -1551,7 +1551,7 @@ Editor::build_track_region_context_menu (nframes64_t frame)
|
||||||
}
|
}
|
||||||
|
|
||||||
Menu*
|
Menu*
|
||||||
Editor::build_track_crossfade_context_menu (nframes64_t frame)
|
Editor::build_track_crossfade_context_menu (framepos_t frame)
|
||||||
{
|
{
|
||||||
using namespace Menu_Helpers;
|
using namespace Menu_Helpers;
|
||||||
MenuList& edit_items = track_crossfade_context_menu.items();
|
MenuList& edit_items = track_crossfade_context_menu.items();
|
||||||
|
|
@ -1641,7 +1641,7 @@ Editor::analyze_range_selection()
|
||||||
}
|
}
|
||||||
|
|
||||||
Menu*
|
Menu*
|
||||||
Editor::build_track_selection_context_menu (nframes64_t)
|
Editor::build_track_selection_context_menu (framepos_t)
|
||||||
{
|
{
|
||||||
using namespace Menu_Helpers;
|
using namespace Menu_Helpers;
|
||||||
MenuList& edit_items = track_selection_context_menu.items();
|
MenuList& edit_items = track_selection_context_menu.items();
|
||||||
|
|
@ -2327,7 +2327,7 @@ Editor::set_edit_point_preference (EditPoint ep, bool force)
|
||||||
Glib::RefPtr<RadioAction>::cast_dynamic(act)->set_active (true);
|
Glib::RefPtr<RadioAction>::cast_dynamic(act)->set_active (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t foo;
|
framepos_t foo;
|
||||||
bool in_track_canvas;
|
bool in_track_canvas;
|
||||||
|
|
||||||
if (!mouse_frame (foo, in_track_canvas)) {
|
if (!mouse_frame (foo, in_track_canvas)) {
|
||||||
|
|
@ -2407,7 +2407,7 @@ Editor::set_state (const XMLNode& node, int /*version*/)
|
||||||
move (x, y);
|
move (x, y);
|
||||||
|
|
||||||
if (_session && (prop = node.property ("playhead"))) {
|
if (_session && (prop = node.property ("playhead"))) {
|
||||||
nframes64_t pos;
|
framepos_t pos;
|
||||||
sscanf (prop->value().c_str(), "%" PRIi64, &pos);
|
sscanf (prop->value().c_str(), "%" PRIi64, &pos);
|
||||||
playhead_cursor->set_position (pos);
|
playhead_cursor->set_position (pos);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -2444,7 +2444,7 @@ Editor::set_state (const XMLNode& node, int /*version*/)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((prop = node.property ("left-frame")) != 0){
|
if ((prop = node.property ("left-frame")) != 0){
|
||||||
nframes64_t pos;
|
framepos_t pos;
|
||||||
if (sscanf (prop->value().c_str(), "%" PRId64, &pos) == 1) {
|
if (sscanf (prop->value().c_str(), "%" PRId64, &pos) == 1) {
|
||||||
reset_x_origin (pos);
|
reset_x_origin (pos);
|
||||||
}
|
}
|
||||||
|
|
@ -2677,7 +2677,7 @@ Editor::trackview_by_y_position (double y)
|
||||||
* @param event Event to get current key modifier information from, or 0.
|
* @param event Event to get current key modifier information from, or 0.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
Editor::snap_to_with_modifier (nframes64_t& start, GdkEvent const * event, int32_t direction, bool for_mark)
|
Editor::snap_to_with_modifier (framepos_t& start, GdkEvent const * event, int32_t direction, bool for_mark)
|
||||||
{
|
{
|
||||||
if (!_session || !event) {
|
if (!_session || !event) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -2695,7 +2695,7 @@ Editor::snap_to_with_modifier (nframes64_t& start, GdkEvent const * event, int32
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::snap_to (nframes64_t& start, int32_t direction, bool for_mark)
|
Editor::snap_to (framepos_t& start, int32_t direction, bool for_mark)
|
||||||
{
|
{
|
||||||
if (!_session || _snap_mode == SnapOff) {
|
if (!_session || _snap_mode == SnapOff) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -2705,17 +2705,17 @@ Editor::snap_to (nframes64_t& start, int32_t direction, bool for_mark)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::timecode_snap_to_internal (nframes64_t& start, int32_t direction, bool /*for_mark*/)
|
Editor::timecode_snap_to_internal (framepos_t& start, int32_t direction, bool /*for_mark*/)
|
||||||
{
|
{
|
||||||
const nframes64_t one_timecode_second = (nframes64_t)(rint(_session->timecode_frames_per_second()) * _session->frames_per_timecode_frame());
|
const framepos_t one_timecode_second = (framepos_t)(rint(_session->timecode_frames_per_second()) * _session->frames_per_timecode_frame());
|
||||||
nframes64_t one_timecode_minute = (nframes64_t)(rint(_session->timecode_frames_per_second()) * _session->frames_per_timecode_frame() * 60);
|
framepos_t one_timecode_minute = (framepos_t)(rint(_session->timecode_frames_per_second()) * _session->frames_per_timecode_frame() * 60);
|
||||||
|
|
||||||
switch (_snap_type) {
|
switch (_snap_type) {
|
||||||
case SnapToTimecodeFrame:
|
case SnapToTimecodeFrame:
|
||||||
if (((direction == 0) && (fmod((double)start, (double)_session->frames_per_timecode_frame()) > (_session->frames_per_timecode_frame() / 2))) || (direction > 0)) {
|
if (((direction == 0) && (fmod((double)start, (double)_session->frames_per_timecode_frame()) > (_session->frames_per_timecode_frame() / 2))) || (direction > 0)) {
|
||||||
start = (nframes64_t) (ceil ((double) start / _session->frames_per_timecode_frame()) * _session->frames_per_timecode_frame());
|
start = (framepos_t) (ceil ((double) start / _session->frames_per_timecode_frame()) * _session->frames_per_timecode_frame());
|
||||||
} else {
|
} else {
|
||||||
start = (nframes64_t) (floor ((double) start / _session->frames_per_timecode_frame()) * _session->frames_per_timecode_frame());
|
start = (framepos_t) (floor ((double) start / _session->frames_per_timecode_frame()) * _session->frames_per_timecode_frame());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -2727,9 +2727,9 @@ Editor::timecode_snap_to_internal (nframes64_t& start, int32_t direction, bool /
|
||||||
start -= _session->timecode_offset ();
|
start -= _session->timecode_offset ();
|
||||||
}
|
}
|
||||||
if (((direction == 0) && (start % one_timecode_second > one_timecode_second / 2)) || direction > 0) {
|
if (((direction == 0) && (start % one_timecode_second > one_timecode_second / 2)) || direction > 0) {
|
||||||
start = (nframes64_t) ceil ((double) start / one_timecode_second) * one_timecode_second;
|
start = (framepos_t) ceil ((double) start / one_timecode_second) * one_timecode_second;
|
||||||
} else {
|
} else {
|
||||||
start = (nframes64_t) floor ((double) start / one_timecode_second) * one_timecode_second;
|
start = (framepos_t) floor ((double) start / one_timecode_second) * one_timecode_second;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_session->timecode_offset_negative())
|
if (_session->timecode_offset_negative())
|
||||||
|
|
@ -2748,9 +2748,9 @@ Editor::timecode_snap_to_internal (nframes64_t& start, int32_t direction, bool /
|
||||||
start -= _session->timecode_offset ();
|
start -= _session->timecode_offset ();
|
||||||
}
|
}
|
||||||
if (((direction == 0) && (start % one_timecode_minute > one_timecode_minute / 2)) || direction > 0) {
|
if (((direction == 0) && (start % one_timecode_minute > one_timecode_minute / 2)) || direction > 0) {
|
||||||
start = (nframes64_t) ceil ((double) start / one_timecode_minute) * one_timecode_minute;
|
start = (framepos_t) ceil ((double) start / one_timecode_minute) * one_timecode_minute;
|
||||||
} else {
|
} else {
|
||||||
start = (nframes64_t) floor ((double) start / one_timecode_minute) * one_timecode_minute;
|
start = (framepos_t) floor ((double) start / one_timecode_minute) * one_timecode_minute;
|
||||||
}
|
}
|
||||||
if (_session->timecode_offset_negative())
|
if (_session->timecode_offset_negative())
|
||||||
{
|
{
|
||||||
|
|
@ -2766,13 +2766,13 @@ Editor::timecode_snap_to_internal (nframes64_t& start, int32_t direction, bool /
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::snap_to_internal (nframes64_t& start, int32_t direction, bool for_mark)
|
Editor::snap_to_internal (framepos_t& start, int32_t direction, bool for_mark)
|
||||||
{
|
{
|
||||||
const nframes64_t one_second = _session->frame_rate();
|
const framepos_t one_second = _session->frame_rate();
|
||||||
const nframes64_t one_minute = _session->frame_rate() * 60;
|
const framepos_t one_minute = _session->frame_rate() * 60;
|
||||||
nframes64_t presnap = start;
|
framepos_t presnap = start;
|
||||||
nframes64_t before;
|
framepos_t before;
|
||||||
nframes64_t after;
|
framepos_t after;
|
||||||
|
|
||||||
switch (_snap_type) {
|
switch (_snap_type) {
|
||||||
case SnapToTimecodeFrame:
|
case SnapToTimecodeFrame:
|
||||||
|
|
@ -2782,25 +2782,25 @@ Editor::snap_to_internal (nframes64_t& start, int32_t direction, bool for_mark)
|
||||||
|
|
||||||
case SnapToCDFrame:
|
case SnapToCDFrame:
|
||||||
if (((direction == 0) && (start % (one_second/75) > (one_second/75) / 2)) || (direction > 0)) {
|
if (((direction == 0) && (start % (one_second/75) > (one_second/75) / 2)) || (direction > 0)) {
|
||||||
start = (nframes64_t) ceil ((double) start / (one_second / 75)) * (one_second / 75);
|
start = (framepos_t) ceil ((double) start / (one_second / 75)) * (one_second / 75);
|
||||||
} else {
|
} else {
|
||||||
start = (nframes64_t) floor ((double) start / (one_second / 75)) * (one_second / 75);
|
start = (framepos_t) floor ((double) start / (one_second / 75)) * (one_second / 75);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SnapToSeconds:
|
case SnapToSeconds:
|
||||||
if (((direction == 0) && (start % one_second > one_second / 2)) || (direction > 0)) {
|
if (((direction == 0) && (start % one_second > one_second / 2)) || (direction > 0)) {
|
||||||
start = (nframes64_t) ceil ((double) start / one_second) * one_second;
|
start = (framepos_t) ceil ((double) start / one_second) * one_second;
|
||||||
} else {
|
} else {
|
||||||
start = (nframes64_t) floor ((double) start / one_second) * one_second;
|
start = (framepos_t) floor ((double) start / one_second) * one_second;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SnapToMinutes:
|
case SnapToMinutes:
|
||||||
if (((direction == 0) && (start % one_minute > one_minute / 2)) || (direction > 0)) {
|
if (((direction == 0) && (start % one_minute > one_minute / 2)) || (direction > 0)) {
|
||||||
start = (nframes64_t) ceil ((double) start / one_minute) * one_minute;
|
start = (framepos_t) ceil ((double) start / one_minute) * one_minute;
|
||||||
} else {
|
} else {
|
||||||
start = (nframes64_t) floor ((double) start / one_minute) * one_minute;
|
start = (framepos_t) floor ((double) start / one_minute) * one_minute;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -2886,8 +2886,8 @@ Editor::snap_to_internal (nframes64_t& start, int32_t direction, bool for_mark)
|
||||||
case SnapToRegionBoundary:
|
case SnapToRegionBoundary:
|
||||||
if (!region_boundary_cache.empty()) {
|
if (!region_boundary_cache.empty()) {
|
||||||
|
|
||||||
vector<nframes64_t>::iterator prev = region_boundary_cache.end ();
|
vector<framepos_t>::iterator prev = region_boundary_cache.end ();
|
||||||
vector<nframes64_t>::iterator next = region_boundary_cache.end ();
|
vector<framepos_t>::iterator next = region_boundary_cache.end ();
|
||||||
|
|
||||||
if (direction > 0) {
|
if (direction > 0) {
|
||||||
next = std::upper_bound (region_boundary_cache.begin(), region_boundary_cache.end(), start);
|
next = std::upper_bound (region_boundary_cache.begin(), region_boundary_cache.end(), start);
|
||||||
|
|
@ -2900,8 +2900,8 @@ Editor::snap_to_internal (nframes64_t& start, int32_t direction, bool for_mark)
|
||||||
prev--;
|
prev--;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t const p = (prev == region_boundary_cache.end()) ? region_boundary_cache.front () : *prev;
|
framepos_t const p = (prev == region_boundary_cache.end()) ? region_boundary_cache.front () : *prev;
|
||||||
nframes64_t const n = (next == region_boundary_cache.end()) ? region_boundary_cache.back () : *next;
|
framepos_t const n = (next == region_boundary_cache.end()) ? region_boundary_cache.back () : *next;
|
||||||
|
|
||||||
if (start > (p + n) / 2) {
|
if (start > (p + n) / 2) {
|
||||||
start = n;
|
start = n;
|
||||||
|
|
@ -4012,7 +4012,7 @@ Editor::playlist_selector () const
|
||||||
}
|
}
|
||||||
|
|
||||||
Evoral::MusicalTime
|
Evoral::MusicalTime
|
||||||
Editor::get_grid_type_as_beats (bool& success, nframes64_t position)
|
Editor::get_grid_type_as_beats (bool& success, framepos_t position)
|
||||||
{
|
{
|
||||||
success = true;
|
success = true;
|
||||||
|
|
||||||
|
|
@ -4091,10 +4091,10 @@ Editor::get_grid_type_as_beats (bool& success, nframes64_t position)
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t
|
framecnt_t
|
||||||
Editor::get_nudge_distance (nframes64_t pos, nframes64_t& next)
|
Editor::get_nudge_distance (framepos_t pos, framecnt_t& next)
|
||||||
{
|
{
|
||||||
nframes64_t ret;
|
framecnt_t ret;
|
||||||
|
|
||||||
ret = nudge_clock.current_duration (pos);
|
ret = nudge_clock.current_duration (pos);
|
||||||
next = ret + 1; /* XXXX fix me */
|
next = ret + 1; /* XXXX fix me */
|
||||||
|
|
@ -4139,7 +4139,7 @@ Editor::playlist_deletion_dialog (boost::shared_ptr<Playlist> pl)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Editor::audio_region_selection_covers (nframes64_t where)
|
Editor::audio_region_selection_covers (framepos_t where)
|
||||||
{
|
{
|
||||||
for (RegionSelection::iterator a = selection->regions.begin(); a != selection->regions.end(); ++a) {
|
for (RegionSelection::iterator a = selection->regions.begin(); a != selection->regions.end(); ++a) {
|
||||||
if ((*a)->region()->covers (where)) {
|
if ((*a)->region()->covers (where)) {
|
||||||
|
|
@ -4370,7 +4370,7 @@ Editor::on_key_release_event (GdkEventKey* ev)
|
||||||
* @param frame New x origin.
|
* @param frame New x origin.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
Editor::reset_x_origin (nframes64_t frame)
|
Editor::reset_x_origin (framepos_t frame)
|
||||||
{
|
{
|
||||||
queue_visual_change (frame);
|
queue_visual_change (frame);
|
||||||
}
|
}
|
||||||
|
|
@ -4388,7 +4388,7 @@ Editor::reset_zoom (double fpu)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::reposition_and_zoom (nframes64_t frame, double fpu)
|
Editor::reposition_and_zoom (framepos_t frame, double fpu)
|
||||||
{
|
{
|
||||||
reset_x_origin (frame);
|
reset_x_origin (frame);
|
||||||
reset_zoom (fpu);
|
reset_zoom (fpu);
|
||||||
|
|
@ -4522,7 +4522,7 @@ Editor::post_zoom ()
|
||||||
{
|
{
|
||||||
// convert fpu to frame count
|
// convert fpu to frame count
|
||||||
|
|
||||||
nframes64_t frames = (nframes64_t) floor (frames_per_unit * _canvas_width);
|
framepos_t frames = (framepos_t) floor (frames_per_unit * _canvas_width);
|
||||||
|
|
||||||
if (frames_per_unit != zoom_range_clock.current_duration()) {
|
if (frames_per_unit != zoom_range_clock.current_duration()) {
|
||||||
zoom_range_clock.set (frames);
|
zoom_range_clock.set (frames);
|
||||||
|
|
@ -4549,7 +4549,7 @@ Editor::post_zoom ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::queue_visual_change (nframes64_t where)
|
Editor::queue_visual_change (framepos_t where)
|
||||||
{
|
{
|
||||||
pending_visual_change.add (VisualChange::TimeOrigin);
|
pending_visual_change.add (VisualChange::TimeOrigin);
|
||||||
pending_visual_change.time_origin = where;
|
pending_visual_change.time_origin = where;
|
||||||
|
|
@ -4641,11 +4641,11 @@ Editor::sort_track_selection (TrackViewList* sel)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t
|
framepos_t
|
||||||
Editor::get_preferred_edit_position (bool ignore_playhead)
|
Editor::get_preferred_edit_position (bool ignore_playhead)
|
||||||
{
|
{
|
||||||
bool ignored;
|
bool ignored;
|
||||||
nframes64_t where = 0;
|
framepos_t where = 0;
|
||||||
EditPoint ep = _edit_point;
|
EditPoint ep = _edit_point;
|
||||||
|
|
||||||
if (entered_marker) {
|
if (entered_marker) {
|
||||||
|
|
@ -4690,7 +4690,7 @@ Editor::get_preferred_edit_position (bool ignore_playhead)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::set_loop_range (nframes64_t start, nframes64_t end, string cmd)
|
Editor::set_loop_range (framepos_t start, framepos_t end, string cmd)
|
||||||
{
|
{
|
||||||
if (!_session) return;
|
if (!_session) return;
|
||||||
|
|
||||||
|
|
@ -4717,7 +4717,7 @@ Editor::set_loop_range (nframes64_t start, nframes64_t end, string cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::set_punch_range (nframes64_t start, nframes64_t end, string cmd)
|
Editor::set_punch_range (framepos_t start, framepos_t end, string cmd)
|
||||||
{
|
{
|
||||||
if (!_session) return;
|
if (!_session) return;
|
||||||
|
|
||||||
|
|
@ -4750,7 +4750,7 @@ Editor::set_punch_range (nframes64_t start, nframes64_t end, string cmd)
|
||||||
* @param ts Tracks to look on; if this is empty, all tracks are examined.
|
* @param ts Tracks to look on; if this is empty, all tracks are examined.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
Editor::get_regions_at (RegionSelection& rs, nframes64_t where, const TrackViewList& ts) const
|
Editor::get_regions_at (RegionSelection& rs, framepos_t where, const TrackViewList& ts) const
|
||||||
{
|
{
|
||||||
const TrackViewList* tracks;
|
const TrackViewList* tracks;
|
||||||
|
|
||||||
|
|
@ -4769,7 +4769,7 @@ Editor::get_regions_at (RegionSelection& rs, nframes64_t where, const TrackViewL
|
||||||
if ((tr = rtv->track()) && ((pl = tr->playlist()))) {
|
if ((tr = rtv->track()) && ((pl = tr->playlist()))) {
|
||||||
|
|
||||||
Playlist::RegionList* regions = pl->regions_at (
|
Playlist::RegionList* regions = pl->regions_at (
|
||||||
(nframes64_t) floor ( (double)where * tr->speed()));
|
(framepos_t) floor ( (double)where * tr->speed()));
|
||||||
|
|
||||||
for (Playlist::RegionList::iterator i = regions->begin(); i != regions->end(); ++i) {
|
for (Playlist::RegionList::iterator i = regions->begin(); i != regions->end(); ++i) {
|
||||||
RegionView* rv = rtv->view()->find_view (*i);
|
RegionView* rv = rtv->view()->find_view (*i);
|
||||||
|
|
@ -4785,7 +4785,7 @@ Editor::get_regions_at (RegionSelection& rs, nframes64_t where, const TrackViewL
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::get_regions_after (RegionSelection& rs, nframes64_t where, const TrackViewList& ts) const
|
Editor::get_regions_after (RegionSelection& rs, framepos_t where, const TrackViewList& ts) const
|
||||||
{
|
{
|
||||||
const TrackViewList* tracks;
|
const TrackViewList* tracks;
|
||||||
|
|
||||||
|
|
@ -4858,7 +4858,7 @@ Editor::get_regions_for_action (RegionSelection& rs, bool allow_entered, bool al
|
||||||
|
|
||||||
if (!tracks.empty()) {
|
if (!tracks.empty()) {
|
||||||
/* now find regions that are at the edit position on those tracks */
|
/* now find regions that are at the edit position on those tracks */
|
||||||
nframes64_t const where = get_preferred_edit_position ();
|
framepos_t const where = get_preferred_edit_position ();
|
||||||
get_regions_at (rs, where, tracks);
|
get_regions_at (rs, where, tracks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -5368,7 +5368,7 @@ Editor::horizontal_scroll_right_release ()
|
||||||
void
|
void
|
||||||
Editor::reset_x_origin_to_follow_playhead ()
|
Editor::reset_x_origin_to_follow_playhead ()
|
||||||
{
|
{
|
||||||
nframes64_t const frame = playhead_cursor->current_frame;
|
framepos_t const frame = playhead_cursor->current_frame;
|
||||||
|
|
||||||
if (frame < leftmost_frame || frame > leftmost_frame + current_page_frames()) {
|
if (frame < leftmost_frame || frame > leftmost_frame + current_page_frames()) {
|
||||||
|
|
||||||
|
|
@ -5384,7 +5384,7 @@ Editor::reset_x_origin_to_follow_playhead ()
|
||||||
|
|
||||||
if (frame < leftmost_frame) {
|
if (frame < leftmost_frame) {
|
||||||
/* moving left */
|
/* moving left */
|
||||||
nframes64_t l = 0;
|
framepos_t l = 0;
|
||||||
if (_session->transport_rolling()) {
|
if (_session->transport_rolling()) {
|
||||||
/* rolling; end up with the playhead at the right of the page */
|
/* rolling; end up with the playhead at the right of the page */
|
||||||
l = frame - current_page_frames ();
|
l = frame - current_page_frames ();
|
||||||
|
|
@ -5438,7 +5438,7 @@ Editor::super_rapid_screen_update ()
|
||||||
|
|
||||||
/* PLAYHEAD AND VIEWPORT */
|
/* PLAYHEAD AND VIEWPORT */
|
||||||
|
|
||||||
nframes64_t const frame = _session->audible_frame();
|
framepos_t const frame = _session->audible_frame();
|
||||||
|
|
||||||
/* There are a few reasons why we might not update the playhead / viewport stuff:
|
/* There are a few reasons why we might not update the playhead / viewport stuff:
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -142,17 +142,17 @@ struct EditorCursor {
|
||||||
Editor& editor;
|
Editor& editor;
|
||||||
ArdourCanvas::Points points;
|
ArdourCanvas::Points points;
|
||||||
ArdourCanvas::Line canvas_item;
|
ArdourCanvas::Line canvas_item;
|
||||||
nframes64_t current_frame;
|
framepos_t current_frame;
|
||||||
double length;
|
double length;
|
||||||
|
|
||||||
EditorCursor (Editor&, bool (Editor::*)(GdkEvent*,ArdourCanvas::Item*));
|
EditorCursor (Editor&, bool (Editor::*)(GdkEvent*,ArdourCanvas::Item*));
|
||||||
~EditorCursor ();
|
~EditorCursor ();
|
||||||
|
|
||||||
void set_position (nframes64_t);
|
void set_position (framepos_t);
|
||||||
void set_length (double units);
|
void set_length (double units);
|
||||||
void set_y_axis (double position);
|
void set_y_axis (double position);
|
||||||
|
|
||||||
PBD::Signal1<void, nframes64_t> PositionChanged;
|
PBD::Signal1<void, framepos_t> PositionChanged;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr
|
class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr
|
||||||
|
|
@ -167,10 +167,10 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
void first_idle ();
|
void first_idle ();
|
||||||
virtual bool have_idled () const { return _have_idled; }
|
virtual bool have_idled () const { return _have_idled; }
|
||||||
|
|
||||||
nframes64_t leftmost_position() const { return leftmost_frame; }
|
framepos_t leftmost_position() const { return leftmost_frame; }
|
||||||
|
|
||||||
nframes64_t current_page_frames() const {
|
framecnt_t current_page_frames() const {
|
||||||
return (nframes64_t) floor (_canvas_width * frames_per_unit);
|
return (framecnt_t) floor (_canvas_width * frames_per_unit);
|
||||||
}
|
}
|
||||||
|
|
||||||
double canvas_height () const {
|
double canvas_height () const {
|
||||||
|
|
@ -236,11 +236,11 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
|
|
||||||
/* undo related */
|
/* undo related */
|
||||||
|
|
||||||
nframes64_t unit_to_frame (double unit) const {
|
framepos_t unit_to_frame (double unit) const {
|
||||||
return (nframes64_t) rint (unit * frames_per_unit);
|
return (framepos_t) rint (unit * frames_per_unit);
|
||||||
}
|
}
|
||||||
|
|
||||||
double frame_to_unit (nframes64_t frame) const {
|
double frame_to_unit (framepos_t frame) const {
|
||||||
return rint ((double) frame / (double) frames_per_unit);
|
return rint ((double) frame / (double) frames_per_unit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -255,7 +255,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
xscroll_adjustment.
|
xscroll_adjustment.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
nframes64_t pixel_to_frame (double pixel) const {
|
framepos_t pixel_to_frame (double pixel) const {
|
||||||
|
|
||||||
/* pixel can be less than zero when motion events
|
/* pixel can be less than zero when motion events
|
||||||
are processed. since we've already run the world->canvas
|
are processed. since we've already run the world->canvas
|
||||||
|
|
@ -264,13 +264,13 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (pixel >= 0) {
|
if (pixel >= 0) {
|
||||||
return (nframes64_t) rint (pixel * frames_per_unit * GNOME_CANVAS(track_canvas->gobj())->pixels_per_unit);
|
return (framepos_t) rint (pixel * frames_per_unit * GNOME_CANVAS(track_canvas->gobj())->pixels_per_unit);
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gulong frame_to_pixel (nframes64_t frame) const {
|
gulong frame_to_pixel (framepos_t frame) const {
|
||||||
return (gulong) rint ((frame / (frames_per_unit * GNOME_CANVAS(track_canvas->gobj())->pixels_per_unit)));
|
return (gulong) rint ((frame / (frames_per_unit * GNOME_CANVAS(track_canvas->gobj())->pixels_per_unit)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -340,8 +340,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
|
|
||||||
/* nudge is initiated by transport controls owned by ARDOUR_UI */
|
/* nudge is initiated by transport controls owned by ARDOUR_UI */
|
||||||
|
|
||||||
nframes64_t get_nudge_distance (nframes64_t pos, nframes64_t& next);
|
framecnt_t get_nudge_distance (framepos_t pos, framecnt_t& next);
|
||||||
Evoral::MusicalTime get_grid_type_as_beats (bool& success, nframes64_t position);
|
Evoral::MusicalTime get_grid_type_as_beats (bool& success, framepos_t position);
|
||||||
|
|
||||||
void nudge_forward (bool next, bool force_playhead);
|
void nudge_forward (bool next, bool force_playhead);
|
||||||
void nudge_backward (bool next, bool force_playhead);
|
void nudge_backward (bool next, bool force_playhead);
|
||||||
|
|
@ -394,13 +394,13 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
void maximise_editing_space();
|
void maximise_editing_space();
|
||||||
void restore_editing_space();
|
void restore_editing_space();
|
||||||
|
|
||||||
void reset_x_origin (nframes64_t);
|
void reset_x_origin (framepos_t);
|
||||||
void reset_x_origin_to_follow_playhead ();
|
void reset_x_origin_to_follow_playhead ();
|
||||||
void reset_y_origin (double);
|
void reset_y_origin (double);
|
||||||
void reset_zoom (double);
|
void reset_zoom (double);
|
||||||
void reposition_and_zoom (nframes64_t, double);
|
void reposition_and_zoom (framepos_t, double);
|
||||||
|
|
||||||
nframes64_t get_preferred_edit_position (bool ignore_playhead = false);
|
framepos_t get_preferred_edit_position (bool ignore_playhead = false);
|
||||||
|
|
||||||
bool update_mouse_speed ();
|
bool update_mouse_speed ();
|
||||||
bool decelerate_mouse_speed ();
|
bool decelerate_mouse_speed ();
|
||||||
|
|
@ -422,23 +422,23 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
|
|
||||||
int get_regionview_count_from_region_list (boost::shared_ptr<ARDOUR::Region>);
|
int get_regionview_count_from_region_list (boost::shared_ptr<ARDOUR::Region>);
|
||||||
|
|
||||||
void do_import (std::vector<std::string> paths, Editing::ImportDisposition, Editing::ImportMode mode, ARDOUR::SrcQuality, nframes64_t&);
|
void do_import (std::vector<std::string> paths, Editing::ImportDisposition, Editing::ImportMode mode, ARDOUR::SrcQuality, framepos_t&);
|
||||||
void do_embed (std::vector<std::string> paths, Editing::ImportDisposition, Editing::ImportMode mode, nframes64_t&);
|
void do_embed (std::vector<std::string> paths, Editing::ImportDisposition, Editing::ImportMode mode, framepos_t&);
|
||||||
|
|
||||||
void get_regions_corresponding_to (boost::shared_ptr<ARDOUR::Region> region, std::vector<RegionView*>& regions);
|
void get_regions_corresponding_to (boost::shared_ptr<ARDOUR::Region> region, std::vector<RegionView*>& regions);
|
||||||
|
|
||||||
void show_verbose_canvas_cursor_with (const std::string& txt);
|
void show_verbose_canvas_cursor_with (const std::string& txt);
|
||||||
void hide_verbose_canvas_cursor();
|
void hide_verbose_canvas_cursor();
|
||||||
|
|
||||||
void center_screen (nframes64_t);
|
void center_screen (framepos_t);
|
||||||
|
|
||||||
TrackViewList axis_views_from_routes (boost::shared_ptr<ARDOUR::RouteList>) const;
|
TrackViewList axis_views_from_routes (boost::shared_ptr<ARDOUR::RouteList>) const;
|
||||||
Gtkmm2ext::TearOff* mouse_mode_tearoff () const { return _mouse_mode_tearoff; }
|
Gtkmm2ext::TearOff* mouse_mode_tearoff () const { return _mouse_mode_tearoff; }
|
||||||
Gtkmm2ext::TearOff* tools_tearoff () const { return _tools_tearoff; }
|
Gtkmm2ext::TearOff* tools_tearoff () const { return _tools_tearoff; }
|
||||||
|
|
||||||
void snap_to (nframes64_t& first, int32_t direction = 0, bool for_mark = false);
|
void snap_to (framepos_t& first, int32_t direction = 0, bool for_mark = false);
|
||||||
void snap_to_with_modifier (nframes64_t& first, GdkEvent const *, int32_t direction = 0, bool for_mark = false);
|
void snap_to_with_modifier (framepos_t& first, GdkEvent const *, int32_t direction = 0, bool for_mark = false);
|
||||||
void snap_to (nframes64_t& first, nframes64_t& last, int32_t direction = 0, bool for_mark = false);
|
void snap_to (framepos_t& first, framepos_t& last, int32_t direction = 0, bool for_mark = false);
|
||||||
|
|
||||||
void begin_reversible_command (std::string cmd_name);
|
void begin_reversible_command (std::string cmd_name);
|
||||||
void commit_reversible_command ();
|
void commit_reversible_command ();
|
||||||
|
|
@ -476,7 +476,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void map_transport_state ();
|
void map_transport_state ();
|
||||||
void map_position_change (nframes64_t);
|
void map_position_change (framepos_t);
|
||||||
|
|
||||||
void on_realize();
|
void on_realize();
|
||||||
|
|
||||||
|
|
@ -487,7 +487,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
bool constructed;
|
bool constructed;
|
||||||
|
|
||||||
// to keep track of the playhead position for control_scroll
|
// to keep track of the playhead position for control_scroll
|
||||||
boost::optional<nframes64_t> _control_scroll_target;
|
boost::optional<framepos_t> _control_scroll_target;
|
||||||
|
|
||||||
PlaylistSelector* _playlist_selector;
|
PlaylistSelector* _playlist_selector;
|
||||||
|
|
||||||
|
|
@ -496,7 +496,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
struct VisualState {
|
struct VisualState {
|
||||||
double y_position;
|
double y_position;
|
||||||
double frames_per_unit;
|
double frames_per_unit;
|
||||||
nframes64_t leftmost_frame;
|
framepos_t leftmost_frame;
|
||||||
Editing::ZoomFocus zoom_focus;
|
Editing::ZoomFocus zoom_focus;
|
||||||
std::list<TAVState> track_states;
|
std::list<TAVState> track_states;
|
||||||
};
|
};
|
||||||
|
|
@ -516,7 +516,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
void cancel_visual_state_op (uint32_t n);
|
void cancel_visual_state_op (uint32_t n);
|
||||||
bool end_visual_state_op (uint32_t n);
|
bool end_visual_state_op (uint32_t n);
|
||||||
|
|
||||||
nframes64_t leftmost_frame;
|
framepos_t leftmost_frame;
|
||||||
double frames_per_unit;
|
double frames_per_unit;
|
||||||
Editing::ZoomFocus zoom_focus;
|
Editing::ZoomFocus zoom_focus;
|
||||||
|
|
||||||
|
|
@ -588,7 +588,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
void hide();
|
void hide();
|
||||||
void show ();
|
void show ();
|
||||||
void set_name (const std::string&);
|
void set_name (const std::string&);
|
||||||
void set_position (nframes64_t start, nframes64_t end = 0);
|
void set_position (framepos_t start, framepos_t end = 0);
|
||||||
void set_color_rgba (uint32_t);
|
void set_color_rgba (uint32_t);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -601,7 +601,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
|
|
||||||
void hide_marker (ArdourCanvas::Item*, GdkEvent*);
|
void hide_marker (ArdourCanvas::Item*, GdkEvent*);
|
||||||
void clear_marker_display ();
|
void clear_marker_display ();
|
||||||
void mouse_add_new_marker (nframes64_t where, bool is_cd=false, bool is_xrun=false);
|
void mouse_add_new_marker (framepos_t where, bool is_cd=false, bool is_xrun=false);
|
||||||
bool choose_new_marker_name(std::string &name);
|
bool choose_new_marker_name(std::string &name);
|
||||||
void update_cd_marker_display ();
|
void update_cd_marker_display ();
|
||||||
void ensure_cd_marker_updated (LocationMarkers * lam, ARDOUR::Location * location);
|
void ensure_cd_marker_updated (LocationMarkers * lam, ARDOUR::Location * location);
|
||||||
|
|
@ -663,12 +663,12 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
Gtk::Menu * track_edit_playlist_submenu;
|
Gtk::Menu * track_edit_playlist_submenu;
|
||||||
Gtk::Menu * track_selection_edit_playlist_submenu;
|
Gtk::Menu * track_selection_edit_playlist_submenu;
|
||||||
|
|
||||||
void popup_track_context_menu (int, int, ItemType, bool, nframes64_t);
|
void popup_track_context_menu (int, int, ItemType, bool, framepos_t);
|
||||||
Gtk::Menu* build_track_context_menu (nframes64_t);
|
Gtk::Menu* build_track_context_menu (framepos_t);
|
||||||
Gtk::Menu* build_track_bus_context_menu (nframes64_t);
|
Gtk::Menu* build_track_bus_context_menu (framepos_t);
|
||||||
Gtk::Menu* build_track_region_context_menu (nframes64_t frame);
|
Gtk::Menu* build_track_region_context_menu (framepos_t frame);
|
||||||
Gtk::Menu* build_track_crossfade_context_menu (nframes64_t);
|
Gtk::Menu* build_track_crossfade_context_menu (framepos_t);
|
||||||
Gtk::Menu* build_track_selection_context_menu (nframes64_t);
|
Gtk::Menu* build_track_selection_context_menu (framepos_t);
|
||||||
void add_dstream_context_items (Gtk::Menu_Helpers::MenuList&);
|
void add_dstream_context_items (Gtk::Menu_Helpers::MenuList&);
|
||||||
void add_bus_context_items (Gtk::Menu_Helpers::MenuList&);
|
void add_bus_context_items (Gtk::Menu_Helpers::MenuList&);
|
||||||
void add_region_context_items (StreamView*, std::list<boost::shared_ptr<ARDOUR::Region> >, Gtk::Menu_Helpers::MenuList&,
|
void add_region_context_items (StreamView*, std::list<boost::shared_ptr<ARDOUR::Region> >, Gtk::Menu_Helpers::MenuList&,
|
||||||
|
|
@ -784,7 +784,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
void compute_fixed_ruler_scale (); //calculates the RulerScale of the fixed rulers
|
void compute_fixed_ruler_scale (); //calculates the RulerScale of the fixed rulers
|
||||||
void update_fixed_rulers ();
|
void update_fixed_rulers ();
|
||||||
void update_tempo_based_rulers ();
|
void update_tempo_based_rulers ();
|
||||||
void popup_ruler_menu (nframes64_t where = 0, ItemType type = RegionItem);
|
void popup_ruler_menu (framepos_t where = 0, ItemType type = RegionItem);
|
||||||
void update_ruler_visibility ();
|
void update_ruler_visibility ();
|
||||||
void set_ruler_visible (RulerType, bool);
|
void set_ruler_visible (RulerType, bool);
|
||||||
void toggle_ruler_visibility (RulerType rt);
|
void toggle_ruler_visibility (RulerType rt);
|
||||||
|
|
@ -845,7 +845,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
gint bbt_nmarks;
|
gint bbt_nmarks;
|
||||||
uint32_t bbt_bar_helper_on;
|
uint32_t bbt_bar_helper_on;
|
||||||
uint32_t bbt_accent_modulo;
|
uint32_t bbt_accent_modulo;
|
||||||
void compute_bbt_ruler_scale (nframes64_t lower, nframes64_t upper);
|
void compute_bbt_ruler_scale (framepos_t lower, framepos_t upper);
|
||||||
|
|
||||||
gint metric_get_timecode (GtkCustomRulerMark **, gdouble, gdouble, gint);
|
gint metric_get_timecode (GtkCustomRulerMark **, gdouble, gdouble, gint);
|
||||||
gint metric_get_bbt (GtkCustomRulerMark **, gdouble, gdouble, gint);
|
gint metric_get_bbt (GtkCustomRulerMark **, gdouble, gdouble, gint);
|
||||||
|
|
@ -895,7 +895,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
EditorCursor* playhead_cursor;
|
EditorCursor* playhead_cursor;
|
||||||
ArdourCanvas::Group* cursor_group;
|
ArdourCanvas::Group* cursor_group;
|
||||||
|
|
||||||
nframes64_t get_region_boundary (nframes64_t pos, int32_t dir, bool with_selection, bool only_onscreen);
|
framepos_t get_region_boundary (framepos_t pos, int32_t dir, bool with_selection, bool only_onscreen);
|
||||||
|
|
||||||
void cursor_to_region_boundary (bool with_selection, int32_t dir);
|
void cursor_to_region_boundary (bool with_selection, int32_t dir);
|
||||||
void cursor_to_next_region_boundary (bool with_selection);
|
void cursor_to_next_region_boundary (bool with_selection);
|
||||||
|
|
@ -963,7 +963,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
|
|
||||||
void control_scroll (float);
|
void control_scroll (float);
|
||||||
void access_action (std::string,std::string);
|
void access_action (std::string,std::string);
|
||||||
bool deferred_control_scroll (nframes64_t);
|
bool deferred_control_scroll (framepos_t);
|
||||||
sigc::connection control_scroll_connection;
|
sigc::connection control_scroll_connection;
|
||||||
|
|
||||||
gdouble get_trackview_group_vertical_offset () const { return vertical_adjustment.get_value () - canvas_timebars_vsize;}
|
gdouble get_trackview_group_vertical_offset () const { return vertical_adjustment.get_value () - canvas_timebars_vsize;}
|
||||||
|
|
@ -984,7 +984,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
};
|
};
|
||||||
|
|
||||||
Type pending;
|
Type pending;
|
||||||
nframes64_t time_origin;
|
framepos_t time_origin;
|
||||||
double frames_per_unit;
|
double frames_per_unit;
|
||||||
double y_origin;
|
double y_origin;
|
||||||
|
|
||||||
|
|
@ -1002,7 +1002,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
static int _idle_visual_changer (void *arg);
|
static int _idle_visual_changer (void *arg);
|
||||||
int idle_visual_changer ();
|
int idle_visual_changer ();
|
||||||
|
|
||||||
void queue_visual_change (nframes64_t);
|
void queue_visual_change (framepos_t);
|
||||||
void queue_visual_change (double);
|
void queue_visual_change (double);
|
||||||
void queue_visual_change_y (double);
|
void queue_visual_change_y (double);
|
||||||
void ensure_visual_change_idle_handler ();
|
void ensure_visual_change_idle_handler ();
|
||||||
|
|
@ -1017,15 +1017,15 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
static void build_cursors ();
|
static void build_cursors ();
|
||||||
|
|
||||||
sigc::connection super_rapid_screen_update_connection;
|
sigc::connection super_rapid_screen_update_connection;
|
||||||
nframes64_t last_update_frame;
|
framepos_t last_update_frame;
|
||||||
void center_screen_internal (nframes64_t, float);
|
void center_screen_internal (framepos_t, float);
|
||||||
|
|
||||||
void super_rapid_screen_update ();
|
void super_rapid_screen_update ();
|
||||||
|
|
||||||
void session_going_away ();
|
void session_going_away ();
|
||||||
|
|
||||||
nframes64_t cut_buffer_start;
|
framepos_t cut_buffer_start;
|
||||||
nframes64_t cut_buffer_length;
|
framecnt_t cut_buffer_length;
|
||||||
|
|
||||||
bool typed_event (ArdourCanvas::Item*, GdkEvent*, ItemType);
|
bool typed_event (ArdourCanvas::Item*, GdkEvent*, ItemType);
|
||||||
bool button_press_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
|
bool button_press_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
|
||||||
|
|
@ -1040,7 +1040,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
|
|
||||||
void register_actions ();
|
void register_actions ();
|
||||||
|
|
||||||
int ensure_cursor (nframes64_t* pos);
|
int ensure_cursor (framepos_t* pos);
|
||||||
|
|
||||||
void cut_copy (Editing::CutCopyOp);
|
void cut_copy (Editing::CutCopyOp);
|
||||||
bool can_cut_copy () const;
|
bool can_cut_copy () const;
|
||||||
|
|
@ -1050,7 +1050,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
void cut_copy_midi (Editing::CutCopyOp);
|
void cut_copy_midi (Editing::CutCopyOp);
|
||||||
|
|
||||||
void mouse_paste ();
|
void mouse_paste ();
|
||||||
void paste_internal (nframes64_t position, float times);
|
void paste_internal (framepos_t position, float times);
|
||||||
|
|
||||||
/* EDITING OPERATIONS */
|
/* EDITING OPERATIONS */
|
||||||
|
|
||||||
|
|
@ -1065,18 +1065,18 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
void change_region_layering_order (ARDOUR::framepos_t);
|
void change_region_layering_order (ARDOUR::framepos_t);
|
||||||
void lower_region ();
|
void lower_region ();
|
||||||
void lower_region_to_bottom ();
|
void lower_region_to_bottom ();
|
||||||
void split_regions_at (nframes64_t, RegionSelection&);
|
void split_regions_at (framepos_t, RegionSelection&);
|
||||||
void split_region_at_transients ();
|
void split_region_at_transients ();
|
||||||
void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret);
|
void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret);
|
||||||
void crop_region_to_selection ();
|
void crop_region_to_selection ();
|
||||||
void crop_region_to (nframes64_t start, nframes64_t end);
|
void crop_region_to (framepos_t start, framepos_t end);
|
||||||
void set_sync_point (nframes64_t, const RegionSelection&);
|
void set_sync_point (framepos_t, const RegionSelection&);
|
||||||
void set_region_sync_from_edit_point ();
|
void set_region_sync_from_edit_point ();
|
||||||
void remove_region_sync();
|
void remove_region_sync();
|
||||||
void align_selection (ARDOUR::RegionPoint, nframes64_t position, const RegionSelection&);
|
void align_selection (ARDOUR::RegionPoint, framepos_t position, const RegionSelection&);
|
||||||
void align_selection_relative (ARDOUR::RegionPoint point, nframes64_t position, const RegionSelection&);
|
void align_selection_relative (ARDOUR::RegionPoint point, framepos_t position, const RegionSelection&);
|
||||||
void align_region (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, nframes64_t position);
|
void align_region (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, framepos_t position);
|
||||||
void align_region_internal (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, nframes64_t position);
|
void align_region_internal (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, framepos_t position);
|
||||||
void remove_selected_regions ();
|
void remove_selected_regions ();
|
||||||
void remove_clicked_region ();
|
void remove_clicked_region ();
|
||||||
void edit_region ();
|
void edit_region ();
|
||||||
|
|
@ -1100,14 +1100,14 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
void fork_region ();
|
void fork_region ();
|
||||||
|
|
||||||
void do_insert_time ();
|
void do_insert_time ();
|
||||||
void insert_time (nframes64_t, nframes64_t, Editing::InsertTimeOption, bool, bool, bool, bool, bool);
|
void insert_time (framepos_t, framecnt_t, Editing::InsertTimeOption, bool, bool, bool, bool, bool);
|
||||||
|
|
||||||
void tab_to_transient (bool forward);
|
void tab_to_transient (bool forward);
|
||||||
|
|
||||||
void use_region_as_bar ();
|
void use_region_as_bar ();
|
||||||
void use_range_as_bar ();
|
void use_range_as_bar ();
|
||||||
|
|
||||||
void define_one_bar (nframes64_t start, nframes64_t end);
|
void define_one_bar (framepos_t start, framepos_t end);
|
||||||
|
|
||||||
void audition_region_from_region_list ();
|
void audition_region_from_region_list ();
|
||||||
void hide_region_from_region_list ();
|
void hide_region_from_region_list ();
|
||||||
|
|
@ -1152,8 +1152,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
void zoom_to_region (bool both_axes);
|
void zoom_to_region (bool both_axes);
|
||||||
void temporal_zoom_session ();
|
void temporal_zoom_session ();
|
||||||
void temporal_zoom (gdouble scale);
|
void temporal_zoom (gdouble scale);
|
||||||
void temporal_zoom_by_frame (nframes64_t start, nframes64_t end, const std::string & op);
|
void temporal_zoom_by_frame (framepos_t start, framepos_t end, const std::string & op);
|
||||||
void temporal_zoom_to_frame (bool coarser, nframes64_t frame);
|
void temporal_zoom_to_frame (bool coarser, framepos_t frame);
|
||||||
|
|
||||||
void amplitude_zoom (gdouble scale);
|
void amplitude_zoom (gdouble scale);
|
||||||
void amplitude_zoom_step (bool in);
|
void amplitude_zoom_step (bool in);
|
||||||
|
|
@ -1174,19 +1174,19 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
|
|
||||||
SoundFileOmega* sfbrowser;
|
SoundFileOmega* sfbrowser;
|
||||||
|
|
||||||
void bring_in_external_audio (Editing::ImportMode mode, nframes64_t& pos);
|
void bring_in_external_audio (Editing::ImportMode mode, framepos_t& pos);
|
||||||
|
|
||||||
bool idle_drop_paths (std::vector<std::string> paths, nframes64_t frame, double ypos);
|
bool idle_drop_paths (std::vector<std::string> paths, framepos_t frame, double ypos);
|
||||||
void drop_paths_part_two (const std::vector<std::string>& paths, nframes64_t frame, double ypos);
|
void drop_paths_part_two (const std::vector<std::string>& paths, framepos_t frame, double ypos);
|
||||||
|
|
||||||
int import_sndfiles (std::vector<std::string> paths, Editing::ImportMode mode, ARDOUR::SrcQuality, nframes64_t& pos,
|
int import_sndfiles (std::vector<std::string> paths, Editing::ImportMode mode, ARDOUR::SrcQuality, framepos_t& pos,
|
||||||
int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::Track>&, bool);
|
int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::Track>&, bool);
|
||||||
int embed_sndfiles (std::vector<std::string> paths, bool multiple_files, bool& check_sample_rate, Editing::ImportMode mode,
|
int embed_sndfiles (std::vector<std::string> paths, bool multiple_files, bool& check_sample_rate, Editing::ImportMode mode,
|
||||||
nframes64_t& pos, int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::Track>&);
|
framepos_t& pos, int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::Track>&);
|
||||||
|
|
||||||
int add_sources (std::vector<std::string> paths, ARDOUR::SourceList& sources, nframes64_t& pos, Editing::ImportMode,
|
int add_sources (std::vector<std::string> paths, ARDOUR::SourceList& sources, framepos_t& pos, Editing::ImportMode,
|
||||||
int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::Track>&, bool add_channel_suffix);
|
int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::Track>&, bool add_channel_suffix);
|
||||||
int finish_bringing_in_material (boost::shared_ptr<ARDOUR::Region> region, uint32_t, uint32_t, nframes64_t& pos, Editing::ImportMode mode,
|
int finish_bringing_in_material (boost::shared_ptr<ARDOUR::Region> region, uint32_t, uint32_t, framepos_t& pos, Editing::ImportMode mode,
|
||||||
boost::shared_ptr<ARDOUR::Track>& existing_track);
|
boost::shared_ptr<ARDOUR::Track>& existing_track);
|
||||||
|
|
||||||
boost::shared_ptr<ARDOUR::AudioTrack> get_nth_selected_audio_track (int nth) const;
|
boost::shared_ptr<ARDOUR::AudioTrack> get_nth_selected_audio_track (int nth) const;
|
||||||
|
|
@ -1200,7 +1200,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
|
|
||||||
struct EditorImportStatus : public ARDOUR::ImportStatus {
|
struct EditorImportStatus : public ARDOUR::ImportStatus {
|
||||||
Editing::ImportMode mode;
|
Editing::ImportMode mode;
|
||||||
nframes64_t pos;
|
framepos_t pos;
|
||||||
int target_tracks;
|
int target_tracks;
|
||||||
int target_regions;
|
int target_regions;
|
||||||
boost::shared_ptr<ARDOUR::Track> track;
|
boost::shared_ptr<ARDOUR::Track> track;
|
||||||
|
|
@ -1257,7 +1257,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
void set_selection_from_loop ();
|
void set_selection_from_loop ();
|
||||||
void set_selection_from_region ();
|
void set_selection_from_region ();
|
||||||
|
|
||||||
void add_location_mark (nframes64_t where);
|
void add_location_mark (framepos_t where);
|
||||||
void add_location_from_audio_region ();
|
void add_location_from_audio_region ();
|
||||||
void add_locations_from_audio_region ();
|
void add_locations_from_audio_region ();
|
||||||
void add_location_from_selection ();
|
void add_location_from_selection ();
|
||||||
|
|
@ -1269,8 +1269,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
void set_loop_from_region (bool play);
|
void set_loop_from_region (bool play);
|
||||||
void set_punch_from_edit_range ();
|
void set_punch_from_edit_range ();
|
||||||
|
|
||||||
void set_loop_range (nframes64_t start, nframes64_t end, std::string cmd);
|
void set_loop_range (framepos_t start, framepos_t end, std::string cmd);
|
||||||
void set_punch_range (nframes64_t start, nframes64_t end, std::string cmd);
|
void set_punch_range (framepos_t start, framepos_t end, std::string cmd);
|
||||||
|
|
||||||
void add_location_from_playhead_cursor ();
|
void add_location_from_playhead_cursor ();
|
||||||
bool select_new_marker;
|
bool select_new_marker;
|
||||||
|
|
@ -1282,12 +1282,12 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
int scrubbing_direction;
|
int scrubbing_direction;
|
||||||
int scrub_reversals;
|
int scrub_reversals;
|
||||||
int scrub_reverse_distance;
|
int scrub_reverse_distance;
|
||||||
void scrub (nframes64_t, double);
|
void scrub (framepos_t, double);
|
||||||
|
|
||||||
void keyboard_selection_begin ();
|
void keyboard_selection_begin ();
|
||||||
void keyboard_selection_finish (bool add);
|
void keyboard_selection_finish (bool add);
|
||||||
bool have_pending_keyboard_selection;
|
bool have_pending_keyboard_selection;
|
||||||
nframes64_t pending_keyboard_selection_start;
|
framepos_t pending_keyboard_selection_start;
|
||||||
|
|
||||||
boost::shared_ptr<ARDOUR::Region> select_region_for_operation (int dir, TimeAxisView **tv);
|
boost::shared_ptr<ARDOUR::Region> select_region_for_operation (int dir, TimeAxisView **tv);
|
||||||
void extend_selection_to_end_of_region (bool next);
|
void extend_selection_to_end_of_region (bool next);
|
||||||
|
|
@ -1337,11 +1337,11 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
void remove_gain_control_point (ArdourCanvas::Item*, GdkEvent*);
|
void remove_gain_control_point (ArdourCanvas::Item*, GdkEvent*);
|
||||||
void remove_control_point (ArdourCanvas::Item*, GdkEvent*);
|
void remove_control_point (ArdourCanvas::Item*, GdkEvent*);
|
||||||
|
|
||||||
void mouse_brush_insert_region (RegionView*, nframes64_t pos);
|
void mouse_brush_insert_region (RegionView*, framepos_t pos);
|
||||||
void brush (nframes64_t);
|
void brush (framepos_t);
|
||||||
|
|
||||||
void show_verbose_time_cursor (nframes64_t frame, double offset = 0, double xpos=-1, double ypos=-1);
|
void show_verbose_time_cursor (framepos_t frame, double offset = 0, double xpos=-1, double ypos=-1);
|
||||||
void show_verbose_duration_cursor (nframes64_t start, nframes64_t end, double offset = 0, double xpos=-1, double ypos=-1);
|
void show_verbose_duration_cursor (framepos_t start, framepos_t end, double offset = 0, double xpos=-1, double ypos=-1);
|
||||||
double clamp_verbose_cursor_x (double);
|
double clamp_verbose_cursor_x (double);
|
||||||
double clamp_verbose_cursor_y (double);
|
double clamp_verbose_cursor_y (double);
|
||||||
|
|
||||||
|
|
@ -1439,8 +1439,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
|
|
||||||
void new_tempo_section ();
|
void new_tempo_section ();
|
||||||
|
|
||||||
void mouse_add_new_tempo_event (nframes64_t where);
|
void mouse_add_new_tempo_event (framepos_t where);
|
||||||
void mouse_add_new_meter_event (nframes64_t where);
|
void mouse_add_new_meter_event (framepos_t where);
|
||||||
|
|
||||||
void remove_tempo_marker (ArdourCanvas::Item*);
|
void remove_tempo_marker (ArdourCanvas::Item*);
|
||||||
void remove_meter_marker (ArdourCanvas::Item*);
|
void remove_meter_marker (ArdourCanvas::Item*);
|
||||||
|
|
@ -1623,7 +1623,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
void region_selection_op (void (ARDOUR::Region::*pmf)(void*), void*);
|
void region_selection_op (void (ARDOUR::Region::*pmf)(void*), void*);
|
||||||
void region_selection_op (void (ARDOUR::Region::*pmf)(bool), bool);
|
void region_selection_op (void (ARDOUR::Region::*pmf)(bool), bool);
|
||||||
|
|
||||||
bool audio_region_selection_covers (nframes64_t where);
|
bool audio_region_selection_covers (framepos_t where);
|
||||||
|
|
||||||
/* transport range select process */
|
/* transport range select process */
|
||||||
|
|
||||||
|
|
@ -1651,14 +1651,14 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
|
|
||||||
/* object rubberband select process */
|
/* object rubberband select process */
|
||||||
|
|
||||||
bool select_all_within (nframes64_t, nframes64_t, double, double, TrackViewList const &, Selection::Operation, bool);
|
bool select_all_within (framepos_t, framepos_t, double, double, TrackViewList const &, Selection::Operation, bool);
|
||||||
|
|
||||||
ArdourCanvas::SimpleRect *rubberband_rect;
|
ArdourCanvas::SimpleRect *rubberband_rect;
|
||||||
|
|
||||||
/* mouse zoom process */
|
/* mouse zoom process */
|
||||||
|
|
||||||
ArdourCanvas::SimpleRect *zoom_rect;
|
ArdourCanvas::SimpleRect *zoom_rect;
|
||||||
void reposition_zoom_rect (nframes64_t start, nframes64_t end);
|
void reposition_zoom_rect (framepos_t start, framepos_t end);
|
||||||
|
|
||||||
EditorRouteGroups* _route_groups;
|
EditorRouteGroups* _route_groups;
|
||||||
EditorRoutes* _routes;
|
EditorRoutes* _routes;
|
||||||
|
|
@ -1685,7 +1685,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
int last_autoscroll_x;
|
int last_autoscroll_x;
|
||||||
int last_autoscroll_y;
|
int last_autoscroll_y;
|
||||||
uint32_t autoscroll_cnt;
|
uint32_t autoscroll_cnt;
|
||||||
nframes64_t autoscroll_x_distance;
|
framecnt_t autoscroll_x_distance;
|
||||||
double autoscroll_y_distance;
|
double autoscroll_y_distance;
|
||||||
|
|
||||||
static gint _autoscroll_canvas (void *);
|
static gint _autoscroll_canvas (void *);
|
||||||
|
|
@ -1694,10 +1694,10 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
void stop_canvas_autoscroll ();
|
void stop_canvas_autoscroll ();
|
||||||
|
|
||||||
/* trimming */
|
/* trimming */
|
||||||
void point_trim (GdkEvent *, nframes64_t);
|
void point_trim (GdkEvent *, framepos_t);
|
||||||
void single_contents_trim (RegionView&, nframes64_t, bool, bool);
|
void single_contents_trim (RegionView&, framepos_t, bool, bool);
|
||||||
void single_start_trim (RegionView&, nframes64_t, bool);
|
void single_start_trim (RegionView&, framepos_t, bool);
|
||||||
void single_end_trim (RegionView&, nframes64_t, bool);
|
void single_end_trim (RegionView&, framepos_t, bool);
|
||||||
|
|
||||||
void thaw_region_after_trim (RegionView& rv);
|
void thaw_region_after_trim (RegionView& rv);
|
||||||
|
|
||||||
|
|
@ -1808,11 +1808,11 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
|
|
||||||
void duplicate_dialog (bool with_dialog);
|
void duplicate_dialog (bool with_dialog);
|
||||||
|
|
||||||
nframes64_t event_frame (GdkEvent const *, double* px = 0, double* py = 0) const;
|
framepos_t event_frame (GdkEvent const *, double* px = 0, double* py = 0) const;
|
||||||
|
|
||||||
/* returns false if mouse pointer is not in track or marker canvas
|
/* returns false if mouse pointer is not in track or marker canvas
|
||||||
*/
|
*/
|
||||||
bool mouse_frame (nframes64_t&, bool& in_track_canvas) const;
|
bool mouse_frame (framepos_t&, bool& in_track_canvas) const;
|
||||||
|
|
||||||
/* "whats mine is yours" */
|
/* "whats mine is yours" */
|
||||||
|
|
||||||
|
|
@ -1975,10 +1975,10 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
|
|
||||||
void selected_marker_moved (ARDOUR::Location*);
|
void selected_marker_moved (ARDOUR::Location*);
|
||||||
|
|
||||||
bool get_edit_op_range (nframes64_t& start, nframes64_t& end) const;
|
bool get_edit_op_range (framepos_t& start, framepos_t& end) const;
|
||||||
|
|
||||||
void get_regions_at (RegionSelection&, nframes64_t where, const TrackViewList& ts) const;
|
void get_regions_at (RegionSelection&, framepos_t where, const TrackViewList& ts) const;
|
||||||
void get_regions_after (RegionSelection&, nframes64_t where, const TrackViewList& ts) const;
|
void get_regions_after (RegionSelection&, framepos_t where, const TrackViewList& ts) const;
|
||||||
|
|
||||||
void get_regions_for_action (RegionSelection&, bool allow_entered = false, bool allow_edit_position = true);
|
void get_regions_for_action (RegionSelection&, bool allow_entered = false, bool allow_edit_position = true);
|
||||||
|
|
||||||
|
|
@ -1989,8 +1989,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
void select_next_route ();
|
void select_next_route ();
|
||||||
void select_prev_route ();
|
void select_prev_route ();
|
||||||
|
|
||||||
void snap_to_internal (nframes64_t& first, int32_t direction = 0, bool for_mark = false);
|
void snap_to_internal (framepos_t& first, int32_t direction = 0, bool for_mark = false);
|
||||||
void timecode_snap_to_internal (nframes64_t& first, int32_t direction = 0, bool for_mark = false);
|
void timecode_snap_to_internal (framepos_t& first, int32_t direction = 0, bool for_mark = false);
|
||||||
|
|
||||||
RhythmFerret* rhythm_ferret;
|
RhythmFerret* rhythm_ferret;
|
||||||
BundleManager* _bundle_manager;
|
BundleManager* _bundle_manager;
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ Editor::external_audio_dialog ()
|
||||||
ImportPosition pos = sfbrowser->get_position ();
|
ImportPosition pos = sfbrowser->get_position ();
|
||||||
ImportMode mode = sfbrowser->get_mode ();
|
ImportMode mode = sfbrowser->get_mode ();
|
||||||
ImportDisposition chns = sfbrowser->get_channel_disposition ();
|
ImportDisposition chns = sfbrowser->get_channel_disposition ();
|
||||||
nframes64_t where;
|
framepos_t where;
|
||||||
|
|
||||||
switch (pos) {
|
switch (pos) {
|
||||||
case ImportAtEditPoint:
|
case ImportAtEditPoint:
|
||||||
|
|
@ -325,7 +325,7 @@ Editor::get_nth_selected_midi_track (int nth) const
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::do_import (vector<string> paths, ImportDisposition chns, ImportMode mode, SrcQuality quality, nframes64_t& pos)
|
Editor::do_import (vector<string> paths, ImportDisposition chns, ImportMode mode, SrcQuality quality, framepos_t& pos)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Track> track;
|
boost::shared_ptr<Track> track;
|
||||||
vector<string> to_import;
|
vector<string> to_import;
|
||||||
|
|
@ -426,7 +426,7 @@ Editor::do_import (vector<string> paths, ImportDisposition chns, ImportMode mode
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::do_embed (vector<string> paths, ImportDisposition chns, ImportMode mode, nframes64_t& pos)
|
Editor::do_embed (vector<string> paths, ImportDisposition chns, ImportMode mode, framepos_t& pos)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Track> track;
|
boost::shared_ptr<Track> track;
|
||||||
bool check_sample_rate = true;
|
bool check_sample_rate = true;
|
||||||
|
|
@ -492,7 +492,7 @@ Editor::do_embed (vector<string> paths, ImportDisposition chns, ImportMode mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Editor::import_sndfiles (vector<string> paths, ImportMode mode, SrcQuality quality, nframes64_t& pos,
|
Editor::import_sndfiles (vector<string> paths, ImportMode mode, SrcQuality quality, framepos_t& pos,
|
||||||
int target_regions, int target_tracks, boost::shared_ptr<Track>& track, bool replace)
|
int target_regions, int target_tracks, boost::shared_ptr<Track>& track, bool replace)
|
||||||
{
|
{
|
||||||
import_status.paths = paths;
|
import_status.paths = paths;
|
||||||
|
|
@ -550,7 +550,7 @@ Editor::import_sndfiles (vector<string> paths, ImportMode mode, SrcQuality quali
|
||||||
|
|
||||||
int
|
int
|
||||||
Editor::embed_sndfiles (vector<string> paths, bool multifile,
|
Editor::embed_sndfiles (vector<string> paths, bool multifile,
|
||||||
bool& check_sample_rate, ImportMode mode, nframes64_t& pos, int target_regions, int target_tracks,
|
bool& check_sample_rate, ImportMode mode, framepos_t& pos, int target_regions, int target_tracks,
|
||||||
boost::shared_ptr<Track>& track)
|
boost::shared_ptr<Track>& track)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<AudioFileSource> source;
|
boost::shared_ptr<AudioFileSource> source;
|
||||||
|
|
@ -717,7 +717,7 @@ Editor::embed_sndfiles (vector<string> paths, bool multifile,
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Editor::add_sources (vector<string> paths, SourceList& sources, nframes64_t& pos, ImportMode mode,
|
Editor::add_sources (vector<string> paths, SourceList& sources, framepos_t& pos, ImportMode mode,
|
||||||
int target_regions, int target_tracks, boost::shared_ptr<Track>& track, bool /*add_channel_suffix*/)
|
int target_regions, int target_tracks, boost::shared_ptr<Track>& track, bool /*add_channel_suffix*/)
|
||||||
{
|
{
|
||||||
vector<boost::shared_ptr<Region> > regions;
|
vector<boost::shared_ptr<Region> > regions;
|
||||||
|
|
@ -865,7 +865,7 @@ Editor::add_sources (vector<string> paths, SourceList& sources, nframes64_t& pos
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Editor::finish_bringing_in_material (boost::shared_ptr<Region> region, uint32_t in_chans, uint32_t out_chans, nframes64_t& pos,
|
Editor::finish_bringing_in_material (boost::shared_ptr<Region> region, uint32_t in_chans, uint32_t out_chans, framepos_t& pos,
|
||||||
ImportMode mode, boost::shared_ptr<Track>& existing_track)
|
ImportMode mode, boost::shared_ptr<Track>& existing_track)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<AudioRegion> ar = boost::dynamic_pointer_cast<AudioRegion>(region);
|
boost::shared_ptr<AudioRegion> ar = boost::dynamic_pointer_cast<AudioRegion>(region);
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ using namespace Glib;
|
||||||
using namespace Gtkmm2ext;
|
using namespace Gtkmm2ext;
|
||||||
using namespace Editing;
|
using namespace Editing;
|
||||||
|
|
||||||
/* XXX this is a hack. it ought to be the maximum value of an nframes64_t */
|
/* XXX this is a hack. it ought to be the maximum value of an framepos_t */
|
||||||
|
|
||||||
const double max_canvas_coordinate = (double) JACK_MAX_FRAMES;
|
const double max_canvas_coordinate = (double) JACK_MAX_FRAMES;
|
||||||
|
|
||||||
|
|
@ -443,14 +443,14 @@ Editor::track_canvas_drag_data_received (const RefPtr<Gdk::DragContext>& context
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Editor::idle_drop_paths (vector<string> paths, nframes64_t frame, double ypos)
|
Editor::idle_drop_paths (vector<string> paths, framepos_t frame, double ypos)
|
||||||
{
|
{
|
||||||
drop_paths_part_two (paths, frame, ypos);
|
drop_paths_part_two (paths, frame, ypos);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::drop_paths_part_two (const vector<string>& paths, nframes64_t frame, double ypos)
|
Editor::drop_paths_part_two (const vector<string>& paths, framepos_t frame, double ypos)
|
||||||
{
|
{
|
||||||
RouteTimeAxisView* tv;
|
RouteTimeAxisView* tv;
|
||||||
|
|
||||||
|
|
@ -492,7 +492,7 @@ Editor::drop_paths (const RefPtr<Gdk::DragContext>& context,
|
||||||
{
|
{
|
||||||
vector<string> paths;
|
vector<string> paths;
|
||||||
GdkEvent ev;
|
GdkEvent ev;
|
||||||
nframes64_t frame;
|
framepos_t frame;
|
||||||
double wx;
|
double wx;
|
||||||
double wy;
|
double wy;
|
||||||
double cy;
|
double cy;
|
||||||
|
|
@ -538,7 +538,7 @@ Editor::drop_regions (const RefPtr<Gdk::DragContext>& /*context*/,
|
||||||
void
|
void
|
||||||
Editor::maybe_autoscroll (bool allow_horiz, bool allow_vert)
|
Editor::maybe_autoscroll (bool allow_horiz, bool allow_vert)
|
||||||
{
|
{
|
||||||
nframes64_t rightmost_frame = leftmost_frame + current_page_frames();
|
framepos_t rightmost_frame = leftmost_frame + current_page_frames();
|
||||||
bool startit = false;
|
bool startit = false;
|
||||||
|
|
||||||
double ty = _drags->current_pointer_y() - get_trackview_group_vertical_offset ();
|
double ty = _drags->current_pointer_y() - get_trackview_group_vertical_offset ();
|
||||||
|
|
@ -715,7 +715,7 @@ Editor::start_canvas_autoscroll (int dx, int dy)
|
||||||
autoscroll_active = true;
|
autoscroll_active = true;
|
||||||
autoscroll_x = dx;
|
autoscroll_x = dx;
|
||||||
autoscroll_y = dy;
|
autoscroll_y = dy;
|
||||||
autoscroll_x_distance = (nframes64_t) floor (current_page_frames()/50.0);
|
autoscroll_x_distance = (framepos_t) floor (current_page_frames()/50.0);
|
||||||
autoscroll_y_distance = fabs (dy * 5); /* pixels */
|
autoscroll_y_distance = fabs (dy * 5); /* pixels */
|
||||||
autoscroll_cnt = 0;
|
autoscroll_cnt = 0;
|
||||||
|
|
||||||
|
|
@ -780,7 +780,7 @@ Editor::set_horizontal_position (double p)
|
||||||
time_line_group->move (x_delta, 0);
|
time_line_group->move (x_delta, 0);
|
||||||
cursor_group->move (x_delta, 0);
|
cursor_group->move (x_delta, 0);
|
||||||
|
|
||||||
leftmost_frame = (nframes64_t) floor (p * frames_per_unit);
|
leftmost_frame = (framepos_t) floor (p * frames_per_unit);
|
||||||
|
|
||||||
update_fixed_rulers ();
|
update_fixed_rulers ();
|
||||||
redisplay_tempo (true);
|
redisplay_tempo (true);
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ using Gtkmm2ext::Keyboard;
|
||||||
bool
|
bool
|
||||||
Editor::track_canvas_scroll (GdkEventScroll* ev)
|
Editor::track_canvas_scroll (GdkEventScroll* ev)
|
||||||
{
|
{
|
||||||
nframes64_t xdelta;
|
framepos_t xdelta;
|
||||||
int direction = ev->direction;
|
int direction = ev->direction;
|
||||||
|
|
||||||
retry:
|
retry:
|
||||||
|
|
@ -1033,7 +1033,7 @@ Editor::track_canvas_drag_motion (Glib::RefPtr<Gdk::DragContext> const & /*c*/,
|
||||||
|
|
||||||
double px;
|
double px;
|
||||||
double py;
|
double py;
|
||||||
nframes64_t const pos = event_frame (&event, &px, &py);
|
framepos_t const pos = event_frame (&event, &px, &py);
|
||||||
|
|
||||||
std::pair<TimeAxisView*, int> const tv = trackview_by_y_position (py);
|
std::pair<TimeAxisView*, int> const tv = trackview_by_y_position (py);
|
||||||
if (tv.first == 0) {
|
if (tv.first == 0) {
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ EditorCursor::~EditorCursor ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EditorCursor::set_position (nframes64_t frame)
|
EditorCursor::set_position (framepos_t frame)
|
||||||
{
|
{
|
||||||
PositionChanged (frame);
|
PositionChanged (frame);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -159,11 +159,11 @@ bool
|
||||||
Editor::write_region (string path, boost::shared_ptr<AudioRegion> region)
|
Editor::write_region (string path, boost::shared_ptr<AudioRegion> region)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<AudioFileSource> fs;
|
boost::shared_ptr<AudioFileSource> fs;
|
||||||
const nframes64_t chunk_size = 4096;
|
const framepos_t chunk_size = 4096;
|
||||||
nframes64_t to_read;
|
framepos_t to_read;
|
||||||
Sample buf[chunk_size];
|
Sample buf[chunk_size];
|
||||||
gain_t gain_buffer[chunk_size];
|
gain_t gain_buffer[chunk_size];
|
||||||
nframes64_t pos;
|
framepos_t pos;
|
||||||
char s[PATH_MAX+1];
|
char s[PATH_MAX+1];
|
||||||
uint32_t cnt;
|
uint32_t cnt;
|
||||||
vector<boost::shared_ptr<AudioFileSource> > sources;
|
vector<boost::shared_ptr<AudioFileSource> > sources;
|
||||||
|
|
@ -231,7 +231,7 @@ Editor::write_region (string path, boost::shared_ptr<AudioRegion> region)
|
||||||
pos = region->position();
|
pos = region->position();
|
||||||
|
|
||||||
while (to_read) {
|
while (to_read) {
|
||||||
nframes64_t this_time;
|
framepos_t this_time;
|
||||||
|
|
||||||
this_time = min (to_read, chunk_size);
|
this_time = min (to_read, chunk_size);
|
||||||
|
|
||||||
|
|
@ -309,11 +309,11 @@ bool
|
||||||
Editor::write_audio_range (AudioPlaylist& playlist, const ChanCount& count, list<AudioRange>& range)
|
Editor::write_audio_range (AudioPlaylist& playlist, const ChanCount& count, list<AudioRange>& range)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<AudioFileSource> fs;
|
boost::shared_ptr<AudioFileSource> fs;
|
||||||
const nframes64_t chunk_size = 4096;
|
const framepos_t chunk_size = 4096;
|
||||||
nframes64_t nframes;
|
framepos_t nframes;
|
||||||
Sample buf[chunk_size];
|
Sample buf[chunk_size];
|
||||||
gain_t gain_buffer[chunk_size];
|
gain_t gain_buffer[chunk_size];
|
||||||
nframes64_t pos;
|
framepos_t pos;
|
||||||
char s[PATH_MAX+1];
|
char s[PATH_MAX+1];
|
||||||
uint32_t cnt;
|
uint32_t cnt;
|
||||||
string path;
|
string path;
|
||||||
|
|
@ -369,7 +369,7 @@ Editor::write_audio_range (AudioPlaylist& playlist, const ChanCount& count, list
|
||||||
pos = (*i).start;
|
pos = (*i).start;
|
||||||
|
|
||||||
while (nframes) {
|
while (nframes) {
|
||||||
nframes64_t this_time;
|
framepos_t this_time;
|
||||||
|
|
||||||
this_time = min (nframes, chunk_size);
|
this_time = min (nframes, chunk_size);
|
||||||
|
|
||||||
|
|
@ -401,7 +401,7 @@ Editor::write_audio_range (AudioPlaylist& playlist, const ChanCount& count, list
|
||||||
|
|
||||||
while (nframes) {
|
while (nframes) {
|
||||||
|
|
||||||
nframes64_t this_time = min (nframes, chunk_size);
|
framepos_t this_time = min (nframes, chunk_size);
|
||||||
memset (buf, 0, sizeof (Sample) * this_time);
|
memset (buf, 0, sizeof (Sample) * this_time);
|
||||||
|
|
||||||
for (uint32_t n=0; n < channels; ++n) {
|
for (uint32_t n=0; n < channels; ++n) {
|
||||||
|
|
|
||||||
|
|
@ -113,10 +113,10 @@ void
|
||||||
Editor::scroll_timeaxis_to_imageframe_item(const TimeAxisViewItem* item)
|
Editor::scroll_timeaxis_to_imageframe_item(const TimeAxisViewItem* item)
|
||||||
{
|
{
|
||||||
// GTK2FIX
|
// GTK2FIX
|
||||||
//nframes64_t offset = static_cast<nframes64_t>(frames_per_unit * (edit_hscroll_slider_width/2)) ;
|
//framepos_t offset = static_cast<framepos_t>(frames_per_unit * (edit_hscroll_slider_width/2)) ;
|
||||||
nframes64_t offset = 0;
|
framepos_t offset = 0;
|
||||||
|
|
||||||
nframes64_t x_pos = 0 ;
|
framepos_t x_pos = 0 ;
|
||||||
|
|
||||||
if (item->get_position() < offset) {
|
if (item->get_position() < offset) {
|
||||||
x_pos = 0 ;
|
x_pos = 0 ;
|
||||||
|
|
@ -489,14 +489,14 @@ Editor::markerview_drag_motion_callback(ArdourCanvas::Item*, GdkEvent* event)
|
||||||
double cx, cy ;
|
double cx, cy ;
|
||||||
|
|
||||||
MarkerView* mv = reinterpret_cast<MarkerView*>(drag_info.data) ;
|
MarkerView* mv = reinterpret_cast<MarkerView*>(drag_info.data) ;
|
||||||
nframes64_t pending_region_position ;
|
framepos_t pending_region_position ;
|
||||||
nframes64_t pointer_frame ;
|
framepos_t pointer_frame ;
|
||||||
|
|
||||||
pointer_frame = event_frame(event, &cx, &cy) ;
|
pointer_frame = event_frame(event, &cx, &cy) ;
|
||||||
|
|
||||||
snap_to(pointer_frame) ;
|
snap_to(pointer_frame) ;
|
||||||
|
|
||||||
if (pointer_frame > (nframes64_t) drag_info.pointer_frame_offset)
|
if (pointer_frame > (framepos_t) drag_info.pointer_frame_offset)
|
||||||
{
|
{
|
||||||
pending_region_position = pointer_frame - drag_info.pointer_frame_offset ;
|
pending_region_position = pointer_frame - drag_info.pointer_frame_offset ;
|
||||||
snap_to(pending_region_position) ;
|
snap_to(pending_region_position) ;
|
||||||
|
|
@ -537,14 +537,14 @@ Editor::imageframe_drag_motion_callback(ArdourCanvas::Item*, GdkEvent* event)
|
||||||
|
|
||||||
ImageFrameView* ifv = reinterpret_cast<ImageFrameView*>(drag_info.data) ;
|
ImageFrameView* ifv = reinterpret_cast<ImageFrameView*>(drag_info.data) ;
|
||||||
|
|
||||||
nframes64_t pending_region_position;
|
framepos_t pending_region_position;
|
||||||
nframes64_t pointer_frame;
|
framepos_t pointer_frame;
|
||||||
|
|
||||||
pointer_frame = event_frame(event, &cx, &cy) ;
|
pointer_frame = event_frame(event, &cx, &cy) ;
|
||||||
|
|
||||||
snap_to(pointer_frame) ;
|
snap_to(pointer_frame) ;
|
||||||
|
|
||||||
if (pointer_frame > (nframes64_t) drag_info.pointer_frame_offset)
|
if (pointer_frame > (framepos_t) drag_info.pointer_frame_offset)
|
||||||
{
|
{
|
||||||
pending_region_position = pointer_frame - drag_info.pointer_frame_offset ;
|
pending_region_position = pointer_frame - drag_info.pointer_frame_offset ;
|
||||||
snap_to(pending_region_position) ;
|
snap_to(pending_region_position) ;
|
||||||
|
|
@ -572,7 +572,7 @@ Editor::imageframe_drag_motion_callback(ArdourCanvas::Item*, GdkEvent* event)
|
||||||
void
|
void
|
||||||
Editor::timeaxis_item_drag_finished_callback(ArdourCanvas::Item*, GdkEvent* event)
|
Editor::timeaxis_item_drag_finished_callback(ArdourCanvas::Item*, GdkEvent* event)
|
||||||
{
|
{
|
||||||
nframes64_t where ;
|
framepos_t where ;
|
||||||
TimeAxisViewItem* tavi = reinterpret_cast<TimeAxisViewItem*>(drag_info.data) ;
|
TimeAxisViewItem* tavi = reinterpret_cast<TimeAxisViewItem*>(drag_info.data) ;
|
||||||
|
|
||||||
bool item_x_movement = (drag_info.last_frame_position != tavi->get_position()) ;
|
bool item_x_movement = (drag_info.last_frame_position != tavi->get_position()) ;
|
||||||
|
|
@ -670,9 +670,9 @@ Editor::imageframe_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
|
||||||
{
|
{
|
||||||
ImageFrameView* ifv = reinterpret_cast<ImageFrameView*> (drag_info.data) ;
|
ImageFrameView* ifv = reinterpret_cast<ImageFrameView*> (drag_info.data) ;
|
||||||
|
|
||||||
nframes64_t start = 0 ;
|
framepos_t start = 0 ;
|
||||||
nframes64_t end = 0 ;
|
framepos_t end = 0 ;
|
||||||
nframes64_t pointer_frame = event_frame(event) ;
|
framepos_t pointer_frame = event_frame(event) ;
|
||||||
|
|
||||||
// chekc th eposition of the item is not locked
|
// chekc th eposition of the item is not locked
|
||||||
if(!ifv->get_position_locked()) {
|
if(!ifv->get_position_locked()) {
|
||||||
|
|
@ -689,7 +689,7 @@ Editor::imageframe_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
|
||||||
}
|
}
|
||||||
|
|
||||||
// are we getting bigger or smaller?
|
// are we getting bigger or smaller?
|
||||||
nframes64_t new_dur_val = end - start ;
|
framepos_t new_dur_val = end - start ;
|
||||||
|
|
||||||
// start handle, so a smaller pointer frame increases our component size
|
// start handle, so a smaller pointer frame increases our component size
|
||||||
if(pointer_frame <= drag_info.grab_frame)
|
if(pointer_frame <= drag_info.grab_frame)
|
||||||
|
|
@ -747,10 +747,10 @@ Editor::imageframe_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* eve
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nframes64_t temp = ifv->get_position() + ifv->get_duration() ;
|
framepos_t temp = ifv->get_position() + ifv->get_duration() ;
|
||||||
|
|
||||||
ifv->set_position((nframes64_t) (temp - drag_info.cumulative_x_drag), this) ;
|
ifv->set_position((framepos_t) (temp - drag_info.cumulative_x_drag), this) ;
|
||||||
ifv->set_duration((nframes64_t) drag_info.cumulative_x_drag, this) ;
|
ifv->set_duration((framepos_t) drag_info.cumulative_x_drag, this) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -759,10 +759,10 @@ Editor::imageframe_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* ev
|
||||||
{
|
{
|
||||||
ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
|
ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
|
||||||
|
|
||||||
nframes64_t start = 0 ;
|
framepos_t start = 0 ;
|
||||||
nframes64_t end = 0 ;
|
framepos_t end = 0 ;
|
||||||
nframes64_t pointer_frame = event_frame(event) ;
|
framepos_t pointer_frame = event_frame(event) ;
|
||||||
nframes64_t new_dur_val = 0 ;
|
framepos_t new_dur_val = 0 ;
|
||||||
|
|
||||||
snap_to(pointer_frame) ;
|
snap_to(pointer_frame) ;
|
||||||
|
|
||||||
|
|
@ -824,7 +824,7 @@ Editor::imageframe_end_handle_end_trim (ArdourCanvas::Item* item, GdkEvent* even
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nframes64_t new_duration = (nframes64_t)drag_info.cumulative_x_drag ;
|
framepos_t new_duration = (framepos_t)drag_info.cumulative_x_drag ;
|
||||||
if((new_duration <= ifv->get_max_duration()) && (new_duration >= ifv->get_min_duration()))
|
if((new_duration <= ifv->get_max_duration()) && (new_duration >= ifv->get_min_duration()))
|
||||||
{
|
{
|
||||||
ifv->set_duration(new_duration, this) ;
|
ifv->set_duration(new_duration, this) ;
|
||||||
|
|
@ -884,9 +884,9 @@ Editor::markerview_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
|
||||||
{
|
{
|
||||||
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
|
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
|
||||||
|
|
||||||
nframes64_t start = 0 ;
|
framepos_t start = 0 ;
|
||||||
nframes64_t end = 0 ;
|
framepos_t end = 0 ;
|
||||||
nframes64_t pointer_frame = event_frame(event) ;
|
framepos_t pointer_frame = event_frame(event) ;
|
||||||
|
|
||||||
// chekc th eposition of the item is not locked
|
// chekc th eposition of the item is not locked
|
||||||
if(!mv->get_position_locked())
|
if(!mv->get_position_locked())
|
||||||
|
|
@ -907,7 +907,7 @@ Editor::markerview_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
|
||||||
}
|
}
|
||||||
|
|
||||||
// are we getting bigger or smaller?
|
// are we getting bigger or smaller?
|
||||||
nframes64_t new_dur_val = end - start ;
|
framepos_t new_dur_val = end - start ;
|
||||||
|
|
||||||
if(pointer_frame <= drag_info.grab_frame)
|
if(pointer_frame <= drag_info.grab_frame)
|
||||||
{
|
{
|
||||||
|
|
@ -964,10 +964,10 @@ Editor::markerview_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* eve
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nframes64_t temp = mv->get_position() + mv->get_duration() ;
|
framepos_t temp = mv->get_position() + mv->get_duration() ;
|
||||||
|
|
||||||
mv->set_position((nframes64_t) (temp - drag_info.cumulative_x_drag), this) ;
|
mv->set_position((framepos_t) (temp - drag_info.cumulative_x_drag), this) ;
|
||||||
mv->set_duration((nframes64_t) drag_info.cumulative_x_drag, this) ;
|
mv->set_duration((framepos_t) drag_info.cumulative_x_drag, this) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -976,10 +976,10 @@ Editor::markerview_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* ev
|
||||||
{
|
{
|
||||||
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
|
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
|
||||||
|
|
||||||
nframes64_t start = 0 ;
|
framepos_t start = 0 ;
|
||||||
nframes64_t end = 0 ;
|
framepos_t end = 0 ;
|
||||||
nframes64_t pointer_frame = event_frame(event) ;
|
framepos_t pointer_frame = event_frame(event) ;
|
||||||
nframes64_t new_dur_val = 0 ;
|
framepos_t new_dur_val = 0 ;
|
||||||
|
|
||||||
snap_to(pointer_frame) ;
|
snap_to(pointer_frame) ;
|
||||||
|
|
||||||
|
|
@ -1004,7 +1004,7 @@ Editor::markerview_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* ev
|
||||||
{
|
{
|
||||||
// we cant extend beyond the item we are marking
|
// we cant extend beyond the item we are marking
|
||||||
ImageFrameView* marked_item = mv->get_marked_item() ;
|
ImageFrameView* marked_item = mv->get_marked_item() ;
|
||||||
nframes64_t marked_end = marked_item->get_position() + marked_item->get_duration() ;
|
framepos_t marked_end = marked_item->get_position() + marked_item->get_duration() ;
|
||||||
|
|
||||||
if(mv->get_max_duration_active() && (new_dur_val > mv->get_max_duration()))
|
if(mv->get_max_duration_active() && (new_dur_val > mv->get_max_duration()))
|
||||||
{
|
{
|
||||||
|
|
@ -1058,7 +1058,7 @@ Editor::markerview_end_handle_end_trim (ArdourCanvas::Item* item, GdkEvent* even
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nframes64_t new_duration = (nframes64_t)drag_info.cumulative_x_drag ;
|
framepos_t new_duration = (framepos_t)drag_info.cumulative_x_drag ;
|
||||||
mv->set_duration(new_duration, this) ;
|
mv->set_duration(new_duration, this) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ Editor::keyboard_selection_finish (bool add)
|
||||||
{
|
{
|
||||||
if (_session && have_pending_keyboard_selection) {
|
if (_session && have_pending_keyboard_selection) {
|
||||||
|
|
||||||
nframes64_t end;
|
framepos_t end;
|
||||||
bool ignored;
|
bool ignored;
|
||||||
|
|
||||||
if (_session->transport_rolling()) {
|
if (_session->transport_rolling()) {
|
||||||
|
|
@ -73,7 +73,7 @@ Editor::keyboard_selection_begin ()
|
||||||
have_pending_keyboard_selection = true;
|
have_pending_keyboard_selection = true;
|
||||||
} else {
|
} else {
|
||||||
bool ignored;
|
bool ignored;
|
||||||
nframes64_t where; // XXX fix me
|
framepos_t where; // XXX fix me
|
||||||
|
|
||||||
if (mouse_frame (where, ignored)) {
|
if (mouse_frame (where, ignored)) {
|
||||||
pending_keyboard_selection_start = where;
|
pending_keyboard_selection_start = where;
|
||||||
|
|
|
||||||
|
|
@ -381,8 +381,8 @@ Editor::LocationMarkers::set_name (const string& str)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::LocationMarkers::set_position (nframes64_t startf,
|
Editor::LocationMarkers::set_position (framepos_t startf,
|
||||||
nframes64_t endf)
|
framepos_t endf)
|
||||||
{
|
{
|
||||||
start->set_position (startf);
|
start->set_position (startf);
|
||||||
if (end) { end->set_position (endf); }
|
if (end) { end->set_position (endf); }
|
||||||
|
|
@ -396,7 +396,7 @@ Editor::LocationMarkers::set_color_rgba (uint32_t rgba)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::mouse_add_new_marker (nframes64_t where, bool is_cd, bool is_xrun)
|
Editor::mouse_add_new_marker (framepos_t where, bool is_cd, bool is_xrun)
|
||||||
{
|
{
|
||||||
string markername, markerprefix;
|
string markername, markerprefix;
|
||||||
int flags = (is_cd ? Location::IsCDMarker|Location::IsMark : Location::IsMark);
|
int flags = (is_cd ? Location::IsCDMarker|Location::IsMark : Location::IsMark);
|
||||||
|
|
@ -866,8 +866,8 @@ Editor::marker_menu_range_to_next ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t start;
|
framepos_t start;
|
||||||
nframes64_t end;
|
framepos_t end;
|
||||||
_session->locations()->marks_either_side (marker->position(), start, end);
|
_session->locations()->marks_either_side (marker->position(), start, end);
|
||||||
|
|
||||||
if (end != max_framepos) {
|
if (end != max_framepos) {
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ using namespace Editing;
|
||||||
using Gtkmm2ext::Keyboard;
|
using Gtkmm2ext::Keyboard;
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Editor::mouse_frame (nframes64_t& where, bool& in_track_canvas) const
|
Editor::mouse_frame (framepos_t& where, bool& in_track_canvas) const
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
double wx, wy;
|
double wx, wy;
|
||||||
|
|
@ -117,7 +117,7 @@ Editor::mouse_frame (nframes64_t& where, bool& in_track_canvas) const
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t
|
framepos_t
|
||||||
Editor::event_frame (GdkEvent const * event, double* pcx, double* pcy) const
|
Editor::event_frame (GdkEvent const * event, double* pcx, double* pcy) const
|
||||||
{
|
{
|
||||||
double cx, cy;
|
double cx, cy;
|
||||||
|
|
@ -1832,7 +1832,7 @@ Editor::left_automation_track ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::scrub (nframes64_t frame, double current_x)
|
Editor::scrub (framepos_t frame, double current_x)
|
||||||
{
|
{
|
||||||
double delta;
|
double delta;
|
||||||
|
|
||||||
|
|
@ -2065,34 +2065,34 @@ Editor::region_view_item_click (AudioRegionView& rv, GdkEventButton* event)
|
||||||
speed = rtv->track()->speed();
|
speed = rtv->track()->speed();
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t where = get_preferred_edit_position();
|
framepos_t where = get_preferred_edit_position();
|
||||||
|
|
||||||
if (where >= 0) {
|
if (where >= 0) {
|
||||||
|
|
||||||
if (Keyboard::modifier_state_equals (event->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::SecondaryModifier))) {
|
if (Keyboard::modifier_state_equals (event->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::SecondaryModifier))) {
|
||||||
|
|
||||||
align_region (rv.region(), SyncPoint, (nframes64_t) (where * speed));
|
align_region (rv.region(), SyncPoint, (framepos_t) (where * speed));
|
||||||
|
|
||||||
} else if (Keyboard::modifier_state_equals (event->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {
|
} else if (Keyboard::modifier_state_equals (event->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {
|
||||||
|
|
||||||
align_region (rv.region(), End, (nframes64_t) (where * speed));
|
align_region (rv.region(), End, (framepos_t) (where * speed));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
align_region (rv.region(), Start, (nframes64_t) (where * speed));
|
align_region (rv.region(), Start, (framepos_t) (where * speed));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::show_verbose_time_cursor (nframes64_t frame, double offset, double xpos, double ypos)
|
Editor::show_verbose_time_cursor (framepos_t frame, double offset, double xpos, double ypos)
|
||||||
{
|
{
|
||||||
char buf[128];
|
char buf[128];
|
||||||
Timecode::Time timecode;
|
Timecode::Time timecode;
|
||||||
BBT_Time bbt;
|
BBT_Time bbt;
|
||||||
int hours, mins;
|
int hours, mins;
|
||||||
nframes64_t frame_rate;
|
framepos_t frame_rate;
|
||||||
float secs;
|
float secs;
|
||||||
|
|
||||||
if (_session == 0) {
|
if (_session == 0) {
|
||||||
|
|
@ -2143,14 +2143,14 @@ Editor::show_verbose_time_cursor (nframes64_t frame, double offset, double xpos,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::show_verbose_duration_cursor (nframes64_t start, nframes64_t end, double offset, double xpos, double ypos)
|
Editor::show_verbose_duration_cursor (framepos_t start, framepos_t end, double offset, double xpos, double ypos)
|
||||||
{
|
{
|
||||||
char buf[128];
|
char buf[128];
|
||||||
Timecode::Time timecode;
|
Timecode::Time timecode;
|
||||||
BBT_Time sbbt;
|
BBT_Time sbbt;
|
||||||
BBT_Time ebbt;
|
BBT_Time ebbt;
|
||||||
int hours, mins;
|
int hours, mins;
|
||||||
nframes64_t distance, frame_rate;
|
framepos_t distance, frame_rate;
|
||||||
float secs;
|
float secs;
|
||||||
Meter meter_at_start(_session->tempo_map().meter_at(start));
|
Meter meter_at_start(_session->tempo_map().meter_at(start));
|
||||||
|
|
||||||
|
|
@ -2251,7 +2251,7 @@ Editor::cancel_selection ()
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::single_contents_trim (RegionView& rv, nframes64_t frame_delta, bool left_direction, bool swap_direction)
|
Editor::single_contents_trim (RegionView& rv, framepos_t frame_delta, bool left_direction, bool swap_direction)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Region> region (rv.region());
|
boost::shared_ptr<Region> region (rv.region());
|
||||||
|
|
||||||
|
|
@ -2259,7 +2259,7 @@ Editor::single_contents_trim (RegionView& rv, nframes64_t frame_delta, bool left
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t new_bound;
|
framepos_t new_bound;
|
||||||
|
|
||||||
double speed = 1.0;
|
double speed = 1.0;
|
||||||
TimeAxisView* tvp = clicked_axisview;
|
TimeAxisView* tvp = clicked_axisview;
|
||||||
|
|
@ -2271,24 +2271,24 @@ Editor::single_contents_trim (RegionView& rv, nframes64_t frame_delta, bool left
|
||||||
|
|
||||||
if (left_direction) {
|
if (left_direction) {
|
||||||
if (swap_direction) {
|
if (swap_direction) {
|
||||||
new_bound = (nframes64_t) (region->position()/speed) + frame_delta;
|
new_bound = (framepos_t) (region->position()/speed) + frame_delta;
|
||||||
} else {
|
} else {
|
||||||
new_bound = (nframes64_t) (region->position()/speed) - frame_delta;
|
new_bound = (framepos_t) (region->position()/speed) - frame_delta;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (swap_direction) {
|
if (swap_direction) {
|
||||||
new_bound = (nframes64_t) (region->position()/speed) - frame_delta;
|
new_bound = (framepos_t) (region->position()/speed) - frame_delta;
|
||||||
} else {
|
} else {
|
||||||
new_bound = (nframes64_t) (region->position()/speed) + frame_delta;
|
new_bound = (framepos_t) (region->position()/speed) + frame_delta;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
region->trim_start ((nframes64_t) (new_bound * speed), this);
|
region->trim_start ((framepos_t) (new_bound * speed), this);
|
||||||
rv.region_changed (PropertyChange (ARDOUR::Properties::start));
|
rv.region_changed (PropertyChange (ARDOUR::Properties::start));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::single_start_trim (RegionView& rv, nframes64_t new_bound, bool no_overlap)
|
Editor::single_start_trim (RegionView& rv, framepos_t new_bound, bool no_overlap)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Region> region (rv.region());
|
boost::shared_ptr<Region> region (rv.region());
|
||||||
|
|
||||||
|
|
@ -2304,9 +2304,9 @@ Editor::single_start_trim (RegionView& rv, nframes64_t new_bound, bool no_overla
|
||||||
speed = tv->track()->speed();
|
speed = tv->track()->speed();
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t pre_trim_first_frame = region->first_frame();
|
framepos_t pre_trim_first_frame = region->first_frame();
|
||||||
|
|
||||||
region->trim_front ((nframes64_t) (new_bound * speed), this);
|
region->trim_front ((framepos_t) (new_bound * speed), this);
|
||||||
|
|
||||||
if (no_overlap) {
|
if (no_overlap) {
|
||||||
//Get the next region on the left of this region and shrink/expand it.
|
//Get the next region on the left of this region and shrink/expand it.
|
||||||
|
|
@ -2331,7 +2331,7 @@ Editor::single_start_trim (RegionView& rv, nframes64_t new_bound, bool no_overla
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::single_end_trim (RegionView& rv, nframes64_t new_bound, bool no_overlap)
|
Editor::single_end_trim (RegionView& rv, framepos_t new_bound, bool no_overlap)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Region> region (rv.region());
|
boost::shared_ptr<Region> region (rv.region());
|
||||||
|
|
||||||
|
|
@ -2347,9 +2347,9 @@ Editor::single_end_trim (RegionView& rv, nframes64_t new_bound, bool no_overlap)
|
||||||
speed = tv->track()->speed();
|
speed = tv->track()->speed();
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t pre_trim_last_frame = region->last_frame();
|
framepos_t pre_trim_last_frame = region->last_frame();
|
||||||
|
|
||||||
region->trim_end ((nframes64_t) (new_bound * speed), this);
|
region->trim_end ((framepos_t) (new_bound * speed), this);
|
||||||
|
|
||||||
if (no_overlap) {
|
if (no_overlap) {
|
||||||
//Get the next region on the right of this region and shrink/expand it.
|
//Get the next region on the right of this region and shrink/expand it.
|
||||||
|
|
@ -2378,7 +2378,7 @@ Editor::single_end_trim (RegionView& rv, nframes64_t new_bound, bool no_overlap)
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::point_trim (GdkEvent* event, nframes64_t new_bound)
|
Editor::point_trim (GdkEvent* event, framepos_t new_bound)
|
||||||
{
|
{
|
||||||
RegionView* rv = clicked_regionview;
|
RegionView* rv = clicked_regionview;
|
||||||
|
|
||||||
|
|
@ -2479,7 +2479,7 @@ Editor::hide_marker (ArdourCanvas::Item* item, GdkEvent* /*event*/)
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::reposition_zoom_rect (nframes64_t start, nframes64_t end)
|
Editor::reposition_zoom_rect (framepos_t start, framepos_t end)
|
||||||
{
|
{
|
||||||
double x1 = frame_to_pixel (start);
|
double x1 = frame_to_pixel (start);
|
||||||
double x2 = frame_to_pixel (end);
|
double x2 = frame_to_pixel (end);
|
||||||
|
|
@ -2518,7 +2518,7 @@ Editor::mouse_rename_region (ArdourCanvas::Item* /*item*/, GdkEvent* /*event*/)
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::mouse_brush_insert_region (RegionView* rv, nframes64_t pos)
|
Editor::mouse_brush_insert_region (RegionView* rv, framepos_t pos)
|
||||||
{
|
{
|
||||||
/* no brushing without a useful snap setting */
|
/* no brushing without a useful snap setting */
|
||||||
|
|
||||||
|
|
@ -2554,7 +2554,7 @@ Editor::mouse_brush_insert_region (RegionView* rv, nframes64_t pos)
|
||||||
|
|
||||||
playlist->clear_changes ();
|
playlist->clear_changes ();
|
||||||
boost::shared_ptr<Region> new_region (RegionFactory::create (rv->region()));
|
boost::shared_ptr<Region> new_region (RegionFactory::create (rv->region()));
|
||||||
playlist->add_region (new_region, (nframes64_t) (pos * speed));
|
playlist->add_region (new_region, (framepos_t) (pos * speed));
|
||||||
_session->add_command (new StatefulDiffCommand (playlist));
|
_session->add_command (new StatefulDiffCommand (playlist));
|
||||||
|
|
||||||
// playlist is frozen, so we have to update manually XXX this is disgusting
|
// playlist is frozen, so we have to update manually XXX this is disgusting
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ Editor::redo (uint32_t n)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::split_regions_at (nframes64_t where, RegionSelection& regions)
|
Editor::split_regions_at (framepos_t where, RegionSelection& regions)
|
||||||
{
|
{
|
||||||
list <boost::shared_ptr<Playlist > > used_playlists;
|
list <boost::shared_ptr<Playlist > > used_playlists;
|
||||||
|
|
||||||
|
|
@ -193,7 +193,7 @@ Editor::select_region_for_operation (int /*dir*/, TimeAxisView **tv)
|
||||||
{
|
{
|
||||||
RegionView* rv;
|
RegionView* rv;
|
||||||
boost::shared_ptr<Region> region;
|
boost::shared_ptr<Region> region;
|
||||||
nframes64_t start = 0;
|
framepos_t start = 0;
|
||||||
|
|
||||||
if (selection->time.start () == selection->time.end_frame ()) {
|
if (selection->time.start () == selection->time.end_frame ()) {
|
||||||
|
|
||||||
|
|
@ -236,7 +236,7 @@ Editor::extend_selection_to_end_of_region (bool next)
|
||||||
{
|
{
|
||||||
TimeAxisView *tv;
|
TimeAxisView *tv;
|
||||||
boost::shared_ptr<Region> region;
|
boost::shared_ptr<Region> region;
|
||||||
nframes64_t start;
|
framepos_t start;
|
||||||
|
|
||||||
if ((region = select_region_for_operation (next ? 1 : 0, &tv)) == 0) {
|
if ((region = select_region_for_operation (next ? 1 : 0, &tv)) == 0) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -258,7 +258,7 @@ Editor::extend_selection_to_start_of_region (bool previous)
|
||||||
{
|
{
|
||||||
TimeAxisView *tv;
|
TimeAxisView *tv;
|
||||||
boost::shared_ptr<Region> region;
|
boost::shared_ptr<Region> region;
|
||||||
nframes64_t end;
|
framepos_t end;
|
||||||
|
|
||||||
if ((region = select_region_for_operation (previous ? -1 : 0, &tv)) == 0) {
|
if ((region = select_region_for_operation (previous ? -1 : 0, &tv)) == 0) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -303,8 +303,8 @@ Editor::nudge_backward_release (GdkEventButton* ev)
|
||||||
void
|
void
|
||||||
Editor::nudge_forward (bool next, bool force_playhead)
|
Editor::nudge_forward (bool next, bool force_playhead)
|
||||||
{
|
{
|
||||||
nframes64_t distance;
|
framepos_t distance;
|
||||||
nframes64_t next_distance;
|
framepos_t next_distance;
|
||||||
RegionSelection rs;
|
RegionSelection rs;
|
||||||
|
|
||||||
get_regions_for_action (rs);
|
get_regions_for_action (rs);
|
||||||
|
|
@ -383,8 +383,8 @@ Editor::nudge_forward (bool next, bool force_playhead)
|
||||||
void
|
void
|
||||||
Editor::nudge_backward (bool next, bool force_playhead)
|
Editor::nudge_backward (bool next, bool force_playhead)
|
||||||
{
|
{
|
||||||
nframes64_t distance;
|
framepos_t distance;
|
||||||
nframes64_t next_distance;
|
framepos_t next_distance;
|
||||||
RegionSelection rs;
|
RegionSelection rs;
|
||||||
|
|
||||||
get_regions_for_action (rs);
|
get_regions_for_action (rs);
|
||||||
|
|
@ -476,7 +476,7 @@ Editor::nudge_backward (bool next, bool force_playhead)
|
||||||
void
|
void
|
||||||
Editor::nudge_forward_capture_offset ()
|
Editor::nudge_forward_capture_offset ()
|
||||||
{
|
{
|
||||||
nframes64_t distance;
|
framepos_t distance;
|
||||||
RegionSelection rs;
|
RegionSelection rs;
|
||||||
|
|
||||||
get_regions_for_action (rs);
|
get_regions_for_action (rs);
|
||||||
|
|
@ -505,7 +505,7 @@ Editor::nudge_forward_capture_offset ()
|
||||||
void
|
void
|
||||||
Editor::nudge_backward_capture_offset ()
|
Editor::nudge_backward_capture_offset ()
|
||||||
{
|
{
|
||||||
nframes64_t distance;
|
framepos_t distance;
|
||||||
RegionSelection rs;
|
RegionSelection rs;
|
||||||
|
|
||||||
get_regions_for_action (rs);
|
get_regions_for_action (rs);
|
||||||
|
|
@ -798,8 +798,8 @@ Editor::get_region_boundary (framepos_t pos, int32_t dir, bool with_selection, b
|
||||||
void
|
void
|
||||||
Editor::cursor_to_region_boundary (bool with_selection, int32_t dir)
|
Editor::cursor_to_region_boundary (bool with_selection, int32_t dir)
|
||||||
{
|
{
|
||||||
nframes64_t pos = playhead_cursor->current_frame;
|
framepos_t pos = playhead_cursor->current_frame;
|
||||||
nframes64_t target;
|
framepos_t target;
|
||||||
|
|
||||||
if (!_session) {
|
if (!_session) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -833,7 +833,7 @@ void
|
||||||
Editor::cursor_to_region_point (EditorCursor* cursor, RegionPoint point, int32_t dir)
|
Editor::cursor_to_region_point (EditorCursor* cursor, RegionPoint point, int32_t dir)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Region> r;
|
boost::shared_ptr<Region> r;
|
||||||
nframes64_t pos = cursor->current_frame;
|
framepos_t pos = cursor->current_frame;
|
||||||
|
|
||||||
if (!_session) {
|
if (!_session) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -912,7 +912,7 @@ Editor::cursor_to_previous_region_point (EditorCursor* cursor, RegionPoint point
|
||||||
void
|
void
|
||||||
Editor::cursor_to_selection_start (EditorCursor *cursor)
|
Editor::cursor_to_selection_start (EditorCursor *cursor)
|
||||||
{
|
{
|
||||||
nframes64_t pos = 0;
|
framepos_t pos = 0;
|
||||||
RegionSelection rs;
|
RegionSelection rs;
|
||||||
|
|
||||||
get_regions_for_action (rs);
|
get_regions_for_action (rs);
|
||||||
|
|
@ -944,7 +944,7 @@ Editor::cursor_to_selection_start (EditorCursor *cursor)
|
||||||
void
|
void
|
||||||
Editor::cursor_to_selection_end (EditorCursor *cursor)
|
Editor::cursor_to_selection_end (EditorCursor *cursor)
|
||||||
{
|
{
|
||||||
nframes64_t pos = 0;
|
framepos_t pos = 0;
|
||||||
RegionSelection rs;
|
RegionSelection rs;
|
||||||
|
|
||||||
get_regions_for_action (rs);
|
get_regions_for_action (rs);
|
||||||
|
|
@ -976,7 +976,7 @@ Editor::cursor_to_selection_end (EditorCursor *cursor)
|
||||||
void
|
void
|
||||||
Editor::selected_marker_to_region_boundary (bool with_selection, int32_t dir)
|
Editor::selected_marker_to_region_boundary (bool with_selection, int32_t dir)
|
||||||
{
|
{
|
||||||
nframes64_t target;
|
framepos_t target;
|
||||||
Location* loc;
|
Location* loc;
|
||||||
bool ignored;
|
bool ignored;
|
||||||
|
|
||||||
|
|
@ -985,7 +985,7 @@ Editor::selected_marker_to_region_boundary (bool with_selection, int32_t dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selection->markers.empty()) {
|
if (selection->markers.empty()) {
|
||||||
nframes64_t mouse;
|
framepos_t mouse;
|
||||||
bool ignored;
|
bool ignored;
|
||||||
|
|
||||||
if (!mouse_frame (mouse, ignored)) {
|
if (!mouse_frame (mouse, ignored)) {
|
||||||
|
|
@ -999,7 +999,7 @@ Editor::selected_marker_to_region_boundary (bool with_selection, int32_t dir)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t pos = loc->start();
|
framepos_t pos = loc->start();
|
||||||
|
|
||||||
// so we don't find the current region again..
|
// so we don't find the current region again..
|
||||||
if (dir > 0 || pos > 0) {
|
if (dir > 0 || pos > 0) {
|
||||||
|
|
@ -1029,7 +1029,7 @@ void
|
||||||
Editor::selected_marker_to_region_point (RegionPoint point, int32_t dir)
|
Editor::selected_marker_to_region_point (RegionPoint point, int32_t dir)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Region> r;
|
boost::shared_ptr<Region> r;
|
||||||
nframes64_t pos;
|
framepos_t pos;
|
||||||
Location* loc;
|
Location* loc;
|
||||||
bool ignored;
|
bool ignored;
|
||||||
|
|
||||||
|
|
@ -1105,7 +1105,7 @@ Editor::selected_marker_to_previous_region_point (RegionPoint point)
|
||||||
void
|
void
|
||||||
Editor::selected_marker_to_selection_start ()
|
Editor::selected_marker_to_selection_start ()
|
||||||
{
|
{
|
||||||
nframes64_t pos = 0;
|
framepos_t pos = 0;
|
||||||
Location* loc;
|
Location* loc;
|
||||||
bool ignored;
|
bool ignored;
|
||||||
|
|
||||||
|
|
@ -1144,7 +1144,7 @@ Editor::selected_marker_to_selection_start ()
|
||||||
void
|
void
|
||||||
Editor::selected_marker_to_selection_end ()
|
Editor::selected_marker_to_selection_end ()
|
||||||
{
|
{
|
||||||
nframes64_t pos = 0;
|
framepos_t pos = 0;
|
||||||
Location* loc;
|
Location* loc;
|
||||||
bool ignored;
|
bool ignored;
|
||||||
|
|
||||||
|
|
@ -1216,8 +1216,8 @@ Editor::scroll_playhead (bool forward)
|
||||||
void
|
void
|
||||||
Editor::playhead_backward ()
|
Editor::playhead_backward ()
|
||||||
{
|
{
|
||||||
nframes64_t pos;
|
framepos_t pos;
|
||||||
nframes64_t cnt;
|
framepos_t cnt;
|
||||||
float prefix;
|
float prefix;
|
||||||
bool was_floating;
|
bool was_floating;
|
||||||
|
|
||||||
|
|
@ -1225,15 +1225,15 @@ Editor::playhead_backward ()
|
||||||
cnt = 1;
|
cnt = 1;
|
||||||
} else {
|
} else {
|
||||||
if (was_floating) {
|
if (was_floating) {
|
||||||
cnt = (nframes64_t) floor (prefix * _session->frame_rate ());
|
cnt = (framepos_t) floor (prefix * _session->frame_rate ());
|
||||||
} else {
|
} else {
|
||||||
cnt = (nframes64_t) prefix;
|
cnt = (framepos_t) prefix;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pos = playhead_cursor->current_frame;
|
pos = playhead_cursor->current_frame;
|
||||||
|
|
||||||
if ((nframes64_t) pos < cnt) {
|
if ((framepos_t) pos < cnt) {
|
||||||
pos = 0;
|
pos = 0;
|
||||||
} else {
|
} else {
|
||||||
pos -= cnt;
|
pos -= cnt;
|
||||||
|
|
@ -1250,8 +1250,8 @@ Editor::playhead_backward ()
|
||||||
void
|
void
|
||||||
Editor::playhead_forward ()
|
Editor::playhead_forward ()
|
||||||
{
|
{
|
||||||
nframes64_t pos;
|
framepos_t pos;
|
||||||
nframes64_t cnt;
|
framepos_t cnt;
|
||||||
bool was_floating;
|
bool was_floating;
|
||||||
float prefix;
|
float prefix;
|
||||||
|
|
||||||
|
|
@ -1259,9 +1259,9 @@ Editor::playhead_forward ()
|
||||||
cnt = 1;
|
cnt = 1;
|
||||||
} else {
|
} else {
|
||||||
if (was_floating) {
|
if (was_floating) {
|
||||||
cnt = (nframes64_t) floor (prefix * _session->frame_rate ());
|
cnt = (framepos_t) floor (prefix * _session->frame_rate ());
|
||||||
} else {
|
} else {
|
||||||
cnt = (nframes64_t) floor (prefix);
|
cnt = (framepos_t) floor (prefix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1311,8 +1311,8 @@ Editor::cursor_align (bool playhead_to_edit)
|
||||||
void
|
void
|
||||||
Editor::edit_cursor_backward ()
|
Editor::edit_cursor_backward ()
|
||||||
{
|
{
|
||||||
nframes64_t pos;
|
framepos_t pos;
|
||||||
nframes64_t cnt;
|
framepos_t cnt;
|
||||||
float prefix;
|
float prefix;
|
||||||
bool was_floating;
|
bool was_floating;
|
||||||
|
|
||||||
|
|
@ -1320,9 +1320,9 @@ Editor::edit_cursor_backward ()
|
||||||
cnt = 1;
|
cnt = 1;
|
||||||
} else {
|
} else {
|
||||||
if (was_floating) {
|
if (was_floating) {
|
||||||
cnt = (nframes64_t) floor (prefix * _session->frame_rate ());
|
cnt = (framepos_t) floor (prefix * _session->frame_rate ());
|
||||||
} else {
|
} else {
|
||||||
cnt = (nframes64_t) prefix;
|
cnt = (framepos_t) prefix;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1342,8 +1342,8 @@ Editor::edit_cursor_backward ()
|
||||||
void
|
void
|
||||||
Editor::edit_cursor_forward ()
|
Editor::edit_cursor_forward ()
|
||||||
{
|
{
|
||||||
//nframes64_t pos;
|
//framepos_t pos;
|
||||||
nframes64_t cnt;
|
framepos_t cnt;
|
||||||
bool was_floating;
|
bool was_floating;
|
||||||
float prefix;
|
float prefix;
|
||||||
|
|
||||||
|
|
@ -1351,9 +1351,9 @@ Editor::edit_cursor_forward ()
|
||||||
cnt = 1;
|
cnt = 1;
|
||||||
} else {
|
} else {
|
||||||
if (was_floating) {
|
if (was_floating) {
|
||||||
cnt = (nframes64_t) floor (prefix * _session->frame_rate ());
|
cnt = (framepos_t) floor (prefix * _session->frame_rate ());
|
||||||
} else {
|
} else {
|
||||||
cnt = (nframes64_t) floor (prefix);
|
cnt = (framepos_t) floor (prefix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1366,16 +1366,16 @@ Editor::goto_frame ()
|
||||||
{
|
{
|
||||||
float prefix;
|
float prefix;
|
||||||
bool was_floating;
|
bool was_floating;
|
||||||
nframes64_t frame;
|
framepos_t frame;
|
||||||
|
|
||||||
if (get_prefix (prefix, was_floating)) {
|
if (get_prefix (prefix, was_floating)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (was_floating) {
|
if (was_floating) {
|
||||||
frame = (nframes64_t) floor (prefix * _session->frame_rate());
|
frame = (framepos_t) floor (prefix * _session->frame_rate());
|
||||||
} else {
|
} else {
|
||||||
frame = (nframes64_t) floor (prefix);
|
frame = (framepos_t) floor (prefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
_session->request_locate (frame);
|
_session->request_locate (frame);
|
||||||
|
|
@ -1384,19 +1384,19 @@ Editor::goto_frame ()
|
||||||
void
|
void
|
||||||
Editor::scroll_backward (float pages)
|
Editor::scroll_backward (float pages)
|
||||||
{
|
{
|
||||||
nframes64_t frame;
|
framepos_t frame;
|
||||||
nframes64_t one_page = (nframes64_t) rint (_canvas_width * frames_per_unit);
|
framepos_t one_page = (framepos_t) rint (_canvas_width * frames_per_unit);
|
||||||
bool was_floating;
|
bool was_floating;
|
||||||
float prefix;
|
float prefix;
|
||||||
nframes64_t cnt;
|
framepos_t cnt;
|
||||||
|
|
||||||
if (get_prefix (prefix, was_floating)) {
|
if (get_prefix (prefix, was_floating)) {
|
||||||
cnt = (nframes64_t) floor (pages * one_page);
|
cnt = (framepos_t) floor (pages * one_page);
|
||||||
} else {
|
} else {
|
||||||
if (was_floating) {
|
if (was_floating) {
|
||||||
cnt = (nframes64_t) floor (prefix * _session->frame_rate());
|
cnt = (framepos_t) floor (prefix * _session->frame_rate());
|
||||||
} else {
|
} else {
|
||||||
cnt = (nframes64_t) floor (prefix * one_page);
|
cnt = (framepos_t) floor (prefix * one_page);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1412,19 +1412,19 @@ Editor::scroll_backward (float pages)
|
||||||
void
|
void
|
||||||
Editor::scroll_forward (float pages)
|
Editor::scroll_forward (float pages)
|
||||||
{
|
{
|
||||||
nframes64_t frame;
|
framepos_t frame;
|
||||||
nframes64_t one_page = (nframes64_t) rint (_canvas_width * frames_per_unit);
|
framepos_t one_page = (framepos_t) rint (_canvas_width * frames_per_unit);
|
||||||
bool was_floating;
|
bool was_floating;
|
||||||
float prefix;
|
float prefix;
|
||||||
nframes64_t cnt;
|
framepos_t cnt;
|
||||||
|
|
||||||
if (get_prefix (prefix, was_floating)) {
|
if (get_prefix (prefix, was_floating)) {
|
||||||
cnt = (nframes64_t) floor (pages * one_page);
|
cnt = (framepos_t) floor (pages * one_page);
|
||||||
} else {
|
} else {
|
||||||
if (was_floating) {
|
if (was_floating) {
|
||||||
cnt = (nframes64_t) floor (prefix * _session->frame_rate());
|
cnt = (framepos_t) floor (prefix * _session->frame_rate());
|
||||||
} else {
|
} else {
|
||||||
cnt = (nframes64_t) floor (prefix * one_page);
|
cnt = (framepos_t) floor (prefix * one_page);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1532,14 +1532,14 @@ Editor::temporal_zoom (gdouble fpu)
|
||||||
{
|
{
|
||||||
if (!_session) return;
|
if (!_session) return;
|
||||||
|
|
||||||
nframes64_t current_page = current_page_frames();
|
framepos_t current_page = current_page_frames();
|
||||||
nframes64_t current_leftmost = leftmost_frame;
|
framepos_t current_leftmost = leftmost_frame;
|
||||||
nframes64_t current_rightmost;
|
framepos_t current_rightmost;
|
||||||
nframes64_t current_center;
|
framepos_t current_center;
|
||||||
nframes64_t new_page_size;
|
framepos_t new_page_size;
|
||||||
nframes64_t half_page_size;
|
framepos_t half_page_size;
|
||||||
nframes64_t leftmost_after_zoom = 0;
|
framepos_t leftmost_after_zoom = 0;
|
||||||
nframes64_t where;
|
framepos_t where;
|
||||||
bool in_track_canvas;
|
bool in_track_canvas;
|
||||||
double nfpu;
|
double nfpu;
|
||||||
double l;
|
double l;
|
||||||
|
|
@ -1552,7 +1552,7 @@ Editor::temporal_zoom (gdouble fpu)
|
||||||
|
|
||||||
nfpu = fpu;
|
nfpu = fpu;
|
||||||
|
|
||||||
new_page_size = (nframes64_t) floor (_canvas_width * nfpu);
|
new_page_size = (framepos_t) floor (_canvas_width * nfpu);
|
||||||
half_page_size = new_page_size / 2;
|
half_page_size = new_page_size / 2;
|
||||||
|
|
||||||
switch (zoom_focus) {
|
switch (zoom_focus) {
|
||||||
|
|
@ -1587,7 +1587,7 @@ Editor::temporal_zoom (gdouble fpu)
|
||||||
} else if (l > max_framepos) {
|
} else if (l > max_framepos) {
|
||||||
leftmost_after_zoom = max_framepos - new_page_size;
|
leftmost_after_zoom = max_framepos - new_page_size;
|
||||||
} else {
|
} else {
|
||||||
leftmost_after_zoom = (nframes64_t) l;
|
leftmost_after_zoom = (framepos_t) l;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -1613,7 +1613,7 @@ Editor::temporal_zoom (gdouble fpu)
|
||||||
} else if (l > max_framepos) {
|
} else if (l > max_framepos) {
|
||||||
leftmost_after_zoom = max_framepos - new_page_size;
|
leftmost_after_zoom = max_framepos - new_page_size;
|
||||||
} else {
|
} else {
|
||||||
leftmost_after_zoom = (nframes64_t) l;
|
leftmost_after_zoom = (framepos_t) l;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1632,7 +1632,7 @@ Editor::temporal_zoom (gdouble fpu)
|
||||||
} else if (l > max_framepos) {
|
} else if (l > max_framepos) {
|
||||||
leftmost_after_zoom = max_framepos - new_page_size;
|
leftmost_after_zoom = max_framepos - new_page_size;
|
||||||
} else {
|
} else {
|
||||||
leftmost_after_zoom = (nframes64_t) l;
|
leftmost_after_zoom = (framepos_t) l;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1690,9 +1690,9 @@ Editor::temporal_zoom_region (bool both_axes)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t range = end - start;
|
framepos_t range = end - start;
|
||||||
double new_fpu = (double)range / (double)_canvas_width;
|
double new_fpu = (double)range / (double)_canvas_width;
|
||||||
nframes64_t extra_samples = (nframes64_t) floor (one_centimeter_in_pixels * new_fpu);
|
framepos_t extra_samples = (framepos_t) floor (one_centimeter_in_pixels * new_fpu);
|
||||||
|
|
||||||
if (start > extra_samples) {
|
if (start > extra_samples) {
|
||||||
start -= extra_samples;
|
start -= extra_samples;
|
||||||
|
|
@ -1759,8 +1759,8 @@ Editor::temporal_zoom_selection ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t start = selection->time[clicked_selection].start;
|
framepos_t start = selection->time[clicked_selection].start;
|
||||||
nframes64_t end = selection->time[clicked_selection].end;
|
framepos_t end = selection->time[clicked_selection].end;
|
||||||
|
|
||||||
temporal_zoom_by_frame (start, end, "zoom to selection");
|
temporal_zoom_by_frame (start, end, "zoom to selection");
|
||||||
}
|
}
|
||||||
|
|
@ -1782,7 +1782,7 @@ Editor::temporal_zoom_session ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::temporal_zoom_by_frame (nframes64_t start, nframes64_t end, const string & /*op*/)
|
Editor::temporal_zoom_by_frame (framepos_t start, framepos_t end, const string & /*op*/)
|
||||||
{
|
{
|
||||||
if (!_session) return;
|
if (!_session) return;
|
||||||
|
|
||||||
|
|
@ -1790,13 +1790,13 @@ Editor::temporal_zoom_by_frame (nframes64_t start, nframes64_t end, const string
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t range = end - start;
|
framepos_t range = end - start;
|
||||||
|
|
||||||
double new_fpu = (double)range / (double)_canvas_width;
|
double new_fpu = (double)range / (double)_canvas_width;
|
||||||
|
|
||||||
nframes64_t new_page = (nframes64_t) floor (_canvas_width * new_fpu);
|
framepos_t new_page = (framepos_t) floor (_canvas_width * new_fpu);
|
||||||
nframes64_t middle = (nframes64_t) floor( (double)start + ((double)range / 2.0f ));
|
framepos_t middle = (framepos_t) floor( (double)start + ((double)range / 2.0f ));
|
||||||
nframes64_t new_leftmost = (nframes64_t) floor( (double)middle - ((double)new_page/2.0f));
|
framepos_t new_leftmost = (framepos_t) floor( (double)middle - ((double)new_page/2.0f));
|
||||||
|
|
||||||
if (new_leftmost > middle) {
|
if (new_leftmost > middle) {
|
||||||
new_leftmost = 0;
|
new_leftmost = 0;
|
||||||
|
|
@ -1806,7 +1806,7 @@ Editor::temporal_zoom_by_frame (nframes64_t start, nframes64_t end, const string
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::temporal_zoom_to_frame (bool coarser, nframes64_t frame)
|
Editor::temporal_zoom_to_frame (bool coarser, framepos_t frame)
|
||||||
{
|
{
|
||||||
if (!_session) {
|
if (!_session) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -1828,7 +1828,7 @@ Editor::temporal_zoom_to_frame (bool coarser, nframes64_t frame)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t new_leftmost = frame - (nframes64_t)range_before;
|
framepos_t new_leftmost = frame - (framepos_t)range_before;
|
||||||
|
|
||||||
if (new_leftmost > frame) {
|
if (new_leftmost > frame) {
|
||||||
new_leftmost = 0;
|
new_leftmost = 0;
|
||||||
|
|
@ -1891,8 +1891,8 @@ Editor::add_location_from_selection ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t start = selection->time[clicked_selection].start;
|
framepos_t start = selection->time[clicked_selection].start;
|
||||||
nframes64_t end = selection->time[clicked_selection].end;
|
framepos_t end = selection->time[clicked_selection].end;
|
||||||
|
|
||||||
_session->locations()->next_available_name(rangename,"selection");
|
_session->locations()->next_available_name(rangename,"selection");
|
||||||
Location *location = new Location (*_session, start, end, rangename, Location::IsRangeMarker);
|
Location *location = new Location (*_session, start, end, rangename, Location::IsRangeMarker);
|
||||||
|
|
@ -1906,7 +1906,7 @@ Editor::add_location_from_selection ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::add_location_mark (nframes64_t where)
|
Editor::add_location_mark (framepos_t where)
|
||||||
{
|
{
|
||||||
string markername;
|
string markername;
|
||||||
|
|
||||||
|
|
@ -2086,7 +2086,7 @@ Editor::jump_backward_to_mark ()
|
||||||
void
|
void
|
||||||
Editor::set_mark ()
|
Editor::set_mark ()
|
||||||
{
|
{
|
||||||
nframes64_t pos;
|
framepos_t pos;
|
||||||
float prefix;
|
float prefix;
|
||||||
bool was_floating;
|
bool was_floating;
|
||||||
string markername;
|
string markername;
|
||||||
|
|
@ -2095,9 +2095,9 @@ Editor::set_mark ()
|
||||||
pos = _session->audible_frame ();
|
pos = _session->audible_frame ();
|
||||||
} else {
|
} else {
|
||||||
if (was_floating) {
|
if (was_floating) {
|
||||||
pos = (nframes64_t) floor (prefix * _session->frame_rate ());
|
pos = (framepos_t) floor (prefix * _session->frame_rate ());
|
||||||
} else {
|
} else {
|
||||||
pos = (nframes64_t) floor (prefix);
|
pos = (framepos_t) floor (prefix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2183,7 +2183,7 @@ Editor::insert_region_list_drag (boost::shared_ptr<Region> region, int x, int y)
|
||||||
{
|
{
|
||||||
double wx, wy;
|
double wx, wy;
|
||||||
double cx, cy;
|
double cx, cy;
|
||||||
nframes64_t where;
|
framepos_t where;
|
||||||
RouteTimeAxisView *rtv = 0;
|
RouteTimeAxisView *rtv = 0;
|
||||||
boost::shared_ptr<Playlist> playlist;
|
boost::shared_ptr<Playlist> playlist;
|
||||||
|
|
||||||
|
|
@ -2359,8 +2359,8 @@ Editor::play_from_edit_point ()
|
||||||
void
|
void
|
||||||
Editor::play_from_edit_point_and_return ()
|
Editor::play_from_edit_point_and_return ()
|
||||||
{
|
{
|
||||||
nframes64_t start_frame;
|
framepos_t start_frame;
|
||||||
nframes64_t return_frame;
|
framepos_t return_frame;
|
||||||
|
|
||||||
start_frame = get_preferred_edit_position (true);
|
start_frame = get_preferred_edit_position (true);
|
||||||
|
|
||||||
|
|
@ -2555,7 +2555,7 @@ Editor::audition_playlist_region_via_route (boost::shared_ptr<Region> region, Ro
|
||||||
void
|
void
|
||||||
Editor::play_edit_range ()
|
Editor::play_edit_range ()
|
||||||
{
|
{
|
||||||
nframes64_t start, end;
|
framepos_t start, end;
|
||||||
|
|
||||||
if (get_edit_op_range (start, end)) {
|
if (get_edit_op_range (start, end)) {
|
||||||
_session->request_bounded_roll (start, end);
|
_session->request_bounded_roll (start, end);
|
||||||
|
|
@ -2604,17 +2604,17 @@ Editor::region_from_selection ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t start = selection->time[clicked_selection].start;
|
framepos_t start = selection->time[clicked_selection].start;
|
||||||
nframes64_t end = selection->time[clicked_selection].end;
|
framepos_t end = selection->time[clicked_selection].end;
|
||||||
|
|
||||||
TrackViewList tracks = get_tracks_for_range_action ();
|
TrackViewList tracks = get_tracks_for_range_action ();
|
||||||
|
|
||||||
nframes64_t selection_cnt = end - start + 1;
|
framepos_t selection_cnt = end - start + 1;
|
||||||
|
|
||||||
for (TrackSelection::iterator i = tracks.begin(); i != tracks.end(); ++i) {
|
for (TrackSelection::iterator i = tracks.begin(); i != tracks.end(); ++i) {
|
||||||
boost::shared_ptr<Region> current;
|
boost::shared_ptr<Region> current;
|
||||||
boost::shared_ptr<Playlist> pl;
|
boost::shared_ptr<Playlist> pl;
|
||||||
nframes64_t internal_start;
|
framepos_t internal_start;
|
||||||
string new_name;
|
string new_name;
|
||||||
|
|
||||||
if ((pl = (*i)->playlist()) == 0) {
|
if ((pl = (*i)->playlist()) == 0) {
|
||||||
|
|
@ -2646,15 +2646,15 @@ Editor::create_region_from_selection (vector<boost::shared_ptr<Region> >& new_re
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t start = selection->time[clicked_selection].start;
|
framepos_t start = selection->time[clicked_selection].start;
|
||||||
nframes64_t end = selection->time[clicked_selection].end;
|
framepos_t end = selection->time[clicked_selection].end;
|
||||||
|
|
||||||
sort_track_selection ();
|
sort_track_selection ();
|
||||||
|
|
||||||
for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
|
for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
|
||||||
boost::shared_ptr<Region> current;
|
boost::shared_ptr<Region> current;
|
||||||
boost::shared_ptr<Playlist> playlist;
|
boost::shared_ptr<Playlist> playlist;
|
||||||
nframes64_t internal_start;
|
framepos_t internal_start;
|
||||||
string new_name;
|
string new_name;
|
||||||
|
|
||||||
if ((playlist = (*i)->playlist()) == 0) {
|
if ((playlist = (*i)->playlist()) == 0) {
|
||||||
|
|
@ -2792,8 +2792,8 @@ Editor::separate_regions_between (const TimeSelection& ts)
|
||||||
|
|
||||||
latest_regionviews.clear ();
|
latest_regionviews.clear ();
|
||||||
|
|
||||||
playlist->partition ((nframes64_t)((*t).start * speed),
|
playlist->partition ((framepos_t)((*t).start * speed),
|
||||||
(nframes64_t)((*t).end * speed), false);
|
(framepos_t)((*t).end * speed), false);
|
||||||
|
|
||||||
c.disconnect ();
|
c.disconnect ();
|
||||||
|
|
||||||
|
|
@ -2856,8 +2856,8 @@ Editor::separate_region_from_selection ()
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
nframes64_t start;
|
framepos_t start;
|
||||||
nframes64_t end;
|
framepos_t end;
|
||||||
|
|
||||||
if (get_edit_op_range (start, end)) {
|
if (get_edit_op_range (start, end)) {
|
||||||
|
|
||||||
|
|
@ -2991,8 +2991,8 @@ Editor::crop_region_to_selection ()
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
nframes64_t start;
|
framepos_t start;
|
||||||
nframes64_t end;
|
framepos_t end;
|
||||||
|
|
||||||
if (get_edit_op_range (start, end)) {
|
if (get_edit_op_range (start, end)) {
|
||||||
crop_region_to (start, end);
|
crop_region_to (start, end);
|
||||||
|
|
@ -3002,7 +3002,7 @@ Editor::crop_region_to_selection ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::crop_region_to (nframes64_t start, nframes64_t end)
|
Editor::crop_region_to (framepos_t start, framepos_t end)
|
||||||
{
|
{
|
||||||
vector<boost::shared_ptr<Playlist> > playlists;
|
vector<boost::shared_ptr<Playlist> > playlists;
|
||||||
boost::shared_ptr<Playlist> playlist;
|
boost::shared_ptr<Playlist> playlist;
|
||||||
|
|
@ -3036,9 +3036,9 @@ Editor::crop_region_to (nframes64_t start, nframes64_t end)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t the_start;
|
framepos_t the_start;
|
||||||
nframes64_t the_end;
|
framepos_t the_end;
|
||||||
nframes64_t cnt;
|
framepos_t cnt;
|
||||||
|
|
||||||
begin_reversible_command (_("trim to selection"));
|
begin_reversible_command (_("trim to selection"));
|
||||||
|
|
||||||
|
|
@ -3056,7 +3056,7 @@ Editor::crop_region_to (nframes64_t start, nframes64_t end)
|
||||||
if the selection extends beyond the region
|
if the selection extends beyond the region
|
||||||
*/
|
*/
|
||||||
|
|
||||||
the_start = max (the_start, (nframes64_t) region->position());
|
the_start = max (the_start, (framepos_t) region->position());
|
||||||
if (max_framepos - the_start < region->length()) {
|
if (max_framepos - the_start < region->length()) {
|
||||||
the_end = the_start + region->length() - 1;
|
the_end = the_start + region->length() - 1;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -3076,7 +3076,7 @@ Editor::crop_region_to (nframes64_t start, nframes64_t end)
|
||||||
void
|
void
|
||||||
Editor::region_fill_track ()
|
Editor::region_fill_track ()
|
||||||
{
|
{
|
||||||
nframes64_t end;
|
framepos_t end;
|
||||||
RegionSelection rs;
|
RegionSelection rs;
|
||||||
|
|
||||||
get_regions_for_action (rs);
|
get_regions_for_action (rs);
|
||||||
|
|
@ -3129,8 +3129,8 @@ Editor::region_fill_selection ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t start = selection->time[clicked_selection].start;
|
framepos_t start = selection->time[clicked_selection].start;
|
||||||
nframes64_t end = selection->time[clicked_selection].end;
|
framepos_t end = selection->time[clicked_selection].end;
|
||||||
|
|
||||||
boost::shared_ptr<Playlist> playlist;
|
boost::shared_ptr<Playlist> playlist;
|
||||||
|
|
||||||
|
|
@ -3138,7 +3138,7 @@ Editor::region_fill_selection ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t selection_length = end - start;
|
framepos_t selection_length = end - start;
|
||||||
float times = (float)selection_length / region->length();
|
float times = (float)selection_length / region->length();
|
||||||
|
|
||||||
begin_reversible_command (_("fill selection"));
|
begin_reversible_command (_("fill selection"));
|
||||||
|
|
@ -3160,14 +3160,14 @@ Editor::region_fill_selection ()
|
||||||
void
|
void
|
||||||
Editor::set_region_sync_from_edit_point ()
|
Editor::set_region_sync_from_edit_point ()
|
||||||
{
|
{
|
||||||
nframes64_t where = get_preferred_edit_position ();
|
framepos_t where = get_preferred_edit_position ();
|
||||||
RegionSelection rs;
|
RegionSelection rs;
|
||||||
get_regions_for_action (rs);
|
get_regions_for_action (rs);
|
||||||
set_sync_point (where, rs);
|
set_sync_point (where, rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::set_sync_point (nframes64_t where, const RegionSelection& rs)
|
Editor::set_sync_point (framepos_t where, const RegionSelection& rs)
|
||||||
{
|
{
|
||||||
bool in_command = false;
|
bool in_command = false;
|
||||||
|
|
||||||
|
|
@ -3242,7 +3242,7 @@ Editor::align (RegionPoint what)
|
||||||
RegionSelection rs;
|
RegionSelection rs;
|
||||||
|
|
||||||
get_regions_for_action (rs);
|
get_regions_for_action (rs);
|
||||||
nframes64_t where = get_preferred_edit_position();
|
framepos_t where = get_preferred_edit_position();
|
||||||
|
|
||||||
if (!rs.empty()) {
|
if (!rs.empty()) {
|
||||||
align_selection (what, where, rs);
|
align_selection (what, where, rs);
|
||||||
|
|
@ -3257,7 +3257,7 @@ Editor::align (RegionPoint what)
|
||||||
void
|
void
|
||||||
Editor::align_relative (RegionPoint what)
|
Editor::align_relative (RegionPoint what)
|
||||||
{
|
{
|
||||||
nframes64_t where = get_preferred_edit_position();
|
framepos_t where = get_preferred_edit_position();
|
||||||
RegionSelection rs;
|
RegionSelection rs;
|
||||||
|
|
||||||
get_regions_for_action (rs);
|
get_regions_for_action (rs);
|
||||||
|
|
@ -3274,14 +3274,14 @@ struct RegionSortByTime {
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::align_selection_relative (RegionPoint point, nframes64_t position, const RegionSelection& rs)
|
Editor::align_selection_relative (RegionPoint point, framepos_t position, const RegionSelection& rs)
|
||||||
{
|
{
|
||||||
if (rs.empty()) {
|
if (rs.empty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t distance = 0;
|
framepos_t distance = 0;
|
||||||
nframes64_t pos = 0;
|
framepos_t pos = 0;
|
||||||
int dir = 1;
|
int dir = 1;
|
||||||
|
|
||||||
list<RegionView*> sorted;
|
list<RegionView*> sorted;
|
||||||
|
|
@ -3358,7 +3358,7 @@ Editor::align_selection_relative (RegionPoint point, nframes64_t position, const
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::align_selection (RegionPoint point, nframes64_t position, const RegionSelection& rs)
|
Editor::align_selection (RegionPoint point, framepos_t position, const RegionSelection& rs)
|
||||||
{
|
{
|
||||||
if (rs.empty()) {
|
if (rs.empty()) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -3374,7 +3374,7 @@ Editor::align_selection (RegionPoint point, nframes64_t position, const RegionSe
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::align_region (boost::shared_ptr<Region> region, RegionPoint point, nframes64_t position)
|
Editor::align_region (boost::shared_ptr<Region> region, RegionPoint point, framepos_t position)
|
||||||
{
|
{
|
||||||
begin_reversible_command (_("align region"));
|
begin_reversible_command (_("align region"));
|
||||||
align_region_internal (region, point, position);
|
align_region_internal (region, point, position);
|
||||||
|
|
@ -3382,7 +3382,7 @@ Editor::align_region (boost::shared_ptr<Region> region, RegionPoint point, nfram
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::align_region_internal (boost::shared_ptr<Region> region, RegionPoint point, nframes64_t position)
|
Editor::align_region_internal (boost::shared_ptr<Region> region, RegionPoint point, framepos_t position)
|
||||||
{
|
{
|
||||||
region->clear_changes ();
|
region->clear_changes ();
|
||||||
|
|
||||||
|
|
@ -3420,7 +3420,7 @@ Editor::trim_region_back ()
|
||||||
void
|
void
|
||||||
Editor::trim_region (bool front)
|
Editor::trim_region (bool front)
|
||||||
{
|
{
|
||||||
nframes64_t where = get_preferred_edit_position();
|
framepos_t where = get_preferred_edit_position();
|
||||||
RegionSelection rs;
|
RegionSelection rs;
|
||||||
|
|
||||||
get_regions_for_action (rs);
|
get_regions_for_action (rs);
|
||||||
|
|
@ -3495,8 +3495,8 @@ Editor::trim_region_to_location (const Location& loc, const char* str)
|
||||||
}
|
}
|
||||||
|
|
||||||
float speed = 1.0;
|
float speed = 1.0;
|
||||||
nframes64_t start;
|
framepos_t start;
|
||||||
nframes64_t end;
|
framepos_t end;
|
||||||
|
|
||||||
if (tav->track() != 0) {
|
if (tav->track() != 0) {
|
||||||
speed = tav->track()->speed();
|
speed = tav->track()->speed();
|
||||||
|
|
@ -3520,7 +3520,7 @@ Editor::trim_region_to_edit_point ()
|
||||||
|
|
||||||
get_regions_for_action (rs);
|
get_regions_for_action (rs);
|
||||||
|
|
||||||
nframes64_t where = get_preferred_edit_position();
|
framepos_t where = get_preferred_edit_position();
|
||||||
|
|
||||||
begin_reversible_command (_("trim region start to edit point"));
|
begin_reversible_command (_("trim region start to edit point"));
|
||||||
|
|
||||||
|
|
@ -3558,7 +3558,7 @@ Editor::trim_region_from_edit_point ()
|
||||||
|
|
||||||
get_regions_for_action (rs);
|
get_regions_for_action (rs);
|
||||||
|
|
||||||
nframes64_t where = get_preferred_edit_position();
|
framepos_t where = get_preferred_edit_position();
|
||||||
|
|
||||||
begin_reversible_command (_("trim region end to edit point"));
|
begin_reversible_command (_("trim region end to edit point"));
|
||||||
|
|
||||||
|
|
@ -3646,7 +3646,7 @@ Editor::trim_to_region(bool forward)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
region->trim_end((nframes64_t) ( (next_region->first_frame() - 1) * speed), this);
|
region->trim_end((framepos_t) ( (next_region->first_frame() - 1) * speed), this);
|
||||||
arv->region_changed (PropertyChange (ARDOUR::Properties::length));
|
arv->region_changed (PropertyChange (ARDOUR::Properties::length));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -3657,7 +3657,7 @@ Editor::trim_to_region(bool forward)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
region->trim_front((nframes64_t) ((next_region->last_frame() + 1) * speed), this);
|
region->trim_front((framepos_t) ((next_region->last_frame() + 1) * speed), this);
|
||||||
|
|
||||||
arv->region_changed (ARDOUR::bounds_change);
|
arv->region_changed (ARDOUR::bounds_change);
|
||||||
}
|
}
|
||||||
|
|
@ -3727,9 +3727,9 @@ Editor::bounce_range_selection (bool replace, bool enable_processing)
|
||||||
|
|
||||||
TrackSelection views = selection->tracks;
|
TrackSelection views = selection->tracks;
|
||||||
|
|
||||||
nframes64_t start = selection->time[clicked_selection].start;
|
framepos_t start = selection->time[clicked_selection].start;
|
||||||
nframes64_t end = selection->time[clicked_selection].end;
|
framepos_t end = selection->time[clicked_selection].end;
|
||||||
nframes64_t cnt = end - start + 1;
|
framepos_t cnt = end - start + 1;
|
||||||
|
|
||||||
begin_reversible_command (_("bounce range"));
|
begin_reversible_command (_("bounce range"));
|
||||||
|
|
||||||
|
|
@ -3917,7 +3917,7 @@ Editor::cut_copy (CutCopyOp op)
|
||||||
|
|
||||||
case MouseRange:
|
case MouseRange:
|
||||||
if (selection->time.empty()) {
|
if (selection->time.empty()) {
|
||||||
nframes64_t start, end;
|
framepos_t start, end;
|
||||||
if (!get_edit_op_range (start, end)) {
|
if (!get_edit_op_range (start, end)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -4101,7 +4101,7 @@ Editor::cut_copy_regions (CutCopyOp op, RegionSelection& rs)
|
||||||
|
|
||||||
for (RegionSelection::iterator x = rs.begin(); x != rs.end(); ++x) {
|
for (RegionSelection::iterator x = rs.begin(); x != rs.end(); ++x) {
|
||||||
|
|
||||||
first_position = min ((nframes64_t) (*x)->region()->position(), first_position);
|
first_position = min ((framepos_t) (*x)->region()->position(), first_position);
|
||||||
|
|
||||||
if (op == Cut || op == Clear) {
|
if (op == Cut || op == Clear) {
|
||||||
boost::shared_ptr<Playlist> pl = (*x)->region()->playlist();
|
boost::shared_ptr<Playlist> pl = (*x)->region()->playlist();
|
||||||
|
|
@ -4257,7 +4257,7 @@ Editor::paste (float times)
|
||||||
void
|
void
|
||||||
Editor::mouse_paste ()
|
Editor::mouse_paste ()
|
||||||
{
|
{
|
||||||
nframes64_t where;
|
framepos_t where;
|
||||||
bool ignored;
|
bool ignored;
|
||||||
|
|
||||||
if (!mouse_frame (where, ignored)) {
|
if (!mouse_frame (where, ignored)) {
|
||||||
|
|
@ -4269,7 +4269,7 @@ Editor::mouse_paste ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::paste_internal (nframes64_t position, float times)
|
Editor::paste_internal (framepos_t position, float times)
|
||||||
{
|
{
|
||||||
bool commit = false;
|
bool commit = false;
|
||||||
|
|
||||||
|
|
@ -4461,9 +4461,9 @@ void
|
||||||
Editor::nudge_track (bool use_edit, bool forwards)
|
Editor::nudge_track (bool use_edit, bool forwards)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Playlist> playlist;
|
boost::shared_ptr<Playlist> playlist;
|
||||||
nframes64_t distance;
|
framepos_t distance;
|
||||||
nframes64_t next_distance;
|
framepos_t next_distance;
|
||||||
nframes64_t start;
|
framepos_t start;
|
||||||
|
|
||||||
if (use_edit) {
|
if (use_edit) {
|
||||||
start = get_preferred_edit_position();
|
start = get_preferred_edit_position();
|
||||||
|
|
@ -4954,7 +4954,7 @@ Editor::external_edit_region ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::brush (nframes64_t pos)
|
Editor::brush (framepos_t pos)
|
||||||
{
|
{
|
||||||
RegionSelection sel;
|
RegionSelection sel;
|
||||||
RegionSelection rs;
|
RegionSelection rs;
|
||||||
|
|
@ -5162,8 +5162,8 @@ Editor::set_fade_length (bool in)
|
||||||
|
|
||||||
RegionView* rv = rs.front ();
|
RegionView* rv = rs.front ();
|
||||||
|
|
||||||
nframes64_t pos = get_preferred_edit_position();
|
framepos_t pos = get_preferred_edit_position();
|
||||||
nframes64_t len;
|
framepos_t len;
|
||||||
char const * cmd;
|
char const * cmd;
|
||||||
|
|
||||||
if (pos > rv->region()->last_frame() || pos < rv->region()->first_frame()) {
|
if (pos > rv->region()->last_frame() || pos < rv->region()->first_frame()) {
|
||||||
|
|
@ -5482,7 +5482,7 @@ Editor::update_xfade_visibility ()
|
||||||
void
|
void
|
||||||
Editor::set_edit_point ()
|
Editor::set_edit_point ()
|
||||||
{
|
{
|
||||||
nframes64_t where;
|
framepos_t where;
|
||||||
bool ignored;
|
bool ignored;
|
||||||
|
|
||||||
if (!mouse_frame (where, ignored)) {
|
if (!mouse_frame (where, ignored)) {
|
||||||
|
|
@ -5512,7 +5512,7 @@ Editor::set_playhead_cursor ()
|
||||||
if (entered_marker) {
|
if (entered_marker) {
|
||||||
_session->request_locate (entered_marker->position(), _session->transport_rolling());
|
_session->request_locate (entered_marker->position(), _session->transport_rolling());
|
||||||
} else {
|
} else {
|
||||||
nframes64_t where;
|
framepos_t where;
|
||||||
bool ignored;
|
bool ignored;
|
||||||
|
|
||||||
if (!mouse_frame (where, ignored)) {
|
if (!mouse_frame (where, ignored)) {
|
||||||
|
|
@ -5541,7 +5541,7 @@ Editor::split ()
|
||||||
|
|
||||||
get_regions_for_action (rs, true);
|
get_regions_for_action (rs, true);
|
||||||
|
|
||||||
nframes64_t where = get_preferred_edit_position();
|
framepos_t where = get_preferred_edit_position();
|
||||||
|
|
||||||
if (rs.empty()) {
|
if (rs.empty()) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -5675,8 +5675,8 @@ Editor::set_loop_from_selection (bool play)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t start = selection->time[clicked_selection].start;
|
framepos_t start = selection->time[clicked_selection].start;
|
||||||
nframes64_t end = selection->time[clicked_selection].end;
|
framepos_t end = selection->time[clicked_selection].end;
|
||||||
|
|
||||||
set_loop_range (start, end, _("set loop range from selection"));
|
set_loop_range (start, end, _("set loop range from selection"));
|
||||||
|
|
||||||
|
|
@ -5693,8 +5693,8 @@ Editor::set_loop_from_edit_range (bool play)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t start;
|
framepos_t start;
|
||||||
nframes64_t end;
|
framepos_t end;
|
||||||
|
|
||||||
if (!get_edit_op_range (start, end)) {
|
if (!get_edit_op_range (start, end)) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -5746,8 +5746,8 @@ Editor::set_punch_from_selection ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t start = selection->time[clicked_selection].start;
|
framepos_t start = selection->time[clicked_selection].start;
|
||||||
nframes64_t end = selection->time[clicked_selection].end;
|
framepos_t end = selection->time[clicked_selection].end;
|
||||||
|
|
||||||
set_punch_range (start, end, _("set punch range from selection"));
|
set_punch_range (start, end, _("set punch range from selection"));
|
||||||
}
|
}
|
||||||
|
|
@ -5759,8 +5759,8 @@ Editor::set_punch_from_edit_range ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t start;
|
framepos_t start;
|
||||||
nframes64_t end;
|
framepos_t end;
|
||||||
|
|
||||||
if (!get_edit_op_range (start, end)) {
|
if (!get_edit_op_range (start, end)) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -5832,16 +5832,16 @@ Editor::use_region_as_bar ()
|
||||||
void
|
void
|
||||||
Editor::use_range_as_bar ()
|
Editor::use_range_as_bar ()
|
||||||
{
|
{
|
||||||
nframes64_t start, end;
|
framepos_t start, end;
|
||||||
if (get_edit_op_range (start, end)) {
|
if (get_edit_op_range (start, end)) {
|
||||||
define_one_bar (start, end);
|
define_one_bar (start, end);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::define_one_bar (nframes64_t start, nframes64_t end)
|
Editor::define_one_bar (framepos_t start, framepos_t end)
|
||||||
{
|
{
|
||||||
nframes64_t length = end - start;
|
framepos_t length = end - start;
|
||||||
|
|
||||||
const Meter& m (_session->tempo_map().meter_at (start));
|
const Meter& m (_session->tempo_map().meter_at (start));
|
||||||
|
|
||||||
|
|
@ -6029,7 +6029,7 @@ Editor::split_region_at_points (boost::shared_ptr<Region> r, AnalysisFeatureList
|
||||||
pl->freeze ();
|
pl->freeze ();
|
||||||
pl->remove_region (r);
|
pl->remove_region (r);
|
||||||
|
|
||||||
nframes64_t pos = 0;
|
framepos_t pos = 0;
|
||||||
|
|
||||||
while (x != positions.end()) {
|
while (x != positions.end()) {
|
||||||
|
|
||||||
|
|
@ -6042,12 +6042,12 @@ Editor::split_region_at_points (boost::shared_ptr<Region> r, AnalysisFeatureList
|
||||||
/* file start = original start + how far we from the initial position ?
|
/* file start = original start + how far we from the initial position ?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
nframes64_t file_start = r->start() + pos;
|
framepos_t file_start = r->start() + pos;
|
||||||
|
|
||||||
/* length = next position - current position
|
/* length = next position - current position
|
||||||
*/
|
*/
|
||||||
|
|
||||||
nframes64_t len = (*x) - pos;
|
framepos_t len = (*x) - pos;
|
||||||
|
|
||||||
/* XXX we do we really want to allow even single-sample regions?
|
/* XXX we do we really want to allow even single-sample regions?
|
||||||
shouldn't we have some kind of lower limit on region size?
|
shouldn't we have some kind of lower limit on region size?
|
||||||
|
|
@ -6115,7 +6115,7 @@ Editor::place_transient()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t where = get_preferred_edit_position();
|
framepos_t where = get_preferred_edit_position();
|
||||||
|
|
||||||
_session->begin_reversible_command (_("place transient"));
|
_session->begin_reversible_command (_("place transient"));
|
||||||
|
|
||||||
|
|
@ -6223,8 +6223,8 @@ Editor::close_region_gaps()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t crossfade_len = spin_crossfade.get_value();
|
framepos_t crossfade_len = spin_crossfade.get_value();
|
||||||
nframes64_t pull_back_frames = spin_pullback.get_value();
|
framepos_t pull_back_frames = spin_pullback.get_value();
|
||||||
|
|
||||||
crossfade_len = lrintf (crossfade_len * _session->frame_rate()/1000);
|
crossfade_len = lrintf (crossfade_len * _session->frame_rate()/1000);
|
||||||
pull_back_frames = lrintf (pull_back_frames * _session->frame_rate()/1000);
|
pull_back_frames = lrintf (pull_back_frames * _session->frame_rate()/1000);
|
||||||
|
|
@ -6240,7 +6240,7 @@ Editor::close_region_gaps()
|
||||||
|
|
||||||
for (RegionSelection::iterator r = rs.begin(); r != rs.end(); ++r) {
|
for (RegionSelection::iterator r = rs.begin(); r != rs.end(); ++r) {
|
||||||
|
|
||||||
nframes64_t position = (*r)->region()->position();
|
framepos_t position = (*r)->region()->position();
|
||||||
|
|
||||||
if (idx == 0 || position < last_region->position()){
|
if (idx == 0 || position < last_region->position()){
|
||||||
last_region = (*r)->region();
|
last_region = (*r)->region();
|
||||||
|
|
@ -6268,7 +6268,7 @@ Editor::tab_to_transient (bool forward)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t pos = _session->audible_frame ();
|
framepos_t pos = _session->audible_frame ();
|
||||||
|
|
||||||
if (!selection->tracks.empty()) {
|
if (!selection->tracks.empty()) {
|
||||||
|
|
||||||
|
|
@ -6281,7 +6281,7 @@ Editor::tab_to_transient (bool forward)
|
||||||
if (tr) {
|
if (tr) {
|
||||||
boost::shared_ptr<Playlist> pl = tr->playlist ();
|
boost::shared_ptr<Playlist> pl = tr->playlist ();
|
||||||
if (pl) {
|
if (pl) {
|
||||||
nframes64_t result = pl->find_next_transient (pos, forward ? 1 : -1);
|
framepos_t result = pl->find_next_transient (pos, forward ? 1 : -1);
|
||||||
|
|
||||||
if (result >= 0) {
|
if (result >= 0) {
|
||||||
positions.push_back (result);
|
positions.push_back (result);
|
||||||
|
|
@ -6353,7 +6353,7 @@ void
|
||||||
Editor::playhead_backward_to_grid ()
|
Editor::playhead_backward_to_grid ()
|
||||||
{
|
{
|
||||||
if (!_session) return;
|
if (!_session) return;
|
||||||
nframes64_t pos = playhead_cursor->current_frame;
|
framepos_t pos = playhead_cursor->current_frame;
|
||||||
if (pos > 2) {
|
if (pos > 2) {
|
||||||
pos -= 2;
|
pos -= 2;
|
||||||
snap_to_internal (pos, -1, false);
|
snap_to_internal (pos, -1, false);
|
||||||
|
|
@ -6539,7 +6539,7 @@ Editor::do_insert_time ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::insert_time (nframes64_t pos, nframes64_t frames, InsertTimeOption opt,
|
Editor::insert_time (framepos_t pos, framecnt_t frames, InsertTimeOption opt,
|
||||||
bool ignore_music_glue, bool markers_too, bool glued_markers_too, bool locked_markers_too, bool tempo_too)
|
bool ignore_music_glue, bool markers_too, bool glued_markers_too, bool locked_markers_too, bool tempo_too)
|
||||||
{
|
{
|
||||||
bool commit = false;
|
bool commit = false;
|
||||||
|
|
|
||||||
|
|
@ -1130,7 +1130,7 @@ EditorRegions::drag_data_received (const RefPtr<Gdk::DragContext>& context,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_editor->convert_drop_to_paths (paths, context, x, y, data, info, time) == 0) {
|
if (_editor->convert_drop_to_paths (paths, context, x, y, data, info, time) == 0) {
|
||||||
nframes64_t pos = 0;
|
framepos_t pos = 0;
|
||||||
if (Profile->get_sae() || Config->get_only_copy_imported_files()) {
|
if (Profile->get_sae() || Config->get_only_copy_imported_files()) {
|
||||||
_editor->do_import (paths, Editing::ImportDistinctFiles, Editing::ImportAsRegion, SrcBest, pos);
|
_editor->do_import (paths, Editing::ImportDistinctFiles, Editing::ImportAsRegion, SrcBest, pos);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@ Editor::initialize_rulers ()
|
||||||
bool
|
bool
|
||||||
Editor::ruler_scroll (GdkEventScroll* event)
|
Editor::ruler_scroll (GdkEventScroll* event)
|
||||||
{
|
{
|
||||||
nframes64_t xdelta;
|
framepos_t xdelta;
|
||||||
int direction = event->direction;
|
int direction = event->direction;
|
||||||
bool handled = false;
|
bool handled = false;
|
||||||
|
|
||||||
|
|
@ -274,7 +274,7 @@ Editor::ruler_button_release (GdkEventButton* ev)
|
||||||
|
|
||||||
stop_canvas_autoscroll();
|
stop_canvas_autoscroll();
|
||||||
|
|
||||||
nframes64_t where = leftmost_frame + pixel_to_frame (x);
|
framepos_t where = leftmost_frame + pixel_to_frame (x);
|
||||||
snap_to (where);
|
snap_to (where);
|
||||||
popup_ruler_menu (where);
|
popup_ruler_menu (where);
|
||||||
}
|
}
|
||||||
|
|
@ -317,7 +317,7 @@ Editor::ruler_mouse_motion (GdkEventMotion* ev)
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::popup_ruler_menu (nframes64_t where, ItemType t)
|
Editor::popup_ruler_menu (framepos_t where, ItemType t)
|
||||||
{
|
{
|
||||||
using namespace Menu_Helpers;
|
using namespace Menu_Helpers;
|
||||||
|
|
||||||
|
|
@ -774,7 +774,7 @@ Editor::update_just_timecode ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t rightmost_frame = leftmost_frame + current_page_frames();
|
framepos_t rightmost_frame = leftmost_frame + current_page_frames();
|
||||||
|
|
||||||
if (ruler_timecode_action->get_active()) {
|
if (ruler_timecode_action->get_active()) {
|
||||||
gtk_custom_ruler_set_range (GTK_CUSTOM_RULER(_timecode_ruler), leftmost_frame, rightmost_frame,
|
gtk_custom_ruler_set_range (GTK_CUSTOM_RULER(_timecode_ruler), leftmost_frame, rightmost_frame,
|
||||||
|
|
@ -801,7 +801,7 @@ Editor::compute_fixed_ruler_scale ()
|
||||||
void
|
void
|
||||||
Editor::update_fixed_rulers ()
|
Editor::update_fixed_rulers ()
|
||||||
{
|
{
|
||||||
nframes64_t rightmost_frame;
|
framepos_t rightmost_frame;
|
||||||
|
|
||||||
if (_session == 0) {
|
if (_session == 0) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -877,9 +877,9 @@ Editor::_metric_get_minsec (GtkCustomRulerMark **marks, gdouble lower, gdouble u
|
||||||
void
|
void
|
||||||
Editor::set_timecode_ruler_scale (gdouble lower, gdouble upper)
|
Editor::set_timecode_ruler_scale (gdouble lower, gdouble upper)
|
||||||
{
|
{
|
||||||
nframes64_t range;
|
framepos_t range;
|
||||||
nframes64_t spacer;
|
framepos_t spacer;
|
||||||
nframes64_t fr;
|
framepos_t fr;
|
||||||
|
|
||||||
if (_session == 0) {
|
if (_session == 0) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -887,13 +887,13 @@ Editor::set_timecode_ruler_scale (gdouble lower, gdouble upper)
|
||||||
|
|
||||||
fr = _session->frame_rate();
|
fr = _session->frame_rate();
|
||||||
|
|
||||||
if (lower > (spacer = (nframes64_t)(128 * Editor::get_current_zoom ()))) {
|
if (lower > (spacer = (framepos_t)(128 * Editor::get_current_zoom ()))) {
|
||||||
lower = lower - spacer;
|
lower = lower - spacer;
|
||||||
} else {
|
} else {
|
||||||
lower = 0;
|
lower = 0;
|
||||||
}
|
}
|
||||||
upper = upper + spacer;
|
upper = upper + spacer;
|
||||||
range = (nframes64_t) floor (upper - lower);
|
range = (framepos_t) floor (upper - lower);
|
||||||
|
|
||||||
if (range < (2 * _session->frames_per_timecode_frame())) { /* 0 - 2 frames */
|
if (range < (2 * _session->frames_per_timecode_frame())) { /* 0 - 2 frames */
|
||||||
timecode_ruler_scale = timecode_show_bits;
|
timecode_ruler_scale = timecode_show_bits;
|
||||||
|
|
@ -902,19 +902,19 @@ Editor::set_timecode_ruler_scale (gdouble lower, gdouble upper)
|
||||||
} else if (range <= (fr / 4)) { /* 2 frames - 0.250 second */
|
} else if (range <= (fr / 4)) { /* 2 frames - 0.250 second */
|
||||||
timecode_ruler_scale = timecode_show_frames;
|
timecode_ruler_scale = timecode_show_frames;
|
||||||
timecode_mark_modulo = 1;
|
timecode_mark_modulo = 1;
|
||||||
timecode_nmarks = 2 + (range / (nframes64_t)_session->frames_per_timecode_frame());
|
timecode_nmarks = 2 + (range / (framepos_t)_session->frames_per_timecode_frame());
|
||||||
} else if (range <= (fr / 2)) { /* 0.25-0.5 second */
|
} else if (range <= (fr / 2)) { /* 0.25-0.5 second */
|
||||||
timecode_ruler_scale = timecode_show_frames;
|
timecode_ruler_scale = timecode_show_frames;
|
||||||
timecode_mark_modulo = 2;
|
timecode_mark_modulo = 2;
|
||||||
timecode_nmarks = 2 + (range / (nframes64_t)_session->frames_per_timecode_frame());
|
timecode_nmarks = 2 + (range / (framepos_t)_session->frames_per_timecode_frame());
|
||||||
} else if (range <= fr) { /* 0.5-1 second */
|
} else if (range <= fr) { /* 0.5-1 second */
|
||||||
timecode_ruler_scale = timecode_show_frames;
|
timecode_ruler_scale = timecode_show_frames;
|
||||||
timecode_mark_modulo = 5;
|
timecode_mark_modulo = 5;
|
||||||
timecode_nmarks = 2 + (range / (nframes64_t)_session->frames_per_timecode_frame());
|
timecode_nmarks = 2 + (range / (framepos_t)_session->frames_per_timecode_frame());
|
||||||
} else if (range <= 2 * fr) { /* 1-2 seconds */
|
} else if (range <= 2 * fr) { /* 1-2 seconds */
|
||||||
timecode_ruler_scale = timecode_show_frames;
|
timecode_ruler_scale = timecode_show_frames;
|
||||||
timecode_mark_modulo = 10;
|
timecode_mark_modulo = 10;
|
||||||
timecode_nmarks = 2 + (range / (nframes64_t)_session->frames_per_timecode_frame());
|
timecode_nmarks = 2 + (range / (framepos_t)_session->frames_per_timecode_frame());
|
||||||
} else if (range <= 8 * fr) { /* 2-8 seconds */
|
} else if (range <= 8 * fr) { /* 2-8 seconds */
|
||||||
timecode_ruler_scale = timecode_show_seconds;
|
timecode_ruler_scale = timecode_show_seconds;
|
||||||
timecode_mark_modulo = 1;
|
timecode_mark_modulo = 1;
|
||||||
|
|
@ -965,7 +965,7 @@ Editor::set_timecode_ruler_scale (gdouble lower, gdouble upper)
|
||||||
timecode_nmarks = 2 + 24;
|
timecode_nmarks = 2 + 24;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
/* not possible if nframes64_t is a 32 bit quantity */
|
/* not possible if framepos_t is a 32 bit quantity */
|
||||||
|
|
||||||
timecode_ruler_scale = timecode_show_hours;
|
timecode_ruler_scale = timecode_show_hours;
|
||||||
timecode_mark_modulo = 4;
|
timecode_mark_modulo = 4;
|
||||||
|
|
@ -1133,7 +1133,7 @@ Editor::metric_get_timecode (GtkCustomRulerMark **marks, gdouble lower, gdouble
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::compute_bbt_ruler_scale (nframes64_t lower, nframes64_t upper)
|
Editor::compute_bbt_ruler_scale (framepos_t lower, framepos_t upper)
|
||||||
{
|
{
|
||||||
if (_session == 0) {
|
if (_session == 0) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -1267,15 +1267,15 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upp
|
||||||
|
|
||||||
char buf[64];
|
char buf[64];
|
||||||
gint n = 0;
|
gint n = 0;
|
||||||
nframes64_t pos;
|
framepos_t pos;
|
||||||
BBT_Time next_beat;
|
BBT_Time next_beat;
|
||||||
nframes64_t next_beat_pos;
|
framepos_t next_beat_pos;
|
||||||
uint32_t beats = 0;
|
uint32_t beats = 0;
|
||||||
|
|
||||||
uint32_t tick = 0;
|
uint32_t tick = 0;
|
||||||
uint32_t skip;
|
uint32_t skip;
|
||||||
uint32_t t;
|
uint32_t t;
|
||||||
nframes64_t frame_skip;
|
framepos_t frame_skip;
|
||||||
double frame_skip_error;
|
double frame_skip_error;
|
||||||
double bbt_position_of_helper;
|
double bbt_position_of_helper;
|
||||||
double accumulated_error;
|
double accumulated_error;
|
||||||
|
|
@ -1378,7 +1378,7 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upp
|
||||||
|
|
||||||
next_beat_pos = _session->tempo_map().frame_time(next_beat);
|
next_beat_pos = _session->tempo_map().frame_time(next_beat);
|
||||||
|
|
||||||
frame_skip = (nframes64_t) floor (frame_skip_error = (_session->frame_rate() * 60) / (bbt_beat_subdivision * (*i).tempo->beats_per_minute()));
|
frame_skip = (framepos_t) floor (frame_skip_error = (_session->frame_rate() * 60) / (bbt_beat_subdivision * (*i).tempo->beats_per_minute()));
|
||||||
frame_skip_error -= frame_skip;
|
frame_skip_error -= frame_skip;
|
||||||
skip = (uint32_t) (Meter::ticks_per_beat / bbt_beat_subdivision);
|
skip = (uint32_t) (Meter::ticks_per_beat / bbt_beat_subdivision);
|
||||||
|
|
||||||
|
|
@ -1396,7 +1396,7 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upp
|
||||||
snprintf (buf, sizeof(buf), " ");
|
snprintf (buf, sizeof(buf), " ");
|
||||||
(*marks)[n].label = g_strdup (buf);
|
(*marks)[n].label = g_strdup (buf);
|
||||||
|
|
||||||
/* Error compensation for float to nframes64_t*/
|
/* Error compensation for float to framepos_t*/
|
||||||
accumulated_error += frame_skip_error;
|
accumulated_error += frame_skip_error;
|
||||||
if (accumulated_error > 1) {
|
if (accumulated_error > 1) {
|
||||||
pos += 1;
|
pos += 1;
|
||||||
|
|
@ -1470,7 +1470,7 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upp
|
||||||
|
|
||||||
next_beat_pos = _session->tempo_map().frame_time(next_beat);
|
next_beat_pos = _session->tempo_map().frame_time(next_beat);
|
||||||
|
|
||||||
frame_skip = (nframes64_t) floor (frame_skip_error = (_session->frame_rate() * 60) / (bbt_beat_subdivision * (*i).tempo->beats_per_minute()));
|
frame_skip = (framepos_t) floor (frame_skip_error = (_session->frame_rate() * 60) / (bbt_beat_subdivision * (*i).tempo->beats_per_minute()));
|
||||||
frame_skip_error -= frame_skip;
|
frame_skip_error -= frame_skip;
|
||||||
skip = (uint32_t) (Meter::ticks_per_beat / bbt_beat_subdivision);
|
skip = (uint32_t) (Meter::ticks_per_beat / bbt_beat_subdivision);
|
||||||
|
|
||||||
|
|
@ -1493,7 +1493,7 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upp
|
||||||
|
|
||||||
(*marks)[n].label = g_strdup (buf);
|
(*marks)[n].label = g_strdup (buf);
|
||||||
|
|
||||||
/* Error compensation for float to nframes64_t*/
|
/* Error compensation for float to framepos_t*/
|
||||||
accumulated_error += frame_skip_error;
|
accumulated_error += frame_skip_error;
|
||||||
if (accumulated_error > 1) {
|
if (accumulated_error > 1) {
|
||||||
pos += 1;
|
pos += 1;
|
||||||
|
|
@ -1567,7 +1567,7 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upp
|
||||||
|
|
||||||
next_beat_pos = _session->tempo_map().frame_time(next_beat);
|
next_beat_pos = _session->tempo_map().frame_time(next_beat);
|
||||||
|
|
||||||
frame_skip = (nframes64_t) floor (frame_skip_error = (_session->frame_rate() * 60) / (bbt_beat_subdivision * (*i).tempo->beats_per_minute()));
|
frame_skip = (framepos_t) floor (frame_skip_error = (_session->frame_rate() * 60) / (bbt_beat_subdivision * (*i).tempo->beats_per_minute()));
|
||||||
frame_skip_error -= frame_skip;
|
frame_skip_error -= frame_skip;
|
||||||
skip = (uint32_t) (Meter::ticks_per_beat / bbt_beat_subdivision);
|
skip = (uint32_t) (Meter::ticks_per_beat / bbt_beat_subdivision);
|
||||||
|
|
||||||
|
|
@ -1590,7 +1590,7 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upp
|
||||||
|
|
||||||
(*marks)[n].label = g_strdup (buf);
|
(*marks)[n].label = g_strdup (buf);
|
||||||
|
|
||||||
/* Error compensation for float to nframes64_t*/
|
/* Error compensation for float to framepos_t*/
|
||||||
accumulated_error += frame_skip_error;
|
accumulated_error += frame_skip_error;
|
||||||
if (accumulated_error > 1) {
|
if (accumulated_error > 1) {
|
||||||
pos += 1;
|
pos += 1;
|
||||||
|
|
@ -1731,10 +1731,10 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upp
|
||||||
gint
|
gint
|
||||||
Editor::metric_get_frames (GtkCustomRulerMark **marks, gdouble lower, gdouble upper, gint /*maxchars*/)
|
Editor::metric_get_frames (GtkCustomRulerMark **marks, gdouble lower, gdouble upper, gint /*maxchars*/)
|
||||||
{
|
{
|
||||||
nframes64_t mark_interval;
|
framepos_t mark_interval;
|
||||||
nframes64_t pos;
|
framepos_t pos;
|
||||||
nframes64_t ilower = (nframes64_t) floor (lower);
|
framepos_t ilower = (framepos_t) floor (lower);
|
||||||
nframes64_t iupper = (nframes64_t) floor (upper);
|
framepos_t iupper = (framepos_t) floor (upper);
|
||||||
gchar buf[16];
|
gchar buf[16];
|
||||||
gint nmarks;
|
gint nmarks;
|
||||||
gint n;
|
gint n;
|
||||||
|
|
@ -1762,15 +1762,15 @@ Editor::metric_get_frames (GtkCustomRulerMark **marks, gdouble lower, gdouble up
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sample_to_clock_parts ( nframes64_t sample,
|
sample_to_clock_parts ( framepos_t sample,
|
||||||
nframes64_t sample_rate,
|
framepos_t sample_rate,
|
||||||
long *hrs_p,
|
long *hrs_p,
|
||||||
long *mins_p,
|
long *mins_p,
|
||||||
long *secs_p,
|
long *secs_p,
|
||||||
long *millisecs_p)
|
long *millisecs_p)
|
||||||
|
|
||||||
{
|
{
|
||||||
nframes64_t left;
|
framepos_t left;
|
||||||
long hrs;
|
long hrs;
|
||||||
long mins;
|
long mins;
|
||||||
long secs;
|
long secs;
|
||||||
|
|
@ -1796,9 +1796,9 @@ sample_to_clock_parts ( nframes64_t sample,
|
||||||
void
|
void
|
||||||
Editor::set_minsec_ruler_scale (gdouble lower, gdouble upper)
|
Editor::set_minsec_ruler_scale (gdouble lower, gdouble upper)
|
||||||
{
|
{
|
||||||
nframes64_t range;
|
framepos_t range;
|
||||||
nframes64_t fr;
|
framepos_t fr;
|
||||||
nframes64_t spacer;
|
framepos_t spacer;
|
||||||
|
|
||||||
if (_session == 0) {
|
if (_session == 0) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -1807,13 +1807,13 @@ Editor::set_minsec_ruler_scale (gdouble lower, gdouble upper)
|
||||||
fr = _session->frame_rate();
|
fr = _session->frame_rate();
|
||||||
|
|
||||||
/* to prevent 'flashing' */
|
/* to prevent 'flashing' */
|
||||||
if (lower > (spacer = (nframes64_t)(128 * Editor::get_current_zoom ()))) {
|
if (lower > (spacer = (framepos_t)(128 * Editor::get_current_zoom ()))) {
|
||||||
lower -= spacer;
|
lower -= spacer;
|
||||||
} else {
|
} else {
|
||||||
lower = 0;
|
lower = 0;
|
||||||
}
|
}
|
||||||
upper += spacer;
|
upper += spacer;
|
||||||
range = (nframes64_t) (upper - lower);
|
range = (framepos_t) (upper - lower);
|
||||||
|
|
||||||
if (range < (fr / 50)) {
|
if (range < (fr / 50)) {
|
||||||
minsec_mark_interval = fr / 1000; /* show 1/1000 seconds */
|
minsec_mark_interval = fr / 1000; /* show 1/1000 seconds */
|
||||||
|
|
@ -1885,7 +1885,7 @@ Editor::set_minsec_ruler_scale (gdouble lower, gdouble upper)
|
||||||
minsec_mark_modulo = 2;
|
minsec_mark_modulo = 2;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
/* not possible if nframes64_t is a 32 bit quantity */
|
/* not possible if framepos_t is a 32 bit quantity */
|
||||||
|
|
||||||
minsec_mark_interval = 4 * 60 * 60 * fr; /* show 4 hrs */
|
minsec_mark_interval = 4 * 60 * 60 * fr; /* show 4 hrs */
|
||||||
}
|
}
|
||||||
|
|
@ -1895,8 +1895,8 @@ Editor::set_minsec_ruler_scale (gdouble lower, gdouble upper)
|
||||||
gint
|
gint
|
||||||
Editor::metric_get_minsec (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upper*/, gint /*maxchars*/)
|
Editor::metric_get_minsec (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upper*/, gint /*maxchars*/)
|
||||||
{
|
{
|
||||||
nframes64_t pos;
|
framepos_t pos;
|
||||||
nframes64_t spacer;
|
framepos_t spacer;
|
||||||
long hrs, mins, secs, millisecs;
|
long hrs, mins, secs, millisecs;
|
||||||
gchar buf[16];
|
gchar buf[16];
|
||||||
gint n;
|
gint n;
|
||||||
|
|
@ -1906,14 +1906,14 @@ Editor::metric_get_minsec (GtkCustomRulerMark **marks, gdouble lower, gdouble /*
|
||||||
}
|
}
|
||||||
|
|
||||||
/* to prevent 'flashing' */
|
/* to prevent 'flashing' */
|
||||||
if (lower > (spacer = (nframes64_t)(128 * Editor::get_current_zoom ()))) {
|
if (lower > (spacer = (framepos_t)(128 * Editor::get_current_zoom ()))) {
|
||||||
lower = lower - spacer;
|
lower = lower - spacer;
|
||||||
} else {
|
} else {
|
||||||
lower = 0;
|
lower = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
*marks = (GtkCustomRulerMark *) g_malloc (sizeof(GtkCustomRulerMark) * minsec_nmarks);
|
*marks = (GtkCustomRulerMark *) g_malloc (sizeof(GtkCustomRulerMark) * minsec_nmarks);
|
||||||
pos = ((((nframes64_t) floor(lower)) + (minsec_mark_interval/2))/minsec_mark_interval) * minsec_mark_interval;
|
pos = ((((framepos_t) floor(lower)) + (minsec_mark_interval/2))/minsec_mark_interval) * minsec_mark_interval;
|
||||||
switch (minsec_ruler_scale) {
|
switch (minsec_ruler_scale) {
|
||||||
case minsec_show_seconds:
|
case minsec_show_seconds:
|
||||||
for (n = 0; n < minsec_nmarks; pos += minsec_mark_interval, ++n) {
|
for (n = 0; n < minsec_nmarks; pos += minsec_mark_interval, ++n) {
|
||||||
|
|
|
||||||
|
|
@ -1178,8 +1178,8 @@ Editor::select_all_selectables_using_time_selection ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t start = selection->time[clicked_selection].start;
|
framepos_t start = selection->time[clicked_selection].start;
|
||||||
nframes64_t end = selection->time[clicked_selection].end;
|
framepos_t end = selection->time[clicked_selection].end;
|
||||||
|
|
||||||
if (end - start < 1) {
|
if (end - start < 1) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -1271,8 +1271,8 @@ Editor::select_all_selectables_using_loop()
|
||||||
void
|
void
|
||||||
Editor::select_all_selectables_using_cursor (EditorCursor *cursor, bool after)
|
Editor::select_all_selectables_using_cursor (EditorCursor *cursor, bool after)
|
||||||
{
|
{
|
||||||
nframes64_t start;
|
framepos_t start;
|
||||||
nframes64_t end;
|
framepos_t end;
|
||||||
list<Selectable *> touched;
|
list<Selectable *> touched;
|
||||||
|
|
||||||
if (after) {
|
if (after) {
|
||||||
|
|
@ -1311,8 +1311,8 @@ Editor::select_all_selectables_using_cursor (EditorCursor *cursor, bool after)
|
||||||
void
|
void
|
||||||
Editor::select_all_selectables_using_edit (bool after)
|
Editor::select_all_selectables_using_edit (bool after)
|
||||||
{
|
{
|
||||||
nframes64_t start;
|
framepos_t start;
|
||||||
nframes64_t end;
|
framepos_t end;
|
||||||
list<Selectable *> touched;
|
list<Selectable *> touched;
|
||||||
|
|
||||||
if (after) {
|
if (after) {
|
||||||
|
|
@ -1351,8 +1351,8 @@ Editor::select_all_selectables_using_edit (bool after)
|
||||||
void
|
void
|
||||||
Editor::select_all_selectables_between (bool /*within*/)
|
Editor::select_all_selectables_between (bool /*within*/)
|
||||||
{
|
{
|
||||||
nframes64_t start;
|
framepos_t start;
|
||||||
nframes64_t end;
|
framepos_t end;
|
||||||
list<Selectable *> touched;
|
list<Selectable *> touched;
|
||||||
|
|
||||||
if (!get_edit_op_range (start, end)) {
|
if (!get_edit_op_range (start, end)) {
|
||||||
|
|
@ -1380,8 +1380,8 @@ Editor::select_all_selectables_between (bool /*within*/)
|
||||||
void
|
void
|
||||||
Editor::select_range_between ()
|
Editor::select_range_between ()
|
||||||
{
|
{
|
||||||
nframes64_t start;
|
framepos_t start;
|
||||||
nframes64_t end;
|
framepos_t end;
|
||||||
|
|
||||||
if (mouse_mode == MouseRange && !selection->time.empty()) {
|
if (mouse_mode == MouseRange && !selection->time.empty()) {
|
||||||
selection->clear_time ();
|
selection->clear_time ();
|
||||||
|
|
@ -1396,9 +1396,9 @@ Editor::select_range_between ()
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Editor::get_edit_op_range (nframes64_t& start, nframes64_t& end) const
|
Editor::get_edit_op_range (framepos_t& start, framepos_t& end) const
|
||||||
{
|
{
|
||||||
nframes64_t m;
|
framepos_t m;
|
||||||
bool ignored;
|
bool ignored;
|
||||||
|
|
||||||
/* in range mode, use any existing selection */
|
/* in range mode, use any existing selection */
|
||||||
|
|
|
||||||
|
|
@ -713,7 +713,7 @@ EditorSummary::set_editor_y (pair<double, double> const & y)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EditorSummary::playhead_position_changed (nframes64_t p)
|
EditorSummary::playhead_position_changed (framepos_t p)
|
||||||
{
|
{
|
||||||
if (_session && int (p * _x_scale) != int (_last_playhead)) {
|
if (_session && int (p * _x_scale) != int (_last_playhead)) {
|
||||||
set_overlays_dirty ();
|
set_overlays_dirty ();
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ private:
|
||||||
void set_editor_x (std::pair<double, double> const &);
|
void set_editor_x (std::pair<double, double> const &);
|
||||||
void set_editor_y (double);
|
void set_editor_y (double);
|
||||||
void set_editor_y (std::pair<double, double> const &);
|
void set_editor_y (std::pair<double, double> const &);
|
||||||
void playhead_position_changed (nframes64_t);
|
void playhead_position_changed (framepos_t);
|
||||||
double summary_y_to_editor (double) const;
|
double summary_y_to_editor (double) const;
|
||||||
double editor_y_to_summary (double) const;
|
double editor_y_to_summary (double) const;
|
||||||
Position get_position (double, double) const;
|
Position get_position (double, double) const;
|
||||||
|
|
|
||||||
|
|
@ -197,7 +197,7 @@ Editor::draw_measures ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::mouse_add_new_tempo_event (nframes64_t frame)
|
Editor::mouse_add_new_tempo_event (framepos_t frame)
|
||||||
{
|
{
|
||||||
if (_session == 0) {
|
if (_session == 0) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -239,7 +239,7 @@ Editor::mouse_add_new_tempo_event (nframes64_t frame)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::mouse_add_new_meter_event (nframes64_t frame)
|
Editor::mouse_add_new_meter_event (framepos_t frame)
|
||||||
{
|
{
|
||||||
if (_session == 0) {
|
if (_session == 0) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -169,9 +169,9 @@ ImageFrameView::~ImageFrameView()
|
||||||
* @return true if the position change was a success, false otherwise
|
* @return true if the position change was a success, false otherwise
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
ImageFrameView::set_position(nframes64_t pos, void* src, double* delta)
|
ImageFrameView::set_position(framepos_t pos, void* src, double* delta)
|
||||||
{
|
{
|
||||||
nframes64_t old_pos = frame_position;
|
framepos_t old_pos = frame_position;
|
||||||
|
|
||||||
// do the standard stuff
|
// do the standard stuff
|
||||||
bool ret = TimeAxisViewItem::set_position(pos, src, delta);
|
bool ret = TimeAxisViewItem::set_position(pos, src, delta);
|
||||||
|
|
@ -183,7 +183,7 @@ ImageFrameView::set_position(nframes64_t pos, void* src, double* delta)
|
||||||
{
|
{
|
||||||
// calculate the offset of the marker
|
// calculate the offset of the marker
|
||||||
MarkerView* mv = (MarkerView*)*i;
|
MarkerView* mv = (MarkerView*)*i;
|
||||||
nframes64_t marker_old_pos = mv->get_position();
|
framepos_t marker_old_pos = mv->get_position();
|
||||||
|
|
||||||
mv->set_position(pos + (marker_old_pos - old_pos), src);
|
mv->set_position(pos + (marker_old_pos - old_pos), src);
|
||||||
}
|
}
|
||||||
|
|
@ -200,7 +200,7 @@ ImageFrameView::set_position(nframes64_t pos, void* src, double* delta)
|
||||||
* @return true if the duration change was succesful, false otherwise
|
* @return true if the duration change was succesful, false otherwise
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
ImageFrameView::set_duration(nframes64_t dur, void* src)
|
ImageFrameView::set_duration(framepos_t dur, void* src)
|
||||||
{
|
{
|
||||||
/* do the standard stuff */
|
/* do the standard stuff */
|
||||||
bool ret = TimeAxisViewItem::set_duration(dur, src);
|
bool ret = TimeAxisViewItem::set_duration(dur, src);
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ class ImageFrameView : public TimeAxisViewItem
|
||||||
* @param src the identity of the object that initiated the change
|
* @param src the identity of the object that initiated the change
|
||||||
* @return true if the position change was a success, false otherwise
|
* @return true if the position change was a success, false otherwise
|
||||||
*/
|
*/
|
||||||
virtual bool set_position(nframes64_t pos, void* src, double* delta = 0) ;
|
virtual bool set_position(framepos_t pos, void* src, double* delta = 0) ;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the duration of this item
|
* Sets the duration of this item
|
||||||
|
|
@ -99,7 +99,7 @@ class ImageFrameView : public TimeAxisViewItem
|
||||||
* @param src the identity of the object that initiated the change
|
* @param src the identity of the object that initiated the change
|
||||||
* @return true if the duration change was succesful, false otherwise
|
* @return true if the duration change was succesful, false otherwise
|
||||||
*/
|
*/
|
||||||
virtual bool set_duration(nframes64_t dur, void* src) ;
|
virtual bool set_duration(framepos_t dur, void* src) ;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------//
|
//---------------------------------------------------------------------------------------//
|
||||||
// Parent Component Methods
|
// Parent Component Methods
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ InsertTimeDialog::InsertTimeDialog (PublicEditor& e)
|
||||||
{
|
{
|
||||||
set_session (_editor.session ());
|
set_session (_editor.session ());
|
||||||
|
|
||||||
nframes64_t const pos = _editor.get_preferred_edit_position ();
|
framepos_t const pos = _editor.get_preferred_edit_position ();
|
||||||
|
|
||||||
get_vbox()->set_border_width (12);
|
get_vbox()->set_border_width (12);
|
||||||
get_vbox()->set_spacing (4);
|
get_vbox()->set_spacing (4);
|
||||||
|
|
@ -138,7 +138,7 @@ InsertTimeDialog::move_locked_markers () const
|
||||||
return _move_locked_markers.get_active ();
|
return _move_locked_markers.get_active ();
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t
|
framepos_t
|
||||||
InsertTimeDialog::distance () const
|
InsertTimeDialog::distance () const
|
||||||
{
|
{
|
||||||
return _clock.current_duration (_editor.get_preferred_edit_position ());
|
return _clock.current_duration (_editor.get_preferred_edit_position ());
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ public:
|
||||||
bool move_glued_markers () const;
|
bool move_glued_markers () const;
|
||||||
bool move_locked_markers () const;
|
bool move_locked_markers () const;
|
||||||
bool move_tempos () const;
|
bool move_tempos () const;
|
||||||
nframes64_t distance () const;
|
framepos_t distance () const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void move_markers_toggled ();
|
void move_markers_toggled ();
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ LatencyBarController::get_label (int&)
|
||||||
std::stringstream s;
|
std::stringstream s;
|
||||||
|
|
||||||
if (nframes < (_latency_gui->sample_rate / 1000.0)) {
|
if (nframes < (_latency_gui->sample_rate / 1000.0)) {
|
||||||
s << ((nframes64_t) rint (nframes)) << " samples";
|
s << ((framepos_t) rint (nframes)) << " samples";
|
||||||
} else {
|
} else {
|
||||||
s << std::fixed << std::setprecision (2) << (nframes / (_latency_gui->sample_rate / 1000.0)) << " msecs";
|
s << std::fixed << std::setprecision (2) << (nframes / (_latency_gui->sample_rate / 1000.0)) << " msecs";
|
||||||
}
|
}
|
||||||
|
|
@ -40,7 +40,7 @@ LatencyBarController::get_label (int&)
|
||||||
return s.str ();
|
return s.str ();
|
||||||
}
|
}
|
||||||
|
|
||||||
LatencyGUI::LatencyGUI (Latent& l, nframes64_t sr, nframes64_t psz)
|
LatencyGUI::LatencyGUI (Latent& l, framepos_t sr, framepos_t psz)
|
||||||
: _latent (l),
|
: _latent (l),
|
||||||
initial_value (_latent.signal_latency()),
|
initial_value (_latent.signal_latency()),
|
||||||
sample_rate (sr),
|
sample_rate (sr),
|
||||||
|
|
@ -95,7 +95,7 @@ LatencyGUI::LatencyGUI (Latent& l, nframes64_t sr, nframes64_t psz)
|
||||||
void
|
void
|
||||||
LatencyGUI::finish ()
|
LatencyGUI::finish ()
|
||||||
{
|
{
|
||||||
nframes64_t new_value = (nframes64_t) adjustment.get_value();
|
framepos_t new_value = (framepos_t) adjustment.get_value();
|
||||||
if (new_value != initial_value) {
|
if (new_value != initial_value) {
|
||||||
_latent.set_user_latency (new_value);
|
_latent.set_user_latency (new_value);
|
||||||
}
|
}
|
||||||
|
|
@ -140,7 +140,7 @@ LatencyGUI::change_latency_from_button (int dir)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LatencyDialog::LatencyDialog (const std::string& title, Latent& l, nframes64_t sr, nframes64_t psz)
|
LatencyDialog::LatencyDialog (const std::string& title, Latent& l, framepos_t sr, framepos_t psz)
|
||||||
: ArdourDialog (title, false, true),
|
: ArdourDialog (title, false, true),
|
||||||
lwidget (l, sr, psz)
|
lwidget (l, sr, psz)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ private:
|
||||||
class LatencyGUI : public Gtk::VBox
|
class LatencyGUI : public Gtk::VBox
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LatencyGUI (ARDOUR::Latent&, nframes64_t sample_rate, nframes64_t period_size);
|
LatencyGUI (ARDOUR::Latent&, framepos_t sample_rate, framepos_t period_size);
|
||||||
~LatencyGUI() { }
|
~LatencyGUI() { }
|
||||||
|
|
||||||
void finish ();
|
void finish ();
|
||||||
|
|
@ -47,9 +47,9 @@ class LatencyGUI : public Gtk::VBox
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ARDOUR::Latent& _latent;
|
ARDOUR::Latent& _latent;
|
||||||
nframes64_t initial_value;
|
framepos_t initial_value;
|
||||||
nframes64_t sample_rate;
|
framepos_t sample_rate;
|
||||||
nframes64_t period_size;
|
framepos_t period_size;
|
||||||
boost::shared_ptr<PBD::IgnorableControllable> ignored;
|
boost::shared_ptr<PBD::IgnorableControllable> ignored;
|
||||||
|
|
||||||
Gtk::Adjustment adjustment;
|
Gtk::Adjustment adjustment;
|
||||||
|
|
@ -72,7 +72,7 @@ class LatencyGUI : public Gtk::VBox
|
||||||
class LatencyDialog : public ArdourDialog
|
class LatencyDialog : public ArdourDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LatencyDialog (const std::string& title, ARDOUR::Latent&, nframes64_t sample_rate, nframes64_t period_size);
|
LatencyDialog (const std::string& title, ARDOUR::Latent&, framepos_t sample_rate, framepos_t period_size);
|
||||||
~LatencyDialog() {}
|
~LatencyDialog() {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
||||||
|
|
@ -365,7 +365,7 @@ Marker::set_name (const string& new_name)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Marker::set_position (nframes64_t frame)
|
Marker::set_position (framepos_t frame)
|
||||||
{
|
{
|
||||||
double new_unit_position = editor.frame_to_unit (frame);
|
double new_unit_position = editor.frame_to_unit (frame);
|
||||||
new_unit_position -= shift;
|
new_unit_position -= shift;
|
||||||
|
|
|
||||||
|
|
@ -68,11 +68,11 @@ class Marker : public sigc::trackable
|
||||||
void hide_line ();
|
void hide_line ();
|
||||||
void set_line_vpos (double y_origin, double height);
|
void set_line_vpos (double y_origin, double height);
|
||||||
|
|
||||||
void set_position (nframes64_t);
|
void set_position (framepos_t);
|
||||||
void set_name (const std::string&);
|
void set_name (const std::string&);
|
||||||
void set_color_rgba (uint32_t rgba);
|
void set_color_rgba (uint32_t rgba);
|
||||||
|
|
||||||
nframes64_t position() const { return frame_position; }
|
framepos_t position() const { return frame_position; }
|
||||||
|
|
||||||
ArdourCanvas::Group * get_parent() { return _parent; }
|
ArdourCanvas::Group * get_parent() { return _parent; }
|
||||||
void reparent (ArdourCanvas::Group & parent);
|
void reparent (ArdourCanvas::Group & parent);
|
||||||
|
|
@ -96,7 +96,7 @@ class Marker : public sigc::trackable
|
||||||
ArdourCanvas::Points *line_points;
|
ArdourCanvas::Points *line_points;
|
||||||
|
|
||||||
double unit_position;
|
double unit_position;
|
||||||
nframes64_t frame_position;
|
framepos_t frame_position;
|
||||||
unsigned char shift; /* should be double, but its always small and integral */
|
unsigned char shift; /* should be double, but its always small and integral */
|
||||||
Type _type;
|
Type _type;
|
||||||
int name_height;
|
int name_height;
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ MidiAutomationLine::MidiAutomationLine (
|
||||||
boost::shared_ptr<ARDOUR::AutomationList> list,
|
boost::shared_ptr<ARDOUR::AutomationList> list,
|
||||||
boost::shared_ptr<ARDOUR::MidiRegion> region,
|
boost::shared_ptr<ARDOUR::MidiRegion> region,
|
||||||
Evoral::Parameter parameter,
|
Evoral::Parameter parameter,
|
||||||
const Evoral::TimeConverter<double, ARDOUR::sframes_t>* converter)
|
const Evoral::TimeConverter<double, ARDOUR::framepos_t>* converter)
|
||||||
: AutomationLine (name, tav, group, list, converter)
|
: AutomationLine (name, tav, group, list, converter)
|
||||||
, _region (region)
|
, _region (region)
|
||||||
, _parameter (parameter)
|
, _parameter (parameter)
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ public:
|
||||||
boost::shared_ptr<ARDOUR::AutomationList>,
|
boost::shared_ptr<ARDOUR::AutomationList>,
|
||||||
boost::shared_ptr<ARDOUR::MidiRegion>,
|
boost::shared_ptr<ARDOUR::MidiRegion>,
|
||||||
Evoral::Parameter,
|
Evoral::Parameter,
|
||||||
const Evoral::TimeConverter<double, ARDOUR::sframes_t>* converter = 0);
|
const Evoral::TimeConverter<double, ARDOUR::framepos_t>* converter = 0);
|
||||||
|
|
||||||
MementoCommandBinder<ARDOUR::AutomationList>* memento_command_binder ();
|
MementoCommandBinder<ARDOUR::AutomationList>* memento_command_binder ();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -328,7 +328,7 @@ bool
|
||||||
MidiRegionView::button_release (GdkEventButton* ev)
|
MidiRegionView::button_release (GdkEventButton* ev)
|
||||||
{
|
{
|
||||||
double event_x, event_y;
|
double event_x, event_y;
|
||||||
nframes64_t event_frame = 0;
|
framepos_t event_frame = 0;
|
||||||
|
|
||||||
event_x = ev->x;
|
event_x = ev->x;
|
||||||
event_y = ev->y;
|
event_y = ev->y;
|
||||||
|
|
@ -398,7 +398,7 @@ bool
|
||||||
MidiRegionView::motion (GdkEventMotion* ev)
|
MidiRegionView::motion (GdkEventMotion* ev)
|
||||||
{
|
{
|
||||||
double event_x, event_y;
|
double event_x, event_y;
|
||||||
nframes64_t event_frame = 0;
|
framepos_t event_frame = 0;
|
||||||
|
|
||||||
event_x = ev->x;
|
event_x = ev->x;
|
||||||
event_y = ev->y;
|
event_y = ev->y;
|
||||||
|
|
@ -665,7 +665,7 @@ MidiRegionView::create_note_at(double x, double y, double length, bool sh)
|
||||||
assert(note <= 127.0);
|
assert(note <= 127.0);
|
||||||
|
|
||||||
// Start of note in frames relative to region start
|
// Start of note in frames relative to region start
|
||||||
nframes64_t const start_frames = snap_frame_to_frame(trackview.editor().pixel_to_frame(x));
|
framepos_t const start_frames = snap_frame_to_frame(trackview.editor().pixel_to_frame(x));
|
||||||
assert(start_frames >= 0);
|
assert(start_frames >= 0);
|
||||||
|
|
||||||
// Snap length
|
// Snap length
|
||||||
|
|
@ -1289,7 +1289,7 @@ MidiRegionView::resolve_note(uint8_t note, double end_time)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_active_notes && _active_notes[note]) {
|
if (_active_notes && _active_notes[note]) {
|
||||||
const nframes64_t end_time_frames = beats_to_frames(end_time);
|
const framepos_t end_time_frames = beats_to_frames(end_time);
|
||||||
_active_notes[note]->property_x2() = trackview.editor().frame_to_pixel(end_time_frames);
|
_active_notes[note]->property_x2() = trackview.editor().frame_to_pixel(end_time_frames);
|
||||||
_active_notes[note]->property_outline_what() = (guint32) 0xF; // all edges
|
_active_notes[note]->property_outline_what() = (guint32) 0xF; // all edges
|
||||||
_active_notes[note] = 0;
|
_active_notes[note] = 0;
|
||||||
|
|
@ -1358,7 +1358,7 @@ MidiRegionView::play_midi_chord (vector<boost::shared_ptr<NoteType> > notes)
|
||||||
bool
|
bool
|
||||||
MidiRegionView::note_in_region_range(const boost::shared_ptr<NoteType> note, bool& visible) const
|
MidiRegionView::note_in_region_range(const boost::shared_ptr<NoteType> note, bool& visible) const
|
||||||
{
|
{
|
||||||
const nframes64_t note_start_frames = beats_to_frames(note->time());
|
const framepos_t note_start_frames = beats_to_frames(note->time());
|
||||||
|
|
||||||
bool outside = (note_start_frames - _region->start() >= _region->length()) ||
|
bool outside = (note_start_frames - _region->start() >= _region->length()) ||
|
||||||
(note_start_frames < _region->start());
|
(note_start_frames < _region->start());
|
||||||
|
|
@ -1374,10 +1374,10 @@ MidiRegionView::update_note (CanvasNote* ev)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<NoteType> note = ev->note();
|
boost::shared_ptr<NoteType> note = ev->note();
|
||||||
|
|
||||||
const nframes64_t note_start_frames = beats_to_frames(note->time());
|
const framepos_t note_start_frames = beats_to_frames(note->time());
|
||||||
|
|
||||||
/* trim note display to not overlap the end of its region */
|
/* trim note display to not overlap the end of its region */
|
||||||
const nframes64_t note_end_frames = min (beats_to_frames (note->end_time()), _region->start() + _region->length());
|
const framepos_t note_end_frames = min (beats_to_frames (note->end_time()), _region->start() + _region->length());
|
||||||
|
|
||||||
const double x = trackview.editor().frame_to_pixel(note_start_frames - _region->start());
|
const double x = trackview.editor().frame_to_pixel(note_start_frames - _region->start());
|
||||||
const double y1 = midi_stream_view()->note_to_y(note->note());
|
const double y1 = midi_stream_view()->note_to_y(note->note());
|
||||||
|
|
@ -1418,7 +1418,7 @@ MidiRegionView::update_hit (CanvasHit* ev)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<NoteType> note = ev->note();
|
boost::shared_ptr<NoteType> note = ev->note();
|
||||||
|
|
||||||
const nframes64_t note_start_frames = beats_to_frames(note->time());
|
const framepos_t note_start_frames = beats_to_frames(note->time());
|
||||||
const double x = trackview.editor().frame_to_pixel(note_start_frames - _region->start());
|
const double x = trackview.editor().frame_to_pixel(note_start_frames - _region->start());
|
||||||
const double diamond_size = midi_stream_view()->note_height() / 2.0;
|
const double diamond_size = midi_stream_view()->note_height() / 2.0;
|
||||||
const double y = midi_stream_view()->note_to_y(note->note()) + ((diamond_size-2) / 4.0);
|
const double y = midi_stream_view()->note_to_y(note->note()) + ((diamond_size-2) / 4.0);
|
||||||
|
|
@ -1499,8 +1499,8 @@ MidiRegionView::step_add_note (uint8_t channel, uint8_t number, uint8_t velocity
|
||||||
|
|
||||||
/* potentially extend region to hold new note */
|
/* potentially extend region to hold new note */
|
||||||
|
|
||||||
nframes64_t end_frame = _region->position() + beats_to_frames (new_note->end_time());
|
framepos_t end_frame = _region->position() + beats_to_frames (new_note->end_time());
|
||||||
nframes64_t region_end = _region->position() + _region->length() - 1;
|
framepos_t region_end = _region->position() + _region->length() - 1;
|
||||||
|
|
||||||
if (end_frame > region_end) {
|
if (end_frame > region_end) {
|
||||||
_region->set_length (end_frame - _region->position(), this);
|
_region->set_length (end_frame - _region->position(), this);
|
||||||
|
|
@ -2090,22 +2090,22 @@ MidiRegionView::note_dropped(CanvasNoteEvent *, frameoffset_t dt, int8_t dnote)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t
|
framepos_t
|
||||||
MidiRegionView::snap_pixel_to_frame(double x)
|
MidiRegionView::snap_pixel_to_frame(double x)
|
||||||
{
|
{
|
||||||
PublicEditor& editor = trackview.editor();
|
PublicEditor& editor = trackview.editor();
|
||||||
// x is region relative, convert it to global absolute frames
|
// x is region relative, convert it to global absolute frames
|
||||||
nframes64_t frame = editor.pixel_to_frame(x) + _region->position();
|
framepos_t frame = editor.pixel_to_frame(x) + _region->position();
|
||||||
editor.snap_to(frame);
|
editor.snap_to(frame);
|
||||||
return frame - _region->position(); // convert back to region relative
|
return frame - _region->position(); // convert back to region relative
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t
|
framepos_t
|
||||||
MidiRegionView::snap_frame_to_frame(nframes64_t x)
|
MidiRegionView::snap_frame_to_frame(framepos_t x)
|
||||||
{
|
{
|
||||||
PublicEditor& editor = trackview.editor();
|
PublicEditor& editor = trackview.editor();
|
||||||
// x is region relative, convert it to global absolute frames
|
// x is region relative, convert it to global absolute frames
|
||||||
nframes64_t frame = x + _region->position();
|
framepos_t frame = x + _region->position();
|
||||||
editor.snap_to(frame);
|
editor.snap_to(frame);
|
||||||
return frame - _region->position(); // convert back to region relative
|
return frame - _region->position(); // convert back to region relative
|
||||||
}
|
}
|
||||||
|
|
@ -2119,25 +2119,25 @@ MidiRegionView::snap_to_pixel(double x)
|
||||||
double
|
double
|
||||||
MidiRegionView::get_position_pixels()
|
MidiRegionView::get_position_pixels()
|
||||||
{
|
{
|
||||||
nframes64_t region_frame = get_position();
|
framepos_t region_frame = get_position();
|
||||||
return trackview.editor().frame_to_pixel(region_frame);
|
return trackview.editor().frame_to_pixel(region_frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
MidiRegionView::get_end_position_pixels()
|
MidiRegionView::get_end_position_pixels()
|
||||||
{
|
{
|
||||||
nframes64_t frame = get_position() + get_duration ();
|
framepos_t frame = get_position() + get_duration ();
|
||||||
return trackview.editor().frame_to_pixel(frame);
|
return trackview.editor().frame_to_pixel(frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t
|
framepos_t
|
||||||
MidiRegionView::beats_to_frames(double beats) const
|
MidiRegionView::beats_to_frames(double beats) const
|
||||||
{
|
{
|
||||||
return _time_converter.to(beats);
|
return _time_converter.to(beats);
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
MidiRegionView::frames_to_beats(nframes64_t frames) const
|
MidiRegionView::frames_to_beats(framepos_t frames) const
|
||||||
{
|
{
|
||||||
return _time_converter.from(frames);
|
return _time_converter.from(frames);
|
||||||
}
|
}
|
||||||
|
|
@ -2596,9 +2596,9 @@ MidiRegionView::nudge_notes (bool forward)
|
||||||
into a vector and sort before using the first one.
|
into a vector and sort before using the first one.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
nframes64_t ref_point = _region->position() + beats_to_frames ((*(_selection.begin()))->note()->time());
|
framepos_t ref_point = _region->position() + beats_to_frames ((*(_selection.begin()))->note()->time());
|
||||||
nframes64_t unused;
|
framepos_t unused;
|
||||||
nframes64_t distance;
|
framepos_t distance;
|
||||||
|
|
||||||
if (trackview.editor().snap_mode() == Editing::SnapOff) {
|
if (trackview.editor().snap_mode() == Editing::SnapOff) {
|
||||||
|
|
||||||
|
|
@ -2784,7 +2784,7 @@ MidiRegionView::selection_as_cut_buffer () const
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MidiRegionView::paste (nframes64_t pos, float times, const MidiCutBuffer& mcb)
|
MidiRegionView::paste (framepos_t pos, float times, const MidiCutBuffer& mcb)
|
||||||
{
|
{
|
||||||
if (mcb.empty()) {
|
if (mcb.empty()) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -2822,8 +2822,8 @@ MidiRegionView::paste (nframes64_t pos, float times, const MidiCutBuffer& mcb)
|
||||||
|
|
||||||
/* if we pasted past the current end of the region, extend the region */
|
/* if we pasted past the current end of the region, extend the region */
|
||||||
|
|
||||||
nframes64_t end_frame = _region->position() + beats_to_frames (end_point);
|
framepos_t end_frame = _region->position() + beats_to_frames (end_point);
|
||||||
nframes64_t region_end = _region->position() + _region->length() - 1;
|
framepos_t region_end = _region->position() + _region->length() - 1;
|
||||||
|
|
||||||
if (end_frame > region_end) {
|
if (end_frame > region_end) {
|
||||||
|
|
||||||
|
|
@ -2859,7 +2859,7 @@ MidiRegionView::time_sort_events ()
|
||||||
void
|
void
|
||||||
MidiRegionView::goto_next_note ()
|
MidiRegionView::goto_next_note ()
|
||||||
{
|
{
|
||||||
// nframes64_t pos = -1;
|
// framepos_t pos = -1;
|
||||||
bool use_next = false;
|
bool use_next = false;
|
||||||
|
|
||||||
if (_events.back()->selected()) {
|
if (_events.back()->selected()) {
|
||||||
|
|
@ -2888,7 +2888,7 @@ MidiRegionView::goto_next_note ()
|
||||||
void
|
void
|
||||||
MidiRegionView::goto_previous_note ()
|
MidiRegionView::goto_previous_note ()
|
||||||
{
|
{
|
||||||
// nframes64_t pos = -1;
|
// framepos_t pos = -1;
|
||||||
bool use_next = false;
|
bool use_next = false;
|
||||||
|
|
||||||
if (_events.front()->selected()) {
|
if (_events.front()->selected()) {
|
||||||
|
|
@ -2941,7 +2941,7 @@ MidiRegionView::update_ghost_note (double x, double y)
|
||||||
_last_ghost_y = y;
|
_last_ghost_y = y;
|
||||||
|
|
||||||
group->w2i (x, y);
|
group->w2i (x, y);
|
||||||
nframes64_t f = trackview.editor().pixel_to_frame (x) + _region->position ();
|
framepos_t f = trackview.editor().pixel_to_frame (x) + _region->position ();
|
||||||
trackview.editor().snap_to (f);
|
trackview.editor().snap_to (f);
|
||||||
f -= _region->position ();
|
f -= _region->position ();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ class MidiRegionView : public RegionView
|
||||||
void resolve_note(uint8_t note_num, double end_time);
|
void resolve_note(uint8_t note_num, double end_time);
|
||||||
|
|
||||||
void cut_copy_clear (Editing::CutCopyOp);
|
void cut_copy_clear (Editing::CutCopyOp);
|
||||||
void paste (nframes64_t pos, float times, const MidiCutBuffer&);
|
void paste (framepos_t pos, float times, const MidiCutBuffer&);
|
||||||
|
|
||||||
struct PCEvent {
|
struct PCEvent {
|
||||||
PCEvent(double a_time, uint8_t a_value, uint8_t a_channel)
|
PCEvent(double a_time, uint8_t a_value, uint8_t a_channel)
|
||||||
|
|
@ -253,21 +253,21 @@ class MidiRegionView : public RegionView
|
||||||
|
|
||||||
/** Snap a region relative pixel coordinate to frame units.
|
/** Snap a region relative pixel coordinate to frame units.
|
||||||
* @param x a pixel coordinate relative to region start
|
* @param x a pixel coordinate relative to region start
|
||||||
* @return the snapped nframes64_t coordinate relative to region start
|
* @return the snapped framepos_t coordinate relative to region start
|
||||||
*/
|
*/
|
||||||
nframes64_t snap_pixel_to_frame(double x);
|
framepos_t snap_pixel_to_frame(double x);
|
||||||
|
|
||||||
/** Snap a region relative frame coordinate to frame units.
|
/** Snap a region relative frame coordinate to frame units.
|
||||||
* @param x a pixel coordinate relative to region start
|
* @param x a pixel coordinate relative to region start
|
||||||
* @return the snapped nframes64_t coordinate relative to region start
|
* @return the snapped framepos_t coordinate relative to region start
|
||||||
*/
|
*/
|
||||||
nframes64_t snap_frame_to_frame(nframes64_t x);
|
framepos_t snap_frame_to_frame(framepos_t x);
|
||||||
|
|
||||||
/** Convert a timestamp in beats to frames (both relative to region start) */
|
/** Convert a timestamp in beats to frames (both relative to region start) */
|
||||||
nframes64_t beats_to_frames(double beats) const;
|
framepos_t beats_to_frames(double beats) const;
|
||||||
|
|
||||||
/** Convert a timestamp in frames to beats (both relative to region start) */
|
/** Convert a timestamp in frames to beats (both relative to region start) */
|
||||||
double frames_to_beats(nframes64_t) const;
|
double frames_to_beats(framepos_t) const;
|
||||||
|
|
||||||
void goto_previous_note ();
|
void goto_previous_note ();
|
||||||
void goto_next_note ();
|
void goto_next_note ();
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,9 @@ class ImageFrameTimeAxis;
|
||||||
class MarkerView;
|
class MarkerView;
|
||||||
class DragManager;
|
class DragManager;
|
||||||
|
|
||||||
|
using ARDOUR::framepos_t;
|
||||||
|
using ARDOUR::framecnt_t;
|
||||||
|
|
||||||
/// Representation of the interface of the Editor class
|
/// Representation of the interface of the Editor class
|
||||||
|
|
||||||
/** This class contains just the public interface of the Editor class,
|
/** This class contains just the public interface of the Editor class,
|
||||||
|
|
@ -128,7 +131,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
|
||||||
virtual void set_snap_threshold (double t) = 0;
|
virtual void set_snap_threshold (double t) = 0;
|
||||||
|
|
||||||
/** Snap a value according to the current snap setting. */
|
/** Snap a value according to the current snap setting. */
|
||||||
virtual void snap_to (nframes64_t& first, int32_t direction = 0, bool for_mark = false) = 0;
|
virtual void snap_to (framepos_t& first, int32_t direction = 0, bool for_mark = false) = 0;
|
||||||
|
|
||||||
/** Undo some transactions.
|
/** Undo some transactions.
|
||||||
* @param n Number of transactions to undo.
|
* @param n Number of transactions to undo.
|
||||||
|
|
@ -185,15 +188,15 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
|
||||||
virtual void separate_region_from_selection () = 0;
|
virtual void separate_region_from_selection () = 0;
|
||||||
|
|
||||||
virtual void transition_to_rolling (bool fwd) = 0;
|
virtual void transition_to_rolling (bool fwd) = 0;
|
||||||
virtual nframes64_t unit_to_frame (double unit) const = 0;
|
virtual framepos_t unit_to_frame (double unit) const = 0;
|
||||||
// XXX remove me when libardour goes nframes64_t
|
// XXX remove me when libardour goes framepos_t
|
||||||
double frame_to_unit (nframes_t frame) const {
|
double frame_to_unit (nframes_t frame) const {
|
||||||
return frame_to_unit ((nframes64_t) frame);
|
return frame_to_unit ((framepos_t) frame);
|
||||||
}
|
}
|
||||||
virtual double frame_to_unit (nframes64_t frame) const = 0;
|
virtual double frame_to_unit (framepos_t frame) const = 0;
|
||||||
virtual double frame_to_unit (double frame) const = 0;
|
virtual double frame_to_unit (double frame) const = 0;
|
||||||
virtual nframes64_t pixel_to_frame (double pixel) const = 0;
|
virtual framepos_t pixel_to_frame (double pixel) const = 0;
|
||||||
virtual gulong frame_to_pixel (nframes64_t frame) const = 0;
|
virtual gulong frame_to_pixel (framepos_t frame) const = 0;
|
||||||
virtual Selection& get_selection () const = 0;
|
virtual Selection& get_selection () const = 0;
|
||||||
virtual Selection& get_cut_buffer () const = 0;
|
virtual Selection& get_cut_buffer () const = 0;
|
||||||
virtual bool extend_selection_to_track (TimeAxisView&) = 0;
|
virtual bool extend_selection_to_track (TimeAxisView&) = 0;
|
||||||
|
|
@ -245,25 +248,25 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
|
||||||
virtual bool dragging_playhead () const = 0;
|
virtual bool dragging_playhead () const = 0;
|
||||||
virtual void ensure_float (Gtk::Window&) = 0;
|
virtual void ensure_float (Gtk::Window&) = 0;
|
||||||
virtual void show_window () = 0;
|
virtual void show_window () = 0;
|
||||||
virtual nframes64_t leftmost_position() const = 0;
|
virtual framepos_t leftmost_position() const = 0;
|
||||||
virtual nframes64_t current_page_frames() const = 0;
|
virtual framecnt_t current_page_frames() const = 0;
|
||||||
virtual void temporal_zoom_step (bool coarser) = 0;
|
virtual void temporal_zoom_step (bool coarser) = 0;
|
||||||
virtual void scroll_tracks_down_line () = 0;
|
virtual void scroll_tracks_down_line () = 0;
|
||||||
virtual void scroll_tracks_up_line () = 0;
|
virtual void scroll_tracks_up_line () = 0;
|
||||||
virtual void prepare_for_cleanup () = 0;
|
virtual void prepare_for_cleanup () = 0;
|
||||||
virtual void finish_cleanup () = 0;
|
virtual void finish_cleanup () = 0;
|
||||||
virtual void reset_x_origin (nframes64_t frame) = 0;
|
virtual void reset_x_origin (framepos_t frame) = 0;
|
||||||
virtual void remove_last_capture () = 0;
|
virtual void remove_last_capture () = 0;
|
||||||
virtual void maximise_editing_space () = 0;
|
virtual void maximise_editing_space () = 0;
|
||||||
virtual void restore_editing_space () = 0;
|
virtual void restore_editing_space () = 0;
|
||||||
virtual nframes64_t get_preferred_edit_position (bool ignore_playhead = false) = 0;
|
virtual framepos_t get_preferred_edit_position (bool ignore_playhead = false) = 0;
|
||||||
virtual void toggle_meter_updating() = 0;
|
virtual void toggle_meter_updating() = 0;
|
||||||
virtual void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret) = 0;
|
virtual void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret) = 0;
|
||||||
virtual void mouse_add_new_marker (nframes64_t where, bool is_cd=false, bool is_xrun=false) = 0;
|
virtual void mouse_add_new_marker (framepos_t where, bool is_cd=false, bool is_xrun=false) = 0;
|
||||||
virtual void foreach_time_axis_view (sigc::slot<void,TimeAxisView&>) = 0;
|
virtual void foreach_time_axis_view (sigc::slot<void,TimeAxisView&>) = 0;
|
||||||
virtual void add_to_idle_resize (TimeAxisView*, int32_t) = 0;
|
virtual void add_to_idle_resize (TimeAxisView*, int32_t) = 0;
|
||||||
virtual nframes64_t get_nudge_distance (nframes64_t pos, nframes64_t& next) = 0;
|
virtual framecnt_t get_nudge_distance (framepos_t pos, framecnt_t& next) = 0;
|
||||||
virtual Evoral::MusicalTime get_grid_type_as_beats (bool& success, nframes64_t position) = 0;
|
virtual Evoral::MusicalTime get_grid_type_as_beats (bool& success, framepos_t position) = 0;
|
||||||
|
|
||||||
#ifdef WITH_CMT
|
#ifdef WITH_CMT
|
||||||
virtual void connect_to_image_compositor() = 0;
|
virtual void connect_to_image_compositor() = 0;
|
||||||
|
|
@ -281,7 +284,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
|
||||||
sigc::signal<void> ZoomChanged;
|
sigc::signal<void> ZoomChanged;
|
||||||
sigc::signal<void> Resized;
|
sigc::signal<void> Resized;
|
||||||
sigc::signal<void> Realized;
|
sigc::signal<void> Realized;
|
||||||
sigc::signal<void,nframes64_t> UpdateAllTransportClocks;
|
sigc::signal<void,framepos_t> UpdateAllTransportClocks;
|
||||||
|
|
||||||
static sigc::signal<void> DropDownKeys;
|
static sigc::signal<void> DropDownKeys;
|
||||||
|
|
||||||
|
|
@ -353,7 +356,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
|
||||||
virtual void show_verbose_canvas_cursor_with (const std::string& txt) = 0;
|
virtual void show_verbose_canvas_cursor_with (const std::string& txt) = 0;
|
||||||
virtual void hide_verbose_canvas_cursor() = 0;
|
virtual void hide_verbose_canvas_cursor() = 0;
|
||||||
|
|
||||||
virtual void center_screen (nframes64_t) = 0;
|
virtual void center_screen (framepos_t) = 0;
|
||||||
|
|
||||||
virtual TrackViewList axis_views_from_routes (boost::shared_ptr<ARDOUR::RouteList>) const = 0;
|
virtual TrackViewList axis_views_from_routes (boost::shared_ptr<ARDOUR::RouteList>) const = 0;
|
||||||
virtual TrackViewList const & get_track_views () = 0;
|
virtual TrackViewList const & get_track_views () = 0;
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ class RegionLayeringOrderEditor : public ArdourDialog
|
||||||
|
|
||||||
private:
|
private:
|
||||||
boost::shared_ptr<ARDOUR::Playlist> playlist;
|
boost::shared_ptr<ARDOUR::Playlist> playlist;
|
||||||
nframes64_t position;
|
framepos_t position;
|
||||||
bool in_row_change;
|
bool in_row_change;
|
||||||
uint32_t regions_at_position;
|
uint32_t regions_at_position;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -324,7 +324,7 @@ RegionView::lower_to_bottom ()
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
RegionView::set_position (nframes64_t pos, void* /*src*/, double* ignored)
|
RegionView::set_position (framepos_t pos, void* /*src*/, double* ignored)
|
||||||
{
|
{
|
||||||
double delta;
|
double delta;
|
||||||
bool ret;
|
bool ret;
|
||||||
|
|
@ -360,7 +360,7 @@ RegionView::set_samples_per_unit (gdouble spu)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
RegionView::set_duration (nframes64_t frames, void *src)
|
RegionView::set_duration (framecnt_t frames, void *src)
|
||||||
{
|
{
|
||||||
if (!TimeAxisViewItem::set_duration (frames, src)) {
|
if (!TimeAxisViewItem::set_duration (frames, src)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -63,14 +63,14 @@ class RegionView : public TimeAxisViewItem
|
||||||
|
|
||||||
virtual void set_height (double);
|
virtual void set_height (double);
|
||||||
virtual void set_samples_per_unit (double);
|
virtual void set_samples_per_unit (double);
|
||||||
virtual bool set_duration (nframes64_t, void*);
|
virtual bool set_duration (framecnt_t, void*);
|
||||||
|
|
||||||
void move (double xdelta, double ydelta);
|
void move (double xdelta, double ydelta);
|
||||||
|
|
||||||
void raise_to_top ();
|
void raise_to_top ();
|
||||||
void lower_to_bottom ();
|
void lower_to_bottom ();
|
||||||
|
|
||||||
bool set_position(nframes64_t pos, void* src, double* delta = 0);
|
bool set_position(framepos_t pos, void* src, double* delta = 0);
|
||||||
void fake_set_opaque (bool yn);
|
void fake_set_opaque (bool yn);
|
||||||
|
|
||||||
virtual void show_region_editor ();
|
virtual void show_region_editor ();
|
||||||
|
|
|
||||||
|
|
@ -212,7 +212,7 @@ RhythmFerret::run_analysis ()
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
RhythmFerret::run_percussion_onset_analysis (boost::shared_ptr<Readable> readable, nframes64_t /*offset*/, AnalysisFeatureList& results)
|
RhythmFerret::run_percussion_onset_analysis (boost::shared_ptr<Readable> readable, framepos_t /*offset*/, AnalysisFeatureList& results)
|
||||||
{
|
{
|
||||||
TransientDetector t (_session->frame_rate());
|
TransientDetector t (_session->frame_rate());
|
||||||
|
|
||||||
|
|
@ -265,7 +265,7 @@ RhythmFerret::get_note_onset_function ()
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
RhythmFerret::run_note_onset_analysis (boost::shared_ptr<Readable> readable, nframes64_t /*offset*/, AnalysisFeatureList& results)
|
RhythmFerret::run_note_onset_analysis (boost::shared_ptr<Readable> readable, framepos_t /*offset*/, AnalysisFeatureList& results)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
OnsetDetector t (_session->frame_rate());
|
OnsetDetector t (_session->frame_rate());
|
||||||
|
|
|
||||||
|
|
@ -85,8 +85,8 @@ class RhythmFerret : public ArdourDialog {
|
||||||
int get_note_onset_function ();
|
int get_note_onset_function ();
|
||||||
|
|
||||||
void run_analysis ();
|
void run_analysis ();
|
||||||
int run_percussion_onset_analysis (boost::shared_ptr<ARDOUR::Readable> region, nframes64_t offset, ARDOUR::AnalysisFeatureList& results);
|
int run_percussion_onset_analysis (boost::shared_ptr<ARDOUR::Readable> region, ARDOUR::frameoffset_t offset, ARDOUR::AnalysisFeatureList& results);
|
||||||
int run_note_onset_analysis (boost::shared_ptr<ARDOUR::Readable> region, nframes64_t offset, ARDOUR::AnalysisFeatureList& results);
|
int run_note_onset_analysis (boost::shared_ptr<ARDOUR::Readable> region, ARDOUR::frameoffset_t offset, ARDOUR::AnalysisFeatureList& results);
|
||||||
|
|
||||||
void do_action ();
|
void do_action ();
|
||||||
void do_split_action ();
|
void do_split_action ();
|
||||||
|
|
|
||||||
|
|
@ -1296,8 +1296,8 @@ RouteTimeAxisView::find_next_region (nframes_t pos, RegionPoint point, int32_t d
|
||||||
return boost::shared_ptr<Region> ();
|
return boost::shared_ptr<Region> ();
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t
|
framepos_t
|
||||||
RouteTimeAxisView::find_next_region_boundary (nframes64_t pos, int32_t dir)
|
RouteTimeAxisView::find_next_region_boundary (framepos_t pos, int32_t dir)
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Playlist> pl = playlist ();
|
boost::shared_ptr<Playlist> pl = playlist ();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ public:
|
||||||
LayerDisplay layer_display () const;
|
LayerDisplay layer_display () const;
|
||||||
|
|
||||||
boost::shared_ptr<ARDOUR::Region> find_next_region (nframes_t pos, ARDOUR::RegionPoint, int32_t dir);
|
boost::shared_ptr<ARDOUR::Region> find_next_region (nframes_t pos, ARDOUR::RegionPoint, int32_t dir);
|
||||||
nframes64_t find_next_region_boundary (nframes64_t pos, int32_t dir);
|
framepos_t find_next_region_boundary (framepos_t pos, int32_t dir);
|
||||||
|
|
||||||
/* Editing operations */
|
/* Editing operations */
|
||||||
void cut_copy_clear (Selection&, Editing::CutCopyOp);
|
void cut_copy_clear (Selection&, Editing::CutCopyOp);
|
||||||
|
|
|
||||||
|
|
@ -1099,7 +1099,7 @@ bool
|
||||||
SoundFileOmega::check_info (const vector<string>& paths, bool& same_size, bool& src_needed, bool& multichannel)
|
SoundFileOmega::check_info (const vector<string>& paths, bool& same_size, bool& src_needed, bool& multichannel)
|
||||||
{
|
{
|
||||||
SoundFileInfo info;
|
SoundFileInfo info;
|
||||||
nframes64_t sz = 0;
|
framepos_t sz = 0;
|
||||||
bool err = false;
|
bool err = false;
|
||||||
string errmsg;
|
string errmsg;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,12 +102,12 @@ TempoLines::draw (ARDOUR::TempoMap::BBTPointList& points, double frames_per_unit
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
xpos = rint(((nframes64_t)(*i).frame) / (double)frames_per_unit);
|
xpos = rint(((framepos_t)(*i).frame) / (double)frames_per_unit);
|
||||||
const double needed_right = xpos;
|
const double needed_right = xpos;
|
||||||
|
|
||||||
i = points.begin();
|
i = points.begin();
|
||||||
|
|
||||||
xpos = rint(((nframes64_t)(*i).frame) / (double)frames_per_unit);
|
xpos = rint(((framepos_t)(*i).frame) / (double)frames_per_unit);
|
||||||
const double needed_left = xpos;
|
const double needed_left = xpos;
|
||||||
|
|
||||||
Lines::iterator left = _lines.lower_bound(xpos); // first line >= xpos
|
Lines::iterator left = _lines.lower_bound(xpos); // first line >= xpos
|
||||||
|
|
@ -145,7 +145,7 @@ TempoLines::draw (ARDOUR::TempoMap::BBTPointList& points, double frames_per_unit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
xpos = rint(((nframes64_t)(*i).frame) / (double)frames_per_unit);
|
xpos = rint(((framepos_t)(*i).frame) / (double)frames_per_unit);
|
||||||
|
|
||||||
if (inserted_last_time && !_lines.empty()) {
|
if (inserted_last_time && !_lines.empty()) {
|
||||||
li = _lines.lower_bound(xpos); // first line >= xpos
|
li = _lines.lower_bound(xpos); // first line >= xpos
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ TimeAxisViewItem::set_constant_heights ()
|
||||||
*/
|
*/
|
||||||
TimeAxisViewItem::TimeAxisViewItem(
|
TimeAxisViewItem::TimeAxisViewItem(
|
||||||
const string & it_name, ArdourCanvas::Group& parent, TimeAxisView& tv, double spu, Gdk::Color const & base_color,
|
const string & it_name, ArdourCanvas::Group& parent, TimeAxisView& tv, double spu, Gdk::Color const & base_color,
|
||||||
nframes64_t start, nframes64_t duration, bool recording, bool automation, Visibility vis
|
framepos_t start, framecnt_t duration, bool recording, bool automation, Visibility vis
|
||||||
)
|
)
|
||||||
: trackview (tv)
|
: trackview (tv)
|
||||||
, _height (1.0)
|
, _height (1.0)
|
||||||
|
|
@ -136,7 +136,7 @@ TimeAxisViewItem::TimeAxisViewItem (const TimeAxisViewItem& other)
|
||||||
|
|
||||||
void
|
void
|
||||||
TimeAxisViewItem::init (
|
TimeAxisViewItem::init (
|
||||||
const string& it_name, double spu, Gdk::Color const & base_color, nframes64_t start, nframes64_t duration, Visibility vis, bool wide, bool high)
|
const string& it_name, double spu, Gdk::Color const & base_color, framepos_t start, framepos_t duration, Visibility vis, bool wide, bool high)
|
||||||
{
|
{
|
||||||
item_name = it_name;
|
item_name = it_name;
|
||||||
samples_per_unit = spu;
|
samples_per_unit = spu;
|
||||||
|
|
@ -241,7 +241,7 @@ TimeAxisViewItem::~TimeAxisViewItem()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool
|
bool
|
||||||
TimeAxisViewItem::set_position(nframes64_t pos, void* src, double* delta)
|
TimeAxisViewItem::set_position(framepos_t pos, void* src, double* delta)
|
||||||
{
|
{
|
||||||
if (position_locked) {
|
if (position_locked) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -277,7 +277,7 @@ TimeAxisViewItem::set_position(nframes64_t pos, void* src, double* delta)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return position of this item on the timeline */
|
/** @return position of this item on the timeline */
|
||||||
nframes64_t
|
framepos_t
|
||||||
TimeAxisViewItem::get_position() const
|
TimeAxisViewItem::get_position() const
|
||||||
{
|
{
|
||||||
return frame_position;
|
return frame_position;
|
||||||
|
|
@ -292,7 +292,7 @@ TimeAxisViewItem::get_position() const
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool
|
bool
|
||||||
TimeAxisViewItem::set_duration (nframes64_t dur, void* src)
|
TimeAxisViewItem::set_duration (framepos_t dur, void* src)
|
||||||
{
|
{
|
||||||
if ((dur > max_item_duration) || (dur < min_item_duration)) {
|
if ((dur > max_item_duration) || (dur < min_item_duration)) {
|
||||||
warning << string_compose (_("new duration %1 frames is out of bounds for %2"), get_item_name(), dur)
|
warning << string_compose (_("new duration %1 frames is out of bounds for %2"), get_item_name(), dur)
|
||||||
|
|
@ -313,7 +313,7 @@ TimeAxisViewItem::set_duration (nframes64_t dur, void* src)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return duration of this item */
|
/** @return duration of this item */
|
||||||
nframes64_t
|
framepos_t
|
||||||
TimeAxisViewItem::get_duration() const
|
TimeAxisViewItem::get_duration() const
|
||||||
{
|
{
|
||||||
return item_duration;
|
return item_duration;
|
||||||
|
|
@ -326,14 +326,14 @@ TimeAxisViewItem::get_duration() const
|
||||||
* @param src the identity of the object that initiated the change
|
* @param src the identity of the object that initiated the change
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TimeAxisViewItem::set_max_duration(nframes64_t dur, void* src)
|
TimeAxisViewItem::set_max_duration(framecnt_t dur, void* src)
|
||||||
{
|
{
|
||||||
max_item_duration = dur;
|
max_item_duration = dur;
|
||||||
MaxDurationChanged(max_item_duration, src); /* EMIT_SIGNAL */
|
MaxDurationChanged(max_item_duration, src); /* EMIT_SIGNAL */
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return the maximum duration that this item may have */
|
/** @return the maximum duration that this item may have */
|
||||||
nframes64_t
|
framecnt_t
|
||||||
TimeAxisViewItem::get_max_duration() const
|
TimeAxisViewItem::get_max_duration() const
|
||||||
{
|
{
|
||||||
return max_item_duration;
|
return max_item_duration;
|
||||||
|
|
@ -346,14 +346,14 @@ TimeAxisViewItem::get_max_duration() const
|
||||||
* @param src the identity of the object that initiated the change
|
* @param src the identity of the object that initiated the change
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TimeAxisViewItem::set_min_duration(nframes64_t dur, void* src)
|
TimeAxisViewItem::set_min_duration(framecnt_t dur, void* src)
|
||||||
{
|
{
|
||||||
min_item_duration = dur;
|
min_item_duration = dur;
|
||||||
MinDurationChanged(max_item_duration, src); /* EMIT_SIGNAL */
|
MinDurationChanged(max_item_duration, src); /* EMIT_SIGNAL */
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return the minimum duration that this item mey have */
|
/** @return the minimum duration that this item mey have */
|
||||||
nframes64_t
|
framecnt_t
|
||||||
TimeAxisViewItem::get_min_duration() const
|
TimeAxisViewItem::get_min_duration() const
|
||||||
{
|
{
|
||||||
return min_item_duration;
|
return min_item_duration;
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,9 @@
|
||||||
|
|
||||||
class TimeAxisView;
|
class TimeAxisView;
|
||||||
|
|
||||||
|
using ARDOUR::framepos_t;
|
||||||
|
using ARDOUR::framecnt_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class for items that may appear upon a TimeAxisView.
|
* Base class for items that may appear upon a TimeAxisView.
|
||||||
*/
|
*/
|
||||||
|
|
@ -41,14 +44,14 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
|
||||||
public:
|
public:
|
||||||
virtual ~TimeAxisViewItem();
|
virtual ~TimeAxisViewItem();
|
||||||
|
|
||||||
virtual bool set_position(nframes64_t, void*, double* delta = 0);
|
virtual bool set_position(framepos_t, void*, double* delta = 0);
|
||||||
nframes64_t get_position() const;
|
framepos_t get_position() const;
|
||||||
virtual bool set_duration(nframes64_t, void*);
|
virtual bool set_duration(framecnt_t, void*);
|
||||||
nframes64_t get_duration() const;
|
framecnt_t get_duration() const;
|
||||||
virtual void set_max_duration(nframes64_t, void*);
|
virtual void set_max_duration(framecnt_t, void*);
|
||||||
nframes64_t get_max_duration() const;
|
framecnt_t get_max_duration() const;
|
||||||
virtual void set_min_duration(nframes64_t, void*);
|
virtual void set_min_duration(framecnt_t, void*);
|
||||||
nframes64_t get_min_duration() const;
|
framecnt_t get_min_duration() const;
|
||||||
virtual void set_position_locked(bool, void*);
|
virtual void set_position_locked(bool, void*);
|
||||||
bool get_position_locked() const;
|
bool get_position_locked() const;
|
||||||
void set_max_duration_active(bool, void*);
|
void set_max_duration_active(bool, void*);
|
||||||
|
|
@ -112,19 +115,19 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
|
||||||
sigc::signal<void,std::string,std::string,void*> NameChanged;
|
sigc::signal<void,std::string,std::string,void*> NameChanged;
|
||||||
|
|
||||||
/** Emiited when the position of this item changes */
|
/** Emiited when the position of this item changes */
|
||||||
sigc::signal<void,nframes64_t,void*> PositionChanged;
|
sigc::signal<void,framepos_t,void*> PositionChanged;
|
||||||
|
|
||||||
/** Emitted when the position lock of this item is changed */
|
/** Emitted when the position lock of this item is changed */
|
||||||
sigc::signal<void,bool,void*> PositionLockChanged;
|
sigc::signal<void,bool,void*> PositionLockChanged;
|
||||||
|
|
||||||
/** Emitted when the duration of this item changes */
|
/** Emitted when the duration of this item changes */
|
||||||
sigc::signal<void,nframes64_t,void*> DurationChanged;
|
sigc::signal<void,framecnt_t,void*> DurationChanged;
|
||||||
|
|
||||||
/** Emitted when the maximum item duration is changed */
|
/** Emitted when the maximum item duration is changed */
|
||||||
sigc::signal<void,nframes64_t,void*> MaxDurationChanged;
|
sigc::signal<void,framecnt_t,void*> MaxDurationChanged;
|
||||||
|
|
||||||
/** Emitted when the mionimum item duration is changed */
|
/** Emitted when the mionimum item duration is changed */
|
||||||
sigc::signal<void,nframes64_t,void*> MinDurationChanged;
|
sigc::signal<void,framecnt_t,void*> MinDurationChanged;
|
||||||
|
|
||||||
enum Visibility {
|
enum Visibility {
|
||||||
ShowFrame = 0x1,
|
ShowFrame = 0x1,
|
||||||
|
|
@ -137,13 +140,13 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
|
||||||
FullWidthNameHighlight = 0x80
|
FullWidthNameHighlight = 0x80
|
||||||
};
|
};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
TimeAxisViewItem(const std::string &, ArdourCanvas::Group&, TimeAxisView&, double, Gdk::Color const &,
|
TimeAxisViewItem(const std::string &, ArdourCanvas::Group&, TimeAxisView&, double, Gdk::Color const &,
|
||||||
nframes64_t, nframes64_t, bool recording = false, bool automation = false, Visibility v = Visibility (0));
|
framepos_t, framepos_t, bool recording = false, bool automation = false, Visibility v = Visibility (0));
|
||||||
|
|
||||||
TimeAxisViewItem (const TimeAxisViewItem&);
|
TimeAxisViewItem (const TimeAxisViewItem&);
|
||||||
|
|
||||||
void init (const std::string&, double, Gdk::Color const &, nframes64_t, nframes64_t, Visibility, bool, bool);
|
void init (const std::string&, double, Gdk::Color const &, framepos_t, framepos_t, Visibility, bool, bool);
|
||||||
|
|
||||||
virtual void compute_colors (Gdk::Color const &);
|
virtual void compute_colors (Gdk::Color const &);
|
||||||
virtual void set_colors();
|
virtual void set_colors();
|
||||||
|
|
@ -163,16 +166,16 @@ protected:
|
||||||
bool position_locked;
|
bool position_locked;
|
||||||
|
|
||||||
/** position of this item on the timeline */
|
/** position of this item on the timeline */
|
||||||
nframes64_t frame_position;
|
framepos_t frame_position;
|
||||||
|
|
||||||
/** duration of this item upon the timeline */
|
/** duration of this item upon the timeline */
|
||||||
nframes64_t item_duration;
|
framecnt_t item_duration;
|
||||||
|
|
||||||
/** maximum duration that this item can have */
|
/** maximum duration that this item can have */
|
||||||
nframes64_t max_item_duration;
|
framecnt_t max_item_duration;
|
||||||
|
|
||||||
/** minimum duration that this item can have */
|
/** minimum duration that this item can have */
|
||||||
nframes64_t min_item_duration;
|
framecnt_t min_item_duration;
|
||||||
|
|
||||||
/** indicates whether the max duration constraint is active */
|
/** indicates whether the max duration constraint is active */
|
||||||
bool max_duration_active;
|
bool max_duration_active;
|
||||||
|
|
|
||||||
|
|
@ -434,7 +434,7 @@ Amp::GainControl::get_value (void) const
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Amp::setup_gain_automation (sframes_t start_frame, sframes_t end_frame, nframes_t nframes)
|
Amp::setup_gain_automation (framepos_t start_frame, framepos_t end_frame, nframes_t nframes)
|
||||||
{
|
{
|
||||||
Glib::Mutex::Lock am (control_lock(), Glib::TRY_LOCK);
|
Glib::Mutex::Lock am (control_lock(), Glib::TRY_LOCK);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ public:
|
||||||
bool apply_gain() const { return _apply_gain; }
|
bool apply_gain() const { return _apply_gain; }
|
||||||
void apply_gain(bool yn) { _apply_gain = yn; }
|
void apply_gain(bool yn) { _apply_gain = yn; }
|
||||||
|
|
||||||
void setup_gain_automation (sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
|
void setup_gain_automation (framepos_t start_frame, framepos_t end_frame, nframes_t nframes);
|
||||||
|
|
||||||
bool apply_gain_automation() const { return _apply_gain_automation; }
|
bool apply_gain_automation() const { return _apply_gain_automation; }
|
||||||
void apply_gain_automation(bool yn) { _apply_gain_automation = yn; }
|
void apply_gain_automation(bool yn) { _apply_gain_automation = yn; }
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ class AudioTrack : public Track
|
||||||
return DataType::AUDIO;
|
return DataType::AUDIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
int export_stuff (BufferSet& bufs, sframes_t start_frame, nframes_t nframes, bool enable_processing = true);
|
int export_stuff (BufferSet& bufs, framepos_t start_frame, framecnt_t nframes, bool enable_processing = true);
|
||||||
|
|
||||||
void freeze_me (InterThreadInfo&);
|
void freeze_me (InterThreadInfo&);
|
||||||
void unfreeze ();
|
void unfreeze ();
|
||||||
|
|
|
||||||
|
|
@ -56,8 +56,8 @@ class AudioAnalyser : public boost::noncopyable {
|
||||||
AnalysisPlugin* plugin;
|
AnalysisPlugin* plugin;
|
||||||
AnalysisPluginKey plugin_key;
|
AnalysisPluginKey plugin_key;
|
||||||
|
|
||||||
nframes64_t bufsize;
|
nframes_t bufsize;
|
||||||
nframes64_t stepsize;
|
nframes_t stepsize;
|
||||||
|
|
||||||
int initialize_plugin (AnalysisPluginKey name, float sample_rate);
|
int initialize_plugin (AnalysisPluginKey name, float sample_rate);
|
||||||
int analyse (const std::string& path, Readable*, uint32_t channel);
|
int analyse (const std::string& path, Readable*, uint32_t channel);
|
||||||
|
|
|
||||||
|
|
@ -58,8 +58,8 @@ public:
|
||||||
/* this block of methods do nothing for regular file sources, but are significant
|
/* this block of methods do nothing for regular file sources, but are significant
|
||||||
for files used in destructive recording.
|
for files used in destructive recording.
|
||||||
*/
|
*/
|
||||||
virtual sframes_t last_capture_start_frame() const { return 0; }
|
virtual framepos_t last_capture_start_frame() const { return 0; }
|
||||||
virtual void mark_capture_start (sframes_t) {}
|
virtual void mark_capture_start (framepos_t) {}
|
||||||
virtual void mark_capture_end () {}
|
virtual void mark_capture_end () {}
|
||||||
virtual void clear_capture_marks() {}
|
virtual void clear_capture_marks() {}
|
||||||
virtual bool one_of_several_channels () const { return false; }
|
virtual bool one_of_several_channels () const { return false; }
|
||||||
|
|
|
||||||
|
|
@ -177,12 +177,12 @@ class AudioRegion : public Region
|
||||||
void resume_fade_in ();
|
void resume_fade_in ();
|
||||||
void resume_fade_out ();
|
void resume_fade_out ();
|
||||||
|
|
||||||
void add_transient (nframes64_t where);
|
void add_transient (framepos_t where);
|
||||||
void remove_transient (nframes64_t where);
|
void remove_transient (framepos_t where);
|
||||||
int set_transients (AnalysisFeatureList&);
|
int set_transients (AnalysisFeatureList&);
|
||||||
int get_transients (AnalysisFeatureList&, bool force_new = false);
|
int get_transients (AnalysisFeatureList&, bool force_new = false);
|
||||||
int update_transient (nframes64_t old_position, nframes64_t new_position);
|
int update_transient (framepos_t old_position, framepos_t new_position);
|
||||||
int adjust_transients (nframes64_t delta);
|
int adjust_transients (framepos_t delta);
|
||||||
|
|
||||||
std::list<std::pair<frameoffset_t, framecnt_t> > find_silence (Sample, framecnt_t, InterThreadInfo&) const;
|
std::list<std::pair<frameoffset_t, framecnt_t> > find_silence (Sample, framecnt_t, InterThreadInfo&) const;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,15 +29,15 @@ namespace ARDOUR {
|
||||||
|
|
||||||
class TempoMap;
|
class TempoMap;
|
||||||
|
|
||||||
class BeatsFramesConverter : public Evoral::TimeConverter<double,sframes_t> {
|
class BeatsFramesConverter : public Evoral::TimeConverter<double,framepos_t> {
|
||||||
public:
|
public:
|
||||||
BeatsFramesConverter(const TempoMap& tempo_map, sframes_t origin)
|
BeatsFramesConverter(const TempoMap& tempo_map, framepos_t origin)
|
||||||
: Evoral::TimeConverter<double, sframes_t> (origin)
|
: Evoral::TimeConverter<double, framepos_t> (origin)
|
||||||
, _tempo_map(tempo_map)
|
, _tempo_map(tempo_map)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
sframes_t to(double beats) const;
|
framepos_t to(double beats) const;
|
||||||
double from(sframes_t frames) const;
|
double from(framepos_t frames) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const TempoMap& _tempo_map;
|
const TempoMap& _tempo_map;
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ class CAImportableSource : public ImportableSource {
|
||||||
nframes_t length() const;
|
nframes_t length() const;
|
||||||
nframes_t samplerate() const;
|
nframes_t samplerate() const;
|
||||||
void seek (nframes_t pos);
|
void seek (nframes_t pos);
|
||||||
nframes64_t natural_position() const { return 0; }
|
framepos_t natural_position() const { return 0; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
mutable CAAudioFile af;
|
mutable CAAudioFile af;
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ class CoreAudioSource : public AudioFileSource {
|
||||||
static int get_soundfile_info (string path, SoundFileInfo& _info, string& error_msg);
|
static int get_soundfile_info (string path, SoundFileInfo& _info, string& error_msg);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
nframes_t read_unlocked (Sample *dst, sframes_t start, nframes_t cnt) const;
|
nframes_t read_unlocked (Sample *dst, framepos_t start, nframes_t cnt) const;
|
||||||
nframes_t write_unlocked (Sample *dst, nframes_t cnt) { return 0; }
|
nframes_t write_unlocked (Sample *dst, nframes_t cnt) { return 0; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
||||||
|
|
@ -66,15 +66,15 @@ public:
|
||||||
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
|
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
|
||||||
bool configure_io (ChanCount in, ChanCount out);
|
bool configure_io (ChanCount in, ChanCount out);
|
||||||
|
|
||||||
void run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes, bool);
|
void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, nframes_t nframes, bool);
|
||||||
|
|
||||||
/* supplemental method used with MIDI */
|
/* supplemental method used with MIDI */
|
||||||
|
|
||||||
void flush_buffers (nframes_t nframes, nframes64_t time);
|
void flush_buffers (nframes_t nframes, framepos_t time);
|
||||||
void no_outs_cuz_we_no_monitor(bool);
|
void no_outs_cuz_we_no_monitor(bool);
|
||||||
void cycle_start (nframes_t);
|
void cycle_start (nframes_t);
|
||||||
void increment_output_offset (nframes_t);
|
void increment_output_offset (nframes_t);
|
||||||
void transport_stopped (sframes_t frame);
|
void transport_stopped (framepos_t frame);
|
||||||
|
|
||||||
BufferSet& output_buffers() { return *_output_buffers; }
|
BufferSet& output_buffers() { return *_output_buffers; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ class ExportHandler : public ExportElementFactory
|
||||||
TimespanBounds timespan_bounds;
|
TimespanBounds timespan_bounds;
|
||||||
|
|
||||||
PBD::ScopedConnection process_connection;
|
PBD::ScopedConnection process_connection;
|
||||||
sframes_t process_position;
|
framepos_t process_position;
|
||||||
|
|
||||||
/* CD Marker stuff */
|
/* CD Marker stuff */
|
||||||
|
|
||||||
|
|
@ -161,13 +161,13 @@ class ExportHandler : public ExportElementFactory
|
||||||
|
|
||||||
/* Track info */
|
/* Track info */
|
||||||
uint32_t track_number;
|
uint32_t track_number;
|
||||||
sframes_t track_position;
|
framepos_t track_position;
|
||||||
sframes_t track_duration;
|
framepos_t track_duration;
|
||||||
sframes_t track_start_frame;
|
framepos_t track_start_frame;
|
||||||
|
|
||||||
/* Index info */
|
/* Index info */
|
||||||
uint32_t index_number;
|
uint32_t index_number;
|
||||||
sframes_t index_position;
|
framepos_t index_position;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -182,7 +182,7 @@ class ExportHandler : public ExportElementFactory
|
||||||
void write_index_info_cue (CDMarkerStatus & status);
|
void write_index_info_cue (CDMarkerStatus & status);
|
||||||
void write_index_info_toc (CDMarkerStatus & status);
|
void write_index_info_toc (CDMarkerStatus & status);
|
||||||
|
|
||||||
void frames_to_cd_frames_string (char* buf, sframes_t when);
|
void frames_to_cd_frames_string (char* buf, framepos_t when);
|
||||||
|
|
||||||
int cue_tracknum;
|
int cue_tracknum;
|
||||||
int cue_indexnum;
|
int cue_indexnum;
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ class IO : public SessionObject, public Latent
|
||||||
/* three utility functions - this just seems to be simplest place to put them */
|
/* three utility functions - this just seems to be simplest place to put them */
|
||||||
|
|
||||||
void collect_input (BufferSet& bufs, nframes_t nframes, ChanCount offset);
|
void collect_input (BufferSet& bufs, nframes_t nframes, ChanCount offset);
|
||||||
void process_input (boost::shared_ptr<Processor>, sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
|
void process_input (boost::shared_ptr<Processor>, framepos_t start_frame, framepos_t end_frame, nframes_t nframes);
|
||||||
void copy_to_outputs (BufferSet& bufs, DataType type, nframes_t nframes, nframes_t offset);
|
void copy_to_outputs (BufferSet& bufs, DataType type, nframes_t nframes, nframes_t offset);
|
||||||
|
|
||||||
/* AudioTrack::deprecated_use_diskstream_connections() needs these */
|
/* AudioTrack::deprecated_use_diskstream_connections() needs these */
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ class Location : public SessionHandleRef, public PBD::StatefulDestructible
|
||||||
};
|
};
|
||||||
|
|
||||||
Location (Session &);
|
Location (Session &);
|
||||||
Location (Session &, nframes64_t, nframes64_t, const std::string &, Flags bits = Flags(0));
|
Location (Session &, framepos_t, framepos_t, const std::string &, Flags bits = Flags(0));
|
||||||
Location (const Location& other);
|
Location (const Location& other);
|
||||||
Location (Session &, const XMLNode&);
|
Location (Session &, const XMLNode&);
|
||||||
Location* operator= (const Location& other);
|
Location* operator= (const Location& other);
|
||||||
|
|
@ -61,15 +61,15 @@ class Location : public SessionHandleRef, public PBD::StatefulDestructible
|
||||||
void lock ();
|
void lock ();
|
||||||
void unlock ();
|
void unlock ();
|
||||||
|
|
||||||
nframes64_t start() const { return _start; }
|
framepos_t start() const { return _start; }
|
||||||
nframes64_t end() const { return _end; }
|
framepos_t end() const { return _end; }
|
||||||
nframes64_t length() const { return _end - _start; }
|
framepos_t length() const { return _end - _start; }
|
||||||
|
|
||||||
int set_start (nframes64_t s, bool force = false, bool allow_bbt_recompute = true);
|
int set_start (framepos_t s, bool force = false, bool allow_bbt_recompute = true);
|
||||||
int set_end (nframes64_t e, bool force = false, bool allow_bbt_recompute = true);
|
int set_end (framepos_t e, bool force = false, bool allow_bbt_recompute = true);
|
||||||
int set (nframes64_t start, nframes64_t end, bool allow_bbt_recompute = true);
|
int set (framepos_t start, framepos_t end, bool allow_bbt_recompute = true);
|
||||||
|
|
||||||
int move_to (nframes64_t pos);
|
int move_to (framepos_t pos);
|
||||||
|
|
||||||
const std::string& name() const { return _name; }
|
const std::string& name() const { return _name; }
|
||||||
void set_name (const std::string &str) { _name = str; name_changed(this); }
|
void set_name (const std::string &str) { _name = str; name_changed(this); }
|
||||||
|
|
@ -116,9 +116,9 @@ class Location : public SessionHandleRef, public PBD::StatefulDestructible
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string _name;
|
std::string _name;
|
||||||
nframes64_t _start;
|
framepos_t _start;
|
||||||
BBT_Time _bbt_start;
|
BBT_Time _bbt_start;
|
||||||
nframes64_t _end;
|
framepos_t _end;
|
||||||
BBT_Time _bbt_end;
|
BBT_Time _bbt_end;
|
||||||
Flags _flags;
|
Flags _flags;
|
||||||
bool _locked;
|
bool _locked;
|
||||||
|
|
@ -159,12 +159,12 @@ class Locations : public SessionHandleRef, public PBD::StatefulDestructible
|
||||||
int set_current (Location *, bool want_lock = true);
|
int set_current (Location *, bool want_lock = true);
|
||||||
Location *current () const { return current_location; }
|
Location *current () const { return current_location; }
|
||||||
|
|
||||||
Location* first_location_before (nframes64_t, bool include_special_ranges = false);
|
Location* first_location_before (framepos_t, bool include_special_ranges = false);
|
||||||
Location* first_location_after (nframes64_t, bool include_special_ranges = false);
|
Location* first_location_after (framepos_t, bool include_special_ranges = false);
|
||||||
|
|
||||||
void marks_either_side (nframes64_t const, nframes64_t &, nframes64_t &) const;
|
void marks_either_side (framepos_t const, framepos_t &, framepos_t &) const;
|
||||||
|
|
||||||
void find_all_between (nframes64_t start, nframes64_t, LocationList&, Location::Flags);
|
void find_all_between (framepos_t start, framepos_t, LocationList&, Location::Flags);
|
||||||
|
|
||||||
enum Change {
|
enum Change {
|
||||||
ADDITION, ///< a location was added, but nothing else changed
|
ADDITION, ///< a location was added, but nothing else changed
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ class MidiPort : public Port {
|
||||||
void cycle_end (nframes_t nframes);
|
void cycle_end (nframes_t nframes);
|
||||||
void cycle_split ();
|
void cycle_split ();
|
||||||
|
|
||||||
void flush_buffers (nframes_t nframes, nframes64_t time, nframes_t offset = 0);
|
void flush_buffers (nframes_t nframes, framepos_t time, nframes_t offset = 0);
|
||||||
void transport_stopped ();
|
void transport_stopped ();
|
||||||
|
|
||||||
size_t raw_buffer_size(jack_nframes_t nframes) const;
|
size_t raw_buffer_size(jack_nframes_t nframes) const;
|
||||||
|
|
|
||||||
|
|
@ -59,25 +59,25 @@ class MidiSource : virtual public Source
|
||||||
* \param tracker an optional pointer to MidiStateTracker object, for note on/off tracking
|
* \param tracker an optional pointer to MidiStateTracker object, for note on/off tracking
|
||||||
*/
|
*/
|
||||||
virtual nframes_t midi_read (Evoral::EventSink<nframes_t>& dst,
|
virtual nframes_t midi_read (Evoral::EventSink<nframes_t>& dst,
|
||||||
sframes_t source_start,
|
framepos_t source_start,
|
||||||
sframes_t start, nframes_t cnt,
|
framepos_t start, nframes_t cnt,
|
||||||
MidiStateTracker*,
|
MidiStateTracker*,
|
||||||
std::set<Evoral::Parameter> const &) const;
|
std::set<Evoral::Parameter> const &) const;
|
||||||
|
|
||||||
virtual nframes_t midi_write (MidiRingBuffer<nframes_t>& src,
|
virtual nframes_t midi_write (MidiRingBuffer<nframes_t>& src,
|
||||||
sframes_t source_start,
|
framepos_t source_start,
|
||||||
nframes_t cnt);
|
nframes_t cnt);
|
||||||
|
|
||||||
virtual void append_event_unlocked_beats(const Evoral::Event<Evoral::MusicalTime>& ev) = 0;
|
virtual void append_event_unlocked_beats(const Evoral::Event<Evoral::MusicalTime>& ev) = 0;
|
||||||
|
|
||||||
virtual void append_event_unlocked_frames(const Evoral::Event<nframes_t>& ev,
|
virtual void append_event_unlocked_frames(const Evoral::Event<nframes_t>& ev,
|
||||||
sframes_t source_start) = 0;
|
framepos_t source_start) = 0;
|
||||||
|
|
||||||
virtual bool empty () const;
|
virtual bool empty () const;
|
||||||
virtual framecnt_t length (framepos_t pos) const;
|
virtual framecnt_t length (framepos_t pos) const;
|
||||||
virtual void update_length (framepos_t pos, framecnt_t cnt);
|
virtual void update_length (framepos_t pos, framecnt_t cnt);
|
||||||
|
|
||||||
virtual void mark_streaming_midi_write_started (NoteMode mode, sframes_t start_time);
|
virtual void mark_streaming_midi_write_started (NoteMode mode, framepos_t start_time);
|
||||||
virtual void mark_streaming_write_started ();
|
virtual void mark_streaming_write_started ();
|
||||||
virtual void mark_streaming_write_completed ();
|
virtual void mark_streaming_write_completed ();
|
||||||
|
|
||||||
|
|
@ -92,7 +92,7 @@ class MidiSource : virtual public Source
|
||||||
static PBD::Signal1<void,MidiSource*> MidiSourceCreated;
|
static PBD::Signal1<void,MidiSource*> MidiSourceCreated;
|
||||||
|
|
||||||
// Signal a range of recorded data is available for reading from model()
|
// Signal a range of recorded data is available for reading from model()
|
||||||
mutable PBD::Signal2<void,sframes_t,nframes_t> ViewDataRangeReady;
|
mutable PBD::Signal2<void,framepos_t,nframes_t> ViewDataRangeReady;
|
||||||
|
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
int set_state (const XMLNode&, int version);
|
int set_state (const XMLNode&, int version);
|
||||||
|
|
@ -134,12 +134,12 @@ class MidiSource : virtual public Source
|
||||||
virtual void flush_midi() = 0;
|
virtual void flush_midi() = 0;
|
||||||
|
|
||||||
virtual nframes_t read_unlocked (Evoral::EventSink<nframes_t>& dst,
|
virtual nframes_t read_unlocked (Evoral::EventSink<nframes_t>& dst,
|
||||||
sframes_t position,
|
framepos_t position,
|
||||||
sframes_t start, nframes_t cnt,
|
framepos_t start, nframes_t cnt,
|
||||||
MidiStateTracker* tracker) const = 0;
|
MidiStateTracker* tracker) const = 0;
|
||||||
|
|
||||||
virtual nframes_t write_unlocked (MidiRingBuffer<nframes_t>& dst,
|
virtual nframes_t write_unlocked (MidiRingBuffer<nframes_t>& dst,
|
||||||
sframes_t position,
|
framepos_t position,
|
||||||
nframes_t cnt) = 0;
|
nframes_t cnt) = 0;
|
||||||
|
|
||||||
std::string _captured_for;
|
std::string _captured_for;
|
||||||
|
|
@ -153,8 +153,8 @@ class MidiSource : virtual public Source
|
||||||
mutable bool _model_iter_valid;
|
mutable bool _model_iter_valid;
|
||||||
|
|
||||||
mutable double _length_beats;
|
mutable double _length_beats;
|
||||||
mutable sframes_t _last_read_end;
|
mutable framepos_t _last_read_end;
|
||||||
sframes_t _last_write_end;
|
framepos_t _last_write_end;
|
||||||
|
|
||||||
/** Map of interpolation styles to use for Parameters; if they are not in this map,
|
/** Map of interpolation styles to use for Parameters; if they are not in this map,
|
||||||
* the correct interpolation style can be obtained from EventTypeMap::interpolation_of ()
|
* the correct interpolation style can be obtained from EventTypeMap::interpolation_of ()
|
||||||
|
|
|
||||||
|
|
@ -41,8 +41,8 @@ public:
|
||||||
void track (const MidiBuffer::iterator& from, const MidiBuffer::iterator& to, bool& looped);
|
void track (const MidiBuffer::iterator& from, const MidiBuffer::iterator& to, bool& looped);
|
||||||
void add (uint8_t note, uint8_t chn);
|
void add (uint8_t note, uint8_t chn);
|
||||||
void remove (uint8_t note, uint8_t chn);
|
void remove (uint8_t note, uint8_t chn);
|
||||||
void resolve_notes (MidiBuffer& buffer, nframes64_t time);
|
void resolve_notes (MidiBuffer& buffer, framepos_t time);
|
||||||
void resolve_notes (Evoral::EventSink<nframes_t>& buffer, nframes64_t time);
|
void resolve_notes (Evoral::EventSink<nframes_t>& buffer, framepos_t time);
|
||||||
void resolve_notes (MidiSource& src, Evoral::MusicalTime time);
|
void resolve_notes (MidiSource& src, Evoral::MusicalTime time);
|
||||||
void dump (std::ostream&);
|
void dump (std::ostream&);
|
||||||
void reset ();
|
void reset ();
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ public:
|
||||||
|
|
||||||
void set_latency_delay (nframes_t);
|
void set_latency_delay (nframes_t);
|
||||||
|
|
||||||
int export_stuff (BufferSet& bufs, nframes_t nframes, sframes_t end_frame);
|
int export_stuff (BufferSet& bufs, nframes_t nframes, framepos_t end_frame);
|
||||||
|
|
||||||
void freeze_me (InterThreadInfo&);
|
void freeze_me (InterThreadInfo&);
|
||||||
void unfreeze ();
|
void unfreeze ();
|
||||||
|
|
@ -110,7 +110,7 @@ protected:
|
||||||
private:
|
private:
|
||||||
boost::shared_ptr<MidiDiskstream> midi_diskstream () const;
|
boost::shared_ptr<MidiDiskstream> midi_diskstream () const;
|
||||||
|
|
||||||
void write_out_of_band_data (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
|
void write_out_of_band_data (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, nframes_t nframes);
|
||||||
|
|
||||||
void set_state_part_two ();
|
void set_state_part_two ();
|
||||||
void set_state_part_three ();
|
void set_state_part_three ();
|
||||||
|
|
@ -122,7 +122,7 @@ private:
|
||||||
uint8_t _default_channel;
|
uint8_t _default_channel;
|
||||||
bool _midi_thru;
|
bool _midi_thru;
|
||||||
|
|
||||||
int no_roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame,
|
int no_roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
|
||||||
bool state_changing, bool can_record, bool rec_monitors_input);
|
bool state_changing, bool can_record, bool rec_monitors_input);
|
||||||
void push_midi_input_to_step_edit_ringbuffer (nframes_t nframes);
|
void push_midi_input_to_step_edit_ringbuffer (nframes_t nframes);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -60,24 +60,24 @@ class PIChaser {
|
||||||
PIChaser();
|
PIChaser();
|
||||||
~PIChaser();
|
~PIChaser();
|
||||||
|
|
||||||
double get_ratio( nframes64_t chasetime_measured, nframes64_t chasetime, nframes64_t slavetime_measured, nframes64_t slavetime, bool in_control, int period_size );
|
double get_ratio( framepos_t chasetime_measured, framepos_t chasetime, framepos_t slavetime_measured, framepos_t slavetime, bool in_control, int period_size );
|
||||||
void reset();
|
void reset();
|
||||||
nframes64_t want_locate() { return want_locate_val; }
|
framepos_t want_locate() { return want_locate_val; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PIController *pic;
|
PIController *pic;
|
||||||
nframes64_t realtime_stamps[ESTIMATOR_SIZE];
|
framepos_t realtime_stamps[ESTIMATOR_SIZE];
|
||||||
nframes64_t chasetime_stamps[ESTIMATOR_SIZE];
|
framepos_t chasetime_stamps[ESTIMATOR_SIZE];
|
||||||
int array_index;
|
int array_index;
|
||||||
nframes64_t want_locate_val;
|
framepos_t want_locate_val;
|
||||||
|
|
||||||
void feed_estimator( nframes64_t realtime, nframes64_t chasetime );
|
void feed_estimator( framepos_t realtime, framepos_t chasetime );
|
||||||
double get_estimate();
|
double get_estimate();
|
||||||
|
|
||||||
double speed;
|
double speed;
|
||||||
|
|
||||||
double speed_threshold;
|
double speed_threshold;
|
||||||
nframes64_t pos_threshold;
|
framepos_t pos_threshold;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ public:
|
||||||
virtual void cycle_end (nframes_t) = 0;
|
virtual void cycle_end (nframes_t) = 0;
|
||||||
virtual void cycle_split () = 0;
|
virtual void cycle_split () = 0;
|
||||||
virtual Buffer& get_buffer (nframes_t nframes, nframes_t offset = 0) = 0;
|
virtual Buffer& get_buffer (nframes_t nframes, nframes_t offset = 0) = 0;
|
||||||
virtual void flush_buffers (nframes_t nframes, nframes64_t /*time*/, nframes_t offset = 0) {
|
virtual void flush_buffers (nframes_t nframes, framepos_t /*time*/, nframes_t offset = 0) {
|
||||||
assert(offset < nframes);
|
assert(offset < nframes);
|
||||||
}
|
}
|
||||||
virtual void transport_stopped () {}
|
virtual void transport_stopped () {}
|
||||||
|
|
|
||||||
|
|
@ -103,8 +103,8 @@ class Region
|
||||||
* START: first frame of the region within its source(s)
|
* START: first frame of the region within its source(s)
|
||||||
* LENGTH: number of frames the region represents
|
* LENGTH: number of frames the region represents
|
||||||
*/
|
*/
|
||||||
sframes_t position () const { return _position; }
|
framepos_t position () const { return _position; }
|
||||||
sframes_t start () const { return _start; }
|
framepos_t start () const { return _start; }
|
||||||
framecnt_t length() const { return _length; }
|
framecnt_t length() const { return _length; }
|
||||||
layer_t layer () const { return _layer; }
|
layer_t layer () const { return _layer; }
|
||||||
|
|
||||||
|
|
@ -112,15 +112,15 @@ class Region
|
||||||
|
|
||||||
/* these two are valid ONLY during a StateChanged signal handler */
|
/* these two are valid ONLY during a StateChanged signal handler */
|
||||||
|
|
||||||
sframes_t last_position() const { return _last_position; }
|
framepos_t last_position() const { return _last_position; }
|
||||||
framecnt_t last_length() const { return _last_length; }
|
framecnt_t last_length() const { return _last_length; }
|
||||||
|
|
||||||
sframes_t ancestral_start () const { return _ancestral_start; }
|
framepos_t ancestral_start () const { return _ancestral_start; }
|
||||||
framecnt_t ancestral_length () const { return _ancestral_length; }
|
framecnt_t ancestral_length () const { return _ancestral_length; }
|
||||||
float stretch() const { return _stretch; }
|
float stretch() const { return _stretch; }
|
||||||
float shift() const { return _shift; }
|
float shift() const { return _shift; }
|
||||||
|
|
||||||
void set_ancestral_data (nframes64_t start, nframes64_t length, float stretch, float shift);
|
void set_ancestral_data (framepos_t start, framepos_t length, float stretch, float shift);
|
||||||
|
|
||||||
frameoffset_t sync_offset(int& dir) const;
|
frameoffset_t sync_offset(int& dir) const;
|
||||||
framepos_t sync_position() const;
|
framepos_t sync_position() const;
|
||||||
|
|
@ -247,16 +247,16 @@ class Region
|
||||||
|
|
||||||
virtual int exportme (ARDOUR::Session&, ARDOUR::ExportSpecification&) = 0;
|
virtual int exportme (ARDOUR::Session&, ARDOUR::ExportSpecification&) = 0;
|
||||||
|
|
||||||
virtual void add_transient (nframes64_t) {
|
virtual void add_transient (framepos_t) {
|
||||||
// no transients, but its OK
|
// no transients, but its OK
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int update_transient (nframes64_t /* old_position */, nframes64_t /* new_position */) {
|
virtual int update_transient (framepos_t /* old_position */, framepos_t /* new_position */) {
|
||||||
// no transients, but its OK
|
// no transients, but its OK
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void remove_transient (nframes64_t /* where */) {
|
virtual void remove_transient (framepos_t /* where */) {
|
||||||
// no transients, but its OK
|
// no transients, but its OK
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -271,7 +271,7 @@ class Region
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int adjust_transients (nframes64_t /*delta*/) {
|
virtual int adjust_transients (framepos_t /*delta*/) {
|
||||||
// no transients, but its OK
|
// no transients, but its OK
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ private:
|
||||||
uint32_t _bitslot;
|
uint32_t _bitslot;
|
||||||
|
|
||||||
void collect_input (BufferSet& bufs, nframes_t nframes, ChanCount offset=ChanCount::ZERO);
|
void collect_input (BufferSet& bufs, nframes_t nframes, ChanCount offset=ChanCount::ZERO);
|
||||||
void just_meter_input (sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
|
void just_meter_input (framepos_t start_frame, framepos_t end_frame, nframes_t nframes);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace ARDOUR
|
} // namespace ARDOUR
|
||||||
|
|
|
||||||
|
|
@ -101,13 +101,13 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
|
||||||
|
|
||||||
/* these are the core of the API of a Route. see the protected sections as well */
|
/* these are the core of the API of a Route. see the protected sections as well */
|
||||||
|
|
||||||
virtual int roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame,
|
virtual int roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
|
||||||
int declick, bool can_record, bool rec_monitors_input, bool& need_butler);
|
int declick, bool can_record, bool rec_monitors_input, bool& need_butler);
|
||||||
|
|
||||||
virtual int no_roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame,
|
virtual int no_roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
|
||||||
bool state_changing, bool can_record, bool rec_monitors_input);
|
bool state_changing, bool can_record, bool rec_monitors_input);
|
||||||
|
|
||||||
virtual int silent_roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame,
|
virtual int silent_roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
|
||||||
bool can_record, bool rec_monitors_input, bool& need_butler);
|
bool can_record, bool rec_monitors_input, bool& need_butler);
|
||||||
|
|
||||||
virtual void toggle_monitor_input ();
|
virtual void toggle_monitor_input ();
|
||||||
|
|
@ -120,7 +120,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
|
||||||
|
|
||||||
/* end of vfunc-based API */
|
/* end of vfunc-based API */
|
||||||
|
|
||||||
void shift (nframes64_t, nframes64_t);
|
void shift (framepos_t, framepos_t);
|
||||||
|
|
||||||
void set_gain (gain_t val, void *src);
|
void set_gain (gain_t val, void *src);
|
||||||
void inc_gain (gain_t delta, void *src);
|
void inc_gain (gain_t delta, void *src);
|
||||||
|
|
@ -382,20 +382,20 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
|
||||||
void mod_solo_by_others_downstream (int32_t);
|
void mod_solo_by_others_downstream (int32_t);
|
||||||
bool has_external_redirects() const;
|
bool has_external_redirects() const;
|
||||||
void curve_reallocate ();
|
void curve_reallocate ();
|
||||||
void just_meter_input (sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
|
void just_meter_input (framepos_t start_frame, framepos_t end_frame, nframes_t nframes);
|
||||||
virtual void set_block_size (nframes_t nframes);
|
virtual void set_block_size (nframes_t nframes);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
nframes_t check_initial_delay (nframes_t, nframes_t&);
|
nframes_t check_initial_delay (nframes_t, nframes_t&);
|
||||||
|
|
||||||
void passthru (sframes_t start_frame, sframes_t end_frame,
|
void passthru (framepos_t start_frame, framepos_t end_frame,
|
||||||
nframes_t nframes, int declick);
|
nframes_t nframes, int declick);
|
||||||
|
|
||||||
virtual void write_out_of_band_data (BufferSet& /* bufs */, sframes_t /* start_frame */, sframes_t /* end_frame */,
|
virtual void write_out_of_band_data (BufferSet& /* bufs */, framepos_t /* start_frame */, framepos_t /* end_frame */,
|
||||||
nframes_t /* nframes */) {}
|
nframes_t /* nframes */) {}
|
||||||
|
|
||||||
virtual void process_output_buffers (BufferSet& bufs,
|
virtual void process_output_buffers (BufferSet& bufs,
|
||||||
sframes_t start_frame, sframes_t end_frame,
|
framepos_t start_frame, framepos_t end_frame,
|
||||||
nframes_t nframes, bool with_processors, int declick);
|
nframes_t nframes, bool with_processors, int declick);
|
||||||
|
|
||||||
boost::shared_ptr<IO> _input;
|
boost::shared_ptr<IO> _input;
|
||||||
|
|
@ -444,7 +444,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
|
||||||
|
|
||||||
int configure_processors (ProcessorStreams*);
|
int configure_processors (ProcessorStreams*);
|
||||||
|
|
||||||
void passthru_silence (sframes_t start_frame, sframes_t end_frame,
|
void passthru_silence (framepos_t start_frame, framepos_t end_frame,
|
||||||
nframes_t nframes, int declick);
|
nframes_t nframes, int declick);
|
||||||
|
|
||||||
void silence (nframes_t);
|
void silence (nframes_t);
|
||||||
|
|
|
||||||
|
|
@ -212,7 +212,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
|
||||||
|
|
||||||
boost::shared_ptr<RouteList> get_routes_with_internal_returns() const;
|
boost::shared_ptr<RouteList> get_routes_with_internal_returns() const;
|
||||||
|
|
||||||
boost::shared_ptr<RouteList> get_routes_with_regions_at (nframes64_t const) const;
|
boost::shared_ptr<RouteList> get_routes_with_regions_at (framepos_t const) const;
|
||||||
|
|
||||||
uint32_t nroutes() const { return routes.reader()->size(); }
|
uint32_t nroutes() const { return routes.reader()->size(); }
|
||||||
uint32_t ntracks () const;
|
uint32_t ntracks () const;
|
||||||
|
|
@ -270,8 +270,8 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
|
||||||
/* Transport mechanism signals */
|
/* Transport mechanism signals */
|
||||||
|
|
||||||
PBD::Signal0<void> TransportStateChange; /* generic */
|
PBD::Signal0<void> TransportStateChange; /* generic */
|
||||||
PBD::Signal1<void,nframes64_t> PositionChanged; /* sent after any non-sequential motion */
|
PBD::Signal1<void,framepos_t> PositionChanged; /* sent after any non-sequential motion */
|
||||||
PBD::Signal1<void,nframes64_t> Xrun;
|
PBD::Signal1<void,framepos_t> Xrun;
|
||||||
PBD::Signal0<void> TransportLooped;
|
PBD::Signal0<void> TransportLooped;
|
||||||
|
|
||||||
/** emitted when a locate has occurred */
|
/** emitted when a locate has occurred */
|
||||||
|
|
@ -428,9 +428,9 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
|
||||||
|
|
||||||
/* Time */
|
/* Time */
|
||||||
|
|
||||||
nframes64_t transport_frame () const {return _transport_frame; }
|
framepos_t transport_frame () const {return _transport_frame; }
|
||||||
nframes64_t audible_frame () const;
|
framepos_t audible_frame () const;
|
||||||
nframes64_t requested_return_frame() const { return _requested_return_frame; }
|
framepos_t requested_return_frame() const { return _requested_return_frame; }
|
||||||
|
|
||||||
enum PullupFormat {
|
enum PullupFormat {
|
||||||
pullup_Plus4Plus1,
|
pullup_Plus4Plus1,
|
||||||
|
|
@ -774,8 +774,8 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
|
||||||
|
|
||||||
boost::shared_ptr<SessionPlaylists> playlists;
|
boost::shared_ptr<SessionPlaylists> playlists;
|
||||||
|
|
||||||
void send_mmc_locate (nframes64_t);
|
void send_mmc_locate (framepos_t);
|
||||||
int send_full_time_code (nframes64_t);
|
int send_full_time_code (framepos_t);
|
||||||
|
|
||||||
PBD::Signal0<void> RouteOrderKeyChanged;
|
PBD::Signal0<void> RouteOrderKeyChanged;
|
||||||
|
|
||||||
|
|
@ -822,7 +822,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
|
||||||
nframes_t _nominal_frame_rate; //ignores audioengine setting, "native" SR
|
nframes_t _nominal_frame_rate; //ignores audioengine setting, "native" SR
|
||||||
int transport_sub_state;
|
int transport_sub_state;
|
||||||
mutable gint _record_status;
|
mutable gint _record_status;
|
||||||
volatile nframes64_t _transport_frame;
|
volatile framepos_t _transport_frame;
|
||||||
Location* _session_range_location; ///< session range, or 0 if there is nothing in the session yet
|
Location* _session_range_location; ///< session range, or 0 if there is nothing in the session yet
|
||||||
Slave* _slave;
|
Slave* _slave;
|
||||||
bool _silent;
|
bool _silent;
|
||||||
|
|
@ -834,9 +834,9 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
|
||||||
CubicInterpolation interpolation;
|
CubicInterpolation interpolation;
|
||||||
|
|
||||||
bool auto_play_legal;
|
bool auto_play_legal;
|
||||||
nframes64_t _last_slave_transport_frame;
|
framepos_t _last_slave_transport_frame;
|
||||||
nframes_t maximum_output_latency;
|
nframes_t maximum_output_latency;
|
||||||
volatile nframes64_t _requested_return_frame;
|
volatile framepos_t _requested_return_frame;
|
||||||
nframes_t current_block_size;
|
nframes_t current_block_size;
|
||||||
nframes_t _worst_output_latency;
|
nframes_t _worst_output_latency;
|
||||||
nframes_t _worst_input_latency;
|
nframes_t _worst_input_latency;
|
||||||
|
|
@ -1147,9 +1147,9 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
|
||||||
void overwrite_some_buffers (Track *);
|
void overwrite_some_buffers (Track *);
|
||||||
void flush_all_inserts ();
|
void flush_all_inserts ();
|
||||||
int micro_locate (nframes_t distance);
|
int micro_locate (nframes_t distance);
|
||||||
void locate (nframes64_t, bool with_roll, bool with_flush, bool with_loop=false, bool force=false, bool with_mmc=true);
|
void locate (framepos_t, bool with_roll, bool with_flush, bool with_loop=false, bool force=false, bool with_mmc=true);
|
||||||
void start_locate (nframes64_t, bool with_roll, bool with_flush, bool with_loop=false, bool force=false);
|
void start_locate (framepos_t, bool with_roll, bool with_flush, bool with_loop=false, bool force=false);
|
||||||
void force_locate (nframes64_t frame, bool with_roll = false);
|
void force_locate (framepos_t frame, bool with_roll = false);
|
||||||
void set_track_speed (Track *, double speed);
|
void set_track_speed (Track *, double speed);
|
||||||
void set_transport_speed (double speed, bool abort = false, bool clear_state = false);
|
void set_transport_speed (double speed, bool abort = false, bool clear_state = false);
|
||||||
void stop_transport (bool abort = false, bool clear_state = false);
|
void stop_transport (bool abort = false, bool clear_state = false);
|
||||||
|
|
|
||||||
|
|
@ -53,14 +53,14 @@ struct SessionEvent {
|
||||||
|
|
||||||
Type type;
|
Type type;
|
||||||
Action action;
|
Action action;
|
||||||
nframes64_t action_frame;
|
framepos_t action_frame;
|
||||||
nframes64_t target_frame;
|
framepos_t target_frame;
|
||||||
double speed;
|
double speed;
|
||||||
|
|
||||||
union {
|
union {
|
||||||
void* ptr;
|
void* ptr;
|
||||||
bool yes_or_no;
|
bool yes_or_no;
|
||||||
nframes64_t target2_frame;
|
framepos_t target2_frame;
|
||||||
Slave* slave;
|
Slave* slave;
|
||||||
Route* route;
|
Route* route;
|
||||||
};
|
};
|
||||||
|
|
@ -148,13 +148,13 @@ protected:
|
||||||
|
|
||||||
void dump_events () const;
|
void dump_events () const;
|
||||||
void merge_event (SessionEvent*);
|
void merge_event (SessionEvent*);
|
||||||
void replace_event (SessionEvent::Type, nframes64_t action_frame, nframes64_t target = 0);
|
void replace_event (SessionEvent::Type, framepos_t action_frame, framepos_t target = 0);
|
||||||
bool _replace_event (SessionEvent*);
|
bool _replace_event (SessionEvent*);
|
||||||
bool _remove_event (SessionEvent *);
|
bool _remove_event (SessionEvent *);
|
||||||
void _clear_event_type (SessionEvent::Type);
|
void _clear_event_type (SessionEvent::Type);
|
||||||
|
|
||||||
void add_event (nframes64_t action_frame, SessionEvent::Type type, nframes64_t target_frame = 0);
|
void add_event (framepos_t action_frame, SessionEvent::Type type, framepos_t target_frame = 0);
|
||||||
void remove_event (nframes64_t frame, SessionEvent::Type type);
|
void remove_event (framepos_t frame, SessionEvent::Type type);
|
||||||
|
|
||||||
virtual void process_event(SessionEvent*) = 0;
|
virtual void process_event(SessionEvent*) = 0;
|
||||||
virtual void set_next_event () = 0;
|
virtual void set_next_event () = 0;
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ class Slave {
|
||||||
* @param position - The transport position requested
|
* @param position - The transport position requested
|
||||||
* @return - The return value is currently ignored (see Session::follow_slave)
|
* @return - The return value is currently ignored (see Session::follow_slave)
|
||||||
*/
|
*/
|
||||||
virtual bool speed_and_position (double& speed, nframes64_t& position) = 0;
|
virtual bool speed_and_position (double& speed, framepos_t& position) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* reports to ARDOUR whether the Slave is currently synced to its external
|
* reports to ARDOUR whether the Slave is currently synced to its external
|
||||||
|
|
@ -156,7 +156,7 @@ class Slave {
|
||||||
* only if requires_seekahead() returns true.
|
* only if requires_seekahead() returns true.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
virtual nframes64_t seekahead_distance() const { return 0; }
|
virtual framepos_t seekahead_distance() const { return 0; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return - when returning true, ARDOUR will use transport speed 1.0 no matter what
|
* @return - when returning true, ARDOUR will use transport speed 1.0 no matter what
|
||||||
|
|
@ -176,12 +176,12 @@ class ISlaveSessionProxy {
|
||||||
virtual ~ISlaveSessionProxy() {}
|
virtual ~ISlaveSessionProxy() {}
|
||||||
virtual TempoMap& tempo_map() const { return *((TempoMap *) 0); }
|
virtual TempoMap& tempo_map() const { return *((TempoMap *) 0); }
|
||||||
virtual nframes_t frame_rate() const { return 0; }
|
virtual nframes_t frame_rate() const { return 0; }
|
||||||
virtual nframes64_t audible_frame () const { return 0; }
|
virtual framepos_t audible_frame () const { return 0; }
|
||||||
virtual nframes64_t transport_frame () const { return 0; }
|
virtual framepos_t transport_frame () const { return 0; }
|
||||||
virtual nframes_t frames_since_cycle_start () const { return 0; }
|
virtual nframes_t frames_since_cycle_start () const { return 0; }
|
||||||
virtual nframes64_t frame_time () const { return 0; }
|
virtual framepos_t frame_time () const { return 0; }
|
||||||
|
|
||||||
virtual void request_locate (nframes64_t /*frame*/, bool with_roll = false) {
|
virtual void request_locate (framepos_t /*frame*/, bool with_roll = false) {
|
||||||
(void) with_roll;
|
(void) with_roll;
|
||||||
}
|
}
|
||||||
virtual void request_transport_speed (double /*speed*/) {}
|
virtual void request_transport_speed (double /*speed*/) {}
|
||||||
|
|
@ -197,19 +197,19 @@ class SlaveSessionProxy : public ISlaveSessionProxy {
|
||||||
|
|
||||||
TempoMap& tempo_map() const;
|
TempoMap& tempo_map() const;
|
||||||
nframes_t frame_rate() const;
|
nframes_t frame_rate() const;
|
||||||
nframes64_t audible_frame () const;
|
framepos_t audible_frame () const;
|
||||||
nframes64_t transport_frame () const;
|
framepos_t transport_frame () const;
|
||||||
nframes_t frames_since_cycle_start () const;
|
nframes_t frames_since_cycle_start () const;
|
||||||
nframes64_t frame_time () const;
|
framepos_t frame_time () const;
|
||||||
|
|
||||||
void request_locate (nframes64_t frame, bool with_roll = false);
|
void request_locate (framepos_t frame, bool with_roll = false);
|
||||||
void request_transport_speed (double speed);
|
void request_transport_speed (double speed);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SafeTime {
|
struct SafeTime {
|
||||||
volatile int guard1;
|
volatile int guard1;
|
||||||
nframes64_t position;
|
framepos_t position;
|
||||||
nframes64_t timestamp;
|
framepos_t timestamp;
|
||||||
double speed;
|
double speed;
|
||||||
volatile int guard2;
|
volatile int guard2;
|
||||||
|
|
||||||
|
|
@ -228,7 +228,7 @@ class MTC_Slave : public Slave {
|
||||||
~MTC_Slave ();
|
~MTC_Slave ();
|
||||||
|
|
||||||
void rebind (MIDI::Port&);
|
void rebind (MIDI::Port&);
|
||||||
bool speed_and_position (double&, nframes64_t&);
|
bool speed_and_position (double&, framepos_t&);
|
||||||
|
|
||||||
bool locked() const;
|
bool locked() const;
|
||||||
bool ok() const;
|
bool ok() const;
|
||||||
|
|
@ -236,7 +236,7 @@ class MTC_Slave : public Slave {
|
||||||
|
|
||||||
nframes_t resolution() const;
|
nframes_t resolution() const;
|
||||||
bool requires_seekahead () const { return true; }
|
bool requires_seekahead () const { return true; }
|
||||||
nframes64_t seekahead_distance() const;
|
framepos_t seekahead_distance() const;
|
||||||
bool give_slave_full_control_over_transport_speed() const;
|
bool give_slave_full_control_over_transport_speed() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
@ -275,8 +275,8 @@ class MTC_Slave : public Slave {
|
||||||
void update_mtc_time (const MIDI::byte *, bool, nframes_t);
|
void update_mtc_time (const MIDI::byte *, bool, nframes_t);
|
||||||
void update_mtc_status (MIDI::MTC_Status);
|
void update_mtc_status (MIDI::MTC_Status);
|
||||||
void read_current (SafeTime *) const;
|
void read_current (SafeTime *) const;
|
||||||
void reset_window (nframes64_t);
|
void reset_window (framepos_t);
|
||||||
bool outside_window (nframes64_t) const;
|
bool outside_window (framepos_t) const;
|
||||||
void process_apparent_speed (double);
|
void process_apparent_speed (double);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -289,7 +289,7 @@ class MIDIClock_Slave : public Slave {
|
||||||
~MIDIClock_Slave ();
|
~MIDIClock_Slave ();
|
||||||
|
|
||||||
void rebind (MIDI::Port&);
|
void rebind (MIDI::Port&);
|
||||||
bool speed_and_position (double&, nframes64_t&);
|
bool speed_and_position (double&, framepos_t&);
|
||||||
|
|
||||||
bool locked() const;
|
bool locked() const;
|
||||||
bool ok() const;
|
bool ok() const;
|
||||||
|
|
@ -344,17 +344,17 @@ class MIDIClock_Slave : public Slave {
|
||||||
double b, c, omega;
|
double b, c, omega;
|
||||||
|
|
||||||
void reset ();
|
void reset ();
|
||||||
void start (MIDI::Parser& parser, nframes64_t timestamp);
|
void start (MIDI::Parser& parser, framepos_t timestamp);
|
||||||
void contineu (MIDI::Parser& parser, nframes64_t timestamp);
|
void contineu (MIDI::Parser& parser, framepos_t timestamp);
|
||||||
void stop (MIDI::Parser& parser, nframes64_t timestamp);
|
void stop (MIDI::Parser& parser, framepos_t timestamp);
|
||||||
void position (MIDI::Parser& parser, MIDI::byte* message, size_t size);
|
void position (MIDI::Parser& parser, MIDI::byte* message, size_t size);
|
||||||
// we can't use continue because it is a C++ keyword
|
// we can't use continue because it is a C++ keyword
|
||||||
void calculate_one_ppqn_in_frames_at(nframes64_t time);
|
void calculate_one_ppqn_in_frames_at(framepos_t time);
|
||||||
nframes64_t calculate_song_position(uint16_t song_position_in_sixteenth_notes);
|
framepos_t calculate_song_position(uint16_t song_position_in_sixteenth_notes);
|
||||||
void calculate_filter_coefficients();
|
void calculate_filter_coefficients();
|
||||||
void update_midi_clock (MIDI::Parser& parser, nframes64_t timestamp);
|
void update_midi_clock (MIDI::Parser& parser, framepos_t timestamp);
|
||||||
void read_current (SafeTime *) const;
|
void read_current (SafeTime *) const;
|
||||||
bool stop_if_no_more_clock_events(nframes64_t& pos, nframes64_t now);
|
bool stop_if_no_more_clock_events(framepos_t& pos, framepos_t now);
|
||||||
|
|
||||||
/// whether transport should be rolling
|
/// whether transport should be rolling
|
||||||
bool _started;
|
bool _started;
|
||||||
|
|
@ -370,7 +370,7 @@ class JACK_Slave : public Slave
|
||||||
JACK_Slave (jack_client_t*);
|
JACK_Slave (jack_client_t*);
|
||||||
~JACK_Slave ();
|
~JACK_Slave ();
|
||||||
|
|
||||||
bool speed_and_position (double& speed, nframes64_t& pos);
|
bool speed_and_position (double& speed, framepos_t& pos);
|
||||||
|
|
||||||
bool starting() const { return _starting; }
|
bool starting() const { return _starting; }
|
||||||
bool locked() const;
|
bool locked() const;
|
||||||
|
|
|
||||||
|
|
@ -52,9 +52,9 @@ public:
|
||||||
bool set_name (const std::string& newname) { return (set_source_name(newname, false) == 0); }
|
bool set_name (const std::string& newname) { return (set_source_name(newname, false) == 0); }
|
||||||
|
|
||||||
void append_event_unlocked_beats (const Evoral::Event<Evoral::MusicalTime>& ev);
|
void append_event_unlocked_beats (const Evoral::Event<Evoral::MusicalTime>& ev);
|
||||||
void append_event_unlocked_frames (const Evoral::Event<nframes_t>& ev, sframes_t source_start);
|
void append_event_unlocked_frames (const Evoral::Event<nframes_t>& ev, framepos_t source_start);
|
||||||
|
|
||||||
void mark_streaming_midi_write_started (NoteMode mode, sframes_t start_time);
|
void mark_streaming_midi_write_started (NoteMode mode, framepos_t start_time);
|
||||||
void mark_streaming_write_completed ();
|
void mark_streaming_write_completed ();
|
||||||
|
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
|
|
@ -74,21 +74,21 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
nframes_t read_unlocked (Evoral::EventSink<nframes_t>& dst,
|
nframes_t read_unlocked (Evoral::EventSink<nframes_t>& dst,
|
||||||
sframes_t position,
|
framepos_t position,
|
||||||
sframes_t start,
|
framepos_t start,
|
||||||
nframes_t cnt,
|
nframes_t cnt,
|
||||||
MidiStateTracker* tracker) const;
|
MidiStateTracker* tracker) const;
|
||||||
|
|
||||||
nframes_t write_unlocked (MidiRingBuffer<nframes_t>& src,
|
nframes_t write_unlocked (MidiRingBuffer<nframes_t>& src,
|
||||||
sframes_t position,
|
framepos_t position,
|
||||||
nframes_t cnt);
|
nframes_t cnt);
|
||||||
|
|
||||||
double _last_ev_time_beats;
|
double _last_ev_time_beats;
|
||||||
sframes_t _last_ev_time_frames;
|
framepos_t _last_ev_time_frames;
|
||||||
/** end time (start + duration) of last call to read_unlocked */
|
/** end time (start + duration) of last call to read_unlocked */
|
||||||
mutable sframes_t _smf_last_read_end;
|
mutable framepos_t _smf_last_read_end;
|
||||||
/** time (in SMF ticks, 1 tick per _ppqn) of the last event read by read_unlocked */
|
/** time (in SMF ticks, 1 tick per _ppqn) of the last event read by read_unlocked */
|
||||||
mutable sframes_t _smf_last_read_time;
|
mutable framepos_t _smf_last_read_time;
|
||||||
};
|
};
|
||||||
|
|
||||||
}; /* namespace ARDOUR */
|
}; /* namespace ARDOUR */
|
||||||
|
|
|
||||||
|
|
@ -47,10 +47,10 @@ class SndFileSource : public AudioFileSource {
|
||||||
int update_header (framepos_t when, struct tm&, time_t);
|
int update_header (framepos_t when, struct tm&, time_t);
|
||||||
int flush_header ();
|
int flush_header ();
|
||||||
|
|
||||||
nframes64_t natural_position () const;
|
framepos_t natural_position () const;
|
||||||
|
|
||||||
sframes_t last_capture_start_frame() const;
|
framepos_t last_capture_start_frame() const;
|
||||||
void mark_capture_start (sframes_t);
|
void mark_capture_start (framepos_t);
|
||||||
void mark_capture_end ();
|
void mark_capture_end ();
|
||||||
void clear_capture_marks();
|
void clear_capture_marks();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -97,8 +97,8 @@ class Source : public SessionObject
|
||||||
std::string get_transients_path() const;
|
std::string get_transients_path() const;
|
||||||
int load_transients (const std::string&);
|
int load_transients (const std::string&);
|
||||||
|
|
||||||
sframes_t timeline_position() const { return _timeline_position; }
|
framepos_t timeline_position() const { return _timeline_position; }
|
||||||
virtual void set_timeline_position (sframes_t pos);
|
virtual void set_timeline_position (framepos_t pos);
|
||||||
|
|
||||||
void set_allow_remove_if_empty (bool yn);
|
void set_allow_remove_if_empty (bool yn);
|
||||||
|
|
||||||
|
|
@ -114,7 +114,7 @@ class Source : public SessionObject
|
||||||
DataType _type;
|
DataType _type;
|
||||||
Flag _flags;
|
Flag _flags;
|
||||||
time_t _timestamp;
|
time_t _timestamp;
|
||||||
sframes_t _timeline_position;
|
framepos_t _timeline_position;
|
||||||
bool _analysed;
|
bool _analysed;
|
||||||
mutable Glib::Mutex _lock;
|
mutable Glib::Mutex _lock;
|
||||||
mutable Glib::Mutex _analysis_lock;
|
mutable Glib::Mutex _analysis_lock;
|
||||||
|
|
|
||||||
|
|
@ -80,18 +80,18 @@ class MetricSection {
|
||||||
public:
|
public:
|
||||||
MetricSection (const BBT_Time& start)
|
MetricSection (const BBT_Time& start)
|
||||||
: _start (start), _frame (0), _movable (true) {}
|
: _start (start), _frame (0), _movable (true) {}
|
||||||
MetricSection (nframes64_t start)
|
MetricSection (framepos_t start)
|
||||||
: _frame (start), _movable (true) {}
|
: _frame (start), _movable (true) {}
|
||||||
|
|
||||||
virtual ~MetricSection() {}
|
virtual ~MetricSection() {}
|
||||||
|
|
||||||
const BBT_Time& start() const { return _start; }
|
const BBT_Time& start() const { return _start; }
|
||||||
nframes64_t frame() const { return _frame; }
|
framepos_t frame() const { return _frame; }
|
||||||
|
|
||||||
void set_movable (bool yn) { _movable = yn; }
|
void set_movable (bool yn) { _movable = yn; }
|
||||||
bool movable() const { return _movable; }
|
bool movable() const { return _movable; }
|
||||||
|
|
||||||
virtual void set_frame (nframes64_t f) {
|
virtual void set_frame (framepos_t f) {
|
||||||
_frame = f;
|
_frame = f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -109,7 +109,7 @@ class MetricSection {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BBT_Time _start;
|
BBT_Time _start;
|
||||||
nframes64_t _frame;
|
framepos_t _frame;
|
||||||
bool _movable;
|
bool _movable;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -117,7 +117,7 @@ class MeterSection : public MetricSection, public Meter {
|
||||||
public:
|
public:
|
||||||
MeterSection (const BBT_Time& start, double bpb, double note_type)
|
MeterSection (const BBT_Time& start, double bpb, double note_type)
|
||||||
: MetricSection (start), Meter (bpb, note_type) {}
|
: MetricSection (start), Meter (bpb, note_type) {}
|
||||||
MeterSection (nframes64_t start, double bpb, double note_type)
|
MeterSection (framepos_t start, double bpb, double note_type)
|
||||||
: MetricSection (start), Meter (bpb, note_type) {}
|
: MetricSection (start), Meter (bpb, note_type) {}
|
||||||
MeterSection (const XMLNode&);
|
MeterSection (const XMLNode&);
|
||||||
|
|
||||||
|
|
@ -130,7 +130,7 @@ class TempoSection : public MetricSection, public Tempo {
|
||||||
public:
|
public:
|
||||||
TempoSection (const BBT_Time& start, double qpm, double note_type)
|
TempoSection (const BBT_Time& start, double qpm, double note_type)
|
||||||
: MetricSection (start), Tempo (qpm, note_type) {}
|
: MetricSection (start), Tempo (qpm, note_type) {}
|
||||||
TempoSection (nframes64_t start, double qpm, double note_type)
|
TempoSection (framepos_t start, double qpm, double note_type)
|
||||||
: MetricSection (start), Tempo (qpm, note_type) {}
|
: MetricSection (start), Tempo (qpm, note_type) {}
|
||||||
TempoSection (const XMLNode&);
|
TempoSection (const XMLNode&);
|
||||||
|
|
||||||
|
|
@ -150,25 +150,25 @@ class TempoMetric {
|
||||||
|
|
||||||
void set_tempo (const Tempo& t) { _tempo = &t; }
|
void set_tempo (const Tempo& t) { _tempo = &t; }
|
||||||
void set_meter (const Meter& m) { _meter = &m; }
|
void set_meter (const Meter& m) { _meter = &m; }
|
||||||
void set_frame (nframes64_t f) { _frame = f; }
|
void set_frame (framepos_t f) { _frame = f; }
|
||||||
void set_start (const BBT_Time& t) { _start = t; }
|
void set_start (const BBT_Time& t) { _start = t; }
|
||||||
|
|
||||||
const Meter& meter() const { return *_meter; }
|
const Meter& meter() const { return *_meter; }
|
||||||
const Tempo& tempo() const { return *_tempo; }
|
const Tempo& tempo() const { return *_tempo; }
|
||||||
nframes64_t frame() const { return _frame; }
|
framepos_t frame() const { return _frame; }
|
||||||
const BBT_Time& start() const { return _start; }
|
const BBT_Time& start() const { return _start; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const Meter* _meter;
|
const Meter* _meter;
|
||||||
const Tempo* _tempo;
|
const Tempo* _tempo;
|
||||||
nframes64_t _frame;
|
framepos_t _frame;
|
||||||
BBT_Time _start;
|
BBT_Time _start;
|
||||||
};
|
};
|
||||||
|
|
||||||
class TempoMap : public PBD::StatefulDestructible
|
class TempoMap : public PBD::StatefulDestructible
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TempoMap (nframes64_t frame_rate);
|
TempoMap (nframes_t frame_rate);
|
||||||
~TempoMap();
|
~TempoMap();
|
||||||
|
|
||||||
/* measure-based stuff */
|
/* measure-based stuff */
|
||||||
|
|
@ -180,13 +180,13 @@ class TempoMap : public PBD::StatefulDestructible
|
||||||
|
|
||||||
struct BBTPoint {
|
struct BBTPoint {
|
||||||
BBTPointType type;
|
BBTPointType type;
|
||||||
nframes64_t frame;
|
framepos_t frame;
|
||||||
const Meter* meter;
|
const Meter* meter;
|
||||||
const Tempo* tempo;
|
const Tempo* tempo;
|
||||||
uint32_t bar;
|
uint32_t bar;
|
||||||
uint32_t beat;
|
uint32_t beat;
|
||||||
|
|
||||||
BBTPoint (const Meter& m, const Tempo& t, nframes64_t f,
|
BBTPoint (const Meter& m, const Tempo& t, framepos_t f,
|
||||||
BBTPointType ty, uint32_t b, uint32_t e)
|
BBTPointType ty, uint32_t b, uint32_t e)
|
||||||
: type (ty), frame (f), meter (&m), tempo (&t), bar (b), beat (e) {}
|
: type (ty), frame (f), meter (&m), tempo (&t), bar (b), beat (e) {}
|
||||||
};
|
};
|
||||||
|
|
@ -198,27 +198,27 @@ class TempoMap : public PBD::StatefulDestructible
|
||||||
(obj.*method)(*metrics);
|
(obj.*method)(*metrics);
|
||||||
}
|
}
|
||||||
|
|
||||||
BBTPointList *get_points (nframes64_t start, nframes64_t end) const;
|
BBTPointList *get_points (framepos_t start, framepos_t end) const;
|
||||||
|
|
||||||
void bbt_time (nframes64_t when, BBT_Time&) const;
|
void bbt_time (framepos_t when, BBT_Time&) const;
|
||||||
nframes64_t frame_time (const BBT_Time&) const;
|
framecnt_t frame_time (const BBT_Time&) const;
|
||||||
nframes64_t bbt_duration_at (nframes64_t, const BBT_Time&, int dir) const;
|
framecnt_t bbt_duration_at (framepos_t, const BBT_Time&, int dir) const;
|
||||||
|
|
||||||
void bbt_time_add (nframes64_t origin, BBT_Time& start, const BBT_Time& shift);
|
void bbt_time_add (framepos_t origin, BBT_Time& start, const BBT_Time& shift);
|
||||||
|
|
||||||
static const Tempo& default_tempo() { return _default_tempo; }
|
static const Tempo& default_tempo() { return _default_tempo; }
|
||||||
static const Meter& default_meter() { return _default_meter; }
|
static const Meter& default_meter() { return _default_meter; }
|
||||||
|
|
||||||
const Tempo& tempo_at (nframes64_t) const;
|
const Tempo& tempo_at (framepos_t) const;
|
||||||
const Meter& meter_at (nframes64_t) const;
|
const Meter& meter_at (framepos_t) const;
|
||||||
|
|
||||||
const TempoSection& tempo_section_at (nframes64_t);
|
const TempoSection& tempo_section_at (framepos_t);
|
||||||
|
|
||||||
void add_tempo(const Tempo&, BBT_Time where);
|
void add_tempo(const Tempo&, BBT_Time where);
|
||||||
void add_meter(const Meter&, BBT_Time where);
|
void add_meter(const Meter&, BBT_Time where);
|
||||||
|
|
||||||
void add_tempo(const Tempo&, nframes64_t where);
|
void add_tempo(const Tempo&, framepos_t where);
|
||||||
void add_meter(const Meter&, nframes64_t where);
|
void add_meter(const Meter&, framepos_t where);
|
||||||
|
|
||||||
void move_tempo (TempoSection&, const BBT_Time& to);
|
void move_tempo (TempoSection&, const BBT_Time& to);
|
||||||
void move_meter (MeterSection&, const BBT_Time& to);
|
void move_meter (MeterSection&, const BBT_Time& to);
|
||||||
|
|
@ -229,12 +229,12 @@ class TempoMap : public PBD::StatefulDestructible
|
||||||
void replace_tempo (TempoSection& existing, const Tempo& replacement);
|
void replace_tempo (TempoSection& existing, const Tempo& replacement);
|
||||||
void replace_meter (MeterSection& existing, const Meter& replacement);
|
void replace_meter (MeterSection& existing, const Meter& replacement);
|
||||||
|
|
||||||
nframes64_t round_to_bar (nframes64_t frame, int dir);
|
framepos_t round_to_bar (framepos_t frame, int dir);
|
||||||
nframes64_t round_to_beat (nframes64_t frame, int dir);
|
framepos_t round_to_beat (framepos_t frame, int dir);
|
||||||
nframes64_t round_to_beat_subdivision (nframes64_t fr, int sub_num, int dir);
|
framepos_t round_to_beat_subdivision (framepos_t fr, int sub_num, int dir);
|
||||||
nframes64_t round_to_tick (nframes64_t frame, int dir);
|
framepos_t round_to_tick (framepos_t frame, int dir);
|
||||||
|
|
||||||
void set_length (nframes64_t frames);
|
void set_length (framepos_t frames);
|
||||||
|
|
||||||
XMLNode& get_state (void);
|
XMLNode& get_state (void);
|
||||||
int set_state (const XMLNode&, int version);
|
int set_state (const XMLNode&, int version);
|
||||||
|
|
@ -243,17 +243,17 @@ class TempoMap : public PBD::StatefulDestructible
|
||||||
void clear ();
|
void clear ();
|
||||||
|
|
||||||
TempoMetric metric_at (BBT_Time bbt) const;
|
TempoMetric metric_at (BBT_Time bbt) const;
|
||||||
TempoMetric metric_at (nframes64_t) const;
|
TempoMetric metric_at (framepos_t) const;
|
||||||
void bbt_time_with_metric (nframes64_t, BBT_Time&, const TempoMetric&) const;
|
void bbt_time_with_metric (framepos_t, BBT_Time&, const TempoMetric&) const;
|
||||||
|
|
||||||
BBT_Time bbt_add (const BBT_Time&, const BBT_Time&, const TempoMetric&) const;
|
BBT_Time bbt_add (const BBT_Time&, const BBT_Time&, const TempoMetric&) const;
|
||||||
BBT_Time bbt_add (const BBT_Time& a, const BBT_Time& b) const;
|
BBT_Time bbt_add (const BBT_Time& a, const BBT_Time& b) const;
|
||||||
BBT_Time bbt_subtract (const BBT_Time&, const BBT_Time&) const;
|
BBT_Time bbt_subtract (const BBT_Time&, const BBT_Time&) const;
|
||||||
|
|
||||||
void change_existing_tempo_at (nframes64_t, double bpm, double note_type);
|
void change_existing_tempo_at (framepos_t, double bpm, double note_type);
|
||||||
void change_initial_tempo (double bpm, double note_type);
|
void change_initial_tempo (double bpm, double note_type);
|
||||||
|
|
||||||
void insert_time (nframes64_t, nframes64_t);
|
void insert_time (framepos_t, framecnt_t);
|
||||||
|
|
||||||
int n_tempos () const;
|
int n_tempos () const;
|
||||||
int n_meters () const;
|
int n_meters () const;
|
||||||
|
|
@ -266,26 +266,26 @@ class TempoMap : public PBD::StatefulDestructible
|
||||||
|
|
||||||
Metrics* metrics;
|
Metrics* metrics;
|
||||||
nframes_t _frame_rate;
|
nframes_t _frame_rate;
|
||||||
nframes64_t last_bbt_when;
|
framepos_t last_bbt_when;
|
||||||
bool last_bbt_valid;
|
bool last_bbt_valid;
|
||||||
BBT_Time last_bbt;
|
BBT_Time last_bbt;
|
||||||
mutable Glib::RWLock lock;
|
mutable Glib::RWLock lock;
|
||||||
|
|
||||||
void timestamp_metrics (bool use_bbt);
|
void timestamp_metrics (bool use_bbt);
|
||||||
|
|
||||||
nframes64_t round_to_type (nframes64_t fr, int dir, BBTPointType);
|
framepos_t round_to_type (framepos_t fr, int dir, BBTPointType);
|
||||||
|
|
||||||
nframes64_t frame_time_unlocked (const BBT_Time&) const;
|
framepos_t frame_time_unlocked (const BBT_Time&) const;
|
||||||
|
|
||||||
void bbt_time_unlocked (nframes64_t, BBT_Time&) const;
|
void bbt_time_unlocked (framepos_t, BBT_Time&) const;
|
||||||
|
|
||||||
nframes64_t bbt_duration_at_unlocked (const BBT_Time& when, const BBT_Time& bbt, int dir) const;
|
framecnt_t bbt_duration_at_unlocked (const BBT_Time& when, const BBT_Time& bbt, int dir) const;
|
||||||
|
|
||||||
const MeterSection& first_meter() const;
|
const MeterSection& first_meter() const;
|
||||||
const TempoSection& first_tempo() const;
|
const TempoSection& first_tempo() const;
|
||||||
|
|
||||||
nframes64_t count_frames_between (const BBT_Time&, const BBT_Time&) const;
|
framecnt_t count_frames_between (const BBT_Time&, const BBT_Time&) const;
|
||||||
nframes64_t count_frames_between_metrics (const Meter&, const Tempo&,
|
framecnt_t count_frames_between_metrics (const Meter&, const Tempo&,
|
||||||
const BBT_Time&, const BBT_Time&) const;
|
const BBT_Time&, const BBT_Time&) const;
|
||||||
|
|
||||||
int move_metric_section (MetricSection&, const BBT_Time& to);
|
int move_metric_section (MetricSection&, const BBT_Time& to);
|
||||||
|
|
|
||||||
|
|
@ -53,13 +53,20 @@ namespace ARDOUR {
|
||||||
typedef uint32_t layer_t;
|
typedef uint32_t layer_t;
|
||||||
typedef uint64_t microseconds_t;
|
typedef uint64_t microseconds_t;
|
||||||
typedef uint32_t nframes_t;
|
typedef uint32_t nframes_t;
|
||||||
typedef int64_t nframes64_t;
|
|
||||||
|
|
||||||
typedef int64_t sframes_t;
|
/* Any position measured in audio frames.
|
||||||
|
Assumed to be non-negative but not enforced.
|
||||||
|
*/
|
||||||
typedef int64_t framepos_t;
|
typedef int64_t framepos_t;
|
||||||
/* any offset from a framepos_t, measured in audio frames */
|
|
||||||
|
/* Any distance from a given framepos_t.
|
||||||
|
Maybe positive or negative.
|
||||||
|
*/
|
||||||
typedef int64_t frameoffset_t;
|
typedef int64_t frameoffset_t;
|
||||||
/* any count of audio frames */
|
|
||||||
|
/* Any count of audio frames.
|
||||||
|
Assumed to be positive but not enforced.
|
||||||
|
*/
|
||||||
typedef int64_t framecnt_t;
|
typedef int64_t framecnt_t;
|
||||||
|
|
||||||
static const framepos_t max_framepos = INT64_MAX;
|
static const framepos_t max_framepos = INT64_MAX;
|
||||||
|
|
@ -422,7 +429,7 @@ namespace ARDOUR {
|
||||||
int opts; // really RubberBandStretcher::Options
|
int opts; // really RubberBandStretcher::Options
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::list<nframes64_t> AnalysisFeatureList;
|
typedef std::list<framepos_t> AnalysisFeatureList;
|
||||||
|
|
||||||
typedef std::list<boost::shared_ptr<Route> > RouteList;
|
typedef std::list<boost::shared_ptr<Route> > RouteList;
|
||||||
|
|
||||||
|
|
@ -533,22 +540,22 @@ std::ostream& operator<<(std::ostream& o, const ARDOUR::WaveformScale& sf);
|
||||||
std::ostream& operator<<(std::ostream& o, const ARDOUR::WaveformShape& sf);
|
std::ostream& operator<<(std::ostream& o, const ARDOUR::WaveformShape& sf);
|
||||||
std::ostream& operator<<(std::ostream& o, const ARDOUR::PositionLockStyle& sf);
|
std::ostream& operator<<(std::ostream& o, const ARDOUR::PositionLockStyle& sf);
|
||||||
|
|
||||||
static inline ARDOUR::nframes64_t
|
static inline ARDOUR::framepos_t
|
||||||
session_frame_to_track_frame (ARDOUR::nframes64_t session_frame, double speed)
|
session_frame_to_track_frame (ARDOUR::framepos_t session_frame, double speed)
|
||||||
{
|
{
|
||||||
return (ARDOUR::nframes64_t)( (double)session_frame * speed );
|
return (ARDOUR::framepos_t)( (double)session_frame * speed );
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline ARDOUR::nframes64_t
|
static inline ARDOUR::framepos_t
|
||||||
track_frame_to_session_frame (ARDOUR::nframes64_t track_frame, double speed)
|
track_frame_to_session_frame (ARDOUR::framepos_t track_frame, double speed)
|
||||||
{
|
{
|
||||||
return (ARDOUR::nframes64_t)( (double)track_frame / speed );
|
return (ARDOUR::framepos_t)( (double)track_frame / speed );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* for now, break the rules and use "using" to make these "global" */
|
/* for now, break the rules and use "using" to make these "global" */
|
||||||
|
|
||||||
using ARDOUR::nframes_t;
|
using ARDOUR::nframes_t;
|
||||||
using ARDOUR::nframes64_t;
|
using ARDOUR::framepos_t;
|
||||||
|
|
||||||
|
|
||||||
#endif /* __ardour_types_h__ */
|
#endif /* __ardour_types_h__ */
|
||||||
|
|
|
||||||
|
|
@ -348,7 +348,7 @@ AudioTrack::set_state_part_two ()
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
AudioTrack::roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame, int declick,
|
AudioTrack::roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick,
|
||||||
bool can_record, bool rec_monitors_input, bool& need_butler)
|
bool can_record, bool rec_monitors_input, bool& need_butler)
|
||||||
{
|
{
|
||||||
Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK);
|
Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK);
|
||||||
|
|
@ -522,7 +522,7 @@ AudioTrack::roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame,
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
AudioTrack::export_stuff (BufferSet& buffers, sframes_t start, nframes_t nframes, bool enable_processing)
|
AudioTrack::export_stuff (BufferSet& buffers, framepos_t start, framecnt_t nframes, bool enable_processing)
|
||||||
{
|
{
|
||||||
boost::scoped_array<gain_t> gain_buffer (new gain_t[nframes]);
|
boost::scoped_array<gain_t> gain_buffer (new gain_t[nframes]);
|
||||||
boost::scoped_array<Sample> mix_buffer (new Sample[nframes]);
|
boost::scoped_array<Sample> mix_buffer (new Sample[nframes]);
|
||||||
|
|
@ -533,7 +533,7 @@ AudioTrack::export_stuff (BufferSet& buffers, sframes_t start, nframes_t nframes
|
||||||
boost::shared_ptr<AudioPlaylist> apl = boost::dynamic_pointer_cast<AudioPlaylist>(diskstream->playlist());
|
boost::shared_ptr<AudioPlaylist> apl = boost::dynamic_pointer_cast<AudioPlaylist>(diskstream->playlist());
|
||||||
assert(apl);
|
assert(apl);
|
||||||
|
|
||||||
assert(buffers.get_audio(0).capacity() >= nframes);
|
assert ((framecnt_t) buffers.get_audio(0).capacity() >= nframes);
|
||||||
|
|
||||||
if (apl->read (buffers.get_audio(0).data(), mix_buffer.get(), gain_buffer.get(), start, nframes) != nframes) {
|
if (apl->read (buffers.get_audio(0).data(), mix_buffer.get(), gain_buffer.get(), start, nframes) != nframes) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
||||||
|
|
@ -88,8 +88,8 @@ AudioAnalyser::analyse (const string& path, Readable* src, uint32_t channel)
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
bool done = false;
|
bool done = false;
|
||||||
Sample* data = 0;
|
Sample* data = 0;
|
||||||
nframes64_t len = src->readable_length();
|
framecnt_t len = src->readable_length();
|
||||||
nframes64_t pos = 0;
|
framepos_t pos = 0;
|
||||||
float* bufs[1] = { 0 };
|
float* bufs[1] = { 0 };
|
||||||
string tmp_path;
|
string tmp_path;
|
||||||
|
|
||||||
|
|
@ -111,11 +111,11 @@ AudioAnalyser::analyse (const string& path, Readable* src, uint32_t channel)
|
||||||
|
|
||||||
while (!done) {
|
while (!done) {
|
||||||
|
|
||||||
nframes64_t to_read;
|
nframes_t to_read;
|
||||||
|
|
||||||
/* read from source */
|
/* read from source */
|
||||||
|
|
||||||
to_read = min ((len - pos), bufsize);
|
to_read = min ((len - pos), (framecnt_t) bufsize);
|
||||||
|
|
||||||
if (src->read (data, pos, to_read, channel) != to_read) {
|
if (src->read (data, pos, to_read, channel) != to_read) {
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@ AudioRegion::AudioRegion (const SourceList& srcs)
|
||||||
assert (_sources.size() == _master_sources.size());
|
assert (_sources.size() == _master_sources.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
AudioRegion::AudioRegion (boost::shared_ptr<const AudioRegion> other, nframes64_t offset, bool offset_relative)
|
AudioRegion::AudioRegion (boost::shared_ptr<const AudioRegion> other, framecnt_t offset, bool offset_relative)
|
||||||
: Region (other, offset, offset_relative)
|
: Region (other, offset, offset_relative)
|
||||||
, AUDIOREGION_COPY_STATE (other)
|
, AUDIOREGION_COPY_STATE (other)
|
||||||
, _automatable (other->session())
|
, _automatable (other->session())
|
||||||
|
|
@ -1287,7 +1287,7 @@ AudioRegion::audio_source (uint32_t n) const
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
AudioRegion::adjust_transients (nframes64_t delta)
|
AudioRegion::adjust_transients (frameoffset_t delta)
|
||||||
{
|
{
|
||||||
for (AnalysisFeatureList::iterator x = _transients.begin(); x != _transients.end(); ++x) {
|
for (AnalysisFeatureList::iterator x = _transients.begin(); x != _transients.end(); ++x) {
|
||||||
(*x) = (*x) + delta;
|
(*x) = (*x) + delta;
|
||||||
|
|
@ -1299,7 +1299,7 @@ AudioRegion::adjust_transients (nframes64_t delta)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
AudioRegion::update_transient (nframes64_t old_position, nframes64_t new_position)
|
AudioRegion::update_transient (framepos_t old_position, framepos_t new_position)
|
||||||
{
|
{
|
||||||
for (AnalysisFeatureList::iterator x = _transients.begin(); x != _transients.end(); ++x) {
|
for (AnalysisFeatureList::iterator x = _transients.begin(); x != _transients.end(); ++x) {
|
||||||
if ((*x) == old_position) {
|
if ((*x) == old_position) {
|
||||||
|
|
@ -1314,7 +1314,7 @@ AudioRegion::update_transient (nframes64_t old_position, nframes64_t new_positio
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioRegion::add_transient (nframes64_t where)
|
AudioRegion::add_transient (framepos_t where)
|
||||||
{
|
{
|
||||||
_transients.push_back(where);
|
_transients.push_back(where);
|
||||||
_valid_transients = true;
|
_valid_transients = true;
|
||||||
|
|
@ -1323,7 +1323,7 @@ AudioRegion::add_transient (nframes64_t where)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioRegion::remove_transient (nframes64_t where)
|
AudioRegion::remove_transient (framepos_t where)
|
||||||
{
|
{
|
||||||
_transients.remove(where);
|
_transients.remove(where);
|
||||||
_valid_transients = true;
|
_valid_transients = true;
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
namespace ARDOUR {
|
namespace ARDOUR {
|
||||||
|
|
||||||
sframes_t
|
framecnt_t
|
||||||
BeatsFramesConverter::to(double beats) const
|
BeatsFramesConverter::to(double beats) const
|
||||||
{
|
{
|
||||||
// FIXME: assumes tempo never changes after origin
|
// FIXME: assumes tempo never changes after origin
|
||||||
|
|
@ -33,11 +33,11 @@ BeatsFramesConverter::to(double beats) const
|
||||||
_tempo_map.frame_rate(),
|
_tempo_map.frame_rate(),
|
||||||
_tempo_map.meter_at (_origin_b));
|
_tempo_map.meter_at (_origin_b));
|
||||||
|
|
||||||
return lrint(beats * frames_per_beat);
|
return llrint (beats * frames_per_beat);
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
BeatsFramesConverter::from(sframes_t frames) const
|
BeatsFramesConverter::from (framecnt_t frames) const
|
||||||
{
|
{
|
||||||
// FIXME: assumes tempo never changes after origin
|
// FIXME: assumes tempo never changes after origin
|
||||||
const Tempo& tempo = _tempo_map.tempo_at (_origin_b);
|
const Tempo& tempo = _tempo_map.tempo_at (_origin_b);
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@ CoreAudioSource::safe_read (Sample* dst, nframes_t start, nframes_t cnt, AudioBu
|
||||||
|
|
||||||
|
|
||||||
nframes_t
|
nframes_t
|
||||||
CoreAudioSource::read_unlocked (Sample *dst, sframes_t start, nframes_t cnt) const
|
CoreAudioSource::read_unlocked (Sample *dst, framepos_t start, nframes_t cnt) const
|
||||||
{
|
{
|
||||||
nframes_t file_cnt;
|
nframes_t file_cnt;
|
||||||
AudioBufferList abl;
|
AudioBufferList abl;
|
||||||
|
|
|
||||||
|
|
@ -355,7 +355,7 @@ Crossfade::read_at (Sample *buf, Sample *mixdown_buffer,
|
||||||
|
|
||||||
start = _position;
|
start = _position;
|
||||||
buf += offset;
|
buf += offset;
|
||||||
to_write = min (_length.val(), (nframes64_t) cnt);
|
to_write = min (_length.val(), cnt);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -437,7 +437,7 @@ Delivery::end_pan_touch (uint32_t which, bool mark, double when)
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Delivery::flush_buffers (nframes_t nframes, nframes64_t time)
|
Delivery::flush_buffers (nframes_t nframes, framepos_t time)
|
||||||
{
|
{
|
||||||
/* io_lock, not taken: function must be called from Session::process() calltree */
|
/* io_lock, not taken: function must be called from Session::process() calltree */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -195,8 +195,8 @@ ExportHandler::process_timespan (nframes_t frames)
|
||||||
/* update position */
|
/* update position */
|
||||||
|
|
||||||
nframes_t frames_to_read = 0;
|
nframes_t frames_to_read = 0;
|
||||||
sframes_t const start = current_timespan->get_start();
|
framepos_t const start = current_timespan->get_start();
|
||||||
sframes_t const end = current_timespan->get_end();
|
framepos_t const end = current_timespan->get_end();
|
||||||
|
|
||||||
bool const last_cycle = (process_position + frames >= end);
|
bool const last_cycle = (process_position + frames >= end);
|
||||||
|
|
||||||
|
|
@ -308,7 +308,7 @@ ExportHandler::export_cd_marker_file (TimespanPtr timespan, FormatPtr file_forma
|
||||||
|
|
||||||
/* Start actual marker stuff */
|
/* Start actual marker stuff */
|
||||||
|
|
||||||
sframes_t last_end_time = timespan->get_start(), last_start_time = timespan->get_start();
|
framepos_t last_end_time = timespan->get_start(), last_start_time = timespan->get_start();
|
||||||
status.track_position = last_start_time - timespan->get_start();
|
status.track_position = last_start_time - timespan->get_start();
|
||||||
|
|
||||||
for (i = temp.begin(); i != temp.end(); ++i) {
|
for (i = temp.begin(); i != temp.end(); ++i) {
|
||||||
|
|
@ -535,9 +535,9 @@ ExportHandler::write_index_info_toc (CDMarkerStatus & status)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ExportHandler::frames_to_cd_frames_string (char* buf, sframes_t when)
|
ExportHandler::frames_to_cd_frames_string (char* buf, framepos_t when)
|
||||||
{
|
{
|
||||||
sframes_t remainder;
|
framecnt_t remainder;
|
||||||
nframes_t fr = session.nominal_frame_rate();
|
nframes_t fr = session.nominal_frame_rate();
|
||||||
int mins, secs, frames;
|
int mins, secs, frames;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -410,7 +410,7 @@ write_midi_data_to_new_files (Evoral::SMF* source, ImportStatus& status,
|
||||||
status.progress += 0.01;
|
status.progress += 0.01;
|
||||||
}
|
}
|
||||||
|
|
||||||
const nframes64_t pos = 0;
|
const framepos_t pos = 0;
|
||||||
const double length_beats = ceil(t / (double)source->ppqn());
|
const double length_beats = ceil(t / (double)source->ppqn());
|
||||||
BeatsFramesConverter converter(smfs->session().tempo_map(), pos);
|
BeatsFramesConverter converter(smfs->session().tempo_map(), pos);
|
||||||
smfs->update_length(pos, converter.to(length_beats));
|
smfs->update_length(pos, converter.to(length_beats));
|
||||||
|
|
|
||||||
|
|
@ -1505,7 +1505,7 @@ IO::connected_to (boost::shared_ptr<const IO> other) const
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
IO::process_input (boost::shared_ptr<Processor> proc, sframes_t start_frame, sframes_t end_frame, nframes_t nframes)
|
IO::process_input (boost::shared_ptr<Processor> proc, framepos_t start_frame, framepos_t end_frame, nframes_t nframes)
|
||||||
{
|
{
|
||||||
BufferSet bufs;
|
BufferSet bufs;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ JACK_Slave::JACK_Slave (jack_client_t* j)
|
||||||
: jack (j)
|
: jack (j)
|
||||||
{
|
{
|
||||||
double x;
|
double x;
|
||||||
nframes64_t p;
|
framepos_t p;
|
||||||
/* call this to initialize things */
|
/* call this to initialize things */
|
||||||
speed_and_position (x, p);
|
speed_and_position (x, p);
|
||||||
}
|
}
|
||||||
|
|
@ -63,7 +63,7 @@ JACK_Slave::ok() const
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
JACK_Slave::speed_and_position (double& sp, nframes64_t& position)
|
JACK_Slave::speed_and_position (double& sp, framepos_t& position)
|
||||||
{
|
{
|
||||||
jack_position_t pos;
|
jack_position_t pos;
|
||||||
jack_transport_state_t state;
|
jack_transport_state_t state;
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ Location::Location (Session& s)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Location::Location (Session& s, nframes64_t sample_start, nframes64_t sample_end, const std::string &name, Flags bits)
|
Location::Location (Session& s, framepos_t sample_start, framepos_t sample_end, const std::string &name, Flags bits)
|
||||||
: SessionHandleRef (s)
|
: SessionHandleRef (s)
|
||||||
, _name (name)
|
, _name (name)
|
||||||
, _start (sample_start)
|
, _start (sample_start)
|
||||||
|
|
@ -124,7 +124,7 @@ Location::operator= (const Location& other)
|
||||||
* @param allow_bbt_recompute True to recompute BBT start time from the new given start time.
|
* @param allow_bbt_recompute True to recompute BBT start time from the new given start time.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
Location::set_start (nframes64_t s, bool force, bool allow_bbt_recompute)
|
Location::set_start (framepos_t s, bool force, bool allow_bbt_recompute)
|
||||||
{
|
{
|
||||||
if (_locked) {
|
if (_locked) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
@ -170,7 +170,7 @@ Location::set_start (nframes64_t s, bool force, bool allow_bbt_recompute)
|
||||||
* @param allow_bbt_recompute True to recompute BBT end time from the new given end time.
|
* @param allow_bbt_recompute True to recompute BBT end time from the new given end time.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
Location::set_end (nframes64_t e, bool force, bool allow_bbt_recompute)
|
Location::set_end (framepos_t e, bool force, bool allow_bbt_recompute)
|
||||||
{
|
{
|
||||||
if (_locked) {
|
if (_locked) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
@ -211,7 +211,7 @@ Location::set_end (nframes64_t e, bool force, bool allow_bbt_recompute)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Location::set (nframes64_t start, nframes64_t end, bool allow_bbt_recompute)
|
Location::set (framepos_t start, framepos_t end, bool allow_bbt_recompute)
|
||||||
{
|
{
|
||||||
/* check validity */
|
/* check validity */
|
||||||
if (((is_auto_punch() || is_auto_loop()) && start >= end) || (!is_mark() && start > end)) {
|
if (((is_auto_punch() || is_auto_loop()) && start >= end) || (!is_mark() && start > end)) {
|
||||||
|
|
@ -226,7 +226,7 @@ Location::set (nframes64_t start, nframes64_t end, bool allow_bbt_recompute)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Location::move_to (nframes64_t pos)
|
Location::move_to (framepos_t pos)
|
||||||
{
|
{
|
||||||
if (_locked) {
|
if (_locked) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
@ -844,7 +844,7 @@ struct LocationStartLaterComparison
|
||||||
};
|
};
|
||||||
|
|
||||||
Location *
|
Location *
|
||||||
Locations::first_location_before (nframes64_t frame, bool include_special_ranges)
|
Locations::first_location_before (framepos_t frame, bool include_special_ranges)
|
||||||
{
|
{
|
||||||
LocationList locs;
|
LocationList locs;
|
||||||
|
|
||||||
|
|
@ -871,7 +871,7 @@ Locations::first_location_before (nframes64_t frame, bool include_special_ranges
|
||||||
}
|
}
|
||||||
|
|
||||||
Location *
|
Location *
|
||||||
Locations::first_location_after (nframes64_t frame, bool include_special_ranges)
|
Locations::first_location_after (framepos_t frame, bool include_special_ranges)
|
||||||
{
|
{
|
||||||
LocationList locs;
|
LocationList locs;
|
||||||
|
|
||||||
|
|
@ -905,7 +905,7 @@ Locations::first_location_after (nframes64_t frame, bool include_special_ranges)
|
||||||
* @param after Filled in with the position of the next `mark' after `frame' (or max_framepos if none exists)
|
* @param after Filled in with the position of the next `mark' after `frame' (or max_framepos if none exists)
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
Locations::marks_either_side (nframes64_t const frame, nframes64_t& before, nframes64_t& after) const
|
Locations::marks_either_side (framepos_t const frame, framepos_t& before, framepos_t& after) const
|
||||||
{
|
{
|
||||||
before = after = max_framepos;
|
before = after = max_framepos;
|
||||||
|
|
||||||
|
|
@ -918,7 +918,7 @@ Locations::marks_either_side (nframes64_t const frame, nframes64_t& before, nfra
|
||||||
|
|
||||||
/* Get a list of positions; don't store any that are exactly on our requested position */
|
/* Get a list of positions; don't store any that are exactly on our requested position */
|
||||||
|
|
||||||
std::list<nframes64_t> positions;
|
std::list<framepos_t> positions;
|
||||||
|
|
||||||
for (LocationList::const_iterator i = locs.begin(); i != locs.end(); ++i) {
|
for (LocationList::const_iterator i = locs.begin(); i != locs.end(); ++i) {
|
||||||
if (((*i)->is_auto_loop() || (*i)->is_auto_punch())) {
|
if (((*i)->is_auto_loop() || (*i)->is_auto_punch())) {
|
||||||
|
|
@ -947,7 +947,7 @@ Locations::marks_either_side (nframes64_t const frame, nframes64_t& before, nfra
|
||||||
|
|
||||||
positions.sort ();
|
positions.sort ();
|
||||||
|
|
||||||
std::list<nframes64_t>::iterator i = positions.begin ();
|
std::list<framepos_t>::iterator i = positions.begin ();
|
||||||
while (i != positions.end () && *i < frame) {
|
while (i != positions.end () && *i < frame) {
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
@ -1027,7 +1027,7 @@ Locations::get_location_by_id(PBD::ID id)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Locations::find_all_between (nframes64_t start, nframes64_t end, LocationList& ll, Location::Flags flags)
|
Locations::find_all_between (framepos_t start, framepos_t end, LocationList& ll, Location::Flags flags)
|
||||||
{
|
{
|
||||||
Glib::Mutex::Lock lm (lock);
|
Glib::Mutex::Lock lm (lock);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ MIDIClock_Slave::rebind (MIDI::Port& p)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MIDIClock_Slave::calculate_one_ppqn_in_frames_at(nframes64_t time)
|
MIDIClock_Slave::calculate_one_ppqn_in_frames_at(framepos_t time)
|
||||||
{
|
{
|
||||||
const Tempo& current_tempo = session->tempo_map().tempo_at(time);
|
const Tempo& current_tempo = session->tempo_map().tempo_at(time);
|
||||||
const Meter& current_meter = session->tempo_map().meter_at(time);
|
const Meter& current_meter = session->tempo_map().meter_at(time);
|
||||||
|
|
@ -100,14 +100,14 @@ MIDIClock_Slave::calculate_one_ppqn_in_frames_at(nframes64_t time)
|
||||||
// DEBUG_TRACE (DEBUG::MidiClock, string_compose ("at %1, one ppqn = %2\n", time, one_ppqn_in_frames));
|
// DEBUG_TRACE (DEBUG::MidiClock, string_compose ("at %1, one ppqn = %2\n", time, one_ppqn_in_frames));
|
||||||
}
|
}
|
||||||
|
|
||||||
ARDOUR::nframes64_t
|
ARDOUR::framepos_t
|
||||||
MIDIClock_Slave::calculate_song_position(uint16_t song_position_in_sixteenth_notes)
|
MIDIClock_Slave::calculate_song_position(uint16_t song_position_in_sixteenth_notes)
|
||||||
{
|
{
|
||||||
nframes64_t song_position_frames = 0;
|
framepos_t song_position_frames = 0;
|
||||||
for (uint16_t i = 1; i <= song_position_in_sixteenth_notes; ++i) {
|
for (uint16_t i = 1; i <= song_position_in_sixteenth_notes; ++i) {
|
||||||
// one quarter note contains ppqn pulses, so a sixteenth note is ppqn / 4 pulses
|
// one quarter note contains ppqn pulses, so a sixteenth note is ppqn / 4 pulses
|
||||||
calculate_one_ppqn_in_frames_at(song_position_frames);
|
calculate_one_ppqn_in_frames_at(song_position_frames);
|
||||||
song_position_frames += one_ppqn_in_frames * (nframes64_t)(ppqn / 4);
|
song_position_frames += one_ppqn_in_frames * (framepos_t)(ppqn / 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
return song_position_frames;
|
return song_position_frames;
|
||||||
|
|
@ -123,7 +123,7 @@ MIDIClock_Slave::calculate_filter_coefficients()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MIDIClock_Slave::update_midi_clock (Parser& /*parser*/, nframes64_t timestamp)
|
MIDIClock_Slave::update_midi_clock (Parser& /*parser*/, framepos_t timestamp)
|
||||||
{
|
{
|
||||||
// some pieces of hardware send MIDI Clock all the time
|
// some pieces of hardware send MIDI Clock all the time
|
||||||
if ( (!_starting) && (!_started) ) {
|
if ( (!_starting) && (!_started) ) {
|
||||||
|
|
@ -132,7 +132,7 @@ MIDIClock_Slave::update_midi_clock (Parser& /*parser*/, nframes64_t timestamp)
|
||||||
|
|
||||||
calculate_one_ppqn_in_frames_at(should_be_position);
|
calculate_one_ppqn_in_frames_at(should_be_position);
|
||||||
|
|
||||||
nframes64_t elapsed_since_start = timestamp - first_timestamp;
|
framepos_t elapsed_since_start = timestamp - first_timestamp;
|
||||||
double error = 0;
|
double error = 0;
|
||||||
|
|
||||||
if (_starting || last_timestamp == 0) {
|
if (_starting || last_timestamp == 0) {
|
||||||
|
|
@ -189,7 +189,7 @@ MIDIClock_Slave::update_midi_clock (Parser& /*parser*/, nframes64_t timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MIDIClock_Slave::start (Parser& /*parser*/, nframes64_t timestamp)
|
MIDIClock_Slave::start (Parser& /*parser*/, framepos_t timestamp)
|
||||||
{
|
{
|
||||||
DEBUG_TRACE (DEBUG::MidiClock, string_compose ("MIDIClock_Slave got start message at time %1 engine time %2\n", timestamp, session->frame_time()));
|
DEBUG_TRACE (DEBUG::MidiClock, string_compose ("MIDIClock_Slave got start message at time %1 engine time %2\n", timestamp, session->frame_time()));
|
||||||
|
|
||||||
|
|
@ -216,7 +216,7 @@ MIDIClock_Slave::reset ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MIDIClock_Slave::contineu (Parser& /*parser*/, nframes64_t /*timestamp*/)
|
MIDIClock_Slave::contineu (Parser& /*parser*/, framepos_t /*timestamp*/)
|
||||||
{
|
{
|
||||||
DEBUG_TRACE (DEBUG::MidiClock, "MIDIClock_Slave got continue message\n");
|
DEBUG_TRACE (DEBUG::MidiClock, "MIDIClock_Slave got continue message\n");
|
||||||
|
|
||||||
|
|
@ -228,7 +228,7 @@ MIDIClock_Slave::contineu (Parser& /*parser*/, nframes64_t /*timestamp*/)
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
MIDIClock_Slave::stop (Parser& /*parser*/, nframes64_t /*timestamp*/)
|
MIDIClock_Slave::stop (Parser& /*parser*/, framepos_t /*timestamp*/)
|
||||||
{
|
{
|
||||||
DEBUG_TRACE (DEBUG::MidiClock, "MIDIClock_Slave got stop message\n");
|
DEBUG_TRACE (DEBUG::MidiClock, "MIDIClock_Slave got stop message\n");
|
||||||
|
|
||||||
|
|
@ -245,7 +245,7 @@ MIDIClock_Slave::stop (Parser& /*parser*/, nframes64_t /*timestamp*/)
|
||||||
// that is the position of the last MIDI Clock
|
// that is the position of the last MIDI Clock
|
||||||
// message and that is probably what the master
|
// message and that is probably what the master
|
||||||
// expects where we are right now
|
// expects where we are right now
|
||||||
nframes64_t stop_position = should_be_position;
|
framepos_t stop_position = should_be_position;
|
||||||
|
|
||||||
// find out the last MIDI beat: go back #midi_clocks mod 6
|
// find out the last MIDI beat: go back #midi_clocks mod 6
|
||||||
// and lets hope the tempo didnt change in those last 6 beats :)
|
// and lets hope the tempo didnt change in those last 6 beats :)
|
||||||
|
|
@ -272,7 +272,7 @@ MIDIClock_Slave::position (Parser& /*parser*/, byte* message, size_t size)
|
||||||
assert((lsb <= 0x7f) && (msb <= 0x7f));
|
assert((lsb <= 0x7f) && (msb <= 0x7f));
|
||||||
|
|
||||||
uint16_t position_in_sixteenth_notes = (uint16_t(msb) << 7) | uint16_t(lsb);
|
uint16_t position_in_sixteenth_notes = (uint16_t(msb) << 7) | uint16_t(lsb);
|
||||||
nframes64_t position_in_frames = calculate_song_position(position_in_sixteenth_notes);
|
framepos_t position_in_frames = calculate_song_position(position_in_sixteenth_notes);
|
||||||
|
|
||||||
DEBUG_TRACE (DEBUG::MidiClock, string_compose ("Song Position: %1 frames: %2\n", position_in_sixteenth_notes, position_in_frames));
|
DEBUG_TRACE (DEBUG::MidiClock, string_compose ("Song Position: %1 frames: %2\n", position_in_sixteenth_notes, position_in_frames));
|
||||||
|
|
||||||
|
|
@ -301,7 +301,7 @@ MIDIClock_Slave::starting() const
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
MIDIClock_Slave::stop_if_no_more_clock_events(nframes64_t& pos, nframes64_t now)
|
MIDIClock_Slave::stop_if_no_more_clock_events(framepos_t& pos, framepos_t now)
|
||||||
{
|
{
|
||||||
/* no timecode for 1/4 second ? conclude that its stopped */
|
/* no timecode for 1/4 second ? conclude that its stopped */
|
||||||
if (last_timestamp &&
|
if (last_timestamp &&
|
||||||
|
|
@ -318,7 +318,7 @@ MIDIClock_Slave::stop_if_no_more_clock_events(nframes64_t& pos, nframes64_t now)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
MIDIClock_Slave::speed_and_position (double& speed, nframes64_t& pos)
|
MIDIClock_Slave::speed_and_position (double& speed, framepos_t& pos)
|
||||||
{
|
{
|
||||||
if (!_started || _starting) {
|
if (!_started || _starting) {
|
||||||
speed = 0.0;
|
speed = 0.0;
|
||||||
|
|
@ -326,7 +326,7 @@ MIDIClock_Slave::speed_and_position (double& speed, nframes64_t& pos)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes64_t engine_now = session->frame_time();
|
framepos_t engine_now = session->frame_time();
|
||||||
|
|
||||||
if (stop_if_no_more_clock_events(pos, engine_now)) {
|
if (stop_if_no_more_clock_events(pos, engine_now)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -343,8 +343,8 @@ MIDIClock_Slave::speed_and_position (double& speed, nframes64_t& pos)
|
||||||
if (engine_now > last_timestamp) {
|
if (engine_now > last_timestamp) {
|
||||||
// we are in between MIDI clock messages
|
// we are in between MIDI clock messages
|
||||||
// so we interpolate position according to speed
|
// so we interpolate position according to speed
|
||||||
nframes64_t elapsed = engine_now - last_timestamp;
|
framecnt_t elapsed = engine_now - last_timestamp;
|
||||||
pos = (nframes64_t) (should_be_position + double(elapsed) * speed);
|
pos = (framepos_t) (should_be_position + double(elapsed) * speed);
|
||||||
} else {
|
} else {
|
||||||
// A new MIDI clock message has arrived this cycle
|
// A new MIDI clock message has arrived this cycle
|
||||||
pos = should_be_position;
|
pos = should_be_position;
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ MidiPlaylist::read (MidiRingBuffer<nframes_t>& dst, nframes_t start, nframes_t d
|
||||||
|
|
||||||
// relevent regions overlapping start <--> end
|
// relevent regions overlapping start <--> end
|
||||||
vector< boost::shared_ptr<Region> > regs;
|
vector< boost::shared_ptr<Region> > regs;
|
||||||
typedef pair<MidiStateTracker*,nframes64_t> TrackerInfo;
|
typedef pair<MidiStateTracker*,framepos_t> TrackerInfo;
|
||||||
vector<TrackerInfo> tracker_info;
|
vector<TrackerInfo> tracker_info;
|
||||||
uint32_t note_cnt = 0;
|
uint32_t note_cnt = 0;
|
||||||
|
|
||||||
|
|
@ -123,7 +123,7 @@ MidiPlaylist::read (MidiRingBuffer<nframes_t>& dst, nframes_t start, nframes_t d
|
||||||
of this read range.
|
of this read range.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
nframes64_t resolve_at = (*i)->last_frame();
|
framepos_t resolve_at = (*i)->last_frame();
|
||||||
if (resolve_at >= end) {
|
if (resolve_at >= end) {
|
||||||
resolve_at = start;
|
resolve_at = start;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ MidiPort::cycle_split ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MidiPort::flush_buffers (nframes_t nframes, nframes64_t time, nframes_t offset)
|
MidiPort::flush_buffers (nframes_t nframes, framepos_t time, nframes_t offset)
|
||||||
{
|
{
|
||||||
if (sends_output ()) {
|
if (sends_output ()) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@ MidiSource::length (framepos_t pos) const
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MidiSource::update_length (sframes_t /*pos*/, sframes_t /*cnt*/)
|
MidiSource::update_length (framepos_t /*pos*/, framecnt_t /*cnt*/)
|
||||||
{
|
{
|
||||||
// You're not the boss of me!
|
// You're not the boss of me!
|
||||||
}
|
}
|
||||||
|
|
@ -197,8 +197,8 @@ MidiSource::invalidate ()
|
||||||
|
|
||||||
/** @param filtered A set of parameters whose MIDI messages will not be returned */
|
/** @param filtered A set of parameters whose MIDI messages will not be returned */
|
||||||
nframes_t
|
nframes_t
|
||||||
MidiSource::midi_read (Evoral::EventSink<nframes_t>& dst, sframes_t source_start,
|
MidiSource::midi_read (Evoral::EventSink<nframes_t>& dst, framepos_t source_start,
|
||||||
sframes_t start, nframes_t cnt,
|
framepos_t start, nframes_t cnt,
|
||||||
MidiStateTracker* tracker,
|
MidiStateTracker* tracker,
|
||||||
std::set<Evoral::Parameter> const & filtered) const
|
std::set<Evoral::Parameter> const & filtered) const
|
||||||
{
|
{
|
||||||
|
|
@ -226,7 +226,7 @@ MidiSource::midi_read (Evoral::EventSink<nframes_t>& dst, sframes_t source_start
|
||||||
|
|
||||||
// Read events up to end
|
// Read events up to end
|
||||||
for (; i != _model->end(); ++i) {
|
for (; i != _model->end(); ++i) {
|
||||||
const sframes_t time_frames = converter.to(i->time());
|
const framecnt_t time_frames = converter.to(i->time());
|
||||||
if (time_frames < start + cnt) {
|
if (time_frames < start + cnt) {
|
||||||
/* convert event times to session frames by adding on the source start position in session frames */
|
/* convert event times to session frames by adding on the source start position in session frames */
|
||||||
dst.write (time_frames + source_start, i->event_type(), i->size(), i->buffer());
|
dst.write (time_frames + source_start, i->event_type(), i->size(), i->buffer());
|
||||||
|
|
@ -252,7 +252,7 @@ MidiSource::midi_read (Evoral::EventSink<nframes_t>& dst, sframes_t source_start
|
||||||
}
|
}
|
||||||
|
|
||||||
nframes_t
|
nframes_t
|
||||||
MidiSource::midi_write (MidiRingBuffer<nframes_t>& source, sframes_t source_start, nframes_t duration)
|
MidiSource::midi_write (MidiRingBuffer<nframes_t>& source, framepos_t source_start, nframes_t duration)
|
||||||
{
|
{
|
||||||
Glib::Mutex::Lock lm (_lock);
|
Glib::Mutex::Lock lm (_lock);
|
||||||
const nframes_t ret = write_unlocked (source, source_start, duration);
|
const nframes_t ret = write_unlocked (source, source_start, duration);
|
||||||
|
|
@ -261,7 +261,7 @@ MidiSource::midi_write (MidiRingBuffer<nframes_t>& source, sframes_t source_star
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MidiSource::mark_streaming_midi_write_started (NoteMode mode, sframes_t start_frame)
|
MidiSource::mark_streaming_midi_write_started (NoteMode mode, framepos_t start_frame)
|
||||||
{
|
{
|
||||||
set_timeline_position(start_frame);
|
set_timeline_position(start_frame);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ MidiStateTracker::track (const MidiBuffer::iterator &from, const MidiBuffer::ite
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MidiStateTracker::resolve_notes (MidiBuffer &dst, nframes64_t time)
|
MidiStateTracker::resolve_notes (MidiBuffer &dst, framepos_t time)
|
||||||
{
|
{
|
||||||
if (!_on) {
|
if (!_on) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -111,7 +111,7 @@ MidiStateTracker::resolve_notes (MidiBuffer &dst, nframes64_t time)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MidiStateTracker::resolve_notes (Evoral::EventSink<nframes_t> &dst, nframes64_t time)
|
MidiStateTracker::resolve_notes (Evoral::EventSink<nframes_t> &dst, framepos_t time)
|
||||||
{
|
{
|
||||||
uint8_t buf[3];
|
uint8_t buf[3];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -381,7 +381,7 @@ MidiTrack::roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
MidiTrack::no_roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame,
|
MidiTrack::no_roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame,
|
||||||
bool state_changing, bool can_record, bool rec_monitors_input)
|
bool state_changing, bool can_record, bool rec_monitors_input)
|
||||||
{
|
{
|
||||||
int ret = Track::no_roll (nframes, start_frame, end_frame, state_changing, can_record, rec_monitors_input);
|
int ret = Track::no_roll (nframes, start_frame, end_frame, state_changing, can_record, rec_monitors_input);
|
||||||
|
|
@ -427,7 +427,7 @@ MidiTrack::push_midi_input_to_step_edit_ringbuffer (nframes_t nframes)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MidiTrack::write_out_of_band_data (BufferSet& bufs, sframes_t /*start*/, sframes_t /*end*/, nframes_t nframes)
|
MidiTrack::write_out_of_band_data (BufferSet& bufs, framepos_t /*start*/, framepos_t /*end*/, nframes_t nframes)
|
||||||
{
|
{
|
||||||
// Append immediate events
|
// Append immediate events
|
||||||
MidiBuffer& buf (bufs.get_midi (0));
|
MidiBuffer& buf (bufs.get_midi (0));
|
||||||
|
|
@ -444,7 +444,7 @@ MidiTrack::write_out_of_band_data (BufferSet& bufs, sframes_t /*start*/, sframes
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
MidiTrack::export_stuff (BufferSet& /*bufs*/, nframes_t /*nframes*/, sframes_t /*end_frame*/)
|
MidiTrack::export_stuff (BufferSet& /*bufs*/, nframes_t /*nframes*/, framepos_t /*end_frame*/)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue