summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/analysis_window.cc10
-rw-r--r--gtk2_ardour/ardour_ui.cc22
-rw-r--r--gtk2_ardour/ardour_ui.h16
-rw-r--r--gtk2_ardour/ardour_ui_ed.cc20
-rw-r--r--gtk2_ardour/audio_clock.cc89
-rw-r--r--gtk2_ardour/audio_clock.h28
-rw-r--r--gtk2_ardour/audio_region_view.cc14
-rw-r--r--gtk2_ardour/audio_region_view.h4
-rw-r--r--gtk2_ardour/audio_streamview.cc10
-rw-r--r--gtk2_ardour/audio_streamview.h2
-rw-r--r--gtk2_ardour/automation_region_view.cc2
-rw-r--r--gtk2_ardour/automation_region_view.h2
-rw-r--r--gtk2_ardour/automation_time_axis.cc2
-rw-r--r--gtk2_ardour/automation_time_axis.h4
-rw-r--r--gtk2_ardour/crossfade_edit.cc12
-rw-r--r--gtk2_ardour/editor.cc2
-rw-r--r--gtk2_ardour/editor.h6
-rw-r--r--gtk2_ardour/editor_ops.cc12
-rw-r--r--gtk2_ardour/editor_regions.cc10
-rw-r--r--gtk2_ardour/editor_rulers.cc6
-rw-r--r--gtk2_ardour/editor_summary.cc2
-rw-r--r--gtk2_ardour/editor_summary.h4
-rw-r--r--gtk2_ardour/editor_tempodisplay.cc2
-rw-r--r--gtk2_ardour/export_format_dialog.cc4
-rw-r--r--gtk2_ardour/export_range_markers_dialog.cc4
-rw-r--r--gtk2_ardour/imageframe_socket_handler.cc20
-rw-r--r--gtk2_ardour/imageframe_time_axis_group.cc2
-rw-r--r--gtk2_ardour/imageframe_time_axis_view.cc5
-rw-r--r--gtk2_ardour/imageframe_view.cc4
-rw-r--r--gtk2_ardour/imageframe_view.h4
-rw-r--r--gtk2_ardour/location_ui.cc4
-rw-r--r--gtk2_ardour/marker.cc2
-rw-r--r--gtk2_ardour/marker.h2
-rw-r--r--gtk2_ardour/marker_time_axis_view.cc4
-rw-r--r--gtk2_ardour/marker_view.cc4
-rw-r--r--gtk2_ardour/midi_streamview.cc2
-rw-r--r--gtk2_ardour/plugin_eq_gui.cc14
-rw-r--r--gtk2_ardour/plugin_eq_gui.h4
-rw-r--r--gtk2_ardour/plugin_ui.cc4
-rw-r--r--gtk2_ardour/port_insert_ui.cc6
-rw-r--r--gtk2_ardour/public_editor.h4
-rwxr-xr-xgtk2_ardour/region_editor.cc4
-rw-r--r--gtk2_ardour/region_view.cc10
-rw-r--r--gtk2_ardour/route_params_ui.cc4
-rw-r--r--gtk2_ardour/route_time_axis.cc8
-rw-r--r--gtk2_ardour/route_time_axis.h6
-rw-r--r--gtk2_ardour/selection.cc10
-rw-r--r--gtk2_ardour/selection.h10
-rw-r--r--gtk2_ardour/sfdb_ui.cc4
-rw-r--r--gtk2_ardour/step_editor.cc4
-rw-r--r--gtk2_ardour/streamview.h8
-rw-r--r--gtk2_ardour/strip_silence_dialog.cc4
-rw-r--r--gtk2_ardour/strip_silence_dialog.h4
-rw-r--r--gtk2_ardour/tempo_dialog.cc4
-rw-r--r--gtk2_ardour/tempo_dialog.h4
-rw-r--r--gtk2_ardour/time_axis_view.cc5
-rw-r--r--gtk2_ardour/time_axis_view.h4
-rw-r--r--gtk2_ardour/visual_time_axis.cc6
58 files changed, 234 insertions, 239 deletions
diff --git a/gtk2_ardour/analysis_window.cc b/gtk2_ardour/analysis_window.cc
index 6d858732ff..afa277e8e4 100644
--- a/gtk2_ardour/analysis_window.cc
+++ b/gtk2_ardour/analysis_window.cc
@@ -278,9 +278,9 @@ AnalysisWindow::analyze_data (Gtk::Button */*button*/)
int n;
for (int channel = 0; channel < n_inputs; channel++) {
- nframes_t x = 0;
+ framecnt_t x = 0;
- while ( x < (*j).length() ) {
+ while (x < j->length()) {
// TODO: What about stereo+ channels? composite all to one, I guess
n = fft_graph.windowSize();
@@ -322,11 +322,11 @@ AnalysisWindow::analyze_data (Gtk::Button */*button*/)
int n;
for (int channel = 0; channel < n_inputs; channel++) {
- nframes_t x = 0;
+ framecnt_t x = 0;
- nframes_t length = arv->region()->length();
+ framecnt_t length = arv->region()->length();
- while ( x < length ) {
+ while (x < length) {
// TODO: What about stereo+ channels? composite all to one, I guess
n = fft_graph.windowSize();
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index e969f31cf1..391db44976 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -121,7 +121,7 @@ UIConfiguration *ARDOUR_UI::ui_config = 0;
sigc::signal<void,bool> ARDOUR_UI::Blink;
sigc::signal<void> ARDOUR_UI::RapidScreenUpdate;
sigc::signal<void> ARDOUR_UI::SuperRapidScreenUpdate;
-sigc::signal<void,nframes_t, bool, nframes_t> ARDOUR_UI::Clock;
+sigc::signal<void, framepos_t, bool, framepos_t> ARDOUR_UI::Clock;
bool could_be_a_valid_path (const string& path);
@@ -952,7 +952,7 @@ ARDOUR_UI::every_point_zero_one_seconds ()
}
void
-ARDOUR_UI::update_sample_rate (nframes_t)
+ARDOUR_UI::update_sample_rate (framecnt_t)
{
char buf[32];
@@ -964,7 +964,7 @@ ARDOUR_UI::update_sample_rate (nframes_t)
} else {
- nframes_t rate = engine->frame_rate();
+ framecnt_t rate = engine->frame_rate();
if (fmod (rate, 1000.0) != 0.0) {
snprintf (buf, sizeof (buf), _("%.1f kHz / %4.1f ms"),
@@ -1024,7 +1024,7 @@ ARDOUR_UI::update_disk_space()
framecnt_t frames = _session->available_capture_duration();
char buf[64];
- nframes_t fr = _session->frame_rate();
+ framecnt_t fr = _session->frame_rate();
if (frames == max_framecnt) {
strcpy (buf, _("Disk: 24hrs+"));
@@ -1415,9 +1415,9 @@ restart JACK with more ports."), PROGRAM_NAME));
}
void
-ARDOUR_UI::do_transport_locate (nframes_t new_position, bool with_roll)
+ARDOUR_UI::do_transport_locate (framepos_t new_position, bool with_roll)
{
- nframes_t _preroll = 0;
+ framecnt_t _preroll = 0;
if (_session) {
// XXX CONFIG_CHANGE FIX - requires AnyTime handling
@@ -1497,7 +1497,7 @@ void
ARDOUR_UI::transport_goto_end ()
{
if (_session) {
- nframes_t const frame = _session->current_end_frame();
+ framepos_t const frame = _session->current_end_frame();
_session->request_locate (frame);
/* force displayed area in editor to start no matter
@@ -3257,7 +3257,7 @@ ARDOUR_UI::keyboard_settings () const
}
void
-ARDOUR_UI::create_xrun_marker(nframes_t where)
+ARDOUR_UI::create_xrun_marker (framepos_t where)
{
editor->mouse_add_new_marker (where, false, true);
}
@@ -3271,7 +3271,7 @@ ARDOUR_UI::halt_on_xrun_message ()
}
void
-ARDOUR_UI::xrun_handler(nframes_t where)
+ARDOUR_UI::xrun_handler (framepos_t where)
{
if (!_session) {
return;
@@ -3384,7 +3384,7 @@ what you would like to do.\n"));
}
int
-ARDOUR_UI::sr_mismatch_dialog (nframes_t desired, nframes_t actual)
+ARDOUR_UI::sr_mismatch_dialog (framecnt_t desired, framecnt_t actual)
{
HBox* hbox = new HBox();
Image* image = new Image (Stock::DIALOG_QUESTION, ICON_SIZE_DIALOG);
@@ -3451,7 +3451,7 @@ ARDOUR_UI::use_config ()
}
void
-ARDOUR_UI::update_transport_clocks (nframes_t pos)
+ARDOUR_UI::update_transport_clocks (framepos_t pos)
{
if (Config->get_primary_clock_delta_edit_cursor()) {
primary_clock.set (pos, false, editor->get_preferred_edit_position(), 1);
diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h
index c7c38f8d5a..e2304b85cc 100644
--- a/gtk2_ardour/ardour_ui.h
+++ b/gtk2_ardour/ardour_ui.h
@@ -174,7 +174,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
static sigc::signal<void,bool> Blink;
static sigc::signal<void> RapidScreenUpdate;
static sigc::signal<void> SuperRapidScreenUpdate;
- static sigc::signal<void,nframes_t, bool, nframes_t> Clock;
+ static sigc::signal<void, framepos_t, bool, framepos_t> Clock;
XMLNode* editor_settings() const;
XMLNode* mixer_settings () const;
@@ -184,10 +184,10 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
void save_ardour_state ();
gboolean configure_handler (GdkEventConfigure* conf);
- void do_transport_locate (nframes_t, bool);
+ void do_transport_locate (framepos_t, bool);
void halt_on_xrun_message ();
- void xrun_handler (nframes_t);
- void create_xrun_marker (nframes_t);
+ void xrun_handler (framepos_t);
+ void create_xrun_marker (framepos_t);
AudioClock primary_clock;
AudioClock secondary_clock;
@@ -328,7 +328,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
void float_big_clock (Gtk::Window* parent);
bool main_window_state_event_handler (GdkEventWindowState*, bool window_was_editor);
- void update_transport_clocks (nframes_t pos);
+ void update_transport_clocks (framepos_t pos);
void record_state_changed ();
std::list<MidiTracer*> _midi_tracer_windows;
@@ -523,7 +523,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
Gtk::Label sample_rate_label;
Gtk::EventBox sample_rate_box;
- void update_sample_rate (nframes_t);
+ void update_sample_rate (ARDOUR::framecnt_t);
gint every_second ();
gint every_point_one_seconds ();
@@ -659,11 +659,11 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
void session_dialog (std::string);
int pending_state_dialog ();
- int sr_mismatch_dialog (nframes_t, nframes_t);
+ int sr_mismatch_dialog (ARDOUR::framecnt_t, ARDOUR::framecnt_t);
void disconnect_from_jack ();
void reconnect_to_jack ();
- void set_jack_buffer_size (nframes_t);
+ void set_jack_buffer_size (ARDOUR::pframes_t);
Gtk::MenuItem* jack_disconnect_item;
Gtk::MenuItem* jack_reconnect_item;
diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc
index 6eb88ae940..e3698289f7 100644
--- a/gtk2_ardour/ardour_ui_ed.cc
+++ b/gtk2_ardour/ardour_ui_ed.cc
@@ -187,23 +187,23 @@ ARDOUR_UI::install_actions ()
RadioAction::Group jack_latency_group;
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency32"), X_("32"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 32));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency32"), X_("32"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (pframes_t) 32));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency64"), X_("64"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 64));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency64"), X_("64"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (pframes_t) 64));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency128"), X_("128"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 128));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency128"), X_("128"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (pframes_t) 128));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency256"), X_("256"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 256));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency256"), X_("256"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (pframes_t) 256));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency512"), X_("512"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 512));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency512"), X_("512"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (pframes_t) 512));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency1024"), X_("1024"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 1024));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency1024"), X_("1024"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (pframes_t) 1024));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency2048"), X_("2048"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 2048));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency2048"), X_("2048"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (pframes_t) 2048));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency4096"), X_("4096"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 4096));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency4096"), X_("4096"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (pframes_t) 4096));
ActionManager::jack_sensitive_actions.push_back (act);
- act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency8192"), X_("8192"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 8192));
+ act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency8192"), X_("8192"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (pframes_t) 8192));
ActionManager::jack_sensitive_actions.push_back (act);
/* these actions are intended to be shared across all windows */
@@ -441,7 +441,7 @@ ARDOUR_UI::install_actions ()
}
void
-ARDOUR_UI::set_jack_buffer_size (nframes_t nframes)
+ARDOUR_UI::set_jack_buffer_size (pframes_t nframes)
{
Glib::RefPtr<Action> action;
const char* action_name = 0;
diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc
index 1c36391bb6..797d8551e1 100644
--- a/gtk2_ardour/audio_clock.cc
+++ b/gtk2_ardour/audio_clock.cc
@@ -414,7 +414,7 @@ AudioClock::on_realize ()
}
void
-AudioClock::set (nframes_t when, bool force, nframes_t offset, char which)
+AudioClock::set (framepos_t when, bool force, framecnt_t offset, char which)
{
if ((!force && !is_visible()) || _session == 0) {
@@ -479,12 +479,12 @@ AudioClock::session_configuration_changed (std::string p)
return;
}
- nframes_t current;
+ framecnt_t current;
switch (_mode) {
case Timecode:
if (is_duration) {
- current = current_duration();
+ current = current_duration ();
} else {
current = current_time ();
}
@@ -496,17 +496,17 @@ AudioClock::session_configuration_changed (std::string p)
}
void
-AudioClock::set_frames (nframes_t when, bool /*force*/)
+AudioClock::set_frames (framepos_t when, bool /*force*/)
{
char buf[32];
- snprintf (buf, sizeof (buf), "%u", when);
+ snprintf (buf, sizeof (buf), "%" PRId64, when);
audio_frames_label.set_text (buf);
if (frames_upper_info_label) {
- nframes_t rate = _session->frame_rate();
+ framecnt_t rate = _session->frame_rate();
if (fmod (rate, 1000.0) == 0.000) {
- sprintf (buf, "%uK", rate/1000);
+ sprintf (buf, "%" PRId64 "K", rate/1000);
} else {
sprintf (buf, "%.3fK", rate/1000.0f);
}
@@ -531,19 +531,19 @@ AudioClock::set_frames (nframes_t when, bool /*force*/)
}
void
-AudioClock::set_minsec (nframes_t when, bool force)
+AudioClock::set_minsec (framepos_t when, bool force)
{
char buf[32];
- nframes_t left;
+ framecnt_t left;
int hrs;
int mins;
float secs;
left = when;
hrs = (int) floor (left / (_session->frame_rate() * 60.0f * 60.0f));
- left -= (nframes_t) floor (hrs * _session->frame_rate() * 60.0f * 60.0f);
+ left -= (framecnt_t) floor (hrs * _session->frame_rate() * 60.0f * 60.0f);
mins = (int) floor (left / (_session->frame_rate() * 60.0f));
- left -= (nframes_t) floor (mins * _session->frame_rate() * 60.0f);
+ left -= (framecnt_t) floor (mins * _session->frame_rate() * 60.0f);
secs = left / (float) _session->frame_rate();
if (force || hrs != ms_last_hrs) {
@@ -566,7 +566,7 @@ AudioClock::set_minsec (nframes_t when, bool force)
}
void
-AudioClock::set_timecode (nframes_t when, bool force)
+AudioClock::set_timecode (framepos_t when, bool force)
{
char buf[32];
Timecode::Time timecode;
@@ -637,7 +637,7 @@ AudioClock::set_timecode (nframes_t when, bool force)
}
void
-AudioClock::set_bbt (nframes_t when, bool force)
+AudioClock::set_bbt (framepos_t when, bool force)
{
char buf[16];
BBT_Time bbt;
@@ -1198,7 +1198,7 @@ AudioClock::field_button_press_event (GdkEventButton *ev, Field /*field*/)
return false;
}
- nframes_t frames = 0;
+ framepos_t frames = 0;
switch (ev->button) {
case 1:
@@ -1244,7 +1244,7 @@ AudioClock::field_button_scroll_event (GdkEventScroll *ev, Field field)
return false;
}
- nframes_t frames = 0;
+ framepos_t frames = 0;
switch (ev->direction) {
@@ -1313,8 +1313,8 @@ AudioClock::field_motion_notify_event (GdkEventMotion *ev, Field field)
if (trunc(drag_accum) != 0) {
- nframes_t frames;
- nframes_t pos ;
+ framepos_t frames;
+ framepos_t pos;
int dir;
dir = (drag_accum < 0 ? 1:-1);
pos = current_time();
@@ -1322,7 +1322,7 @@ AudioClock::field_motion_notify_event (GdkEventMotion *ev, Field field)
if (frames != 0 && frames * drag_accum < current_time()) {
- set ((nframes_t) floor (pos - drag_accum * frames), false); // minus because up is negative in computer-land
+ set ((framepos_t) floor (pos - drag_accum * frames), false); // minus because up is negative in computer-land
} else {
set (0 , false);
@@ -1338,24 +1338,23 @@ AudioClock::field_motion_notify_event (GdkEventMotion *ev, Field field)
return true;
}
-nframes_t
-AudioClock::get_frames (Field field,nframes_t pos,int dir)
+framepos_t
+AudioClock::get_frames (Field field, framepos_t pos, int dir)
{
-
- nframes_t frames = 0;
+ framecnt_t frames = 0;
BBT_Time bbt;
switch (field) {
case Timecode_Hours:
- frames = (nframes_t) floor (3600.0 * _session->frame_rate());
+ frames = (framecnt_t) floor (3600.0 * _session->frame_rate());
break;
case Timecode_Minutes:
- frames = (nframes_t) floor (60.0 * _session->frame_rate());
+ frames = (framecnt_t) floor (60.0 * _session->frame_rate());
break;
case Timecode_Seconds:
frames = _session->frame_rate();
break;
case Timecode_Frames:
- frames = (nframes_t) floor (_session->frame_rate() / _session->timecode_frames_per_second());
+ frames = (framecnt_t) floor (_session->frame_rate() / _session->timecode_frames_per_second());
break;
case AudioFrames:
@@ -1363,10 +1362,10 @@ AudioClock::get_frames (Field field,nframes_t pos,int dir)
break;
case MS_Hours:
- frames = (nframes_t) floor (3600.0 * _session->frame_rate());
+ frames = (framecnt_t) floor (3600.0 * _session->frame_rate());
break;
case MS_Minutes:
- frames = (nframes_t) floor (60.0 * _session->frame_rate());
+ frames = (framecnt_t) floor (60.0 * _session->frame_rate());
break;
case MS_Seconds:
frames = _session->frame_rate();
@@ -1395,10 +1394,10 @@ AudioClock::get_frames (Field field,nframes_t pos,int dir)
return frames;
}
-nframes_t
-AudioClock::current_time (nframes_t pos) const
+framepos_t
+AudioClock::current_time (framepos_t pos) const
{
- nframes_t ret = 0;
+ framepos_t ret = 0;
switch (_mode) {
case Timecode:
@@ -1423,10 +1422,10 @@ AudioClock::current_time (nframes_t pos) const
return ret;
}
-nframes_t
-AudioClock::current_duration (nframes_t pos) const
+framepos_t
+AudioClock::current_duration (framepos_t pos) const
{
- nframes_t ret = 0;
+ framepos_t ret = 0;
switch (_mode) {
case Timecode:
@@ -1490,7 +1489,7 @@ AudioClock::timecode_sanitize_display()
}
}
-nframes_t
+framepos_t
AudioClock::timecode_frame_from_display () const
{
if (_session == 0) {
@@ -1883,7 +1882,7 @@ AudioClock::timecode_frame_from_display () const
return sample;
}
-nframes_t
+framepos_t
AudioClock::minsec_frame_from_display () const
{
if (_session == 0) {
@@ -1894,13 +1893,13 @@ AudioClock::minsec_frame_from_display () const
int mins = atoi (ms_minutes_label.get_text());
float secs = atof (ms_seconds_label.get_text());
- nframes_t sr = _session->frame_rate();
+ framecnt_t sr = _session->frame_rate();
- return (nframes_t) floor ((hrs * 60.0f * 60.0f * sr) + (mins * 60.0f * sr) + (secs * sr));
+ return (framepos_t) floor ((hrs * 60.0f * 60.0f * sr) + (mins * 60.0f * sr) + (secs * sr));
}
-nframes_t
-AudioClock::bbt_frame_from_display (nframes_t pos) const
+framepos_t
+AudioClock::bbt_frame_from_display (framepos_t pos) const
{
if (_session == 0) {
error << "AudioClock::current_time() called with BBT mode but without session!" << endmsg;
@@ -1919,14 +1918,12 @@ AudioClock::bbt_frame_from_display (nframes_t pos) const
any.bbt.beats++;
}
- nframes_t ret = _session->convert_to_frames_at (pos, any);
-
- return ret;
+ return _session->convert_to_frames_at (pos, any);
}
-nframes_t
-AudioClock::bbt_frame_duration_from_display (nframes_t pos) const
+framepos_t
+AudioClock::bbt_frame_duration_from_display (framepos_t pos) const
{
if (_session == 0) {
error << "AudioClock::current_time() called with BBT mode but without session!" << endmsg;
@@ -1943,10 +1940,10 @@ AudioClock::bbt_frame_duration_from_display (nframes_t pos) const
return _session->tempo_map().bbt_duration_at(pos,bbt,1);
}
-nframes_t
+framepos_t
AudioClock::audio_frame_from_display () const
{
- return (nframes_t) atoi (audio_frames_label.get_text());
+ return (framepos_t) atoi (audio_frames_label.get_text());
}
void
diff --git a/gtk2_ardour/audio_clock.h b/gtk2_ardour/audio_clock.h
index faab980bcc..f07b12d4c5 100644
--- a/gtk2_ardour/audio_clock.h
+++ b/gtk2_ardour/audio_clock.h
@@ -50,7 +50,7 @@ class AudioClock : public Gtk::HBox, public ARDOUR::SessionHandlePtr
void focus ();
- void set (nframes_t, bool force = false, nframes_t offset = 0, char which = 0);
+ void set (framepos_t, bool force = false, ARDOUR::framecnt_t offset = 0, char which = 0);
void set_from_playhead ();
void locate ();
void set_mode (Mode);
@@ -61,8 +61,8 @@ class AudioClock : public Gtk::HBox, public ARDOUR::SessionHandlePtr
std::string name() const { return _name; }
- nframes_t current_time (nframes_t position = 0) const;
- nframes_t current_duration (nframes_t position = 0) const;
+ framepos_t current_time (framepos_t position = 0) const;
+ framepos_t current_duration (framepos_t position = 0) const;
void set_session (ARDOUR::Session *s);
sigc::signal<void> ValueChanged;
@@ -164,7 +164,7 @@ class AudioClock : public Gtk::HBox, public ARDOUR::SessionHandlePtr
Gtk::Frame clock_frame;
framepos_t bbt_reference_time;
- nframes_t last_when;
+ framepos_t last_when;
bool last_pdelta;
bool last_sdelta;
@@ -195,19 +195,19 @@ class AudioClock : public Gtk::HBox, public ARDOUR::SessionHandlePtr
bool field_focus_out_event (GdkEventFocus *, Field);
bool drop_focus_handler (GdkEventFocus*);
- void set_timecode (nframes_t, bool);
- void set_bbt (nframes_t, bool);
- void set_minsec (nframes_t, bool);
- void set_frames (nframes_t, bool);
+ void set_timecode (framepos_t, bool);
+ void set_bbt (framepos_t, bool);
+ void set_minsec (framepos_t, bool);
+ void set_frames (framepos_t, bool);
- nframes_t get_frames (Field,nframes_t pos = 0,int dir=1);
+ framepos_t get_frames (Field, framepos_t pos = 0, int dir = 1);
void timecode_sanitize_display();
- nframes_t timecode_frame_from_display () const;
- nframes_t bbt_frame_from_display (nframes_t) const;
- nframes_t bbt_frame_duration_from_display (nframes_t) const;
- nframes_t minsec_frame_from_display () const;
- nframes_t audio_frame_from_display () const;
+ framepos_t timecode_frame_from_display () const;
+ framepos_t bbt_frame_from_display (framepos_t) const;
+ framepos_t bbt_frame_duration_from_display (framepos_t) const;
+ framepos_t minsec_frame_from_display () const;
+ framepos_t audio_frame_from_display () const;
void build_ops_menu ();
void setup_events ();
diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc
index 9080276831..3b98e55151 100644
--- a/gtk2_ardour/audio_region_view.cc
+++ b/gtk2_ardour/audio_region_view.cc
@@ -573,11 +573,11 @@ AudioRegionView::reset_fade_shapes ()
void
AudioRegionView::reset_fade_in_shape ()
{
- reset_fade_in_shape_width ((nframes_t) audio_region()->fade_in()->back()->when);
+ reset_fade_in_shape_width ((framecnt_t) audio_region()->fade_in()->back()->when);
}
void
-AudioRegionView::reset_fade_in_shape_width (nframes_t width)
+AudioRegionView::reset_fade_in_shape_width (framecnt_t width)
{
if (fade_in_handle == 0) {
return;
@@ -585,7 +585,7 @@ AudioRegionView::reset_fade_in_shape_width (nframes_t width)
/* smallest size for a fade is 64 frames */
- width = std::max ((nframes_t) 64, width);
+ width = std::max ((framecnt_t) 64, width);
Points* points;
@@ -665,11 +665,11 @@ AudioRegionView::reset_fade_in_shape_width (nframes_t width)
void
AudioRegionView::reset_fade_out_shape ()
{
- reset_fade_out_shape_width ((nframes_t) audio_region()->fade_out()->back()->when);
+ reset_fade_out_shape_width ((framecnt_t) audio_region()->fade_out()->back()->when);
}
void
-AudioRegionView::reset_fade_out_shape_width (nframes_t width)
+AudioRegionView::reset_fade_out_shape_width (framecnt_t width)
{
if (fade_out_handle == 0) {
return;
@@ -677,7 +677,7 @@ AudioRegionView::reset_fade_out_shape_width (nframes_t width)
/* smallest size for a fade is 64 frames */
- width = std::max ((nframes_t) 64, width);
+ width = std::max ((framecnt_t) 64, width);
Points* points;
double pwidth = width / samples_per_unit;
@@ -1043,7 +1043,7 @@ AudioRegionView::add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *ev)
item->w2i (x, y);
- nframes_t fx = trackview.editor().pixel_to_frame (x);
+ framepos_t fx = trackview.editor().pixel_to_frame (x);
if (fx > _region->length()) {
return;
diff --git a/gtk2_ardour/audio_region_view.h b/gtk2_ardour/audio_region_view.h
index d2593feaab..f7b8404d7b 100644
--- a/gtk2_ardour/audio_region_view.h
+++ b/gtk2_ardour/audio_region_view.h
@@ -100,8 +100,8 @@ class AudioRegionView : public RegionView
GhostRegion* add_ghost (TimeAxisView&);
- void reset_fade_in_shape_width (nframes_t);
- void reset_fade_out_shape_width (nframes_t);
+ void reset_fade_in_shape_width (framecnt_t);
+ void reset_fade_out_shape_width (framecnt_t);
void show_fade_line(framepos_t pos);
void hide_fade_line();
diff --git a/gtk2_ardour/audio_streamview.cc b/gtk2_ardour/audio_streamview.cc
index 1f1ee9d82c..abfa767c9c 100644
--- a/gtk2_ardour/audio_streamview.cc
+++ b/gtk2_ardour/audio_streamview.cc
@@ -471,7 +471,7 @@ AudioStreamView::setup_rec_box ()
// handle multi
- nframes_t start = 0;
+ framepos_t start = 0;
if (rec_regions.size() > 0) {
start = rec_regions.back().first->start()
+ _trackview.track()->get_captured_frames(rec_regions.size()-1);
@@ -600,7 +600,7 @@ AudioStreamView::foreach_crossfadeview (void (CrossfadeView::*pmf)(void))
}
void
-AudioStreamView::rec_peak_range_ready (nframes_t start, nframes_t cnt, boost::weak_ptr<Source> weak_src)
+AudioStreamView::rec_peak_range_ready (framepos_t start, framecnt_t cnt, boost::weak_ptr<Source> weak_src)
{
ENSURE_GUI_THREAD (*this, &AudioStreamView::rec_peak_range_ready, start, cnt, weak_src)
@@ -653,13 +653,13 @@ AudioStreamView::update_rec_regions (framepos_t start, framecnt_t cnt)
continue;
}
- nframes_t origlen = region->length();
+ framecnt_t origlen = region->length();
if (region == rec_regions.back().first && rec_active) {
if (last_rec_data_frame > region->start()) {
- nframes_t nlen = last_rec_data_frame - region->start();
+ framecnt_t nlen = last_rec_data_frame - region->start();
if (nlen != region->length()) {
@@ -684,7 +684,7 @@ AudioStreamView::update_rec_regions (framepos_t start, framecnt_t cnt)
} else {
- nframes_t nlen = _trackview.track()->get_captured_frames(n);
+ framecnt_t nlen = _trackview.track()->get_captured_frames(n);
if (nlen != region->length()) {
diff --git a/gtk2_ardour/audio_streamview.h b/gtk2_ardour/audio_streamview.h
index f7b11dcf97..0c50986f93 100644
--- a/gtk2_ardour/audio_streamview.h
+++ b/gtk2_ardour/audio_streamview.h
@@ -78,7 +78,7 @@ class AudioStreamView : public StreamView
private:
void setup_rec_box ();
- void rec_peak_range_ready (nframes_t start, nframes_t cnt, boost::weak_ptr<ARDOUR::Source> src);
+ void rec_peak_range_ready (framepos_t start, ARDOUR::framecnt_t cnt, boost::weak_ptr<ARDOUR::Source> src);
void update_rec_regions (ARDOUR::framepos_t, ARDOUR::framecnt_t);
RegionView* add_region_view_internal (boost::shared_ptr<ARDOUR::Region>, bool wait_for_waves, bool recording = false);
diff --git a/gtk2_ardour/automation_region_view.cc b/gtk2_ardour/automation_region_view.cc
index 1cda2051dd..c556d01848 100644
--- a/gtk2_ardour/automation_region_view.cc
+++ b/gtk2_ardour/automation_region_view.cc
@@ -126,7 +126,7 @@ AutomationRegionView::canvas_event(GdkEvent* ev)
* @param y y position, relative to our TimeAxisView.
*/
void
-AutomationRegionView::add_automation_event (GdkEvent *, nframes_t when, double y)
+AutomationRegionView::add_automation_event (GdkEvent *, framepos_t when, double y)
{
if (!_line) {
boost::shared_ptr<Evoral::Control> c = _region->control(_parameter, true);
diff --git a/gtk2_ardour/automation_region_view.h b/gtk2_ardour/automation_region_view.h
index 04dd308def..570b4edbfe 100644
--- a/gtk2_ardour/automation_region_view.h
+++ b/gtk2_ardour/automation_region_view.h
@@ -67,7 +67,7 @@ protected:
bool set_position(framepos_t pos, void* src, double* ignored);
void region_resized (const PBD::PropertyChange&);
bool canvas_event(GdkEvent* ev);
- void add_automation_event (GdkEvent* event, nframes_t when, double y);
+ void add_automation_event (GdkEvent* event, framepos_t when, double y);
void entered (bool);
void exited();
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc
index abfd83184c..e0a2cd0970 100644
--- a/gtk2_ardour/automation_time_axis.cc
+++ b/gtk2_ardour/automation_time_axis.cc
@@ -587,7 +587,7 @@ AutomationTimeAxisView::build_display_menu ()
}
void
-AutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* /*item*/, GdkEvent* /*event*/, nframes_t when, double y)
+AutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* /*item*/, GdkEvent* /*event*/, framepos_t when, double y)
{
if (!_line)
return;
diff --git a/gtk2_ardour/automation_time_axis.h b/gtk2_ardour/automation_time_axis.h
index 798a144cab..76e687da0d 100644
--- a/gtk2_ardour/automation_time_axis.h
+++ b/gtk2_ardour/automation_time_axis.h
@@ -72,7 +72,7 @@ class AutomationTimeAxisView : public TimeAxisView {
bool set_visibility (bool yn);
std::string name() const { return _name; }
- void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, nframes_t, double);
+ void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, framepos_t, double);
void clear_lines ();
@@ -86,7 +86,7 @@ class AutomationTimeAxisView : public TimeAxisView {
void get_selectables (ARDOUR::framepos_t start, ARDOUR::framepos_t end, double top, double bot, std::list<Selectable *>&);
void get_inverted_selectables (Selection&, std::list<Selectable*>& results);
- void show_timestretch (nframes_t /*start*/, nframes_t /*end*/) {}
+ void show_timestretch (framepos_t /*start*/, framepos_t /*end*/) {}
void hide_timestretch () {}
/* editing operations */
diff --git a/gtk2_ardour/crossfade_edit.cc b/gtk2_ardour/crossfade_edit.cc
index 987a3f2827..0c8daafb04 100644
--- a/gtk2_ardour/crossfade_edit.cc
+++ b/gtk2_ardour/crossfade_edit.cc
@@ -656,7 +656,7 @@ CrossfadeEditor::redraw ()
return;
}
- nframes_t len = xfade->length ();
+ framecnt_t len = xfade->length ();
fade[current].normative_curve.clear ();
fade[current].gain_curve.clear ();
@@ -1215,11 +1215,11 @@ void
CrossfadeEditor::audition (Audition which)
{
AudioPlaylist& pl (_session->the_auditioner()->prepare_playlist());
- nframes_t preroll;
- nframes_t postroll;
- nframes_t left_start_offset;
- nframes_t right_length;
- nframes_t left_length;
+ framecnt_t preroll;
+ framecnt_t postroll;
+ framecnt_t left_start_offset;
+ framecnt_t right_length;
+ framecnt_t left_length;
if (which != Right && preroll_button.get_active()) {
preroll = _session->frame_rate() * 2; //2 second hardcoded preroll for now
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index b41282d0df..84cd70ee67 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -1105,7 +1105,7 @@ Editor::set_session (Session *t)
bbt.bars = 0;
bbt.beats = 0;
bbt.ticks = 120;
- nframes_t pos = _session->tempo_map().bbt_duration_at (0, bbt, 1);
+ framepos_t pos = _session->tempo_map().bbt_duration_at (0, bbt, 1);
nudge_clock.set_mode(AudioClock::BBT);
nudge_clock.set (pos, true, 0, AudioClock::BBT);
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index 3c3f56d2f1..0b90c16e0d 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -799,7 +799,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
MinsecRulerScale minsec_ruler_scale;
- nframes_t minsec_mark_interval;
+ framecnt_t minsec_mark_interval;
gint minsec_mark_modulo;
gint minsec_nmarks;
void set_minsec_ruler_scale (gdouble lower, gdouble upper);
@@ -814,7 +814,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
TimecodeRulerScale timecode_ruler_scale;
- nframes_t timecode_mark_interval;
+ framecnt_t timecode_mark_interval;
gint timecode_mark_modulo;
gint timecode_nmarks;
void set_timecode_ruler_scale (gdouble lower, gdouble upper);
@@ -1492,7 +1492,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
void remove_metric_marks ();
void draw_metric_marks (const ARDOUR::Metrics& metrics);
- void compute_current_bbt_points (nframes_t left, nframes_t right);
+ void compute_current_bbt_points (framepos_t left, framepos_t right);
void tempo_map_changed (const PBD::PropertyChange&);
void redisplay_tempo (bool immediate_redraw);
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 5bddc13891..6f2957b3ff 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -1752,13 +1752,13 @@ Editor::temporal_zoom_session ()
ENSURE_GUI_THREAD (*this, &Editor::temporal_zoom_session)
if (_session) {
- nframes_t const l = _session->current_end_frame() - _session->current_start_frame();
+ framecnt_t const l = _session->current_end_frame() - _session->current_start_frame();
double s = _session->current_start_frame() - l * 0.01;
if (s < 0) {
s = 0;
}
- nframes_t const e = _session->current_end_frame() + l * 0.01;
- temporal_zoom_by_frame (nframes_t (s), e, "zoom to _session");
+ framecnt_t const e = _session->current_end_frame() + l * 0.01;
+ temporal_zoom_by_frame (framecnt_t (s), e, "zoom to _session");
}
}
@@ -2207,7 +2207,7 @@ Editor::insert_route_list_drag (boost::shared_ptr<Route> route, int x, int y)
{
double wx, wy;
double cx, cy;
- nframes_t where;
+ framepos_t where;
RouteTimeAxisView *dest_rtv = 0;
RouteTimeAxisView *source_rtv = 0;
@@ -4188,8 +4188,8 @@ Editor::duplicate_some_regions (RegionSelection& regions, float times)
RegionSelection sel = regions; // clear (below) may clear the argument list if its the current region selection
RegionSelection foo;
- nframes_t const start_frame = regions.start ();
- nframes_t const end_frame = regions.end_frame ();
+ framepos_t const start_frame = regions.start ();
+ framepos_t const end_frame = regions.end_frame ();
begin_reversible_command (_("duplicate region"));
diff --git a/gtk2_ardour/editor_regions.cc b/gtk2_ardour/editor_regions.cc
index 9b56ad0433..30fce08a93 100644
--- a/gtk2_ardour/editor_regions.cc
+++ b/gtk2_ardour/editor_regions.cc
@@ -800,9 +800,9 @@ EditorRegions::format_position (framepos_t pos, char* buf, size_t bufsize)
left = pos;
hrs = (int) floor (left / (_session->frame_rate() * 60.0f * 60.0f));
- left -= (nframes_t) floor (hrs * _session->frame_rate() * 60.0f * 60.0f);
+ left -= (framecnt_t) floor (hrs * _session->frame_rate() * 60.0f * 60.0f);
mins = (int) floor (left / (_session->frame_rate() * 60.0f));
- left -= (nframes_t) floor (mins * _session->frame_rate() * 60.0f);
+ left -= (framecnt_t) floor (mins * _session->frame_rate() * 60.0f);
secs = left / (float) _session->frame_rate();
snprintf (buf, bufsize, "%02d:%02d:%06.3f", hrs, mins, secs);
break;
@@ -844,13 +844,13 @@ EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row co
#if 0
if (audioRegion && fades_in_seconds) {
- nframes_t left;
+ framepos_t left;
int mins;
int millisecs;
left = audioRegion->fade_in()->back()->when;
mins = (int) floor (left / (_session->frame_rate() * 60.0f));
- left -= (nframes_t) floor (mins * _session->frame_rate() * 60.0f);
+ left -= (framepos_t) floor (mins * _session->frame_rate() * 60.0f);
millisecs = (int) floor ((left * 1000.0f) / _session->frame_rate());
if (audioRegion->fade_in()->back()->when >= _session->frame_rate()) {
@@ -861,7 +861,7 @@ EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row co
left = audioRegion->fade_out()->back()->when;
mins = (int) floor (left / (_session->frame_rate() * 60.0f));
- left -= (nframes_t) floor (mins * _session->frame_rate() * 60.0f);
+ left -= (framepos_t) floor (mins * _session->frame_rate() * 60.0f);
millisecs = (int) floor ((left * 1000.0f) / _session->frame_rate());
if (audioRegion->fade_out()->back()->when >= _session->frame_rate()) {
diff --git a/gtk2_ardour/editor_rulers.cc b/gtk2_ardour/editor_rulers.cc
index 068be6d534..b367a55f25 100644
--- a/gtk2_ardour/editor_rulers.cc
+++ b/gtk2_ardour/editor_rulers.cc
@@ -1002,7 +1002,7 @@ Editor::metric_get_timecode (GtkCustomRulerMark **marks, gdouble lower, gdouble
lower = 0;
}
- pos = (nframes_t) floor (lower);
+ pos = (framecnt_t) floor (lower);
*marks = (GtkCustomRulerMark *) g_malloc (sizeof(GtkCustomRulerMark) * timecode_nmarks);
switch (timecode_ruler_scale) {
@@ -1150,8 +1150,8 @@ Editor::compute_bbt_ruler_scale (framepos_t lower, framepos_t upper)
TempoMap::BBTPointList::iterator i;
BBT_Time lower_beat, upper_beat; // the beats at each end of the ruler
- _session->bbt_time((jack_nframes_t) lower, lower_beat);
- _session->bbt_time((jack_nframes_t) upper, upper_beat);
+ _session->bbt_time (lower, lower_beat);
+ _session->bbt_time (upper, upper_beat);
uint32_t beats = 0;
bbt_accent_modulo = 1;
diff --git a/gtk2_ardour/editor_summary.cc b/gtk2_ardour/editor_summary.cc
index e55b53aeea..c097bfe049 100644
--- a/gtk2_ardour/editor_summary.cc
+++ b/gtk2_ardour/editor_summary.cc
@@ -147,7 +147,7 @@ EditorSummary::render (cairo_t* cr)
/* compute start and end points for the summary */
- nframes_t const session_length = _session->current_end_frame() - _session->current_start_frame ();
+ framecnt_t const session_length = _session->current_end_frame() - _session->current_start_frame ();
double const theoretical_start = _session->current_start_frame() - session_length * _overhang_fraction;
_start = theoretical_start > 0 ? theoretical_start : 0;
_end = _session->current_end_frame() + session_length * _overhang_fraction;
diff --git a/gtk2_ardour/editor_summary.h b/gtk2_ardour/editor_summary.h
index e9258a88fd..86f2e79390 100644
--- a/gtk2_ardour/editor_summary.h
+++ b/gtk2_ardour/editor_summary.h
@@ -80,8 +80,8 @@ private:
Position get_position (double, double) const;
void set_cursor (Position);
- nframes_t _start; ///< start frame of the overview
- nframes_t _end; ///< end frame of the overview
+ framepos_t _start; ///< start frame of the overview
+ framepos_t _end; ///< end frame of the overview
/** fraction of the session length by which the overview size should extend past the start and end markers */
double _overhang_fraction;
diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc
index 0d0fd4e841..90fd6136cf 100644
--- a/gtk2_ardour/editor_tempodisplay.cc
+++ b/gtk2_ardour/editor_tempodisplay.cc
@@ -138,7 +138,7 @@ Editor::redisplay_tempo (bool immediate_redraw)
}
void
-Editor::compute_current_bbt_points (nframes_t leftmost, nframes_t rightmost)
+Editor::compute_current_bbt_points (framepos_t leftmost, framepos_t rightmost)
{
if (!_session) {
return;
diff --git a/gtk2_ardour/export_format_dialog.cc b/gtk2_ardour/export_format_dialog.cc
index caf76ac0de..f950e6ab18 100644
--- a/gtk2_ardour/export_format_dialog.cc
+++ b/gtk2_ardour/export_format_dialog.cc
@@ -210,7 +210,7 @@ ExportFormatDialog::set_session (ARDOUR::Session* s)
if (sample_rate_view.get_selection()->count_selected_rows() == 0) {
Gtk::ListStore::Children::iterator it;
for (it = sample_rate_list->children().begin(); it != sample_rate_list->children().end(); ++it) {
- if ((nframes_t) (*it)->get_value (sample_rate_cols.ptr)->rate == _session->nominal_frame_rate()) {
+ if ((framecnt_t) (*it)->get_value (sample_rate_cols.ptr)->rate == _session->nominal_frame_rate()) {
sample_rate_view.get_selection()->select (it);
break;
}
@@ -761,7 +761,7 @@ ExportFormatDialog::update_time (AnyTime & time, AudioClock const & clock)
return;
}
- nframes_t frames = clock.current_duration();
+ framecnt_t frames = clock.current_duration();
switch (clock.mode()) {
case AudioClock::Timecode:
diff --git a/gtk2_ardour/export_range_markers_dialog.cc b/gtk2_ardour/export_range_markers_dialog.cc
index f5c6c916d1..774a956d9e 100644
--- a/gtk2_ardour/export_range_markers_dialog.cc
+++ b/gtk2_ardour/export_range_markers_dialog.cc
@@ -171,7 +171,7 @@ ExportRangeMarkersDialog::init_progress_computing(Locations::LocationList& locat
// flush vector
range_markers_durations_aggregated.resize(0);
- nframes_t duration_before_current_location = 0;
+ framecnt_t duration_before_current_location = 0;
Locations::LocationList::iterator locationIter;
for (locationIter = locations.begin(); locationIter != locations.end(); ++locationIter) {
@@ -180,7 +180,7 @@ ExportRangeMarkersDialog::init_progress_computing(Locations::LocationList& locat
if(currentLocation->is_range_marker()){
range_markers_durations_aggregated.push_back (duration_before_current_location);
- nframes_t duration = currentLocation->end() - currentLocation->start();
+ framecnt_t duration = currentLocation->end() - currentLocation->start();
range_markers_durations.push_back (duration);
duration_before_current_location += duration;
diff --git a/gtk2_ardour/imageframe_socket_handler.cc b/gtk2_ardour/imageframe_socket_handler.cc
index dc9188db1b..da827b72df 100644
--- a/gtk2_ardour/imageframe_socket_handler.cc
+++ b/gtk2_ardour/imageframe_socket_handler.cc
@@ -537,7 +537,7 @@ ImageFrameSocketHandler::send_imageframe_time_axis_group_renamed(const string &
* @param item the time axis item whos position has changed
*/
void
-ImageFrameSocketHandler::send_imageframe_view_position_change(nframes_t pos, void* src, ImageFrameView* item)
+ImageFrameSocketHandler::send_imageframe_view_position_change (framepos_t pos, void* src, ImageFrameView* item)
{
// ENSURE_GUI_THREAD (*this, &ImageFrameSocketHandler::send_imageframe_view_position_change, pos, src, item)
@@ -573,7 +573,7 @@ ImageFrameSocketHandler::send_imageframe_view_position_change(nframes_t pos, voi
* @param item the item which has had a duration change
*/
void
-ImageFrameSocketHandler::send_imageframe_view_duration_change(nframes_t dur, void* src, ImageFrameView* item)
+ImageFrameSocketHandler::send_imageframe_view_duration_change (framecnt_t dur, void* src, ImageFrameView* item)
{
// ENSURE_GUI_THREAD (*this, &ImageFrameSocketHandler::send_imageframe_view_duration_change, dur, src, item)
@@ -687,7 +687,7 @@ ImageFrameSocketHandler::send_imageframe_view_removed(const string & item_id, vo
* @param item the time axis item whos position has changed
*/
void
-ImageFrameSocketHandler::send_marker_view_position_change(nframes_t pos, void* src, MarkerView* item)
+ImageFrameSocketHandler::send_marker_view_position_change (framepos_t pos, void* src, MarkerView* item)
{
if(this == src || src == 0)
{
@@ -721,7 +721,7 @@ ImageFrameSocketHandler::send_marker_view_position_change(nframes_t pos, void* s
* @param item the time axis item whos position has changed
*/
void
-ImageFrameSocketHandler::send_marker_view_duration_change(nframes_t dur, void* src, MarkerView* item)
+ImageFrameSocketHandler::send_marker_view_duration_change (framecnt_t dur, void* src, MarkerView* item)
{
if(this == src || src == 0)
{
@@ -1336,11 +1336,11 @@ ImageFrameSocketHandler::handle_insert_imageframe_view(const char* msg)
position += image_id_size ;
// get the start frame value
- nframes_t start = strtoul((get_message_part(position,10,msg).c_str()),0,10) ;
+ framepos_t start = strtoul((get_message_part(position,10,msg).c_str()),0,10) ;
position += 10 ;
// get the duration value
- nframes_t duration = strtoul((get_message_part(position,10,msg).c_str()),0,10) ;
+ framecnt_t duration = strtoul((get_message_part(position,10,msg).c_str()),0,10) ;
position += 10 ;
//get the named time axis view we about to add an image to
@@ -1672,7 +1672,7 @@ ImageFrameSocketHandler::handle_imageframe_view_position_update(const char* msg)
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, scene_id, scene_id_size, item_id, item_id_size) ;
- nframes_t start_frame = strtoul(get_message_part(position, ardourvis::TIME_VALUE_CHARS, msg).c_str(), 0, 10) ;
+ framepos_t start_frame = strtoul(get_message_part(position, ardourvis::TIME_VALUE_CHARS, msg).c_str(), 0, 10) ;
position += ardourvis::TIME_VALUE_CHARS ;
// get the named time axis
@@ -1724,7 +1724,7 @@ ImageFrameSocketHandler::handle_imageframe_view_duration_update(const char* msg)
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, scene_id, scene_id_size, item_id, item_id_size) ;
- nframes_t duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
+ framecnt_t duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
position += ardourvis::TIME_VALUE_CHARS ;
// get the named time axis
@@ -1827,7 +1827,7 @@ ImageFrameSocketHandler::handle_imageframe_view_max_duration_update(const char*
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
- nframes_t max_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
+ framecnt_t max_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
position += ardourvis::TIME_VALUE_CHARS ;
int errcode ;
@@ -1915,7 +1915,7 @@ ImageFrameSocketHandler::handle_imageframe_view_min_duration_update(const char*
this->decompose_imageframe_item_desc(msg, position, track_id, track_id_size, group_id, group_id_size, item_id, item_id_size) ;
- nframes_t min_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
+ framecnt_t min_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
position += ardourvis::TIME_VALUE_CHARS ;
int errcode ;
diff --git a/gtk2_ardour/imageframe_time_axis_group.cc b/gtk2_ardour/imageframe_time_axis_group.cc
index 1bff9a1572..301d0d2fdd 100644
--- a/gtk2_ardour/imageframe_time_axis_group.cc
+++ b/gtk2_ardour/imageframe_time_axis_group.cc
@@ -198,7 +198,7 @@ ImageFrameTimeAxisGroup::apply_item_color(Gdk::Color& color)
* @param src the identity of the object that initiated the change
*/
ImageFrameView*
-ImageFrameTimeAxisGroup::add_imageframe_item(const string & frame_id, nframes_t start, nframes_t duration, unsigned char* rgb_data, uint32_t width, uint32_t height, uint32_t num_channels, void* src)
+ImageFrameTimeAxisGroup::add_imageframe_item(const string & frame_id, framepos_t start, framecnt_t duration, unsigned char* rgb_data, uint32_t width, uint32_t height, uint32_t num_channels, void* src)
{
ImageFrameView* ifv = 0;
diff --git a/gtk2_ardour/imageframe_time_axis_view.cc b/gtk2_ardour/imageframe_time_axis_view.cc
index b78ce58b08..bbec156efd 100644
--- a/gtk2_ardour/imageframe_time_axis_view.cc
+++ b/gtk2_ardour/imageframe_time_axis_view.cc
@@ -406,9 +406,8 @@ ImageFrameTimeAxisView::get_selected_imageframe_view() const
void
ImageFrameTimeAxisView::set_imageframe_duration_sec(double sec)
{
- if(selected_imageframe_group && selected_imageframe_view)
- {
- selected_imageframe_view->set_duration((nframes_t) (sec * _trackview.editor.session()->frame_rate()), this) ;
+ if (selected_imageframe_group && selected_imageframe_view) {
+ selected_imageframe_view->set_duration ((sec * _trackview.editor.session()->frame_rate()), this);
}
}
diff --git a/gtk2_ardour/imageframe_view.cc b/gtk2_ardour/imageframe_view.cc
index 04dde574c6..817088124c 100644
--- a/gtk2_ardour/imageframe_view.cc
+++ b/gtk2_ardour/imageframe_view.cc
@@ -60,8 +60,8 @@ ImageFrameView::ImageFrameView(const string & item_id,
ImageFrameTimeAxisGroup* item_group,
double spu,
Gdk::Color& basic_color,
- nframes_t start,
- nframes_t duration,
+ framepos_t start,
+ framecnt_t duration,
unsigned char* rgb_data,
uint32_t width,
uint32_t height,
diff --git a/gtk2_ardour/imageframe_view.h b/gtk2_ardour/imageframe_view.h
index ac8a3b3bb0..49b29038c4 100644
--- a/gtk2_ardour/imageframe_view.h
+++ b/gtk2_ardour/imageframe_view.h
@@ -65,8 +65,8 @@ class ImageFrameView : public TimeAxisViewItem
ImageFrameTimeAxisGroup* group,
double spu,
Gdk::Color& base_color,
- nframes_t start,
- nframes_t duration,
+ framepos_t start,
+ framecnt_t duration,
unsigned char* rgb_data,
uint32_t width,
uint32_t height,
diff --git a/gtk2_ardour/location_ui.cc b/gtk2_ardour/location_ui.cc
index aadbbfc5b7..0284921ba5 100644
--- a/gtk2_ardour/location_ui.cc
+++ b/gtk2_ardour/location_ui.cc
@@ -934,7 +934,7 @@ LocationUI::add_new_location()
string markername;
if (_session) {
- nframes_t where = _session->audible_frame();
+ framepos_t where = _session->audible_frame();
_session->locations()->next_available_name(markername,"mark");
Location *location = new Location (*_session, where, where, markername, Location::IsMark);
if (Config->get_name_new_markers()) {
@@ -956,7 +956,7 @@ LocationUI::add_new_range()
string rangename;
if (_session) {
- nframes_t where = _session->audible_frame();
+ framepos_t where = _session->audible_frame();
_session->locations()->next_available_name(rangename,"unnamed");
Location *location = new Location (*_session, where, where, rangename, Location::IsRangeMarker);
_session->begin_reversible_command (_("add range marker"));
diff --git a/gtk2_ardour/marker.cc b/gtk2_ardour/marker.cc
index ca4cfbf4c5..6f0898d5dc 100644
--- a/gtk2_ardour/marker.cc
+++ b/gtk2_ardour/marker.cc
@@ -46,7 +46,7 @@ using namespace Gtkmm2ext;
PBD::Signal1<void,Marker*> Marker::CatchDeletion;
Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, ArdourCanvas::Group& line_parent, guint32 rgba, const string& annotation,
- Type type, nframes_t frame, bool handle_events)
+ Type type, framepos_t frame, bool handle_events)
: editor (ed)
, _parent (&parent)
diff --git a/gtk2_ardour/marker.h b/gtk2_ardour/marker.h
index c17af63134..fbc7e18a50 100644
--- a/gtk2_ardour/marker.h
+++ b/gtk2_ardour/marker.h
@@ -57,7 +57,7 @@ class Marker : public sigc::trackable
Marker (PublicEditor& editor, ArdourCanvas::Group &, ArdourCanvas::Group &, guint32 rgba, const std::string& text, Type,
- nframes_t frame = 0, bool handle_events = true);
+ framepos_t frame = 0, bool handle_events = true);
virtual ~Marker ();
diff --git a/gtk2_ardour/marker_time_axis_view.cc b/gtk2_ardour/marker_time_axis_view.cc
index c901f9ba52..124aac0852 100644
--- a/gtk2_ardour/marker_time_axis_view.cc
+++ b/gtk2_ardour/marker_time_axis_view.cc
@@ -192,7 +192,7 @@ MarkerTimeAxisView::apply_color(Gdk::Color& color)
* @param src the identity of the object that initiated the change
*/
MarkerView*
-MarkerTimeAxisView::add_marker_view(ImageFrameView* ifv, std::string mark_type, std::string mark_id, nframes_t start, nframes_t dur, void* src)
+MarkerTimeAxisView::add_marker_view(ImageFrameView* ifv, std::string mark_type, std::string mark_id, framepos_t start, framecnt_t dur, void* src)
{
if(ifv->has_marker_view_item(mark_id))
{
@@ -335,7 +335,7 @@ MarkerTimeAxisView::set_marker_duration_sec(double sec)
{
if(get_selected_time_axis_item() != 0)
{
- get_selected_time_axis_item()->set_duration((nframes_t) (sec * _trackview.editor.session()->frame_rate()), this) ;
+ get_selected_time_axis_item()->set_duration((sec * _trackview.editor.session()->frame_rate()), this);
}
}
diff --git a/gtk2_ardour/marker_view.cc b/gtk2_ardour/marker_view.cc
index a0e8f2bbf0..4bd842341b 100644
--- a/gtk2_ardour/marker_view.cc
+++ b/gtk2_ardour/marker_view.cc
@@ -52,8 +52,8 @@ MarkerView::MarkerView(ArdourCanvas::Group *parent,
Gdk::Color& basic_color,
std::string mark_type,
std::string mark_id,
- nframes_t start,
- nframes_t duration)
+ framepos_t start,
+ framecnt_t duration)
: TimeAxisViewItem(mark_id, *parent,*tv,spu,basic_color,start,duration)
{
mark_type_text = mark_type ;
diff --git a/gtk2_ardour/midi_streamview.cc b/gtk2_ardour/midi_streamview.cc
index 293bb6503a..723b522202 100644
--- a/gtk2_ardour/midi_streamview.cc
+++ b/gtk2_ardour/midi_streamview.cc
@@ -437,7 +437,7 @@ MidiStreamView::setup_rec_box ()
// handle multi
- nframes_t start = 0;
+ framepos_t start = 0;
if (rec_regions.size() > 0) {
start = rec_regions.back().first->start()
+ _trackview.track()->get_captured_frames(rec_regions.size()-1);
diff --git a/gtk2_ardour/plugin_eq_gui.cc b/gtk2_ardour/plugin_eq_gui.cc
index a95c0891d0..21ec837992 100644
--- a/gtk2_ardour/plugin_eq_gui.cc
+++ b/gtk2_ardour/plugin_eq_gui.cc
@@ -35,6 +35,8 @@
#include <iostream>
#include <cmath>
+using namespace ARDOUR;
+
PluginEqGui::PluginEqGui(boost::shared_ptr<ARDOUR::PluginInsert> pluginInsert)
: _min_dB(-12.0),
_max_dB(+12.0),
@@ -315,8 +317,8 @@ PluginEqGui::run_impulse_analysis()
ARDOUR::ChanMapping in_map(_plugin->get_info()->n_inputs);
ARDOUR::ChanMapping out_map(_plugin->get_info()->n_outputs);
- _plugin->connect_and_run(_bufferset, in_map, out_map, _buffer_size, (nframes_t)0);
- nframes_t f = _plugin->signal_latency();
+ _plugin->connect_and_run(_bufferset, in_map, out_map, _buffer_size, 0);
+ framecnt_t f = _plugin->signal_latency ();
// Adding user_latency() could be interesting
// Gather all output, taking latency into account.
@@ -338,8 +340,8 @@ PluginEqGui::run_impulse_analysis()
} else {
//int C = 0;
//std::cerr << (++C) << ": latency is " << f << " frames, doing split processing.." << std::endl;
- nframes_t target_offset = 0;
- nframes_t frames_left = _buffer_size; // refaktoroi
+ framecnt_t target_offset = 0;
+ framecnt_t frames_left = _buffer_size; // refaktoroi
do {
if (f >= _buffer_size) {
//std::cerr << (++C) << ": f (=" << f << ") is larger than buffer_size, still trying to reach the actual output" << std::endl;
@@ -351,7 +353,7 @@ PluginEqGui::run_impulse_analysis()
// we start at output offset "f"
// .. and copy "buffer size" - "f" - "offset" frames
- nframes_t length = _buffer_size - f - target_offset;
+ framecnt_t length = _buffer_size - f - target_offset;
//std::cerr << (++C) << ": copying " << length << " frames to _collect_bufferset.get_audio(i)+" << target_offset << " from bufferset at offset " << f << std::endl;
for (uint32_t i = 0; i < outputs; ++i) {
@@ -374,7 +376,7 @@ PluginEqGui::run_impulse_analysis()
in_map = ARDOUR::ChanMapping(_plugin->get_info()->n_inputs);
out_map = ARDOUR::ChanMapping(_plugin->get_info()->n_outputs);
- _plugin->connect_and_run(_bufferset, in_map, out_map, _buffer_size, (nframes_t)0);
+ _plugin->connect_and_run(_bufferset, in_map, out_map, _buffer_size, 0);
}
} while ( frames_left > 0);
diff --git a/gtk2_ardour/plugin_eq_gui.h b/gtk2_ardour/plugin_eq_gui.h
index 26a0777ba3..24ffd45656 100644
--- a/gtk2_ardour/plugin_eq_gui.h
+++ b/gtk2_ardour/plugin_eq_gui.h
@@ -89,8 +89,8 @@ class PluginEqGui : public Gtk::Table
float _log_coeff;
float _log_max;
- nframes_t _buffer_size;
- nframes_t _signal_buffer_size;
+ ARDOUR::framecnt_t _buffer_size;
+ ARDOUR::framecnt_t _signal_buffer_size;
// buffers
ARDOUR::BufferSet _bufferset;
diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc
index b08b5a3a0f..ce36b8a414 100644
--- a/gtk2_ardour/plugin_ui.cc
+++ b/gtk2_ardour/plugin_ui.cc
@@ -471,8 +471,8 @@ void
PlugUIBase::set_latency_label ()
{
char buf[64];
- nframes_t l = insert->effective_latency ();
- nframes_t sr = insert->session().frame_rate();
+ framecnt_t const l = insert->effective_latency ();
+ framecnt_t const sr = insert->session().frame_rate ();
if (l < sr / 1000) {
snprintf (buf, sizeof (buf), "latency (%d samples)", l);
diff --git a/gtk2_ardour/port_insert_ui.cc b/gtk2_ardour/port_insert_ui.cc
index 84d2eea155..5546fd533b 100644
--- a/gtk2_ardour/port_insert_ui.cc
+++ b/gtk2_ardour/port_insert_ui.cc
@@ -71,7 +71,7 @@ PortInsertUI::PortInsertUI (Gtk::Window* parent, ARDOUR::Session* sess, boost::s
void
PortInsertUI::update_latency_display ()
{
- nframes_t sample_rate = input_selector.session()->engine().frame_rate();
+ framecnt_t const sample_rate = input_selector.session()->engine().frame_rate();
if (sample_rate == 0) {
latency_display.set_text (_("Disconnected from audio engine"));
} else {
@@ -98,7 +98,7 @@ PortInsertUI::check_latency_measurement ()
}
char buf[128];
- nframes_t sample_rate = AudioEngine::instance()->frame_rate();
+ framecnt_t const sample_rate = AudioEngine::instance()->frame_rate();
if (sample_rate == 0) {
latency_display.set_text (_("Disconnected from audio engine"));
@@ -121,7 +121,7 @@ PortInsertUI::check_latency_measurement ()
}
if (solid) {
- _pi->set_measured_latency ((nframes_t) rint (mtdm->del()));
+ _pi->set_measured_latency (rint (mtdm->del()));
latency_button.set_active (false);
strcat (buf, " (set)");
}
diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h
index 1be9879cd7..f0c2ca3f91 100644
--- a/gtk2_ardour/public_editor.h
+++ b/gtk2_ardour/public_editor.h
@@ -196,10 +196,6 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
virtual void transition_to_rolling (bool fwd) = 0;
virtual framepos_t unit_to_frame (double unit) const = 0;
- // XXX remove me when libardour goes framepos_t
- double frame_to_unit (nframes_t frame) const {
- return frame_to_unit ((framepos_t) frame);
- }
virtual double frame_to_unit (framepos_t frame) const = 0;
virtual double frame_to_unit (double frame) const = 0;
virtual framepos_t pixel_to_frame (double pixel) const = 0;
diff --git a/gtk2_ardour/region_editor.cc b/gtk2_ardour/region_editor.cc
index 61e2939c09..c95d9bbd20 100755
--- a/gtk2_ardour/region_editor.cc
+++ b/gtk2_ardour/region_editor.cc
@@ -291,7 +291,7 @@ RegionEditor::end_clock_changed ()
void
RegionEditor::length_clock_changed ()
{
- nframes_t frames = length_clock.current_time();
+ framecnt_t frames = length_clock.current_time();
_session->begin_reversible_command (_("change region length"));
@@ -343,7 +343,7 @@ RegionEditor::bounds_changed (const PropertyChange& what_changed)
if (what_changed.contains (ARDOUR::Properties::sync_position) || what_changed.contains (ARDOUR::Properties::position)) {
int dir;
- nframes_t off = _region->sync_offset (dir);
+ frameoffset_t off = _region->sync_offset (dir);
if (dir == -1) {
off = -off;
}
diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc
index d722976861..51ec002931 100644
--- a/gtk2_ardour/region_view.cc
+++ b/gtk2_ardour/region_view.cc
@@ -468,7 +468,7 @@ void
RegionView::region_sync_changed ()
{
int sync_dir;
- nframes_t sync_offset;
+ framecnt_t sync_offset;
sync_offset = _region->sync_offset (sync_dir);
@@ -595,7 +595,7 @@ RegionView::set_height (double h)
if (sync_line) {
Points points;
int sync_dir;
- nframes_t sync_offset;
+ framecnt_t sync_offset;
sync_offset = _region->sync_offset (sync_dir);
double offset = sync_offset / samples_per_unit;
@@ -631,9 +631,9 @@ RegionView::update_coverage_frames (LayerDisplay d)
return;
}
- nframes_t const position = _region->first_frame ();
- nframes_t t = position;
- nframes_t const end = _region->last_frame ();
+ framepos_t const position = _region->first_frame ();
+ framepos_t t = position;
+ framepos_t const end = _region->last_frame ();
ArdourCanvas::SimpleRect* cr = 0;
bool me = false;
diff --git a/gtk2_ardour/route_params_ui.cc b/gtk2_ardour/route_params_ui.cc
index d947fbeb15..1cba72ebda 100644
--- a/gtk2_ardour/route_params_ui.cc
+++ b/gtk2_ardour/route_params_ui.cc
@@ -260,7 +260,7 @@ RouteParams_UI::refresh_latency ()
latency_widget->refresh();
char buf[128];
- snprintf (buf, sizeof (buf), _("Playback delay: %u samples"), _route->initial_delay());
+ snprintf (buf, sizeof (buf), _("Playback delay: %" PRId64 " samples"), _route->initial_delay());
delay_label.set_text (buf);
}
}
@@ -288,7 +288,7 @@ RouteParams_UI::setup_latency_frame ()
latency_widget = new LatencyGUI (*(_route->output()), _session->frame_rate(), _session->engine().frames_per_cycle());
char buf[128];
- snprintf (buf, sizeof (buf), _("Playback delay: %u samples"), _route->initial_delay());
+ snprintf (buf, sizeof (buf), _("Playback delay: %" PRId64 " samples"), _route->initial_delay());
delay_label.set_text (buf);
latency_packer.pack_start (*latency_widget, false, false);
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc
index 31966681df..b6cea2a11a 100644
--- a/gtk2_ardour/route_time_axis.cc
+++ b/gtk2_ardour/route_time_axis.cc
@@ -672,7 +672,7 @@ RouteTimeAxisView::track_mode_changed ()
}
void
-RouteTimeAxisView::show_timestretch (nframes_t start, nframes_t end)
+RouteTimeAxisView::show_timestretch (framepos_t start, framepos_t end)
{
double x1;
double x2;
@@ -1208,8 +1208,8 @@ RouteTimeAxisView::get_selectables (framepos_t start, framepos_t end, double top
speed = track()->speed();
}
- nframes_t start_adjusted = session_frame_to_track_frame(start, speed);
- nframes_t end_adjusted = session_frame_to_track_frame(end, speed);
+ framepos_t const start_adjusted = session_frame_to_track_frame(start, speed);
+ framepos_t const end_adjusted = session_frame_to_track_frame(end, speed);
if ((_view && ((top < 0.0 && bot < 0.0))) || touched (top, bot)) {
_view->get_selectables (start_adjusted, end_adjusted, top, bot, results);
@@ -1295,7 +1295,7 @@ RouteTimeAxisView::name_entry_changed ()
}
boost::shared_ptr<Region>
-RouteTimeAxisView::find_next_region (nframes_t pos, RegionPoint point, int32_t dir)
+RouteTimeAxisView::find_next_region (framepos_t pos, RegionPoint point, int32_t dir)
{
boost::shared_ptr<Playlist> pl = playlist ();
diff --git a/gtk2_ardour/route_time_axis.h b/gtk2_ardour/route_time_axis.h
index edc752d630..8515f375b9 100644
--- a/gtk2_ardour/route_time_axis.h
+++ b/gtk2_ardour/route_time_axis.h
@@ -78,7 +78,7 @@ public:
void set_samples_per_unit (double);
void set_height (uint32_t h);
- void show_timestretch (nframes_t start, nframes_t end);
+ void show_timestretch (framepos_t start, framepos_t end);
void hide_timestretch ();
void selection_click (GdkEventButton*);
void set_selected_points (PointSelection&);
@@ -88,7 +88,7 @@ public:
void set_layer_display (LayerDisplay d);
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 (framepos_t pos, ARDOUR::RegionPoint, int32_t dir);
framepos_t find_next_region_boundary (framepos_t pos, int32_t dir);
/* Editing operations */
@@ -232,7 +232,7 @@ protected:
virtual void show_existing_automation ();
virtual void hide_all_automation ();
- void timestretch (nframes_t start, nframes_t end);
+ void timestretch (framepos_t start, framepos_t end);
void speed_changed ();
diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc
index 63ece47e6a..b135593a62 100644
--- a/gtk2_ardour/selection.cc
+++ b/gtk2_ardour/selection.cc
@@ -304,7 +304,7 @@ Selection::toggle (vector<RegionView*>& r)
}
long
-Selection::toggle (nframes_t start, nframes_t end)
+Selection::toggle (framepos_t start, framepos_t end)
{
AudioRangeComparator cmp;
@@ -462,7 +462,7 @@ Selection::add (MidiRegionView* mrv)
}
long
-Selection::add (nframes_t start, nframes_t end)
+Selection::add (framepos_t start, framepos_t end)
{
AudioRangeComparator cmp;
@@ -478,7 +478,7 @@ Selection::add (nframes_t start, nframes_t end)
}
void
-Selection::replace (uint32_t sid, nframes_t start, nframes_t end)
+Selection::replace (uint32_t sid, framepos_t start, framepos_t end)
{
for (list<AudioRange>::iterator i = time.begin(); i != time.end(); ++i) {
if ((*i).id == sid) {
@@ -654,7 +654,7 @@ Selection::remove (uint32_t selection_id)
}
void
-Selection::remove (nframes_t /*start*/, nframes_t /*end*/)
+Selection::remove (framepos_t /*start*/, framepos_t /*end*/)
{
}
@@ -744,7 +744,7 @@ Selection::set (vector<RegionView*>& v)
* the list of tracks it applies to.
*/
long
-Selection::set (nframes_t start, nframes_t end)
+Selection::set (framepos_t start, framepos_t end)
{
if ((start == 0 && end == 0) || end < start) {
return 0;
diff --git a/gtk2_ardour/selection.h b/gtk2_ardour/selection.h
index 81bb54b9df..0a73ae275e 100644
--- a/gtk2_ardour/selection.h
+++ b/gtk2_ardour/selection.h
@@ -121,7 +121,7 @@ class Selection : public sigc::trackable, public PBD::ScopedConnectionList
void set (RegionView*, bool also_clear_tracks = true);
void set (MidiRegionView*);
void set (std::vector<RegionView*>&);
- long set (nframes_t, nframes_t);
+ long set (framepos_t, framepos_t);
void set (boost::shared_ptr<Evoral::ControlList>);
void set (boost::shared_ptr<ARDOUR::Playlist>);
void set (const std::list<boost::shared_ptr<ARDOUR::Playlist> >&);
@@ -136,7 +136,7 @@ class Selection : public sigc::trackable, public PBD::ScopedConnectionList
void toggle (MidiRegionView*);
void toggle (MidiCutBuffer*);
void toggle (std::vector<RegionView*>&);
- long toggle (nframes_t, nframes_t);
+ long toggle (framepos_t, framepos_t);
void toggle (ARDOUR::AutomationList*);
void toggle (boost::shared_ptr<ARDOUR::Playlist>);
void toggle (const std::list<boost::shared_ptr<ARDOUR::Playlist> >&);
@@ -151,7 +151,7 @@ class Selection : public sigc::trackable, public PBD::ScopedConnectionList
void add (MidiRegionView*);
void add (MidiCutBuffer*);
void add (std::vector<RegionView*>&);
- long add (nframes_t, nframes_t);
+ long add (framepos_t, framepos_t);
void add (boost::shared_ptr<Evoral::ControlList>);
void add (boost::shared_ptr<ARDOUR::Playlist>);
void add (const std::list<boost::shared_ptr<ARDOUR::Playlist> >&);
@@ -167,14 +167,14 @@ class Selection : public sigc::trackable, public PBD::ScopedConnectionList
void remove (MidiRegionView*);
void remove (MidiCutBuffer*);
void remove (uint32_t selection_id);
- void remove (nframes_t, nframes_t);
+ void remove (framepos_t, framepos_t);
void remove (boost::shared_ptr<ARDOUR::AutomationList>);
void remove (boost::shared_ptr<ARDOUR::Playlist>);
void remove (const std::list<boost::shared_ptr<ARDOUR::Playlist> >&);
void remove (const std::list<Selectable*>&);
void remove (Marker*);
- void replace (uint32_t time_index, nframes_t start, nframes_t end);
+ void replace (uint32_t time_index, framepos_t start, framepos_t end);
void clear_regions();
void clear_tracks ();
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc
index aed3d52089..bd19db31f0 100644
--- a/gtk2_ardour/sfdb_ui.cc
+++ b/gtk2_ardour/sfdb_ui.cc
@@ -268,7 +268,7 @@ SoundFileBox::setup_labels (const string& filename)
samplerate.set_name ("NewSessionSR2Label");
}
- nframes_t const nfr = _session ? _session->nominal_frame_rate() : 25;
+ framecnt_t const nfr = _session ? _session->nominal_frame_rate() : 25;
double src_coef = (double) nfr / sf_info.samplerate;
length_clock.set (sf_info.length * src_coef + 0.5, true);
@@ -1128,7 +1128,7 @@ SoundFileOmega::check_info (const vector<string>& paths, bool& same_size, bool&
}
}
- if ((nframes_t) info.samplerate != _session->frame_rate()) {
+ if (info.samplerate != _session->frame_rate()) {
src_needed = true;
}
diff --git a/gtk2_ardour/step_editor.cc b/gtk2_ardour/step_editor.cc
index 5e7969bb3a..c4d62def90 100644
--- a/gtk2_ardour/step_editor.cc
+++ b/gtk2_ardour/step_editor.cc
@@ -158,14 +158,14 @@ StepEditor::stop_step_editing ()
void
StepEditor::check_step_edit ()
{
- MidiRingBuffer<nframes_t>& incoming (_track->step_edit_ring_buffer());
+ MidiRingBuffer<framepos_t>& incoming (_track->step_edit_ring_buffer());
uint8_t* buf;
uint32_t bufsize = 32;
buf = new uint8_t[bufsize];
while (incoming.read_space()) {
- nframes_t time;
+ framepos_t time;
Evoral::EventType type;
uint32_t size;
diff --git a/gtk2_ardour/streamview.h b/gtk2_ardour/streamview.h
index 366bc8d4bf..769255408a 100644
--- a/gtk2_ardour/streamview.h
+++ b/gtk2_ardour/streamview.h
@@ -43,9 +43,9 @@ namespace ARDOUR {
}
struct RecBoxInfo {
- ArdourCanvas::SimpleRect* rectangle;
- nframes_t start;
- nframes_t length;
+ ArdourCanvas::SimpleRect* rectangle;
+ framepos_t start;
+ ARDOUR::framecnt_t length;
};
class Selectable;
@@ -171,7 +171,7 @@ protected:
double height;
PBD::ScopedConnectionList rec_data_ready_connections;
- nframes_t last_rec_data_frame;
+ framepos_t last_rec_data_frame;
/* When recording, the session time at which a new layer must be created for the region
being recorded, or max_framepos if not applicable.
diff --git a/gtk2_ardour/strip_silence_dialog.cc b/gtk2_ardour/strip_silence_dialog.cc
index c43a962e4d..9103f72cba 100644
--- a/gtk2_ardour/strip_silence_dialog.cc
+++ b/gtk2_ardour/strip_silence_dialog.cc
@@ -493,13 +493,13 @@ StripSilenceDialog::update_stats (const SilenceResult& res)
}
}
-nframes_t
+framecnt_t
StripSilenceDialog::minimum_length () const
{
return _minimum_length.current_duration (_waves.front()->region->position());
}
-nframes_t
+framecnt_t
StripSilenceDialog::fade_length () const
{
return _minimum_length.current_duration (_waves.front()->region->position());
diff --git a/gtk2_ardour/strip_silence_dialog.h b/gtk2_ardour/strip_silence_dialog.h
index 15e6b206c1..625e9b65fd 100644
--- a/gtk2_ardour/strip_silence_dialog.h
+++ b/gtk2_ardour/strip_silence_dialog.h
@@ -41,8 +41,8 @@ public:
return _threshold.get_value ();
}
- nframes_t minimum_length () const;
- nframes_t fade_length () const;
+ ARDOUR::framecnt_t minimum_length () const;
+ ARDOUR::framecnt_t fade_length () const;
private:
typedef std::list<std::pair<ARDOUR::frameoffset_t,ARDOUR::framecnt_t> > SilenceResult;
diff --git a/gtk2_ardour/tempo_dialog.cc b/gtk2_ardour/tempo_dialog.cc
index 71fd5b40b4..1190251fa1 100644
--- a/gtk2_ardour/tempo_dialog.cc
+++ b/gtk2_ardour/tempo_dialog.cc
@@ -33,7 +33,7 @@ using namespace Gtkmm2ext;
using namespace ARDOUR;
using namespace PBD;
-TempoDialog::TempoDialog (TempoMap& map, nframes_t frame, const string & action)
+TempoDialog::TempoDialog (TempoMap& map, framepos_t frame, const string & action)
: ArdourDialog (_("New Tempo")),
bpm_adjustment (60.0, 1.0, 999.9, 0.1, 1.0),
bpm_spinner (bpm_adjustment),
@@ -239,7 +239,7 @@ TempoDialog::note_types_change ()
}
-MeterDialog::MeterDialog (TempoMap& map, nframes_t frame, const string & action)
+MeterDialog::MeterDialog (TempoMap& map, framepos_t frame, const string & action)
: ArdourDialog ("New Meter"),
ok_button (action),
cancel_button (_("Cancel"))
diff --git a/gtk2_ardour/tempo_dialog.h b/gtk2_ardour/tempo_dialog.h
index c1a88367ca..ebb700e3e9 100644
--- a/gtk2_ardour/tempo_dialog.h
+++ b/gtk2_ardour/tempo_dialog.h
@@ -38,7 +38,7 @@
class TempoDialog : public ArdourDialog
{
public:
- TempoDialog (ARDOUR::TempoMap&, nframes_t, const std::string & action);
+ TempoDialog (ARDOUR::TempoMap&, framepos_t, const std::string & action);
TempoDialog (ARDOUR::TempoSection&, const std::string & action);
double get_bpm ();
@@ -70,7 +70,7 @@ class MeterDialog : public ArdourDialog
{
public:
- MeterDialog (ARDOUR::TempoMap&, nframes_t, const std::string & action);
+ MeterDialog (ARDOUR::TempoMap&, framepos_t, const std::string & action);
MeterDialog (ARDOUR::MeterSection&, const std::string & action);
double get_bpb ();
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc
index 29cb3e613b..a206b1a231 100644
--- a/gtk2_ardour/time_axis_view.cc
+++ b/gtk2_ardour/time_axis_view.cc
@@ -672,7 +672,7 @@ TimeAxisView::set_samples_per_unit (double spu)
}
void
-TimeAxisView::show_timestretch (nframes_t start, nframes_t end)
+TimeAxisView::show_timestretch (framepos_t start, framepos_t end)
{
for (Children::iterator i = children.begin(); i != children.end(); ++i) {
(*i)->show_timestretch (start, end);
@@ -714,7 +714,8 @@ TimeAxisView::show_selection (TimeSelection& ts)
selection_group->raise_to_top();
for (list<AudioRange>::iterator i = ts.begin(); i != ts.end(); ++i) {
- nframes_t start, end, cnt;
+ framepos_t start, end;
+ framecnt_t cnt;
start = (*i).start;
end = (*i).end;
diff --git a/gtk2_ardour/time_axis_view.h b/gtk2_ardour/time_axis_view.h
index 94d3bb16ce..b376ba2aba 100644
--- a/gtk2_ardour/time_axis_view.h
+++ b/gtk2_ardour/time_axis_view.h
@@ -169,7 +169,7 @@ class TimeAxisView : public virtual AxisView, public PBD::Stateful
virtual void show_selection (TimeSelection&);
virtual void hide_selection ();
virtual void reshow_selection (TimeSelection&);
- virtual void show_timestretch (nframes_t start, nframes_t end);
+ virtual void show_timestretch (framepos_t start, framepos_t end);
virtual void hide_timestretch ();
virtual void hide_dependent_views (TimeAxisViewItem&) {}
@@ -183,7 +183,7 @@ class TimeAxisView : public virtual AxisView, public PBD::Stateful
virtual void set_selected_regionviews (RegionSelection&) {}
virtual void set_selected_points (PointSelection&) {}
- virtual boost::shared_ptr<ARDOUR::Region> find_next_region (nframes_t /*pos*/, ARDOUR::RegionPoint, int32_t /*dir*/) {
+ virtual boost::shared_ptr<ARDOUR::Region> find_next_region (framepos_t /*pos*/, ARDOUR::RegionPoint, int32_t /*dir*/) {
return boost::shared_ptr<ARDOUR::Region> ();
}
diff --git a/gtk2_ardour/visual_time_axis.cc b/gtk2_ardour/visual_time_axis.cc
index 23daba7f7f..10c8513ec8 100644
--- a/gtk2_ardour/visual_time_axis.cc
+++ b/gtk2_ardour/visual_time_axis.cc
@@ -409,15 +409,15 @@ VisualTimeAxis::name_entry_key_release_handler(GdkEventKey* ev)
// Super class methods not handled by VisualTimeAxis
void
-VisualTimeAxis::show_timestretch (nframes_t start, nframes_t end)
+VisualTimeAxis::show_timestretch (framepos_t start, framepos_t end)
{
- // Not handled by purely visual TimeAxis
+ // Not handled by purely visual TimeAxis
}
void
VisualTimeAxis::hide_timestretch()
{
- // Not handled by purely visual TimeAxis
+ // Not handled by purely visual TimeAxis
}