mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +01:00
fixes for destructive track offsets of various kinds; move from jack_nframes_t -> nframes_t
git-svn-id: svn://localhost/ardour2/trunk@933 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
3e6feb62ae
commit
93c7aeba04
181 changed files with 2030 additions and 1985 deletions
|
|
@ -248,7 +248,7 @@ AnalysisWindow::analyze_data (Gtk::Button *button)
|
|||
|
||||
for (std::list<ARDOUR::AudioRange>::iterator j = ts.begin(); j != ts.end(); ++j) {
|
||||
|
||||
jack_nframes_t i = 0;
|
||||
nframes_t i = 0;
|
||||
int n;
|
||||
|
||||
while ( i < (*j).length() ) {
|
||||
|
|
@ -289,7 +289,7 @@ AnalysisWindow::analyze_data (Gtk::Button *button)
|
|||
continue;
|
||||
|
||||
// cerr << " - " << (*j)->region().name() << ": " << (*j)->region().length() << " samples starting at " << (*j)->region().position() << endl;
|
||||
jack_nframes_t i = 0;
|
||||
nframes_t i = 0;
|
||||
int n;
|
||||
|
||||
while ( i < arv->region()->length() ) {
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ ARDOUR_UI *ARDOUR_UI::theArdourUI = 0;
|
|||
sigc::signal<void,bool> ARDOUR_UI::Blink;
|
||||
sigc::signal<void> ARDOUR_UI::RapidScreenUpdate;
|
||||
sigc::signal<void> ARDOUR_UI::SuperRapidScreenUpdate;
|
||||
sigc::signal<void,jack_nframes_t> ARDOUR_UI::Clock;
|
||||
sigc::signal<void,nframes_t> ARDOUR_UI::Clock;
|
||||
|
||||
ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], string rcfile)
|
||||
|
||||
|
|
@ -488,7 +488,7 @@ ARDOUR_UI::every_point_zero_one_seconds ()
|
|||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::update_sample_rate (jack_nframes_t ignored)
|
||||
ARDOUR_UI::update_sample_rate (nframes_t ignored)
|
||||
{
|
||||
char buf[32];
|
||||
|
||||
|
|
@ -500,7 +500,7 @@ ARDOUR_UI::update_sample_rate (jack_nframes_t ignored)
|
|||
|
||||
} else {
|
||||
|
||||
jack_nframes_t rate = engine->frame_rate();
|
||||
nframes_t rate = engine->frame_rate();
|
||||
|
||||
if (fmod (rate, 1000.0) != 0.0) {
|
||||
snprintf (buf, sizeof (buf), _("%.1f kHz / %4.1f msecs"),
|
||||
|
|
@ -554,7 +554,7 @@ ARDOUR_UI::update_disk_space()
|
|||
return;
|
||||
}
|
||||
|
||||
jack_nframes_t frames = session->available_capture_duration();
|
||||
nframes_t frames = session->available_capture_duration();
|
||||
char buf[64];
|
||||
|
||||
if (frames == max_frames) {
|
||||
|
|
@ -563,7 +563,7 @@ ARDOUR_UI::update_disk_space()
|
|||
int hrs;
|
||||
int mins;
|
||||
int secs;
|
||||
jack_nframes_t fr = session->frame_rate();
|
||||
nframes_t fr = session->frame_rate();
|
||||
|
||||
if (session->actively_recording()){
|
||||
|
||||
|
|
@ -930,9 +930,9 @@ restart JACK with more ports."));
|
|||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::do_transport_locate (jack_nframes_t new_position)
|
||||
ARDOUR_UI::do_transport_locate (nframes_t new_position)
|
||||
{
|
||||
jack_nframes_t _preroll = 0;
|
||||
nframes_t _preroll = 0;
|
||||
|
||||
if (session) {
|
||||
// XXX CONFIG_CHANGE FIX - requires AnyTime handling
|
||||
|
|
@ -986,7 +986,7 @@ void
|
|||
ARDOUR_UI::transport_goto_end ()
|
||||
{
|
||||
if (session) {
|
||||
jack_nframes_t frame = session->current_end_frame();
|
||||
nframes_t frame = session->current_end_frame();
|
||||
session->request_locate (frame);
|
||||
|
||||
/* force displayed area in editor to start no matter
|
||||
|
|
@ -1846,7 +1846,7 @@ ARDOUR_UI::build_session (const string & path, const string & snap_name,
|
|||
AutoConnectOption output_connect,
|
||||
uint32_t nphysin,
|
||||
uint32_t nphysout,
|
||||
jack_nframes_t initial_length)
|
||||
nframes_t initial_length)
|
||||
{
|
||||
Session *new_session;
|
||||
int x;
|
||||
|
|
@ -2317,7 +2317,7 @@ ARDOUR_UI::reconnect_to_jack ()
|
|||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::set_jack_buffer_size (jack_nframes_t nframes)
|
||||
ARDOUR_UI::set_jack_buffer_size (nframes_t nframes)
|
||||
{
|
||||
engine->request_buffer_size (nframes);
|
||||
update_sample_rate (0);
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
ARDOUR::AutoConnectOption output_connect,
|
||||
uint32_t nphysin,
|
||||
uint32_t nphysout,
|
||||
jack_nframes_t initial_length);
|
||||
nframes_t initial_length);
|
||||
bool session_is_new() const { return _session_is_new; }
|
||||
|
||||
ARDOUR::Session* the_session() { return session; }
|
||||
|
|
@ -159,7 +159,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
static sigc::signal<void,bool> Blink;
|
||||
static sigc::signal<void> RapidScreenUpdate;
|
||||
static sigc::signal<void> SuperRapidScreenUpdate;
|
||||
static sigc::signal<void,jack_nframes_t> Clock;
|
||||
static sigc::signal<void,nframes_t> Clock;
|
||||
|
||||
/* this is a helper function to centralize the (complex) logic for
|
||||
blinking rec-enable buttons.
|
||||
|
|
@ -179,7 +179,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
void save_ardour_state ();
|
||||
gboolean configure_handler (GdkEventConfigure* conf);
|
||||
|
||||
void do_transport_locate (jack_nframes_t position);
|
||||
void do_transport_locate (nframes_t position);
|
||||
void halt_on_xrun_message ();
|
||||
|
||||
AudioClock primary_clock;
|
||||
|
|
@ -497,7 +497,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
|
||||
Gtk::Label sample_rate_label;
|
||||
Gtk::EventBox sample_rate_box;
|
||||
void update_sample_rate (jack_nframes_t);
|
||||
void update_sample_rate (nframes_t);
|
||||
|
||||
gint every_second ();
|
||||
gint every_point_one_seconds ();
|
||||
|
|
@ -640,7 +640,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
|
||||
void disconnect_from_jack ();
|
||||
void reconnect_to_jack ();
|
||||
void set_jack_buffer_size (jack_nframes_t);
|
||||
void set_jack_buffer_size (nframes_t);
|
||||
|
||||
Gtk::MenuItem* jack_disconnect_item;
|
||||
Gtk::MenuItem* jack_reconnect_item;
|
||||
|
|
|
|||
|
|
@ -149,23 +149,23 @@ ARDOUR_UI::install_actions ()
|
|||
|
||||
RadioAction::Group jack_latency_group;
|
||||
|
||||
act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency32"), X_("32"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 32));
|
||||
act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency32"), X_("32"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 32));
|
||||
ActionManager::jack_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency64"), X_("64"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 64));
|
||||
act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency64"), X_("64"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 64));
|
||||
ActionManager::jack_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency128"), X_("128"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 128));
|
||||
act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency128"), X_("128"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 128));
|
||||
ActionManager::jack_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency256"), X_("256"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 256));
|
||||
act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency256"), X_("256"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 256));
|
||||
ActionManager::jack_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency512"), X_("512"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 512));
|
||||
act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency512"), X_("512"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 512));
|
||||
ActionManager::jack_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency1024"), X_("1024"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 1024));
|
||||
act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency1024"), X_("1024"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 1024));
|
||||
ActionManager::jack_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency2048"), X_("2048"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 2048));
|
||||
act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency2048"), X_("2048"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 2048));
|
||||
ActionManager::jack_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency4096"), X_("4096"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 4096));
|
||||
act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency4096"), X_("4096"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 4096));
|
||||
ActionManager::jack_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency8192"), X_("8192"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 8192));
|
||||
act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency8192"), X_("8192"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 8192));
|
||||
ActionManager::jack_sensitive_actions.push_back (act);
|
||||
|
||||
/* these actions are intended to be shared across all windows */
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ AudioClock::on_realize ()
|
|||
}
|
||||
|
||||
void
|
||||
AudioClock::set (jack_nframes_t when, bool force)
|
||||
AudioClock::set (nframes_t when, bool force)
|
||||
{
|
||||
|
||||
if ((!force && !is_visible()) || session == 0) {
|
||||
|
|
@ -395,7 +395,7 @@ AudioClock::set (jack_nframes_t when, bool force)
|
|||
void
|
||||
AudioClock::smpte_offset_changed ()
|
||||
{
|
||||
jack_nframes_t current;
|
||||
nframes_t current;
|
||||
|
||||
switch (_mode) {
|
||||
case SMPTE:
|
||||
|
|
@ -412,7 +412,7 @@ AudioClock::smpte_offset_changed ()
|
|||
}
|
||||
|
||||
void
|
||||
AudioClock::set_frames (jack_nframes_t when, bool force)
|
||||
AudioClock::set_frames (nframes_t when, bool force)
|
||||
{
|
||||
char buf[32];
|
||||
snprintf (buf, sizeof (buf), "%u", when);
|
||||
|
|
@ -420,19 +420,19 @@ AudioClock::set_frames (jack_nframes_t when, bool force)
|
|||
}
|
||||
|
||||
void
|
||||
AudioClock::set_minsec (jack_nframes_t when, bool force)
|
||||
AudioClock::set_minsec (nframes_t when, bool force)
|
||||
{
|
||||
char buf[32];
|
||||
jack_nframes_t left;
|
||||
nframes_t left;
|
||||
int hrs;
|
||||
int mins;
|
||||
float secs;
|
||||
|
||||
left = when;
|
||||
hrs = (int) floor (left / (session->frame_rate() * 60.0f * 60.0f));
|
||||
left -= (jack_nframes_t) floor (hrs * session->frame_rate() * 60.0f * 60.0f);
|
||||
left -= (nframes_t) floor (hrs * session->frame_rate() * 60.0f * 60.0f);
|
||||
mins = (int) floor (left / (session->frame_rate() * 60.0f));
|
||||
left -= (jack_nframes_t) floor (mins * session->frame_rate() * 60.0f);
|
||||
left -= (nframes_t) floor (mins * session->frame_rate() * 60.0f);
|
||||
secs = left / (float) session->frame_rate();
|
||||
|
||||
if (force || hrs != ms_last_hrs) {
|
||||
|
|
@ -455,7 +455,7 @@ AudioClock::set_minsec (jack_nframes_t when, bool force)
|
|||
}
|
||||
|
||||
void
|
||||
AudioClock::set_smpte (jack_nframes_t when, bool force)
|
||||
AudioClock::set_smpte (nframes_t when, bool force)
|
||||
{
|
||||
char buf[32];
|
||||
SMPTE::Time smpte;
|
||||
|
|
@ -497,7 +497,7 @@ AudioClock::set_smpte (jack_nframes_t when, bool force)
|
|||
}
|
||||
|
||||
void
|
||||
AudioClock::set_bbt (jack_nframes_t when, bool force)
|
||||
AudioClock::set_bbt (nframes_t when, bool force)
|
||||
{
|
||||
char buf[16];
|
||||
BBT_Time bbt;
|
||||
|
|
@ -952,7 +952,7 @@ AudioClock::field_button_press_event (GdkEventButton *ev, Field field)
|
|||
{
|
||||
if (session == 0) return FALSE;
|
||||
|
||||
jack_nframes_t frames = 0;
|
||||
nframes_t frames = 0;
|
||||
|
||||
switch (ev->button) {
|
||||
case 1:
|
||||
|
|
@ -1029,7 +1029,7 @@ AudioClock::field_button_scroll_event (GdkEventScroll *ev, Field field)
|
|||
{
|
||||
if (session == 0) return FALSE;
|
||||
|
||||
jack_nframes_t frames = 0;
|
||||
nframes_t frames = 0;
|
||||
|
||||
switch (ev->direction) {
|
||||
|
||||
|
|
@ -1098,8 +1098,8 @@ AudioClock::field_motion_notify_event (GdkEventMotion *ev, Field field)
|
|||
|
||||
if (trunc(drag_accum) != 0) {
|
||||
|
||||
jack_nframes_t frames;
|
||||
jack_nframes_t pos ;
|
||||
nframes_t frames;
|
||||
nframes_t pos ;
|
||||
int dir;
|
||||
dir = (drag_accum < 0 ? 1:-1);
|
||||
pos = current_time();
|
||||
|
|
@ -1107,7 +1107,7 @@ AudioClock::field_motion_notify_event (GdkEventMotion *ev, Field field)
|
|||
|
||||
if (frames != 0 && frames * drag_accum < current_time()) {
|
||||
|
||||
set ((jack_nframes_t) floor (pos - drag_accum * frames), false); // minus because up is negative in computer-land
|
||||
set ((nframes_t) floor (pos - drag_accum * frames), false); // minus because up is negative in computer-land
|
||||
|
||||
} else {
|
||||
set (0 , false);
|
||||
|
|
@ -1123,24 +1123,24 @@ AudioClock::field_motion_notify_event (GdkEventMotion *ev, Field field)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
jack_nframes_t
|
||||
AudioClock::get_frames (Field field,jack_nframes_t pos,int dir)
|
||||
nframes_t
|
||||
AudioClock::get_frames (Field field,nframes_t pos,int dir)
|
||||
{
|
||||
|
||||
jack_nframes_t frames = 0;
|
||||
nframes_t frames = 0;
|
||||
BBT_Time bbt;
|
||||
switch (field) {
|
||||
case SMPTE_Hours:
|
||||
frames = (jack_nframes_t) floor (3600.0 * session->frame_rate());
|
||||
frames = (nframes_t) floor (3600.0 * session->frame_rate());
|
||||
break;
|
||||
case SMPTE_Minutes:
|
||||
frames = (jack_nframes_t) floor (60.0 * session->frame_rate());
|
||||
frames = (nframes_t) floor (60.0 * session->frame_rate());
|
||||
break;
|
||||
case SMPTE_Seconds:
|
||||
frames = session->frame_rate();
|
||||
break;
|
||||
case SMPTE_Frames:
|
||||
frames = (jack_nframes_t) floor (session->frame_rate() / Config->get_smpte_frames_per_second());
|
||||
frames = (nframes_t) floor (session->frame_rate() / Config->get_smpte_frames_per_second());
|
||||
break;
|
||||
|
||||
case AudioFrames:
|
||||
|
|
@ -1148,10 +1148,10 @@ AudioClock::get_frames (Field field,jack_nframes_t pos,int dir)
|
|||
break;
|
||||
|
||||
case MS_Hours:
|
||||
frames = (jack_nframes_t) floor (3600.0 * session->frame_rate());
|
||||
frames = (nframes_t) floor (3600.0 * session->frame_rate());
|
||||
break;
|
||||
case MS_Minutes:
|
||||
frames = (jack_nframes_t) floor (60.0 * session->frame_rate());
|
||||
frames = (nframes_t) floor (60.0 * session->frame_rate());
|
||||
break;
|
||||
case MS_Seconds:
|
||||
frames = session->frame_rate();
|
||||
|
|
@ -1180,10 +1180,10 @@ AudioClock::get_frames (Field field,jack_nframes_t pos,int dir)
|
|||
return frames;
|
||||
}
|
||||
|
||||
jack_nframes_t
|
||||
AudioClock::current_time (jack_nframes_t pos) const
|
||||
nframes_t
|
||||
AudioClock::current_time (nframes_t pos) const
|
||||
{
|
||||
jack_nframes_t ret = 0;
|
||||
nframes_t ret = 0;
|
||||
|
||||
switch (_mode) {
|
||||
case SMPTE:
|
||||
|
|
@ -1208,10 +1208,10 @@ AudioClock::current_time (jack_nframes_t pos) const
|
|||
return ret;
|
||||
}
|
||||
|
||||
jack_nframes_t
|
||||
AudioClock::current_duration (jack_nframes_t pos) const
|
||||
nframes_t
|
||||
AudioClock::current_duration (nframes_t pos) const
|
||||
{
|
||||
jack_nframes_t ret = 0;
|
||||
nframes_t ret = 0;
|
||||
|
||||
switch (_mode) {
|
||||
case SMPTE:
|
||||
|
|
@ -1275,7 +1275,7 @@ AudioClock::smpte_sanitize_display()
|
|||
}
|
||||
}
|
||||
|
||||
jack_nframes_t
|
||||
nframes_t
|
||||
AudioClock::smpte_frame_from_display () const
|
||||
{
|
||||
if (session == 0) {
|
||||
|
|
@ -1283,7 +1283,7 @@ AudioClock::smpte_frame_from_display () const
|
|||
}
|
||||
|
||||
SMPTE::Time smpte;
|
||||
jack_nframes_t sample;
|
||||
nframes_t sample;
|
||||
|
||||
smpte.hours = atoi (hours_label.get_text());
|
||||
smpte.minutes = atoi (minutes_label.get_text());
|
||||
|
|
@ -1304,10 +1304,10 @@ AudioClock::smpte_frame_from_display () const
|
|||
|
||||
// Testcode for smpte<->sample conversions (P.S.)
|
||||
SMPTE::Time smpte1;
|
||||
jack_nframes_t sample1;
|
||||
jack_nframes_t oldsample = 0;
|
||||
nframes_t sample1;
|
||||
nframes_t oldsample = 0;
|
||||
SMPTE::Time smpte2;
|
||||
jack_nframes_t sample_increment;
|
||||
nframes_t sample_increment;
|
||||
|
||||
sample_increment = (long)rint(session->frame_rate() / session->smpte_frames_per_second);
|
||||
|
||||
|
|
@ -1666,7 +1666,7 @@ AudioClock::smpte_frame_from_display () const
|
|||
return sample;
|
||||
}
|
||||
|
||||
jack_nframes_t
|
||||
nframes_t
|
||||
AudioClock::minsec_frame_from_display () const
|
||||
{
|
||||
if (session == 0) {
|
||||
|
|
@ -1677,13 +1677,13 @@ AudioClock::minsec_frame_from_display () const
|
|||
int mins = atoi (ms_minutes_label.get_text());
|
||||
float secs = atof (ms_seconds_label.get_text());
|
||||
|
||||
jack_nframes_t sr = session->frame_rate();
|
||||
nframes_t sr = session->frame_rate();
|
||||
|
||||
return (jack_nframes_t) floor ((hrs * 60.0f * 60.0f * sr) + (mins * 60.0f * sr) + (secs * sr));
|
||||
return (nframes_t) floor ((hrs * 60.0f * 60.0f * sr) + (mins * 60.0f * sr) + (secs * sr));
|
||||
}
|
||||
|
||||
jack_nframes_t
|
||||
AudioClock::bbt_frame_from_display (jack_nframes_t pos) const
|
||||
nframes_t
|
||||
AudioClock::bbt_frame_from_display (nframes_t pos) const
|
||||
{
|
||||
if (session == 0) {
|
||||
error << "AudioClock::current_time() called with BBT mode but without session!" << endmsg;
|
||||
|
|
@ -1697,14 +1697,14 @@ AudioClock::bbt_frame_from_display (jack_nframes_t pos) const
|
|||
any.bbt.beats = atoi (beats_label.get_text());
|
||||
any.bbt.ticks = atoi (ticks_label.get_text());
|
||||
|
||||
jack_nframes_t ret = session->convert_to_frames_at (pos, any);
|
||||
nframes_t ret = session->convert_to_frames_at (pos, any);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
jack_nframes_t
|
||||
AudioClock::bbt_frame_duration_from_display (jack_nframes_t pos) const
|
||||
nframes_t
|
||||
AudioClock::bbt_frame_duration_from_display (nframes_t pos) const
|
||||
{
|
||||
if (session == 0) {
|
||||
error << "AudioClock::current_time() called with BBT mode but without session!" << endmsg;
|
||||
|
|
@ -1721,10 +1721,10 @@ AudioClock::bbt_frame_duration_from_display (jack_nframes_t pos) const
|
|||
return session->tempo_map().bbt_duration_at(pos,bbt,1);
|
||||
}
|
||||
|
||||
jack_nframes_t
|
||||
nframes_t
|
||||
AudioClock::audio_frame_from_display () const
|
||||
{
|
||||
return (jack_nframes_t) atoi (audio_frames_label.get_text());
|
||||
return (nframes_t) atoi (audio_frames_label.get_text());
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -47,11 +47,11 @@ class AudioClock : public Gtk::HBox
|
|||
|
||||
Mode mode() const { return _mode; }
|
||||
|
||||
void set (jack_nframes_t, bool force = false);
|
||||
void set (nframes_t, bool force = false);
|
||||
void set_mode (Mode);
|
||||
|
||||
jack_nframes_t current_time (jack_nframes_t position = 0) const;
|
||||
jack_nframes_t current_duration (jack_nframes_t position = 0) const;
|
||||
nframes_t current_time (nframes_t position = 0) const;
|
||||
nframes_t current_duration (nframes_t position = 0) const;
|
||||
void set_session (ARDOUR::Session *s);
|
||||
|
||||
sigc::signal<void> ValueChanged;
|
||||
|
|
@ -131,7 +131,7 @@ class AudioClock : public Gtk::HBox
|
|||
Gtk::EventBox clock_base;
|
||||
Gtk::Frame clock_frame;
|
||||
|
||||
jack_nframes_t last_when;
|
||||
nframes_t last_when;
|
||||
|
||||
uint32_t last_hrs;
|
||||
uint32_t last_mins;
|
||||
|
|
@ -158,19 +158,19 @@ class AudioClock : public Gtk::HBox
|
|||
bool field_focus_in_event (GdkEventFocus *, Field);
|
||||
bool field_focus_out_event (GdkEventFocus *, Field);
|
||||
|
||||
void set_smpte (jack_nframes_t, bool);
|
||||
void set_bbt (jack_nframes_t, bool);
|
||||
void set_minsec (jack_nframes_t, bool);
|
||||
void set_frames (jack_nframes_t, bool);
|
||||
void set_smpte (nframes_t, bool);
|
||||
void set_bbt (nframes_t, bool);
|
||||
void set_minsec (nframes_t, bool);
|
||||
void set_frames (nframes_t, bool);
|
||||
|
||||
jack_nframes_t get_frames (Field,jack_nframes_t pos = 0,int dir=1);
|
||||
nframes_t get_frames (Field,nframes_t pos = 0,int dir=1);
|
||||
|
||||
void smpte_sanitize_display();
|
||||
jack_nframes_t smpte_frame_from_display () const;
|
||||
jack_nframes_t bbt_frame_from_display (jack_nframes_t) const;
|
||||
jack_nframes_t bbt_frame_duration_from_display (jack_nframes_t) const;
|
||||
jack_nframes_t minsec_frame_from_display () const;
|
||||
jack_nframes_t audio_frame_from_display () const;
|
||||
nframes_t smpte_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;
|
||||
|
||||
void build_ops_menu ();
|
||||
void setup_events ();
|
||||
|
|
|
|||
|
|
@ -467,7 +467,7 @@ AudioRegionEditor::end_clock_changed ()
|
|||
void
|
||||
AudioRegionEditor::length_clock_changed ()
|
||||
{
|
||||
jack_nframes_t frames = length_clock.current_time();
|
||||
nframes_t frames = length_clock.current_time();
|
||||
_region->trim_end (_region->position() + frames, this);
|
||||
|
||||
length_clock.set (_region->length());
|
||||
|
|
@ -632,12 +632,12 @@ void
|
|||
AudioRegionEditor::fade_in_changed ()
|
||||
{
|
||||
float msecs = fade_in_length_adjustment.get_value();
|
||||
jack_nframes_t sr = _session.frame_rate();
|
||||
jack_nframes_t adj_frames = (jack_nframes_t) floor (msecs * (sr/1000.0f));
|
||||
jack_nframes_t frames;
|
||||
nframes_t sr = _session.frame_rate();
|
||||
nframes_t adj_frames = (nframes_t) floor (msecs * (sr/1000.0f));
|
||||
nframes_t frames;
|
||||
bool x;
|
||||
|
||||
if (adj_frames != (frames = (jack_nframes_t) _region->fade_in().back()->when)) {
|
||||
if (adj_frames != (frames = (nframes_t) _region->fade_in().back()->when)) {
|
||||
fade_in_length_adjustment.set_value ((frames * 1000.0f) / sr);
|
||||
}
|
||||
|
||||
|
|
@ -650,11 +650,11 @@ void
|
|||
AudioRegionEditor::fade_out_changed ()
|
||||
{
|
||||
float msecs = fade_out_length_adjustment.get_value();
|
||||
jack_nframes_t sr = _session.frame_rate();
|
||||
jack_nframes_t adj_frames = (jack_nframes_t) floor (msecs * (sr/1000.0f));
|
||||
jack_nframes_t frames;
|
||||
nframes_t sr = _session.frame_rate();
|
||||
nframes_t adj_frames = (nframes_t) floor (msecs * (sr/1000.0f));
|
||||
nframes_t frames;
|
||||
bool x;
|
||||
if (adj_frames != (frames = (jack_nframes_t) _region->fade_out().back()->when)) {
|
||||
if (adj_frames != (frames = (nframes_t) _region->fade_out().back()->when)) {
|
||||
fade_out_length_adjustment.set_value ((frames * 1000.0f) / sr);
|
||||
}
|
||||
|
||||
|
|
@ -666,8 +666,8 @@ AudioRegionEditor::fade_out_changed ()
|
|||
void
|
||||
AudioRegionEditor::fade_in_length_adjustment_changed ()
|
||||
{
|
||||
jack_nframes_t fade_length = (jack_nframes_t) floor (fade_in_length_adjustment.get_value() * _session.frame_rate() * 0.001);
|
||||
fade_length = max (fade_length, (jack_nframes_t) 64);
|
||||
nframes_t fade_length = (nframes_t) floor (fade_in_length_adjustment.get_value() * _session.frame_rate() * 0.001);
|
||||
fade_length = max (fade_length, (nframes_t) 64);
|
||||
fade_length = min (fade_length, _region->length());
|
||||
|
||||
_region->set_fade_in_length (fade_length);
|
||||
|
|
@ -678,8 +678,8 @@ AudioRegionEditor::fade_in_length_adjustment_changed ()
|
|||
void
|
||||
AudioRegionEditor::fade_out_length_adjustment_changed ()
|
||||
{
|
||||
jack_nframes_t fade_length = (jack_nframes_t) floor (fade_out_length_adjustment.get_value() * _session.frame_rate() * 0.001);
|
||||
fade_length = max (fade_length, (jack_nframes_t) 64);
|
||||
nframes_t fade_length = (nframes_t) floor (fade_out_length_adjustment.get_value() * _session.frame_rate() * 0.001);
|
||||
fade_length = max (fade_length, (nframes_t) 64);
|
||||
fade_length = min (fade_length, _region->length());
|
||||
|
||||
_region->set_fade_out_length (fade_length);
|
||||
|
|
|
|||
|
|
@ -449,11 +449,11 @@ AudioRegionView::reset_fade_shapes ()
|
|||
void
|
||||
AudioRegionView::reset_fade_in_shape ()
|
||||
{
|
||||
reset_fade_in_shape_width ((jack_nframes_t) audio_region()->fade_in().back()->when);
|
||||
reset_fade_in_shape_width ((nframes_t) audio_region()->fade_in().back()->when);
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionView::reset_fade_in_shape_width (jack_nframes_t width)
|
||||
AudioRegionView::reset_fade_in_shape_width (nframes_t width)
|
||||
{
|
||||
if (fade_in_handle == 0) {
|
||||
return;
|
||||
|
|
@ -461,7 +461,7 @@ AudioRegionView::reset_fade_in_shape_width (jack_nframes_t width)
|
|||
|
||||
/* smallest size for a fade is 64 frames */
|
||||
|
||||
width = std::max ((jack_nframes_t) 64, width);
|
||||
width = std::max ((nframes_t) 64, width);
|
||||
|
||||
Points* points;
|
||||
double pwidth = width / samples_per_unit;
|
||||
|
|
@ -533,11 +533,11 @@ AudioRegionView::reset_fade_in_shape_width (jack_nframes_t width)
|
|||
void
|
||||
AudioRegionView::reset_fade_out_shape ()
|
||||
{
|
||||
reset_fade_out_shape_width ((jack_nframes_t) audio_region()->fade_out().back()->when);
|
||||
reset_fade_out_shape_width ((nframes_t) audio_region()->fade_out().back()->when);
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionView::reset_fade_out_shape_width (jack_nframes_t width)
|
||||
AudioRegionView::reset_fade_out_shape_width (nframes_t width)
|
||||
{
|
||||
if (fade_out_handle == 0) {
|
||||
return;
|
||||
|
|
@ -545,7 +545,7 @@ AudioRegionView::reset_fade_out_shape_width (jack_nframes_t width)
|
|||
|
||||
/* smallest size for a fade is 64 frames */
|
||||
|
||||
width = std::max ((jack_nframes_t) 64, width);
|
||||
width = std::max ((nframes_t) 64, width);
|
||||
|
||||
Points* points;
|
||||
double pwidth = width / samples_per_unit;
|
||||
|
|
@ -884,7 +884,7 @@ AudioRegionView::add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *ev)
|
|||
|
||||
item->w2i (x, y);
|
||||
|
||||
jack_nframes_t fx = trackview.editor.pixel_to_frame (x);
|
||||
nframes_t fx = trackview.editor.pixel_to_frame (x);
|
||||
|
||||
if (fx > _region->length()) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -89,8 +89,8 @@ class AudioRegionView : public RegionView
|
|||
|
||||
GhostRegion* add_ghost (AutomationTimeAxisView&);
|
||||
|
||||
void reset_fade_in_shape_width (jack_nframes_t);
|
||||
void reset_fade_out_shape_width (jack_nframes_t);
|
||||
void reset_fade_in_shape_width (nframes_t);
|
||||
void reset_fade_out_shape_width (nframes_t);
|
||||
void set_fade_in_active (bool);
|
||||
void set_fade_out_active (bool);
|
||||
|
||||
|
|
|
|||
|
|
@ -484,7 +484,7 @@ AudioRegionView::lower_to_bottom ()
|
|||
}
|
||||
|
||||
bool
|
||||
AudioRegionView::set_position (jack_nframes_t pos, void* src, double* ignored)
|
||||
AudioRegionView::set_position (nframes_t pos, void* src, double* ignored)
|
||||
{
|
||||
double delta;
|
||||
bool ret;
|
||||
|
|
@ -576,11 +576,11 @@ AudioRegionView::reset_fade_shapes ()
|
|||
void
|
||||
AudioRegionView::reset_fade_in_shape ()
|
||||
{
|
||||
reset_fade_in_shape_width ((jack_nframes_t) region.fade_in().back()->when);
|
||||
reset_fade_in_shape_width ((nframes_t) region.fade_in().back()->when);
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionView::reset_fade_in_shape_width (jack_nframes_t width)
|
||||
AudioRegionView::reset_fade_in_shape_width (nframes_t width)
|
||||
{
|
||||
if (fade_in_handle == 0) {
|
||||
return;
|
||||
|
|
@ -588,7 +588,7 @@ AudioRegionView::reset_fade_in_shape_width (jack_nframes_t width)
|
|||
|
||||
/* smallest size for a fade is 64 frames */
|
||||
|
||||
width = std::max ((jack_nframes_t) 64, width);
|
||||
width = std::max ((nframes_t) 64, width);
|
||||
|
||||
Points* points;
|
||||
double pwidth = width / samples_per_unit;
|
||||
|
|
@ -660,11 +660,11 @@ AudioRegionView::reset_fade_in_shape_width (jack_nframes_t width)
|
|||
void
|
||||
AudioRegionView::reset_fade_out_shape ()
|
||||
{
|
||||
reset_fade_out_shape_width ((jack_nframes_t) region.fade_out().back()->when);
|
||||
reset_fade_out_shape_width ((nframes_t) region.fade_out().back()->when);
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionView::reset_fade_out_shape_width (jack_nframes_t width)
|
||||
AudioRegionView::reset_fade_out_shape_width (nframes_t width)
|
||||
{
|
||||
if (fade_out_handle == 0) {
|
||||
return;
|
||||
|
|
@ -672,7 +672,7 @@ AudioRegionView::reset_fade_out_shape_width (jack_nframes_t width)
|
|||
|
||||
/* smallest size for a fade is 64 frames */
|
||||
|
||||
width = std::max ((jack_nframes_t) 64, width);
|
||||
width = std::max ((nframes_t) 64, width);
|
||||
|
||||
Points* points;
|
||||
double pwidth = width / samples_per_unit;
|
||||
|
|
@ -765,7 +765,7 @@ AudioRegionView::set_samples_per_unit (gdouble spu)
|
|||
}
|
||||
|
||||
bool
|
||||
AudioRegionView::set_duration (jack_nframes_t frames, void *src)
|
||||
AudioRegionView::set_duration (nframes_t frames, void *src)
|
||||
{
|
||||
if (!TimeAxisViewItem::set_duration (frames, src)) {
|
||||
return false;
|
||||
|
|
@ -887,7 +887,7 @@ AudioRegionView::region_sync_changed ()
|
|||
}
|
||||
|
||||
int sync_dir;
|
||||
jack_nframes_t sync_offset;
|
||||
nframes_t sync_offset;
|
||||
|
||||
sync_offset = region.sync_offset (sync_dir);
|
||||
|
||||
|
|
@ -1129,7 +1129,7 @@ AudioRegionView::add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *ev)
|
|||
|
||||
item->w2i (x, y);
|
||||
|
||||
jack_nframes_t fx = trackview.editor.pixel_to_frame (x);
|
||||
nframes_t fx = trackview.editor.pixel_to_frame (x);
|
||||
|
||||
if (fx > region.length()) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -412,7 +412,7 @@ AudioStreamView::setup_rec_box ()
|
|||
|
||||
// handle multi
|
||||
|
||||
jack_nframes_t start = 0;
|
||||
nframes_t start = 0;
|
||||
if (rec_regions.size() > 0) {
|
||||
start = rec_regions.back()->start() + _trackview.get_diskstream()->get_captured_frames(rec_regions.size()-1);
|
||||
}
|
||||
|
|
@ -433,7 +433,7 @@ AudioStreamView::setup_rec_box ()
|
|||
|
||||
at = _trackview.audio_track(); /* we know what it is already */
|
||||
boost::shared_ptr<AudioDiskstream> ds = at->audio_diskstream();
|
||||
jack_nframes_t frame_pos = ds->current_capture_start ();
|
||||
nframes_t frame_pos = ds->current_capture_start ();
|
||||
gdouble xstart = _trackview.editor.frame_to_pixel (frame_pos);
|
||||
gdouble xend;
|
||||
uint32_t fill_color;
|
||||
|
|
@ -537,7 +537,7 @@ AudioStreamView::foreach_crossfadeview (void (CrossfadeView::*pmf)(void))
|
|||
}
|
||||
|
||||
void
|
||||
AudioStreamView::rec_peak_range_ready (jack_nframes_t start, jack_nframes_t cnt, boost::shared_ptr<Source> src)
|
||||
AudioStreamView::rec_peak_range_ready (nframes_t start, nframes_t cnt, boost::shared_ptr<Source> src)
|
||||
{
|
||||
// this is called from the peak building thread
|
||||
|
||||
|
|
@ -580,13 +580,13 @@ AudioStreamView::update_rec_regions ()
|
|||
continue;
|
||||
}
|
||||
|
||||
jack_nframes_t origlen = region->length();
|
||||
nframes_t origlen = region->length();
|
||||
|
||||
if (region == rec_regions.back() && rec_active) {
|
||||
|
||||
if (last_rec_peak_frame > region->start()) {
|
||||
|
||||
jack_nframes_t nlen = last_rec_peak_frame - region->start();
|
||||
nframes_t nlen = last_rec_peak_frame - region->start();
|
||||
|
||||
if (nlen != region->length()) {
|
||||
|
||||
|
|
@ -609,7 +609,7 @@ AudioStreamView::update_rec_regions ()
|
|||
|
||||
} else {
|
||||
|
||||
jack_nframes_t nlen = _trackview.get_diskstream()->get_captured_frames(n);
|
||||
nframes_t nlen = _trackview.get_diskstream()->get_captured_frames(n);
|
||||
|
||||
if (nlen != region->length()) {
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ class AudioStreamView : public StreamView
|
|||
|
||||
private:
|
||||
void setup_rec_box ();
|
||||
void rec_peak_range_ready (jack_nframes_t start, jack_nframes_t cnt, boost::shared_ptr<ARDOUR::Source> src);
|
||||
void rec_peak_range_ready (nframes_t start, nframes_t cnt, boost::shared_ptr<ARDOUR::Source> src);
|
||||
void update_rec_regions ();
|
||||
|
||||
void add_region_view_internal (boost::shared_ptr<ARDOUR::Region>, bool wait_for_waves);
|
||||
|
|
@ -102,7 +102,7 @@ class AudioStreamView : public StreamView
|
|||
bool crossfades_visible;
|
||||
|
||||
list<sigc::connection> peak_ready_connections;
|
||||
jack_nframes_t last_rec_peak_frame;
|
||||
nframes_t last_rec_peak_frame;
|
||||
map<boost::shared_ptr<ARDOUR::Source>, bool> rec_peak_ready_map;
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -504,14 +504,14 @@ AutomationLine::model_representation (ControlPoint& cp, ModelRepresentation& mr)
|
|||
line to convert them to something relevant.
|
||||
*/
|
||||
|
||||
mr.xval = (jack_nframes_t) floor (cp.get_x());
|
||||
mr.xval = (nframes_t) floor (cp.get_x());
|
||||
mr.yval = 1.0 - (cp.get_y() / _height);
|
||||
|
||||
|
||||
/* if xval has not changed, set it directly from the model to avoid rounding errors */
|
||||
|
||||
if (mr.xval == trackview.editor.frame_to_unit((*cp.model)->when)) {
|
||||
mr.xval = (jack_nframes_t) (*cp.model)->when;
|
||||
mr.xval = (nframes_t) (*cp.model)->when;
|
||||
} else {
|
||||
mr.xval = trackview.editor.unit_to_frame (mr.xval);
|
||||
}
|
||||
|
|
@ -526,7 +526,7 @@ AutomationLine::model_representation (ControlPoint& cp, ModelRepresentation& mr)
|
|||
/* part 2: find out where the model point is now
|
||||
*/
|
||||
|
||||
mr.xpos = (jack_nframes_t) (*cp.model)->when;
|
||||
mr.xpos = (nframes_t) (*cp.model)->when;
|
||||
mr.ypos = (*cp.model)->value;
|
||||
|
||||
/* part 3: get the position of the visual control
|
||||
|
|
@ -545,7 +545,7 @@ AutomationLine::model_representation (ControlPoint& cp, ModelRepresentation& mr)
|
|||
after = nth (cp.view_index + 1);
|
||||
|
||||
if (before) {
|
||||
mr.xmin = (jack_nframes_t) (*before->model)->when;
|
||||
mr.xmin = (nframes_t) (*before->model)->when;
|
||||
mr.ymin = (*before->model)->value;
|
||||
mr.start = before->model;
|
||||
++mr.start;
|
||||
|
|
@ -899,7 +899,7 @@ AutomationLine::start_drag (ControlPoint* cp, float fraction)
|
|||
}
|
||||
|
||||
void
|
||||
AutomationLine::point_drag (ControlPoint& cp, jack_nframes_t x, float fraction, bool with_push)
|
||||
AutomationLine::point_drag (ControlPoint& cp, nframes_t x, float fraction, bool with_push)
|
||||
{
|
||||
modify_view (cp, x, fraction, with_push);
|
||||
drags++;
|
||||
|
|
@ -1027,14 +1027,14 @@ AutomationLine::remove_point (ControlPoint& cp)
|
|||
}
|
||||
|
||||
void
|
||||
AutomationLine::get_selectables (jack_nframes_t& start, jack_nframes_t& end,
|
||||
AutomationLine::get_selectables (nframes_t& start, nframes_t& end,
|
||||
double botfrac, double topfrac, list<Selectable*>& results)
|
||||
{
|
||||
|
||||
double top;
|
||||
double bot;
|
||||
jack_nframes_t nstart;
|
||||
jack_nframes_t nend;
|
||||
nframes_t nstart;
|
||||
nframes_t nend;
|
||||
bool collecting = false;
|
||||
|
||||
/* Curse X11 and its inverted coordinate system! */
|
||||
|
|
@ -1047,7 +1047,7 @@ AutomationLine::get_selectables (jack_nframes_t& start, jack_nframes_t& end,
|
|||
|
||||
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
|
||||
|
||||
jack_nframes_t when = (jack_nframes_t) (*(*i)->model)->when;
|
||||
nframes_t when = (nframes_t) (*(*i)->model)->when;
|
||||
|
||||
if (when >= start && when <= end) {
|
||||
|
||||
|
|
@ -1239,7 +1239,7 @@ AutomationLine::clear ()
|
|||
void
|
||||
AutomationLine::change_model (AutomationList::iterator i, double x, double y)
|
||||
{
|
||||
alist.modify (i, (jack_nframes_t) x, y);
|
||||
alist.modify (i, (nframes_t) x, y);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulDestructible
|
|||
void clear();
|
||||
|
||||
void set_selected_points (PointSelection&);
|
||||
void get_selectables (jack_nframes_t& start, jack_nframes_t& end,
|
||||
void get_selectables (nframes_t& start, nframes_t& end,
|
||||
double botfrac, double topfrac,
|
||||
list<Selectable*>& results);
|
||||
void get_inverted_selectables (Selection&, list<Selectable*>& results);
|
||||
|
|
@ -118,7 +118,7 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulDestructible
|
|||
/* dragging API */
|
||||
|
||||
virtual void start_drag (ControlPoint*, float fraction);
|
||||
virtual void point_drag(ControlPoint&, jack_nframes_t x, float, bool with_push);
|
||||
virtual void point_drag(ControlPoint&, nframes_t x, float, bool with_push);
|
||||
virtual void end_drag (ControlPoint*);
|
||||
virtual void line_drag(uint32_t i1, uint32_t i2, float, bool with_push);
|
||||
|
||||
|
|
@ -224,13 +224,13 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulDestructible
|
|||
struct ModelRepresentation {
|
||||
ARDOUR::AutomationList::iterator start;
|
||||
ARDOUR::AutomationList::iterator end;
|
||||
jack_nframes_t xpos;
|
||||
nframes_t xpos;
|
||||
double ypos;
|
||||
jack_nframes_t xmin;
|
||||
nframes_t xmin;
|
||||
double ymin;
|
||||
jack_nframes_t xmax;
|
||||
nframes_t xmax;
|
||||
double ymax;
|
||||
jack_nframes_t xval;
|
||||
nframes_t xval;
|
||||
double yval;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@ class TimeAxisView;
|
|||
|
||||
struct AutomationSelectable : public Selectable
|
||||
{
|
||||
jack_nframes_t start;
|
||||
jack_nframes_t end;
|
||||
nframes_t start;
|
||||
nframes_t end;
|
||||
double low_fract;
|
||||
double high_fract;
|
||||
TimeAxisView& track;
|
||||
|
||||
AutomationSelectable (jack_nframes_t s, jack_nframes_t e, double l, double h, TimeAxisView& atv)
|
||||
AutomationSelectable (nframes_t s, nframes_t e, double l, double h, TimeAxisView& atv)
|
||||
: start (s), end (e), low_fract (l), high_fract (h), track (atv) {}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -602,7 +602,7 @@ AutomationTimeAxisView::cut_copy_clear_objects_one (AutomationLine& line, PointS
|
|||
}
|
||||
|
||||
bool
|
||||
AutomationTimeAxisView::paste (jack_nframes_t pos, float times, Selection& selection, size_t nth)
|
||||
AutomationTimeAxisView::paste (nframes_t pos, float times, Selection& selection, size_t nth)
|
||||
{
|
||||
bool ret = true;
|
||||
|
||||
|
|
@ -614,7 +614,7 @@ AutomationTimeAxisView::paste (jack_nframes_t pos, float times, Selection& selec
|
|||
}
|
||||
|
||||
bool
|
||||
AutomationTimeAxisView::paste_one (AutomationLine& line, jack_nframes_t pos, float times, Selection& selection, size_t nth)
|
||||
AutomationTimeAxisView::paste_one (AutomationLine& line, nframes_t pos, float times, Selection& selection, size_t nth)
|
||||
{
|
||||
AutomationSelection::iterator p;
|
||||
AutomationList& alist (line.the_list());
|
||||
|
|
@ -670,7 +670,7 @@ AutomationTimeAxisView::remove_ghost (GhostRegion* gr)
|
|||
}
|
||||
|
||||
void
|
||||
AutomationTimeAxisView::get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable*>& results)
|
||||
AutomationTimeAxisView::get_selectables (nframes_t start, nframes_t end, double top, double bot, list<Selectable*>& results)
|
||||
{
|
||||
if (!lines.empty() && touched (top, bot)) {
|
||||
double topfrac;
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class AutomationTimeAxisView : public TimeAxisView {
|
|||
void set_samples_per_unit (double);
|
||||
std::string name() const { return _name; }
|
||||
|
||||
virtual void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, jack_nframes_t, double) = 0;
|
||||
virtual void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, nframes_t, double) = 0;
|
||||
|
||||
virtual void clear_lines ();
|
||||
virtual void add_line (AutomationLine&);
|
||||
|
|
@ -56,17 +56,17 @@ class AutomationTimeAxisView : public TimeAxisView {
|
|||
vector<AutomationLine*> lines;
|
||||
|
||||
void set_selected_points (PointSelection&);
|
||||
void get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable *>&);
|
||||
void get_selectables (nframes_t start, nframes_t end, double top, double bot, list<Selectable *>&);
|
||||
void get_inverted_selectables (Selection&, list<Selectable*>& results);
|
||||
|
||||
void show_timestretch (jack_nframes_t start, jack_nframes_t end) {}
|
||||
void show_timestretch (nframes_t start, nframes_t end) {}
|
||||
void hide_timestretch () {}
|
||||
|
||||
/* editing operations */
|
||||
|
||||
bool cut_copy_clear (Selection&, Editing::CutCopyOp);
|
||||
bool cut_copy_clear_objects (PointSelection&, Editing::CutCopyOp);
|
||||
bool paste (jack_nframes_t, float times, Selection&, size_t nth);
|
||||
bool paste (nframes_t, float times, Selection&, size_t nth);
|
||||
void reset_objects (PointSelection&);
|
||||
|
||||
void add_ghost (GhostRegion*);
|
||||
|
|
@ -110,7 +110,7 @@ class AutomationTimeAxisView : public TimeAxisView {
|
|||
|
||||
bool cut_copy_clear_one (AutomationLine&, Selection&, Editing::CutCopyOp);
|
||||
bool cut_copy_clear_objects_one (AutomationLine&, PointSelection&, Editing::CutCopyOp);
|
||||
bool paste_one (AutomationLine&, jack_nframes_t, float times, Selection&, size_t nth);
|
||||
bool paste_one (AutomationLine&, nframes_t, float times, Selection&, size_t nth);
|
||||
void reset_objects_one (AutomationLine&, PointSelection&);
|
||||
|
||||
virtual void set_automation_state (ARDOUR::AutoState) = 0;
|
||||
|
|
|
|||
|
|
@ -632,7 +632,7 @@ CrossfadeEditor::redraw ()
|
|||
return;
|
||||
}
|
||||
|
||||
jack_nframes_t len = xfade.length ();
|
||||
nframes_t len = xfade.length ();
|
||||
|
||||
fade[current].normative_curve.clear ();
|
||||
fade[current].gain_curve.clear ();
|
||||
|
|
@ -1079,12 +1079,12 @@ void
|
|||
CrossfadeEditor::audition_both ()
|
||||
{
|
||||
AudioPlaylist& pl (session.the_auditioner()->prepare_playlist());
|
||||
jack_nframes_t preroll;
|
||||
jack_nframes_t postroll;
|
||||
jack_nframes_t length;
|
||||
jack_nframes_t left_start_offset;
|
||||
jack_nframes_t right_length;
|
||||
jack_nframes_t left_length;
|
||||
nframes_t preroll;
|
||||
nframes_t postroll;
|
||||
nframes_t length;
|
||||
nframes_t left_start_offset;
|
||||
nframes_t right_length;
|
||||
nframes_t left_length;
|
||||
|
||||
if (preroll_button.get_active()) {
|
||||
preroll = ARDOUR_UI::instance()->preroll_clock.current_duration ();
|
||||
|
|
|
|||
|
|
@ -20,11 +20,11 @@ struct DragInfo {
|
|||
ArdourCanvas::Item* item;
|
||||
ItemType item_type;
|
||||
void* data;
|
||||
jack_nframes_t last_frame_position;
|
||||
nframes_t last_frame_position;
|
||||
int32_t pointer_frame_offset;
|
||||
jack_nframes_t grab_frame;
|
||||
jack_nframes_t last_pointer_frame;
|
||||
jack_nframes_t current_pointer_frame;
|
||||
nframes_t grab_frame;
|
||||
nframes_t last_pointer_frame;
|
||||
nframes_t current_pointer_frame;
|
||||
double grab_x, grab_y;
|
||||
double cumulative_x_drag;
|
||||
double cumulative_y_drag;
|
||||
|
|
|
|||
|
|
@ -803,7 +803,7 @@ Editor::tie_vertical_scrolling ()
|
|||
void
|
||||
Editor::set_frames_per_unit (double fpu)
|
||||
{
|
||||
jack_nframes_t frames;
|
||||
nframes_t frames;
|
||||
|
||||
if (fpu == frames_per_unit) {
|
||||
return;
|
||||
|
|
@ -815,7 +815,7 @@ Editor::set_frames_per_unit (double fpu)
|
|||
|
||||
// convert fpu to frame count
|
||||
|
||||
frames = (jack_nframes_t) floor (fpu * canvas_width);
|
||||
frames = (nframes_t) floor (fpu * canvas_width);
|
||||
|
||||
/* don't allow zooms that fit more than the maximum number
|
||||
of frames into an 800 pixel wide space.
|
||||
|
|
@ -870,12 +870,12 @@ Editor::instant_save ()
|
|||
}
|
||||
|
||||
void
|
||||
Editor::reposition_x_origin (jack_nframes_t frame)
|
||||
Editor::reposition_x_origin (nframes_t frame)
|
||||
{
|
||||
if (frame != leftmost_frame) {
|
||||
leftmost_frame = frame;
|
||||
|
||||
jack_nframes_t rightmost_frame = leftmost_frame + current_page_frames ();
|
||||
nframes_t rightmost_frame = leftmost_frame + current_page_frames ();
|
||||
|
||||
if (rightmost_frame > last_canvas_frame) {
|
||||
last_canvas_frame = rightmost_frame;
|
||||
|
|
@ -909,10 +909,10 @@ Editor::zoom_adjustment_changed ()
|
|||
|
||||
if (fpu < 1.0) {
|
||||
fpu = 1.0;
|
||||
zoom_range_clock.set ((jack_nframes_t) floor (fpu * canvas_width));
|
||||
zoom_range_clock.set ((nframes_t) floor (fpu * canvas_width));
|
||||
} else if (fpu > session->current_end_frame() / canvas_width) {
|
||||
fpu = session->current_end_frame() / canvas_width;
|
||||
zoom_range_clock.set ((jack_nframes_t) floor (fpu * canvas_width));
|
||||
zoom_range_clock.set ((nframes_t) floor (fpu * canvas_width));
|
||||
}
|
||||
|
||||
temporal_zoom (fpu);
|
||||
|
|
@ -928,14 +928,14 @@ Editor::control_scroll (float fraction)
|
|||
}
|
||||
|
||||
double step = fraction * current_page_frames();
|
||||
jack_nframes_t target;
|
||||
nframes_t target;
|
||||
|
||||
if ((fraction < 0.0f) && (session->transport_frame() < (jack_nframes_t) fabs(step))) {
|
||||
if ((fraction < 0.0f) && (session->transport_frame() < (nframes_t) fabs(step))) {
|
||||
target = 0;
|
||||
} else if ((fraction > 0.0f) && (max_frames - session->transport_frame() < step)) {
|
||||
target = (max_frames - (current_page_frames()*2)); // allow room for slop in where the PH is on the screen
|
||||
} else {
|
||||
target = (session->transport_frame() + (jack_nframes_t) floor ((fraction * current_page_frames())));
|
||||
target = (session->transport_frame() + (nframes_t) floor ((fraction * current_page_frames())));
|
||||
}
|
||||
|
||||
/* move visuals, we'll catch up with it later */
|
||||
|
|
@ -959,7 +959,7 @@ Editor::control_scroll (float fraction)
|
|||
}
|
||||
|
||||
bool
|
||||
Editor::deferred_control_scroll (jack_nframes_t target)
|
||||
Editor::deferred_control_scroll (nframes_t target)
|
||||
{
|
||||
session->request_locate (target);
|
||||
return false;
|
||||
|
|
@ -969,14 +969,14 @@ void
|
|||
Editor::canvas_horizontally_scrolled ()
|
||||
{
|
||||
|
||||
leftmost_frame = (jack_nframes_t) floor (horizontal_adjustment.get_value() * frames_per_unit);
|
||||
leftmost_frame = (nframes_t) floor (horizontal_adjustment.get_value() * frames_per_unit);
|
||||
update_fixed_rulers ();
|
||||
tempo_map_changed (Change (0));
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
Editor::reposition_and_zoom (jack_nframes_t frame, double nfpu)
|
||||
Editor::reposition_and_zoom (nframes_t frame, double nfpu)
|
||||
{
|
||||
if (!repos_zoom_queued) {
|
||||
repos_zoom_queued = true;
|
||||
|
|
@ -985,7 +985,7 @@ Editor::reposition_and_zoom (jack_nframes_t frame, double nfpu)
|
|||
}
|
||||
|
||||
gint
|
||||
Editor::deferred_reposition_and_zoom (jack_nframes_t frame, double nfpu)
|
||||
Editor::deferred_reposition_and_zoom (nframes_t frame, double nfpu)
|
||||
{
|
||||
|
||||
set_frames_per_unit (nfpu);
|
||||
|
|
@ -1041,7 +1041,7 @@ Editor::stop_scrolling ()
|
|||
}
|
||||
|
||||
void
|
||||
Editor::map_position_change (jack_nframes_t frame)
|
||||
Editor::map_position_change (nframes_t frame)
|
||||
{
|
||||
ENSURE_GUI_THREAD (bind (mem_fun(*this, &Editor::map_position_change), frame));
|
||||
|
||||
|
|
@ -1054,7 +1054,7 @@ Editor::map_position_change (jack_nframes_t frame)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::center_screen (jack_nframes_t frame)
|
||||
Editor::center_screen (nframes_t frame)
|
||||
{
|
||||
double page = canvas_width * frames_per_unit;
|
||||
|
||||
|
|
@ -1067,12 +1067,12 @@ Editor::center_screen (jack_nframes_t frame)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::center_screen_internal (jack_nframes_t frame, float page)
|
||||
Editor::center_screen_internal (nframes_t frame, float page)
|
||||
{
|
||||
page /= 2;
|
||||
|
||||
if (frame > page) {
|
||||
frame -= (jack_nframes_t) page;
|
||||
frame -= (nframes_t) page;
|
||||
} else {
|
||||
frame = 0;
|
||||
}
|
||||
|
|
@ -1085,7 +1085,7 @@ Editor::handle_new_duration ()
|
|||
{
|
||||
ENSURE_GUI_THREAD (mem_fun (*this, &Editor::handle_new_duration));
|
||||
|
||||
jack_nframes_t new_end = session->get_maximum_extent() + (jack_nframes_t) floorf (current_page_frames() * 0.10f);
|
||||
nframes_t new_end = session->get_maximum_extent() + (nframes_t) floorf (current_page_frames() * 0.10f);
|
||||
|
||||
if (new_end > last_canvas_frame) {
|
||||
last_canvas_frame = new_end;
|
||||
|
|
@ -1426,10 +1426,10 @@ Editor::popup_fade_context_menu (int button, int32_t time, ArdourCanvas::Item* i
|
|||
}
|
||||
|
||||
void
|
||||
Editor::popup_track_context_menu (int button, int32_t time, ItemType item_type, bool with_selection, jack_nframes_t frame)
|
||||
Editor::popup_track_context_menu (int button, int32_t time, ItemType item_type, bool with_selection, nframes_t frame)
|
||||
{
|
||||
using namespace Menu_Helpers;
|
||||
Menu* (Editor::*build_menu_function)(jack_nframes_t);
|
||||
Menu* (Editor::*build_menu_function)(nframes_t);
|
||||
Menu *menu;
|
||||
|
||||
switch (item_type) {
|
||||
|
|
@ -1541,7 +1541,7 @@ Editor::popup_track_context_menu (int button, int32_t time, ItemType item_type,
|
|||
}
|
||||
|
||||
Menu*
|
||||
Editor::build_track_context_menu (jack_nframes_t ignored)
|
||||
Editor::build_track_context_menu (nframes_t ignored)
|
||||
{
|
||||
using namespace Menu_Helpers;
|
||||
|
||||
|
|
@ -1553,7 +1553,7 @@ Editor::build_track_context_menu (jack_nframes_t ignored)
|
|||
}
|
||||
|
||||
Menu*
|
||||
Editor::build_track_bus_context_menu (jack_nframes_t ignored)
|
||||
Editor::build_track_bus_context_menu (nframes_t ignored)
|
||||
{
|
||||
using namespace Menu_Helpers;
|
||||
|
||||
|
|
@ -1565,7 +1565,7 @@ Editor::build_track_bus_context_menu (jack_nframes_t ignored)
|
|||
}
|
||||
|
||||
Menu*
|
||||
Editor::build_track_region_context_menu (jack_nframes_t frame)
|
||||
Editor::build_track_region_context_menu (nframes_t frame)
|
||||
{
|
||||
using namespace Menu_Helpers;
|
||||
MenuList& edit_items = track_region_context_menu.items();
|
||||
|
|
@ -1578,7 +1578,7 @@ Editor::build_track_region_context_menu (jack_nframes_t frame)
|
|||
Playlist* pl;
|
||||
|
||||
if ((ds = atv->get_diskstream()) && ((pl = ds->playlist()))) {
|
||||
Playlist::RegionList* regions = pl->regions_at ((jack_nframes_t) floor ( (double)frame * ds->speed()));
|
||||
Playlist::RegionList* regions = pl->regions_at ((nframes_t) floor ( (double)frame * ds->speed()));
|
||||
for (Playlist::RegionList::iterator i = regions->begin(); i != regions->end(); ++i) {
|
||||
add_region_context_items (atv->audio_view(), (*i), edit_items);
|
||||
}
|
||||
|
|
@ -1592,7 +1592,7 @@ Editor::build_track_region_context_menu (jack_nframes_t frame)
|
|||
}
|
||||
|
||||
Menu*
|
||||
Editor::build_track_crossfade_context_menu (jack_nframes_t frame)
|
||||
Editor::build_track_crossfade_context_menu (nframes_t frame)
|
||||
{
|
||||
using namespace Menu_Helpers;
|
||||
MenuList& edit_items = track_crossfade_context_menu.items();
|
||||
|
|
@ -1672,7 +1672,7 @@ Editor::analyze_range_selection()
|
|||
|
||||
|
||||
Menu*
|
||||
Editor::build_track_selection_context_menu (jack_nframes_t ignored)
|
||||
Editor::build_track_selection_context_menu (nframes_t ignored)
|
||||
{
|
||||
using namespace Menu_Helpers;
|
||||
MenuList& edit_items = track_selection_context_menu.items();
|
||||
|
|
@ -2317,7 +2317,7 @@ Editor::trackview_by_y_position (double y)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::snap_to (jack_nframes_t& start, int32_t direction, bool for_mark)
|
||||
Editor::snap_to (nframes_t& start, int32_t direction, bool for_mark)
|
||||
{
|
||||
Location* before = 0;
|
||||
Location* after = 0;
|
||||
|
|
@ -2326,10 +2326,10 @@ Editor::snap_to (jack_nframes_t& start, int32_t direction, bool for_mark)
|
|||
return;
|
||||
}
|
||||
|
||||
const jack_nframes_t one_second = session->frame_rate();
|
||||
const jack_nframes_t one_minute = session->frame_rate() * 60;
|
||||
const nframes_t one_second = session->frame_rate();
|
||||
const nframes_t one_minute = session->frame_rate() * 60;
|
||||
|
||||
jack_nframes_t presnap = start;
|
||||
nframes_t presnap = start;
|
||||
|
||||
switch (snap_type) {
|
||||
case SnapToFrame:
|
||||
|
|
@ -2337,16 +2337,16 @@ Editor::snap_to (jack_nframes_t& start, int32_t direction, bool for_mark)
|
|||
|
||||
case SnapToCDFrame:
|
||||
if (direction) {
|
||||
start = (jack_nframes_t) ceil ((double) start / (one_second / 75)) * (one_second / 75);
|
||||
start = (nframes_t) ceil ((double) start / (one_second / 75)) * (one_second / 75);
|
||||
} else {
|
||||
start = (jack_nframes_t) floor ((double) start / (one_second / 75)) * (one_second / 75);
|
||||
start = (nframes_t) floor ((double) start / (one_second / 75)) * (one_second / 75);
|
||||
}
|
||||
break;
|
||||
case SnapToSMPTEFrame:
|
||||
if (direction) {
|
||||
start = (jack_nframes_t) (ceil ((double) start / session->frames_per_smpte_frame()) * session->frames_per_smpte_frame());
|
||||
start = (nframes_t) (ceil ((double) start / session->frames_per_smpte_frame()) * session->frames_per_smpte_frame());
|
||||
} else {
|
||||
start = (jack_nframes_t) (floor ((double) start / session->frames_per_smpte_frame()) * session->frames_per_smpte_frame());
|
||||
start = (nframes_t) (floor ((double) start / session->frames_per_smpte_frame()) * session->frames_per_smpte_frame());
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -2358,9 +2358,9 @@ Editor::snap_to (jack_nframes_t& start, int32_t direction, bool for_mark)
|
|||
start -= session->smpte_offset ();
|
||||
}
|
||||
if (direction > 0) {
|
||||
start = (jack_nframes_t) ceil ((double) start / one_second) * one_second;
|
||||
start = (nframes_t) ceil ((double) start / one_second) * one_second;
|
||||
} else {
|
||||
start = (jack_nframes_t) floor ((double) start / one_second) * one_second;
|
||||
start = (nframes_t) floor ((double) start / one_second) * one_second;
|
||||
}
|
||||
|
||||
if (session->smpte_offset_negative())
|
||||
|
|
@ -2379,9 +2379,9 @@ Editor::snap_to (jack_nframes_t& start, int32_t direction, bool for_mark)
|
|||
start -= session->smpte_offset ();
|
||||
}
|
||||
if (direction) {
|
||||
start = (jack_nframes_t) ceil ((double) start / one_minute) * one_minute;
|
||||
start = (nframes_t) ceil ((double) start / one_minute) * one_minute;
|
||||
} else {
|
||||
start = (jack_nframes_t) floor ((double) start / one_minute) * one_minute;
|
||||
start = (nframes_t) floor ((double) start / one_minute) * one_minute;
|
||||
}
|
||||
if (session->smpte_offset_negative())
|
||||
{
|
||||
|
|
@ -2393,17 +2393,17 @@ Editor::snap_to (jack_nframes_t& start, int32_t direction, bool for_mark)
|
|||
|
||||
case SnapToSeconds:
|
||||
if (direction) {
|
||||
start = (jack_nframes_t) ceil ((double) start / one_second) * one_second;
|
||||
start = (nframes_t) ceil ((double) start / one_second) * one_second;
|
||||
} else {
|
||||
start = (jack_nframes_t) floor ((double) start / one_second) * one_second;
|
||||
start = (nframes_t) floor ((double) start / one_second) * one_second;
|
||||
}
|
||||
break;
|
||||
|
||||
case SnapToMinutes:
|
||||
if (direction) {
|
||||
start = (jack_nframes_t) ceil ((double) start / one_minute) * one_minute;
|
||||
start = (nframes_t) ceil ((double) start / one_minute) * one_minute;
|
||||
} else {
|
||||
start = (jack_nframes_t) floor ((double) start / one_minute) * one_minute;
|
||||
start = (nframes_t) floor ((double) start / one_minute) * one_minute;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -2484,7 +2484,7 @@ Editor::snap_to (jack_nframes_t& start, int32_t direction, bool for_mark)
|
|||
case SnapToRegionSync:
|
||||
case SnapToRegionBoundary:
|
||||
if (!region_boundary_cache.empty()) {
|
||||
vector<jack_nframes_t>::iterator i;
|
||||
vector<nframes_t>::iterator i;
|
||||
|
||||
if (direction > 0) {
|
||||
i = std::upper_bound (region_boundary_cache.begin(), region_boundary_cache.end(), start);
|
||||
|
|
@ -2929,7 +2929,7 @@ Editor::set_selected_control_point_from_click (bool press, Selection::Operation
|
|||
/* select this point and any others that it represents */
|
||||
|
||||
double y1, y2;
|
||||
jack_nframes_t x1, x2;
|
||||
nframes_t x1, x2;
|
||||
|
||||
x1 = pixel_to_frame (clicked_control_point->get_x() - 10);
|
||||
x2 = pixel_to_frame (clicked_control_point->get_x() + 10);
|
||||
|
|
@ -3112,8 +3112,8 @@ Editor::set_selected_regionview_from_click (bool press, Selection::Operation op,
|
|||
} else if (op == Selection::Extend) {
|
||||
|
||||
list<Selectable*> results;
|
||||
jack_nframes_t last_frame;
|
||||
jack_nframes_t first_frame;
|
||||
nframes_t last_frame;
|
||||
nframes_t first_frame;
|
||||
|
||||
/* 1. find the last selected regionview in the track that was clicked in */
|
||||
|
||||
|
|
@ -3891,10 +3891,10 @@ Editor::playlist_selector () const
|
|||
return *_playlist_selector;
|
||||
}
|
||||
|
||||
jack_nframes_t
|
||||
Editor::get_nudge_distance (jack_nframes_t pos, jack_nframes_t& next)
|
||||
nframes_t
|
||||
Editor::get_nudge_distance (nframes_t pos, nframes_t& next)
|
||||
{
|
||||
jack_nframes_t ret;
|
||||
nframes_t ret;
|
||||
|
||||
ret = nudge_clock.current_duration (pos);
|
||||
next = ret + 1; /* XXXX fix me */
|
||||
|
|
@ -3944,7 +3944,7 @@ Editor::playlist_deletion_dialog (Playlist* pl)
|
|||
}
|
||||
|
||||
bool
|
||||
Editor::audio_region_selection_covers (jack_nframes_t where)
|
||||
Editor::audio_region_selection_covers (nframes_t where)
|
||||
{
|
||||
for (RegionSelection::iterator a = selection->regions.begin(); a != selection->regions.end(); ++a) {
|
||||
if ((*a)->region()->covers (where)) {
|
||||
|
|
|
|||
|
|
@ -128,9 +128,9 @@ class Editor : public PublicEditor
|
|||
void connect_to_session (ARDOUR::Session *);
|
||||
ARDOUR::Session* current_session() const { return session; }
|
||||
|
||||
jack_nframes_t leftmost_position() const { return leftmost_frame; }
|
||||
jack_nframes_t current_page_frames() const {
|
||||
return (jack_nframes_t) floor (canvas_width * frames_per_unit);
|
||||
nframes_t leftmost_position() const { return leftmost_frame; }
|
||||
nframes_t current_page_frames() const {
|
||||
return (nframes_t) floor (canvas_width * frames_per_unit);
|
||||
}
|
||||
|
||||
void set_snap_to (Editing::SnapType);
|
||||
|
|
@ -176,11 +176,11 @@ class Editor : public PublicEditor
|
|||
|
||||
void set_edit_menu (Gtk::Menu&);
|
||||
|
||||
jack_nframes_t unit_to_frame (double unit) {
|
||||
return (jack_nframes_t) rint (unit * frames_per_unit);
|
||||
nframes_t unit_to_frame (double unit) {
|
||||
return (nframes_t) rint (unit * frames_per_unit);
|
||||
}
|
||||
|
||||
double frame_to_unit (jack_nframes_t frame) {
|
||||
double frame_to_unit (nframes_t frame) {
|
||||
return rint ((double) frame / (double) frames_per_unit);
|
||||
}
|
||||
|
||||
|
|
@ -195,7 +195,7 @@ class Editor : public PublicEditor
|
|||
xscroll_adjustment.
|
||||
*/
|
||||
|
||||
jack_nframes_t pixel_to_frame (double pixel) {
|
||||
nframes_t pixel_to_frame (double pixel) {
|
||||
|
||||
/* pixel can be less than zero when motion events
|
||||
are processed. since we've already run the world->canvas
|
||||
|
|
@ -204,13 +204,13 @@ class Editor : public PublicEditor
|
|||
*/
|
||||
|
||||
if (pixel >= 0) {
|
||||
return (jack_nframes_t) rint (pixel * frames_per_unit * GNOME_CANVAS(track_canvas.gobj())->pixels_per_unit);
|
||||
return (nframes_t) rint (pixel * frames_per_unit * GNOME_CANVAS(track_canvas.gobj())->pixels_per_unit);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
gulong frame_to_pixel (jack_nframes_t frame) {
|
||||
gulong frame_to_pixel (nframes_t frame) {
|
||||
return (gulong) rint ((frame / (frames_per_unit * GNOME_CANVAS(track_canvas.gobj())->pixels_per_unit)));
|
||||
}
|
||||
|
||||
|
|
@ -263,7 +263,7 @@ class Editor : public PublicEditor
|
|||
PlaylistSelector& playlist_selector() const;
|
||||
void route_name_changed (TimeAxisView *);
|
||||
gdouble frames_per_unit;
|
||||
jack_nframes_t leftmost_frame;
|
||||
nframes_t leftmost_frame;
|
||||
void clear_playlist (ARDOUR::Playlist&);
|
||||
|
||||
void new_playlists ();
|
||||
|
|
@ -336,14 +336,14 @@ class Editor : public PublicEditor
|
|||
bool new_regionviews_display_gain () { return _new_regionviews_show_envelope; }
|
||||
void prepare_for_cleanup ();
|
||||
|
||||
void reposition_x_origin (jack_nframes_t sample);
|
||||
void reposition_x_origin (nframes_t sample);
|
||||
|
||||
void maximise_editing_space();
|
||||
void restore_editing_space();
|
||||
|
||||
protected:
|
||||
void map_transport_state ();
|
||||
void map_position_change (jack_nframes_t);
|
||||
void map_position_change (nframes_t);
|
||||
|
||||
void on_realize();
|
||||
|
||||
|
|
@ -398,7 +398,7 @@ class Editor : public PublicEditor
|
|||
void hide();
|
||||
void show ();
|
||||
void set_name (const string&);
|
||||
void set_position (jack_nframes_t start, jack_nframes_t end = 0);
|
||||
void set_position (nframes_t start, nframes_t end = 0);
|
||||
void set_color_rgba (uint32_t);
|
||||
};
|
||||
|
||||
|
|
@ -410,7 +410,7 @@ class Editor : public PublicEditor
|
|||
|
||||
void hide_marker (ArdourCanvas::Item*, GdkEvent*);
|
||||
void clear_marker_display ();
|
||||
void mouse_add_new_marker (jack_nframes_t where);
|
||||
void mouse_add_new_marker (nframes_t where);
|
||||
|
||||
TimeAxisView* clicked_trackview;
|
||||
AudioTimeAxisView* clicked_audio_trackview;
|
||||
|
|
@ -456,12 +456,12 @@ class Editor : public PublicEditor
|
|||
Gtk::Menu * track_edit_playlist_submenu;
|
||||
Gtk::Menu * track_selection_edit_playlist_submenu;
|
||||
|
||||
void popup_track_context_menu (int, int, ItemType, bool, jack_nframes_t);
|
||||
Gtk::Menu* build_track_context_menu (jack_nframes_t);
|
||||
Gtk::Menu* build_track_bus_context_menu (jack_nframes_t);
|
||||
Gtk::Menu* build_track_region_context_menu (jack_nframes_t frame);
|
||||
Gtk::Menu* build_track_crossfade_context_menu (jack_nframes_t);
|
||||
Gtk::Menu* build_track_selection_context_menu (jack_nframes_t);
|
||||
void popup_track_context_menu (int, int, ItemType, bool, nframes_t);
|
||||
Gtk::Menu* build_track_context_menu (nframes_t);
|
||||
Gtk::Menu* build_track_bus_context_menu (nframes_t);
|
||||
Gtk::Menu* build_track_region_context_menu (nframes_t frame);
|
||||
Gtk::Menu* build_track_crossfade_context_menu (nframes_t);
|
||||
Gtk::Menu* build_track_selection_context_menu (nframes_t);
|
||||
void add_dstream_context_items (Gtk::Menu_Helpers::MenuList&);
|
||||
void add_bus_context_items (Gtk::Menu_Helpers::MenuList&);
|
||||
void add_region_context_items (AudioStreamView*, boost::shared_ptr<ARDOUR::Region>, Gtk::Menu_Helpers::MenuList&);
|
||||
|
|
@ -541,7 +541,7 @@ class Editor : public PublicEditor
|
|||
void update_just_smpte ();
|
||||
void update_fixed_rulers ();
|
||||
void update_tempo_based_rulers ();
|
||||
void popup_ruler_menu (jack_nframes_t where = 0, ItemType type = RegionItem);
|
||||
void popup_ruler_menu (nframes_t where = 0, ItemType type = RegionItem);
|
||||
void update_ruler_visibility ();
|
||||
void ruler_toggled (int);
|
||||
gint ruler_label_button_release (GdkEventButton*);
|
||||
|
|
@ -603,13 +603,13 @@ class Editor : public PublicEditor
|
|||
Editor& editor;
|
||||
ArdourCanvas::Points points;
|
||||
ArdourCanvas::Line canvas_item;
|
||||
jack_nframes_t current_frame;
|
||||
nframes_t current_frame;
|
||||
double length;
|
||||
|
||||
Cursor (Editor&, const string& color, bool (Editor::*)(GdkEvent*,ArdourCanvas::Item*));
|
||||
~Cursor ();
|
||||
|
||||
void set_position (jack_nframes_t);
|
||||
void set_position (nframes_t);
|
||||
void set_length (double units);
|
||||
void set_y_axis (double position);
|
||||
};
|
||||
|
|
@ -630,9 +630,9 @@ class Editor : public PublicEditor
|
|||
void select_all_selectables_using_cursor (Cursor *, bool);
|
||||
void select_all_selectables_between_cursors (Cursor *, Cursor *);
|
||||
|
||||
boost::shared_ptr<ARDOUR::Region> find_next_region (jack_nframes_t, ARDOUR::RegionPoint, int32_t dir, TrackViewList&, TimeAxisView ** = 0);
|
||||
boost::shared_ptr<ARDOUR::Region> find_next_region (nframes_t, ARDOUR::RegionPoint, int32_t dir, TrackViewList&, TimeAxisView ** = 0);
|
||||
|
||||
vector<jack_nframes_t> region_boundary_cache;
|
||||
vector<nframes_t> region_boundary_cache;
|
||||
void build_region_boundary_cache ();
|
||||
|
||||
Gtk::VBox trackview_vpacker;
|
||||
|
|
@ -660,7 +660,7 @@ class Editor : public PublicEditor
|
|||
|
||||
double canvas_width;
|
||||
double canvas_height;
|
||||
jack_nframes_t last_canvas_frame;
|
||||
nframes_t last_canvas_frame;
|
||||
|
||||
bool track_canvas_map_handler (GdkEventAny*);
|
||||
bool time_canvas_map_handler (GdkEventAny*);
|
||||
|
|
@ -678,14 +678,14 @@ class Editor : public PublicEditor
|
|||
Gtk::HBox edit_controls_hbox;
|
||||
|
||||
void control_scroll (float);
|
||||
bool deferred_control_scroll (jack_nframes_t);
|
||||
bool deferred_control_scroll (nframes_t);
|
||||
sigc::connection control_scroll_connection;
|
||||
|
||||
void tie_vertical_scrolling ();
|
||||
void canvas_horizontally_scrolled ();
|
||||
|
||||
void reposition_and_zoom (jack_nframes_t sample, double fpu);
|
||||
gint deferred_reposition_and_zoom (jack_nframes_t sample, double fpu);
|
||||
void reposition_and_zoom (nframes_t sample, double fpu);
|
||||
gint deferred_reposition_and_zoom (nframes_t sample, double fpu);
|
||||
void end_location_changed (ARDOUR::Location*);
|
||||
bool repos_zoom_queued;
|
||||
|
||||
|
|
@ -802,9 +802,9 @@ class Editor : public PublicEditor
|
|||
static void build_cursors ();
|
||||
|
||||
sigc::connection scroll_connection;
|
||||
jack_nframes_t last_update_frame;
|
||||
void center_screen (jack_nframes_t);
|
||||
void center_screen_internal (jack_nframes_t, float);
|
||||
nframes_t last_update_frame;
|
||||
void center_screen (nframes_t);
|
||||
void center_screen_internal (nframes_t, float);
|
||||
|
||||
void update_current_screen ();
|
||||
|
||||
|
|
@ -813,8 +813,8 @@ class Editor : public PublicEditor
|
|||
|
||||
void session_going_away ();
|
||||
|
||||
jack_nframes_t cut_buffer_start;
|
||||
jack_nframes_t cut_buffer_length;
|
||||
nframes_t cut_buffer_start;
|
||||
nframes_t cut_buffer_length;
|
||||
|
||||
bool typed_event (ArdourCanvas::Item*, GdkEvent*, ItemType);
|
||||
bool button_press_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
|
||||
|
|
@ -827,7 +827,7 @@ class Editor : public PublicEditor
|
|||
|
||||
void register_actions ();
|
||||
|
||||
int ensure_cursor (jack_nframes_t* pos);
|
||||
int ensure_cursor (nframes_t* pos);
|
||||
|
||||
void handle_new_audio_region (boost::shared_ptr<ARDOUR::AudioRegion>);
|
||||
void handle_audio_region_removed (boost::shared_ptr<ARDOUR::AudioRegion>);
|
||||
|
|
@ -844,7 +844,7 @@ class Editor : public PublicEditor
|
|||
void cut_copy_ranges (Editing::CutCopyOp);
|
||||
|
||||
void mouse_paste ();
|
||||
void paste_internal (jack_nframes_t position, float times);
|
||||
void paste_internal (nframes_t position, float times);
|
||||
|
||||
/* EDITING OPERATIONS */
|
||||
|
||||
|
|
@ -856,16 +856,16 @@ class Editor : public PublicEditor
|
|||
void lower_region ();
|
||||
void lower_region_to_bottom ();
|
||||
void split_region ();
|
||||
void split_region_at (jack_nframes_t);
|
||||
void split_regions_at (jack_nframes_t, RegionSelection&);
|
||||
void split_region_at (nframes_t);
|
||||
void split_regions_at (nframes_t, RegionSelection&);
|
||||
void crop_region_to_selection ();
|
||||
void set_a_regions_sync_position (boost::shared_ptr<ARDOUR::Region>, jack_nframes_t);
|
||||
void set_a_regions_sync_position (boost::shared_ptr<ARDOUR::Region>, nframes_t);
|
||||
void set_region_sync_from_edit_cursor ();
|
||||
void remove_region_sync();
|
||||
void align_selection (ARDOUR::RegionPoint, jack_nframes_t position);
|
||||
void align_selection_relative (ARDOUR::RegionPoint point, jack_nframes_t position);
|
||||
void align_region (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, jack_nframes_t position);
|
||||
void align_region_internal (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, jack_nframes_t position);
|
||||
void align_selection (ARDOUR::RegionPoint, nframes_t position);
|
||||
void align_selection_relative (ARDOUR::RegionPoint point, nframes_t position);
|
||||
void align_region (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, nframes_t position);
|
||||
void align_region_internal (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, nframes_t position);
|
||||
void remove_some_regions ();
|
||||
void remove_clicked_region ();
|
||||
void destroy_clicked_region ();
|
||||
|
|
@ -923,8 +923,8 @@ class Editor : public PublicEditor
|
|||
void temporal_zoom_selection ();
|
||||
void temporal_zoom_session ();
|
||||
void temporal_zoom (gdouble scale);
|
||||
void temporal_zoom_by_frame (jack_nframes_t start, jack_nframes_t end, const string & op);
|
||||
void temporal_zoom_to_frame (bool coarser, jack_nframes_t frame);
|
||||
void temporal_zoom_by_frame (nframes_t start, nframes_t end, const string & op);
|
||||
void temporal_zoom_to_frame (bool coarser, nframes_t frame);
|
||||
|
||||
void amplitude_zoom (gdouble scale);
|
||||
void amplitude_zoom_step (bool in);
|
||||
|
|
@ -934,13 +934,13 @@ class Editor : public PublicEditor
|
|||
|
||||
void add_external_audio_action (Editing::ImportMode);
|
||||
|
||||
void bring_in_external_audio (Editing::ImportMode mode, ARDOUR::AudioTrack*, jack_nframes_t& pos, bool prompt);
|
||||
void do_import (vector<Glib::ustring> paths, bool split, Editing::ImportMode mode, ARDOUR::AudioTrack*, jack_nframes_t&, bool);
|
||||
void do_embed (vector<Glib::ustring> paths, bool split, Editing::ImportMode mode, ARDOUR::AudioTrack*, jack_nframes_t&, bool);
|
||||
int import_sndfile (Glib::ustring path, Editing::ImportMode mode, ARDOUR::AudioTrack* track, jack_nframes_t& pos);
|
||||
void bring_in_external_audio (Editing::ImportMode mode, ARDOUR::AudioTrack*, nframes_t& pos, bool prompt);
|
||||
void do_import (vector<Glib::ustring> paths, bool split, Editing::ImportMode mode, ARDOUR::AudioTrack*, nframes_t&, bool);
|
||||
void do_embed (vector<Glib::ustring> paths, bool split, Editing::ImportMode mode, ARDOUR::AudioTrack*, nframes_t&, bool);
|
||||
int import_sndfile (Glib::ustring path, Editing::ImportMode mode, ARDOUR::AudioTrack* track, nframes_t& pos);
|
||||
int embed_sndfile (Glib::ustring path, bool split, bool multiple_files, bool& check_sample_rate, Editing::ImportMode mode,
|
||||
ARDOUR::AudioTrack* track, jack_nframes_t& pos, bool prompt);
|
||||
int finish_bringing_in_audio (boost::shared_ptr<ARDOUR::AudioRegion> region, uint32_t, uint32_t, ARDOUR::AudioTrack* track, jack_nframes_t& pos, Editing::ImportMode mode);
|
||||
ARDOUR::AudioTrack* track, nframes_t& pos, bool prompt);
|
||||
int finish_bringing_in_audio (boost::shared_ptr<ARDOUR::AudioRegion> region, uint32_t, uint32_t, ARDOUR::AudioTrack* track, nframes_t& pos, Editing::ImportMode mode);
|
||||
|
||||
/* generic interthread progress window */
|
||||
|
||||
|
|
@ -1021,7 +1021,7 @@ class Editor : public PublicEditor
|
|||
void keyboard_selection_begin ();
|
||||
void keyboard_selection_finish (bool add);
|
||||
bool have_pending_keyboard_selection;
|
||||
jack_nframes_t pending_keyboard_selection_start;
|
||||
nframes_t pending_keyboard_selection_start;
|
||||
|
||||
boost::shared_ptr<ARDOUR::Region> select_region_for_operation (int dir, TimeAxisView **tv);
|
||||
void extend_selection_to_end_of_region (bool next);
|
||||
|
|
@ -1097,11 +1097,11 @@ class Editor : public PublicEditor
|
|||
void remove_gain_control_point (ArdourCanvas::Item*, GdkEvent*);
|
||||
void remove_control_point (ArdourCanvas::Item*, GdkEvent*);
|
||||
|
||||
void mouse_brush_insert_region (RegionView*, jack_nframes_t pos);
|
||||
void brush (jack_nframes_t);
|
||||
void mouse_brush_insert_region (RegionView*, nframes_t pos);
|
||||
void brush (nframes_t);
|
||||
|
||||
void show_verbose_time_cursor (jack_nframes_t frame, double offset = 0, double xpos=-1, double ypos=-1);
|
||||
void show_verbose_duration_cursor (jack_nframes_t start, jack_nframes_t end, double offset = 0, double xpos=-1, double ypos=-1);
|
||||
void show_verbose_time_cursor (nframes_t frame, double offset = 0, double xpos=-1, double ypos=-1);
|
||||
void show_verbose_duration_cursor (nframes_t start, nframes_t end, double offset = 0, double xpos=-1, double ypos=-1);
|
||||
|
||||
/* Canvas event handlers */
|
||||
|
||||
|
|
@ -1200,8 +1200,8 @@ class Editor : public PublicEditor
|
|||
|
||||
void new_tempo_section ();
|
||||
|
||||
void mouse_add_new_tempo_event (jack_nframes_t where);
|
||||
void mouse_add_new_meter_event (jack_nframes_t where);
|
||||
void mouse_add_new_tempo_event (nframes_t where);
|
||||
void mouse_add_new_meter_event (nframes_t where);
|
||||
|
||||
void remove_tempo_marker (ArdourCanvas::Item*);
|
||||
void remove_meter_marker (ArdourCanvas::Item*);
|
||||
|
|
@ -1255,7 +1255,7 @@ class Editor : public PublicEditor
|
|||
void tempo_map_changed (ARDOUR::Change);
|
||||
void redisplay_tempo ();
|
||||
|
||||
void snap_to (jack_nframes_t& first, int32_t direction = 0, bool for_mark = false);
|
||||
void snap_to (nframes_t& first, int32_t direction = 0, bool for_mark = false);
|
||||
uint32_t bbt_beat_subdivision;
|
||||
|
||||
/* toolbar */
|
||||
|
|
@ -1353,7 +1353,7 @@ class Editor : public PublicEditor
|
|||
void region_selection_op (void (ARDOUR::Region::*pmf)(void*), void*);
|
||||
void region_selection_op (void (ARDOUR::Region::*pmf)(bool), bool);
|
||||
|
||||
bool audio_region_selection_covers (jack_nframes_t where);
|
||||
bool audio_region_selection_covers (nframes_t where);
|
||||
|
||||
/* transport range select process */
|
||||
enum RangeMarkerOp {
|
||||
|
|
@ -1394,7 +1394,7 @@ class Editor : public PublicEditor
|
|||
void drag_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event);
|
||||
void end_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event);
|
||||
|
||||
bool select_all_within (jack_nframes_t start, jack_nframes_t end, gdouble topy, gdouble boty, Selection::Operation op);
|
||||
bool select_all_within (nframes_t start, nframes_t end, gdouble topy, gdouble boty, Selection::Operation op);
|
||||
|
||||
ArdourCanvas::SimpleRect *rubberband_rect;
|
||||
|
||||
|
|
@ -1405,7 +1405,7 @@ class Editor : public PublicEditor
|
|||
void end_mouse_zoom (ArdourCanvas::Item* item, GdkEvent* event);
|
||||
|
||||
ArdourCanvas::SimpleRect *zoom_rect;
|
||||
void reposition_zoom_rect (jack_nframes_t start, jack_nframes_t end);
|
||||
void reposition_zoom_rect (nframes_t start, nframes_t end);
|
||||
|
||||
/* diskstream/route display management */
|
||||
|
||||
|
|
@ -1502,7 +1502,7 @@ class Editor : public PublicEditor
|
|||
int autoscroll_timeout_tag;
|
||||
int autoscroll_direction;
|
||||
uint32_t autoscroll_cnt;
|
||||
jack_nframes_t autoscroll_distance;
|
||||
nframes_t autoscroll_distance;
|
||||
|
||||
static gint _autoscroll_canvas (void *);
|
||||
bool autoscroll_canvas ();
|
||||
|
|
@ -1520,9 +1520,9 @@ class Editor : public PublicEditor
|
|||
void start_trim (ArdourCanvas::Item*, GdkEvent*);
|
||||
void point_trim (GdkEvent*);
|
||||
void trim_motion_callback (ArdourCanvas::Item*, GdkEvent*);
|
||||
void single_contents_trim (RegionView&, jack_nframes_t, bool, bool, bool);
|
||||
void single_start_trim (RegionView&, jack_nframes_t, bool, bool);
|
||||
void single_end_trim (RegionView&, jack_nframes_t, bool, bool);
|
||||
void single_contents_trim (RegionView&, nframes_t, bool, bool, bool);
|
||||
void single_start_trim (RegionView&, nframes_t, bool, bool);
|
||||
void single_end_trim (RegionView&, nframes_t, bool, bool);
|
||||
|
||||
void trim_finished_callback (ArdourCanvas::Item*, GdkEvent*);
|
||||
void thaw_region_after_trim (RegionView& rv);
|
||||
|
|
@ -1576,7 +1576,7 @@ class Editor : public PublicEditor
|
|||
ExportDialog *export_dialog;
|
||||
ExportDialog *export_range_markers_dialog;
|
||||
|
||||
void export_range (jack_nframes_t start, jack_nframes_t end);
|
||||
void export_range (nframes_t start, nframes_t end);
|
||||
void export_range_markers ();
|
||||
|
||||
int write_region_selection(RegionSelection&);
|
||||
|
|
@ -1649,7 +1649,7 @@ class Editor : public PublicEditor
|
|||
Gtk::Menu* edit_menu;
|
||||
bool edit_menu_map_handler (GdkEventAny*);
|
||||
|
||||
jack_nframes_t event_frame (GdkEvent*, double* px = 0, double* py = 0);
|
||||
nframes_t event_frame (GdkEvent*, double* px = 0, double* py = 0);
|
||||
|
||||
void time_fx_motion (ArdourCanvas::Item*, GdkEvent*);
|
||||
void start_time_fx (ArdourCanvas::Item*, GdkEvent*);
|
||||
|
|
@ -1765,7 +1765,7 @@ class Editor : public PublicEditor
|
|||
Gtk::VBox nudge_vbox;
|
||||
AudioClock nudge_clock;
|
||||
|
||||
jack_nframes_t get_nudge_distance (jack_nframes_t pos, jack_nframes_t& next);
|
||||
nframes_t get_nudge_distance (nframes_t pos, nframes_t& next);
|
||||
|
||||
/* audio filters */
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ using namespace Editing;
|
|||
void
|
||||
Editor::add_external_audio_action (ImportMode mode)
|
||||
{
|
||||
jack_nframes_t& pos = edit_cursor->current_frame;
|
||||
nframes_t& pos = edit_cursor->current_frame;
|
||||
AudioTrack* track = 0;
|
||||
|
||||
if (!selection->tracks.empty()) {
|
||||
|
|
@ -69,7 +69,7 @@ Editor::add_external_audio_action (ImportMode mode)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::bring_in_external_audio (ImportMode mode, AudioTrack* track, jack_nframes_t& pos, bool prompt)
|
||||
Editor::bring_in_external_audio (ImportMode mode, AudioTrack* track, nframes_t& pos, bool prompt)
|
||||
{
|
||||
if (session == 0) {
|
||||
MessageDialog msg (0, _("You can't import or embed an audiofile until you have a session loaded."));
|
||||
|
|
@ -95,7 +95,7 @@ Editor::bring_in_external_audio (ImportMode mode, AudioTrack* track, jack_nframe
|
|||
}
|
||||
|
||||
void
|
||||
Editor::do_import (vector<Glib::ustring> paths, bool split, ImportMode mode, AudioTrack* track, jack_nframes_t& pos, bool prompt)
|
||||
Editor::do_import (vector<Glib::ustring> paths, bool split, ImportMode mode, AudioTrack* track, nframes_t& pos, bool prompt)
|
||||
{
|
||||
/* SFDB sets "multichan" to true to indicate "split channels"
|
||||
so reverse the setting to match the way libardour
|
||||
|
|
@ -120,7 +120,7 @@ Editor::do_import (vector<Glib::ustring> paths, bool split, ImportMode mode, Aud
|
|||
}
|
||||
|
||||
void
|
||||
Editor::do_embed (vector<Glib::ustring> paths, bool split, ImportMode mode, AudioTrack* track, jack_nframes_t& pos, bool prompt)
|
||||
Editor::do_embed (vector<Glib::ustring> paths, bool split, ImportMode mode, AudioTrack* track, nframes_t& pos, bool prompt)
|
||||
{
|
||||
bool multiple_files = paths.size() > 1;
|
||||
bool check_sample_rate = true;
|
||||
|
|
@ -140,7 +140,7 @@ Editor::do_embed (vector<Glib::ustring> paths, bool split, ImportMode mode, Audi
|
|||
}
|
||||
|
||||
int
|
||||
Editor::import_sndfile (Glib::ustring path, ImportMode mode, AudioTrack* track, jack_nframes_t& pos)
|
||||
Editor::import_sndfile (Glib::ustring path, ImportMode mode, AudioTrack* track, nframes_t& pos)
|
||||
{
|
||||
interthread_progress_window->set_title (string_compose (_("ardour: importing %1"), path));
|
||||
interthread_progress_window->set_position (Gtk::WIN_POS_MOUSE);
|
||||
|
|
@ -188,7 +188,7 @@ Editor::import_sndfile (Glib::ustring path, ImportMode mode, AudioTrack* track,
|
|||
|
||||
int
|
||||
Editor::embed_sndfile (Glib::ustring path, bool split, bool multiple_files, bool& check_sample_rate, ImportMode mode,
|
||||
AudioTrack* track, jack_nframes_t& pos, bool prompt)
|
||||
AudioTrack* track, nframes_t& pos, bool prompt)
|
||||
{
|
||||
boost::shared_ptr<AudioFileSource> source;
|
||||
SourceList sources;
|
||||
|
|
@ -308,7 +308,7 @@ Editor::embed_sndfile (Glib::ustring path, bool split, bool multiple_files, bool
|
|||
}
|
||||
|
||||
int
|
||||
Editor::finish_bringing_in_audio (boost::shared_ptr<AudioRegion> region, uint32_t in_chans, uint32_t out_chans, AudioTrack* track, jack_nframes_t& pos, ImportMode mode)
|
||||
Editor::finish_bringing_in_audio (boost::shared_ptr<AudioRegion> region, uint32_t in_chans, uint32_t out_chans, AudioTrack* track, nframes_t& pos, ImportMode mode)
|
||||
{
|
||||
switch (mode) {
|
||||
case ImportAsRegion:
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ Editor::set_route_loop_selection ()
|
|||
return;
|
||||
}
|
||||
|
||||
jack_nframes_t start = selection->time[clicked_selection].start;
|
||||
jack_nframes_t end = selection->time[clicked_selection].end;
|
||||
nframes_t start = selection->time[clicked_selection].start;
|
||||
nframes_t end = selection->time[clicked_selection].end;
|
||||
|
||||
Location* loc = transport_loop_location();
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ using namespace Glib;
|
|||
using namespace Gtkmm2ext;
|
||||
using namespace Editing;
|
||||
|
||||
/* XXX this is a hack. it ought to be the maximum value of an jack_nframes_t */
|
||||
/* XXX this is a hack. it ought to be the maximum value of an nframes_t */
|
||||
|
||||
const double max_canvas_coordinate = (double) JACK_MAX_FRAMES;
|
||||
|
||||
|
|
@ -279,7 +279,7 @@ Editor::track_canvas_allocate (Gtk::Allocation alloc)
|
|||
canvas_width = alloc.get_width();
|
||||
canvas_height = alloc.get_height();
|
||||
|
||||
zoom_range_clock.set ((jack_nframes_t) floor ((canvas_width * frames_per_unit)));
|
||||
zoom_range_clock.set ((nframes_t) floor ((canvas_width * frames_per_unit)));
|
||||
edit_cursor->set_position (edit_cursor->current_frame);
|
||||
playhead_cursor->set_position (playhead_cursor->current_frame);
|
||||
|
||||
|
|
@ -438,7 +438,7 @@ Editor::drop_paths (const RefPtr<Gdk::DragContext>& context,
|
|||
vector<ustring> paths;
|
||||
string spath;
|
||||
GdkEvent ev;
|
||||
jack_nframes_t frame;
|
||||
nframes_t frame;
|
||||
|
||||
if (convert_drop_to_paths (paths, context, x, y, data, info, time)) {
|
||||
goto out;
|
||||
|
|
@ -466,7 +466,7 @@ Editor::drop_paths (const RefPtr<Gdk::DragContext>& context,
|
|||
|
||||
/* drop onto canvas background: create new tracks */
|
||||
|
||||
jack_nframes_t pos = 0;
|
||||
nframes_t pos = 0;
|
||||
do_embed (paths, false, ImportAsTrack, 0, pos, false);
|
||||
|
||||
} else if ((tv = dynamic_cast<AudioTimeAxisView*>(tvp)) != 0) {
|
||||
|
|
@ -507,8 +507,8 @@ Editor::drop_regions (const RefPtr<Gdk::DragContext>& context,
|
|||
void
|
||||
Editor::maybe_autoscroll (GdkEvent* event)
|
||||
{
|
||||
jack_nframes_t rightmost_frame = leftmost_frame + current_page_frames();
|
||||
jack_nframes_t frame = drag_info.current_pointer_frame;
|
||||
nframes_t rightmost_frame = leftmost_frame + current_page_frames();
|
||||
nframes_t frame = drag_info.current_pointer_frame;
|
||||
bool startit = false;
|
||||
|
||||
static int last_autoscroll_direction = 0;
|
||||
|
|
@ -557,10 +557,10 @@ Editor::_autoscroll_canvas (void *arg)
|
|||
bool
|
||||
Editor::autoscroll_canvas ()
|
||||
{
|
||||
jack_nframes_t new_frame;
|
||||
jack_nframes_t limit = max_frames - current_page_frames();
|
||||
nframes_t new_frame;
|
||||
nframes_t limit = max_frames - current_page_frames();
|
||||
GdkEventMotion ev;
|
||||
jack_nframes_t target_frame;
|
||||
nframes_t target_frame;
|
||||
|
||||
if (autoscroll_direction < 0) {
|
||||
if (leftmost_frame < autoscroll_distance) {
|
||||
|
|
@ -610,17 +610,17 @@ Editor::autoscroll_canvas ()
|
|||
|
||||
/* after about a while, speed up a bit by changing the timeout interval */
|
||||
|
||||
autoscroll_distance = (jack_nframes_t) floor (current_page_frames()/30.0f);
|
||||
autoscroll_distance = (nframes_t) floor (current_page_frames()/30.0f);
|
||||
|
||||
} else if (autoscroll_cnt == 150) { /* 1.0 seconds */
|
||||
|
||||
autoscroll_distance = (jack_nframes_t) floor (current_page_frames()/20.0f);
|
||||
autoscroll_distance = (nframes_t) floor (current_page_frames()/20.0f);
|
||||
|
||||
} else if (autoscroll_cnt == 300) { /* 1.5 seconds */
|
||||
|
||||
/* after about another while, speed up by increasing the shift per callback */
|
||||
|
||||
autoscroll_distance = (jack_nframes_t) floor (current_page_frames()/10.0f);
|
||||
autoscroll_distance = (nframes_t) floor (current_page_frames()/10.0f);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -637,7 +637,7 @@ Editor::start_canvas_autoscroll (int dir)
|
|||
stop_canvas_autoscroll ();
|
||||
|
||||
autoscroll_direction = dir;
|
||||
autoscroll_distance = (jack_nframes_t) floor (current_page_frames()/50.0);
|
||||
autoscroll_distance = (nframes_t) floor (current_page_frames()/50.0);
|
||||
autoscroll_cnt = 0;
|
||||
|
||||
/* do it right now, which will start the repeated callbacks */
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
|
|||
event.button.x = wx;
|
||||
event.button.y = wy;
|
||||
|
||||
jack_nframes_t where = event_frame (&event, 0, 0);
|
||||
nframes_t where = event_frame (&event, 0, 0);
|
||||
temporal_zoom_to_frame (true, where);
|
||||
return true;
|
||||
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
|
||||
|
|
@ -101,7 +101,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
|
|||
event.button.x = wx;
|
||||
event.button.y = wy;
|
||||
|
||||
jack_nframes_t where = event_frame (&event, 0, 0);
|
||||
nframes_t where = event_frame (&event, 0, 0);
|
||||
temporal_zoom_to_frame (false, where);
|
||||
return true;
|
||||
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ Editor::Cursor::~Cursor ()
|
|||
}
|
||||
|
||||
void
|
||||
Editor::Cursor::set_position (jack_nframes_t frame)
|
||||
Editor::Cursor::set_position (nframes_t frame)
|
||||
{
|
||||
double new_pos = editor.frame_to_unit (frame);
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ Editor::export_selection ()
|
|||
}
|
||||
|
||||
void
|
||||
Editor::export_range (jack_nframes_t start, jack_nframes_t end)
|
||||
Editor::export_range (nframes_t start, nframes_t end)
|
||||
{
|
||||
if (session) {
|
||||
if (export_dialog == 0) {
|
||||
|
|
@ -160,11 +160,11 @@ bool
|
|||
Editor::write_region (string path, boost::shared_ptr<AudioRegion> region)
|
||||
{
|
||||
boost::shared_ptr<AudioFileSource> fs;
|
||||
const jack_nframes_t chunk_size = 4096;
|
||||
jack_nframes_t to_read;
|
||||
const nframes_t chunk_size = 4096;
|
||||
nframes_t to_read;
|
||||
Sample buf[chunk_size];
|
||||
gain_t gain_buffer[chunk_size];
|
||||
jack_nframes_t pos;
|
||||
nframes_t pos;
|
||||
char s[PATH_MAX+1];
|
||||
uint32_t cnt;
|
||||
vector<boost::shared_ptr<AudioFileSource> > sources;
|
||||
|
|
@ -227,7 +227,7 @@ Editor::write_region (string path, boost::shared_ptr<AudioRegion> region)
|
|||
pos = region->position();
|
||||
|
||||
while (to_read) {
|
||||
jack_nframes_t this_time;
|
||||
nframes_t this_time;
|
||||
|
||||
this_time = min (to_read, chunk_size);
|
||||
|
||||
|
|
@ -304,11 +304,11 @@ bool
|
|||
Editor::write_audio_range (AudioPlaylist& playlist, uint32_t channels, list<AudioRange>& range)
|
||||
{
|
||||
boost::shared_ptr<AudioFileSource> fs;
|
||||
const jack_nframes_t chunk_size = 4096;
|
||||
jack_nframes_t nframes;
|
||||
const nframes_t chunk_size = 4096;
|
||||
nframes_t nframes;
|
||||
Sample buf[chunk_size];
|
||||
gain_t gain_buffer[chunk_size];
|
||||
jack_nframes_t pos;
|
||||
nframes_t pos;
|
||||
char s[PATH_MAX+1];
|
||||
uint32_t cnt;
|
||||
string path;
|
||||
|
|
@ -357,7 +357,7 @@ Editor::write_audio_range (AudioPlaylist& playlist, uint32_t channels, list<Audi
|
|||
pos = (*i).start;
|
||||
|
||||
while (nframes) {
|
||||
jack_nframes_t this_time;
|
||||
nframes_t this_time;
|
||||
|
||||
this_time = min (nframes, chunk_size);
|
||||
|
||||
|
|
@ -389,7 +389,7 @@ Editor::write_audio_range (AudioPlaylist& playlist, uint32_t channels, list<Audi
|
|||
|
||||
while (nframes) {
|
||||
|
||||
jack_nframes_t this_time = min (nframes, chunk_size);
|
||||
nframes_t this_time = min (nframes, chunk_size);
|
||||
memset (buf, 0, sizeof (Sample) * this_time);
|
||||
|
||||
for (uint32_t n=0; n < channels; ++n) {
|
||||
|
|
|
|||
|
|
@ -96,10 +96,10 @@ void
|
|||
Editor::scroll_timeaxis_to_imageframe_item(const TimeAxisViewItem* item)
|
||||
{
|
||||
// GTK2FIX
|
||||
//jack_nframes_t offset = static_cast<jack_nframes_t>(frames_per_unit * (edit_hscroll_slider_width/2)) ;
|
||||
jack_nframes_t offset = 0;
|
||||
//nframes_t offset = static_cast<nframes_t>(frames_per_unit * (edit_hscroll_slider_width/2)) ;
|
||||
nframes_t offset = 0;
|
||||
|
||||
jack_nframes_t x_pos = 0 ;
|
||||
nframes_t x_pos = 0 ;
|
||||
if(item->get_position() < offset)
|
||||
{
|
||||
x_pos = 0 ;
|
||||
|
|
@ -494,14 +494,14 @@ Editor::markerview_drag_motion_callback(ArdourCanvas::Item*, GdkEvent* event)
|
|||
double cx, cy ;
|
||||
|
||||
MarkerView* mv = reinterpret_cast<MarkerView*>(drag_info.data) ;
|
||||
jack_nframes_t pending_region_position ;
|
||||
jack_nframes_t pointer_frame ;
|
||||
nframes_t pending_region_position ;
|
||||
nframes_t pointer_frame ;
|
||||
|
||||
pointer_frame = event_frame(event, &cx, &cy) ;
|
||||
|
||||
snap_to(pointer_frame) ;
|
||||
|
||||
if (pointer_frame > (jack_nframes_t) drag_info.pointer_frame_offset)
|
||||
if (pointer_frame > (nframes_t) drag_info.pointer_frame_offset)
|
||||
{
|
||||
pending_region_position = pointer_frame - drag_info.pointer_frame_offset ;
|
||||
snap_to(pending_region_position) ;
|
||||
|
|
@ -542,14 +542,14 @@ Editor::imageframe_drag_motion_callback(ArdourCanvas::Item*, GdkEvent* event)
|
|||
|
||||
ImageFrameView* ifv = reinterpret_cast<ImageFrameView*>(drag_info.data) ;
|
||||
|
||||
jack_nframes_t pending_region_position;
|
||||
jack_nframes_t pointer_frame;
|
||||
nframes_t pending_region_position;
|
||||
nframes_t pointer_frame;
|
||||
|
||||
pointer_frame = event_frame(event, &cx, &cy) ;
|
||||
|
||||
snap_to(pointer_frame) ;
|
||||
|
||||
if (pointer_frame > (jack_nframes_t) drag_info.pointer_frame_offset)
|
||||
if (pointer_frame > (nframes_t) drag_info.pointer_frame_offset)
|
||||
{
|
||||
pending_region_position = pointer_frame - drag_info.pointer_frame_offset ;
|
||||
snap_to(pending_region_position) ;
|
||||
|
|
@ -577,7 +577,7 @@ Editor::imageframe_drag_motion_callback(ArdourCanvas::Item*, GdkEvent* event)
|
|||
void
|
||||
Editor::timeaxis_item_drag_finished_callback(ArdourCanvas::Item*, GdkEvent* event)
|
||||
{
|
||||
jack_nframes_t where ;
|
||||
nframes_t where ;
|
||||
TimeAxisViewItem* tavi = reinterpret_cast<TimeAxisViewItem*>(drag_info.data) ;
|
||||
|
||||
bool item_x_movement = (drag_info.last_frame_position != tavi->get_position()) ;
|
||||
|
|
@ -675,9 +675,9 @@ Editor::imageframe_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
|
|||
{
|
||||
ImageFrameView* ifv = reinterpret_cast<ImageFrameView*> (drag_info.data) ;
|
||||
|
||||
jack_nframes_t start = 0 ;
|
||||
jack_nframes_t end = 0 ;
|
||||
jack_nframes_t pointer_frame = event_frame(event) ;
|
||||
nframes_t start = 0 ;
|
||||
nframes_t end = 0 ;
|
||||
nframes_t pointer_frame = event_frame(event) ;
|
||||
|
||||
// chekc th eposition of the item is not locked
|
||||
if(!ifv->get_position_locked()) {
|
||||
|
|
@ -694,7 +694,7 @@ Editor::imageframe_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
|
|||
}
|
||||
|
||||
// are we getting bigger or smaller?
|
||||
jack_nframes_t new_dur_val = end - start ;
|
||||
nframes_t new_dur_val = end - start ;
|
||||
|
||||
// start handle, so a smaller pointer frame increases our component size
|
||||
if(pointer_frame <= drag_info.grab_frame)
|
||||
|
|
@ -752,10 +752,10 @@ Editor::imageframe_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* eve
|
|||
}
|
||||
else
|
||||
{
|
||||
jack_nframes_t temp = ifv->get_position() + ifv->get_duration() ;
|
||||
nframes_t temp = ifv->get_position() + ifv->get_duration() ;
|
||||
|
||||
ifv->set_position((jack_nframes_t) (temp - drag_info.cumulative_x_drag), this) ;
|
||||
ifv->set_duration((jack_nframes_t) drag_info.cumulative_x_drag, this) ;
|
||||
ifv->set_position((nframes_t) (temp - drag_info.cumulative_x_drag), this) ;
|
||||
ifv->set_duration((nframes_t) drag_info.cumulative_x_drag, this) ;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -764,10 +764,10 @@ Editor::imageframe_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* ev
|
|||
{
|
||||
ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
|
||||
|
||||
jack_nframes_t start = 0 ;
|
||||
jack_nframes_t end = 0 ;
|
||||
jack_nframes_t pointer_frame = event_frame(event) ;
|
||||
jack_nframes_t new_dur_val = 0 ;
|
||||
nframes_t start = 0 ;
|
||||
nframes_t end = 0 ;
|
||||
nframes_t pointer_frame = event_frame(event) ;
|
||||
nframes_t new_dur_val = 0 ;
|
||||
|
||||
snap_to(pointer_frame) ;
|
||||
|
||||
|
|
@ -829,7 +829,7 @@ Editor::imageframe_end_handle_end_trim (ArdourCanvas::Item* item, GdkEvent* even
|
|||
}
|
||||
else
|
||||
{
|
||||
jack_nframes_t new_duration = (jack_nframes_t)drag_info.cumulative_x_drag ;
|
||||
nframes_t new_duration = (nframes_t)drag_info.cumulative_x_drag ;
|
||||
if((new_duration <= ifv->get_max_duration()) && (new_duration >= ifv->get_min_duration()))
|
||||
{
|
||||
ifv->set_duration(new_duration, this) ;
|
||||
|
|
@ -889,9 +889,9 @@ Editor::markerview_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
|
|||
{
|
||||
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
|
||||
|
||||
jack_nframes_t start = 0 ;
|
||||
jack_nframes_t end = 0 ;
|
||||
jack_nframes_t pointer_frame = event_frame(event) ;
|
||||
nframes_t start = 0 ;
|
||||
nframes_t end = 0 ;
|
||||
nframes_t pointer_frame = event_frame(event) ;
|
||||
|
||||
// chekc th eposition of the item is not locked
|
||||
if(!mv->get_position_locked())
|
||||
|
|
@ -912,7 +912,7 @@ Editor::markerview_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
|
|||
}
|
||||
|
||||
// are we getting bigger or smaller?
|
||||
jack_nframes_t new_dur_val = end - start ;
|
||||
nframes_t new_dur_val = end - start ;
|
||||
|
||||
if(pointer_frame <= drag_info.grab_frame)
|
||||
{
|
||||
|
|
@ -969,10 +969,10 @@ Editor::markerview_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* eve
|
|||
}
|
||||
else
|
||||
{
|
||||
jack_nframes_t temp = mv->get_position() + mv->get_duration() ;
|
||||
nframes_t temp = mv->get_position() + mv->get_duration() ;
|
||||
|
||||
mv->set_position((jack_nframes_t) (temp - drag_info.cumulative_x_drag), this) ;
|
||||
mv->set_duration((jack_nframes_t) drag_info.cumulative_x_drag, this) ;
|
||||
mv->set_position((nframes_t) (temp - drag_info.cumulative_x_drag), this) ;
|
||||
mv->set_duration((nframes_t) drag_info.cumulative_x_drag, this) ;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -981,10 +981,10 @@ Editor::markerview_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* ev
|
|||
{
|
||||
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
|
||||
|
||||
jack_nframes_t start = 0 ;
|
||||
jack_nframes_t end = 0 ;
|
||||
jack_nframes_t pointer_frame = event_frame(event) ;
|
||||
jack_nframes_t new_dur_val = 0 ;
|
||||
nframes_t start = 0 ;
|
||||
nframes_t end = 0 ;
|
||||
nframes_t pointer_frame = event_frame(event) ;
|
||||
nframes_t new_dur_val = 0 ;
|
||||
|
||||
snap_to(pointer_frame) ;
|
||||
|
||||
|
|
@ -1009,7 +1009,7 @@ Editor::markerview_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* ev
|
|||
{
|
||||
// we cant extend beyond the item we are marking
|
||||
ImageFrameView* marked_item = mv->get_marked_item() ;
|
||||
jack_nframes_t marked_end = marked_item->get_position() + marked_item->get_duration() ;
|
||||
nframes_t marked_end = marked_item->get_position() + marked_item->get_duration() ;
|
||||
|
||||
if(mv->get_max_duration_active() && (new_dur_val > mv->get_max_duration()))
|
||||
{
|
||||
|
|
@ -1063,7 +1063,7 @@ Editor::markerview_end_handle_end_trim (ArdourCanvas::Item* item, GdkEvent* even
|
|||
}
|
||||
else
|
||||
{
|
||||
jack_nframes_t new_duration = (jack_nframes_t)drag_info.cumulative_x_drag ;
|
||||
nframes_t new_duration = (nframes_t)drag_info.cumulative_x_drag ;
|
||||
mv->set_duration(new_duration, this) ;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ Editor::kbd_set_edit_cursor ()
|
|||
void
|
||||
Editor::kbd_do_split (GdkEvent* ev)
|
||||
{
|
||||
jack_nframes_t where = event_frame (ev);
|
||||
nframes_t where = event_frame (ev);
|
||||
|
||||
if (entered_regionview) {
|
||||
if (selection->regions.find (entered_regionview) != selection->regions.end()) {
|
||||
|
|
@ -122,7 +122,7 @@ Editor::kbd_set_sync_position ()
|
|||
void
|
||||
Editor::kbd_do_set_sync_position (GdkEvent* ev)
|
||||
{
|
||||
jack_nframes_t where = event_frame (ev);
|
||||
nframes_t where = event_frame (ev);
|
||||
snap_to (where);
|
||||
|
||||
if (entered_regionview) {
|
||||
|
|
|
|||
|
|
@ -271,8 +271,8 @@ Editor::LocationMarkers::set_name (const string& str)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::LocationMarkers::set_position (jack_nframes_t startf,
|
||||
jack_nframes_t endf)
|
||||
Editor::LocationMarkers::set_position (nframes_t startf,
|
||||
nframes_t endf)
|
||||
{
|
||||
start->set_position (startf);
|
||||
if (end) { end->set_position (endf); }
|
||||
|
|
@ -286,7 +286,7 @@ Editor::LocationMarkers::set_color_rgba (uint32_t rgba)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::mouse_add_new_marker (jack_nframes_t where)
|
||||
Editor::mouse_add_new_marker (nframes_t where)
|
||||
{
|
||||
if (session) {
|
||||
Location *location = new Location (where, where, "mark", Location::IsMark);
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ Editor::update_current_screen ()
|
|||
{
|
||||
if (session && engine.running()) {
|
||||
|
||||
jack_nframes_t frame;
|
||||
nframes_t frame;
|
||||
|
||||
frame = session->audible_frame();
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ using namespace sigc;
|
|||
using namespace Gtk;
|
||||
using namespace Editing;
|
||||
|
||||
jack_nframes_t
|
||||
nframes_t
|
||||
Editor::event_frame (GdkEvent* event, double* pcx, double* pcy)
|
||||
{
|
||||
double cx, cy;
|
||||
|
|
@ -376,7 +376,7 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
|
|||
bool
|
||||
Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type)
|
||||
{
|
||||
jack_nframes_t where = event_frame (event, 0, 0);
|
||||
nframes_t where = event_frame (event, 0, 0);
|
||||
|
||||
track_canvas.grab_focus();
|
||||
|
||||
|
|
@ -820,7 +820,7 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
|
|||
bool
|
||||
Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type)
|
||||
{
|
||||
jack_nframes_t where = event_frame (event, 0, 0);
|
||||
nframes_t where = event_frame (event, 0, 0);
|
||||
|
||||
/* no action if we're recording */
|
||||
|
||||
|
|
@ -1709,7 +1709,7 @@ Editor::end_grab (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
void
|
||||
Editor::set_edit_cursor (GdkEvent* event)
|
||||
{
|
||||
jack_nframes_t pointer_frame = event_frame (event);
|
||||
nframes_t pointer_frame = event_frame (event);
|
||||
|
||||
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
|
||||
if (snap_type != SnapToEditCursor) {
|
||||
|
|
@ -1724,7 +1724,7 @@ Editor::set_edit_cursor (GdkEvent* event)
|
|||
void
|
||||
Editor::set_playhead_cursor (GdkEvent* event)
|
||||
{
|
||||
jack_nframes_t pointer_frame = event_frame (event);
|
||||
nframes_t pointer_frame = event_frame (event);
|
||||
|
||||
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
|
||||
snap_to (pointer_frame);
|
||||
|
|
@ -1751,15 +1751,15 @@ Editor::start_fade_in_grab (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
|
||||
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
|
||||
|
||||
drag_info.pointer_frame_offset = drag_info.grab_frame - ((jack_nframes_t) arv->audio_region()->fade_in().back()->when + arv->region()->position());
|
||||
drag_info.pointer_frame_offset = drag_info.grab_frame - ((nframes_t) arv->audio_region()->fade_in().back()->when + arv->region()->position());
|
||||
}
|
||||
|
||||
void
|
||||
Editor::fade_in_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
|
||||
jack_nframes_t pos;
|
||||
jack_nframes_t fade_length;
|
||||
nframes_t pos;
|
||||
nframes_t fade_length;
|
||||
|
||||
if ((long)drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
|
||||
pos = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
|
||||
|
|
@ -1793,8 +1793,8 @@ Editor::fade_in_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* even
|
|||
if (drag_info.first_move) return;
|
||||
|
||||
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
|
||||
jack_nframes_t pos;
|
||||
jack_nframes_t fade_length;
|
||||
nframes_t pos;
|
||||
nframes_t fade_length;
|
||||
|
||||
if ((long)drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
|
||||
pos = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
|
||||
|
|
@ -1844,15 +1844,15 @@ Editor::start_fade_out_grab (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
|
||||
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
|
||||
|
||||
drag_info.pointer_frame_offset = drag_info.grab_frame - (arv->region()->length() - (jack_nframes_t) arv->audio_region()->fade_out().back()->when + arv->region()->position());
|
||||
drag_info.pointer_frame_offset = drag_info.grab_frame - (arv->region()->length() - (nframes_t) arv->audio_region()->fade_out().back()->when + arv->region()->position());
|
||||
}
|
||||
|
||||
void
|
||||
Editor::fade_out_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
|
||||
jack_nframes_t pos;
|
||||
jack_nframes_t fade_length;
|
||||
nframes_t pos;
|
||||
nframes_t fade_length;
|
||||
|
||||
if ((long)drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
|
||||
pos = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
|
||||
|
|
@ -1888,8 +1888,8 @@ Editor::fade_out_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* eve
|
|||
if (drag_info.first_move) return;
|
||||
|
||||
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
|
||||
jack_nframes_t pos;
|
||||
jack_nframes_t fade_length;
|
||||
nframes_t pos;
|
||||
nframes_t fade_length;
|
||||
|
||||
if ((long)drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
|
||||
pos = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
|
||||
|
|
@ -1955,7 +1955,7 @@ void
|
|||
Editor::cursor_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
Cursor* cursor = (Cursor *) drag_info.data;
|
||||
jack_nframes_t adjusted_frame;
|
||||
nframes_t adjusted_frame;
|
||||
|
||||
if ((long)drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
|
||||
adjusted_frame = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
|
||||
|
|
@ -2060,7 +2060,7 @@ Editor::start_marker_grab (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
void
|
||||
Editor::marker_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
jack_nframes_t f_delta;
|
||||
nframes_t f_delta;
|
||||
Marker* marker = (Marker *) drag_info.data;
|
||||
Location *real_location;
|
||||
Location *copy_location;
|
||||
|
|
@ -2068,7 +2068,7 @@ Editor::marker_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
bool move_both = false;
|
||||
|
||||
|
||||
jack_nframes_t newframe;
|
||||
nframes_t newframe;
|
||||
if (drag_info.pointer_frame_offset <= (long) drag_info.current_pointer_frame) {
|
||||
newframe = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
|
||||
}
|
||||
|
|
@ -2076,7 +2076,7 @@ Editor::marker_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
newframe = 0;
|
||||
}
|
||||
|
||||
jack_nframes_t next = newframe;
|
||||
nframes_t next = newframe;
|
||||
|
||||
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
|
||||
snap_to (newframe, 0, true);
|
||||
|
|
@ -2248,7 +2248,7 @@ void
|
|||
Editor::meter_marker_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
MeterMarker* marker = (MeterMarker *) drag_info.data;
|
||||
jack_nframes_t adjusted_frame;
|
||||
nframes_t adjusted_frame;
|
||||
|
||||
if ((long)drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
|
||||
adjusted_frame = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
|
||||
|
|
@ -2379,7 +2379,7 @@ void
|
|||
Editor::tempo_marker_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
TempoMarker* marker = (TempoMarker *) drag_info.data;
|
||||
jack_nframes_t adjusted_frame;
|
||||
nframes_t adjusted_frame;
|
||||
|
||||
if ((long)drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
|
||||
adjusted_frame = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
|
||||
|
|
@ -2521,7 +2521,7 @@ Editor::control_point_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent*
|
|||
cy = min ((double) cp->line.height(), cy);
|
||||
|
||||
//translate cx to frames
|
||||
jack_nframes_t cx_frames = unit_to_frame (cx);
|
||||
nframes_t cx_frames = unit_to_frame (cx);
|
||||
|
||||
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier()) && !drag_info.x_constrained) {
|
||||
snap_to (cx_frames);
|
||||
|
|
@ -2594,7 +2594,7 @@ Editor::start_line_grab (AutomationLine* line, GdkEvent* event)
|
|||
{
|
||||
double cx;
|
||||
double cy;
|
||||
jack_nframes_t frame_within_region;
|
||||
nframes_t frame_within_region;
|
||||
|
||||
/* need to get x coordinate in terms of parent (TimeAxisItemView)
|
||||
origin.
|
||||
|
|
@ -2603,7 +2603,7 @@ Editor::start_line_grab (AutomationLine* line, GdkEvent* event)
|
|||
cx = event->button.x;
|
||||
cy = event->button.y;
|
||||
line->parent_group().w2i (cx, cy);
|
||||
frame_within_region = (jack_nframes_t) floor (cx * frames_per_unit);
|
||||
frame_within_region = (nframes_t) floor (cx * frames_per_unit);
|
||||
|
||||
if (!line->control_points_adjacent (frame_within_region, current_line_drag_info.before,
|
||||
current_line_drag_info.after)) {
|
||||
|
|
@ -2683,7 +2683,7 @@ Editor::start_region_grab (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
speed = tv->get_diskstream()->speed();
|
||||
}
|
||||
|
||||
drag_info.last_frame_position = (jack_nframes_t) (clicked_regionview->region()->position() / speed);
|
||||
drag_info.last_frame_position = (nframes_t) (clicked_regionview->region()->position() / speed);
|
||||
drag_info.pointer_frame_offset = drag_info.grab_frame - drag_info.last_frame_position;
|
||||
drag_info.last_trackview = &clicked_regionview->get_time_axis_view();
|
||||
// we want a move threshold
|
||||
|
|
@ -2716,7 +2716,7 @@ Editor::start_region_copy_grab (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
drag_info.last_trackview = &clicked_regionview->get_time_axis_view();
|
||||
drag_info.last_frame_position = (jack_nframes_t) (clicked_regionview->region()->position() / speed);
|
||||
drag_info.last_frame_position = (nframes_t) (clicked_regionview->region()->position() / speed);
|
||||
drag_info.pointer_frame_offset = drag_info.grab_frame - drag_info.last_frame_position;
|
||||
// we want a move threshold
|
||||
drag_info.want_move_threshold = true;
|
||||
|
|
@ -2747,7 +2747,7 @@ Editor::start_region_brush_grab (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
speed = tv->get_diskstream()->speed();
|
||||
}
|
||||
|
||||
drag_info.last_frame_position = (jack_nframes_t) (clicked_regionview->region()->position() / speed);
|
||||
drag_info.last_frame_position = (nframes_t) (clicked_regionview->region()->position() / speed);
|
||||
drag_info.pointer_frame_offset = drag_info.grab_frame - drag_info.last_frame_position;
|
||||
drag_info.last_trackview = &clicked_regionview->get_time_axis_view();
|
||||
// we want a move threshold
|
||||
|
|
@ -2763,7 +2763,7 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
double x_delta;
|
||||
double y_delta = 0;
|
||||
RegionView* rv = reinterpret_cast<RegionView*> (drag_info.data);
|
||||
jack_nframes_t pending_region_position = 0;
|
||||
nframes_t pending_region_position = 0;
|
||||
int32_t pointer_y_span = 0, canvas_pointer_y_span = 0, original_pointer_order;
|
||||
int32_t visible_y_high = 0, visible_y_low = 512; //high meaning higher numbered.. not the height on the screen
|
||||
bool clamp_y_axis = false;
|
||||
|
|
@ -2820,7 +2820,7 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
|
||||
newregion->set_locked (false);
|
||||
|
||||
to_playlist->add_region (newregion, (jack_nframes_t) (rv->region()->position() * atv->get_diskstream()->speed()));
|
||||
to_playlist->add_region (newregion, (nframes_t) (rv->region()->position() * atv->get_diskstream()->speed()));
|
||||
|
||||
c.disconnect ();
|
||||
|
||||
|
|
@ -3029,8 +3029,8 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
|
||||
if ((int32_t)drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
|
||||
|
||||
jack_nframes_t sync_frame;
|
||||
jack_nframes_t sync_offset;
|
||||
nframes_t sync_frame;
|
||||
nframes_t sync_offset;
|
||||
int32_t sync_dir;
|
||||
|
||||
pending_region_position = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
|
||||
|
|
@ -3265,7 +3265,7 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
void
|
||||
Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
jack_nframes_t where;
|
||||
nframes_t where;
|
||||
RegionView* rv = reinterpret_cast<RegionView *> (drag_info.data);
|
||||
pair<set<Playlist*>::iterator,bool> insert_result;
|
||||
bool nocommit = true;
|
||||
|
|
@ -3304,7 +3304,7 @@ Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event
|
|||
speed = atv->get_diskstream()->speed();
|
||||
}
|
||||
|
||||
regionview_x_movement = (drag_info.last_frame_position != (jack_nframes_t) (rv->region()->position()/speed));
|
||||
regionview_x_movement = (drag_info.last_frame_position != (nframes_t) (rv->region()->position()/speed));
|
||||
regionview_y_movement = (drag_info.last_trackview != &rv->get_time_axis_view());
|
||||
|
||||
//printf ("last_frame: %s position is %lu %g\n", rv->get_time_axis_view().name().c_str(), drag_info.last_frame_position, speed);
|
||||
|
|
@ -3389,7 +3389,7 @@ Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event
|
|||
|
||||
latest_regionview = 0;
|
||||
|
||||
where = (jack_nframes_t) (unit_to_frame (ix1) * speed);
|
||||
where = (nframes_t) (unit_to_frame (ix1) * speed);
|
||||
boost::shared_ptr<Region> new_region (RegionFactory::create ((*i)->region()));
|
||||
|
||||
from_playlist->remove_region (((*i)->region()));
|
||||
|
|
@ -3429,7 +3429,7 @@ Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event
|
|||
|
||||
rv->get_canvas_frame()->get_bounds (ix1, iy1, ix2, iy2);
|
||||
rv->get_canvas_group()->i2w (ix1, iy1);
|
||||
where = (jack_nframes_t) (unit_to_frame (ix1) * ownspeed);
|
||||
where = (nframes_t) (unit_to_frame (ix1) * ownspeed);
|
||||
|
||||
} else {
|
||||
|
||||
|
|
@ -3474,21 +3474,21 @@ Editor::region_view_item_click (AudioRegionView& rv, GdkEventButton* event)
|
|||
|
||||
if (Keyboard::modifier_state_equals (event->state, Keyboard::ModifierMask (Keyboard::Control|Keyboard::Alt))) {
|
||||
|
||||
align_region (rv.region(), SyncPoint, (jack_nframes_t) (edit_cursor->current_frame * speed));
|
||||
align_region (rv.region(), SyncPoint, (nframes_t) (edit_cursor->current_frame * speed));
|
||||
|
||||
} else if (Keyboard::modifier_state_equals (event->state, Keyboard::ModifierMask (Keyboard::Control|Keyboard::Shift))) {
|
||||
|
||||
align_region (rv.region(), End, (jack_nframes_t) (edit_cursor->current_frame * speed));
|
||||
align_region (rv.region(), End, (nframes_t) (edit_cursor->current_frame * speed));
|
||||
|
||||
} else {
|
||||
|
||||
align_region (rv.region(), Start, (jack_nframes_t) (edit_cursor->current_frame * speed));
|
||||
align_region (rv.region(), Start, (nframes_t) (edit_cursor->current_frame * speed));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::show_verbose_time_cursor (jack_nframes_t frame, double offset, double xpos, double ypos)
|
||||
Editor::show_verbose_time_cursor (nframes_t frame, double offset, double xpos, double ypos)
|
||||
{
|
||||
char buf[128];
|
||||
SMPTE::Time smpte;
|
||||
|
|
@ -3532,7 +3532,7 @@ Editor::show_verbose_time_cursor (jack_nframes_t frame, double offset, double xp
|
|||
}
|
||||
|
||||
void
|
||||
Editor::show_verbose_duration_cursor (jack_nframes_t start, jack_nframes_t end, double offset, double xpos, double ypos)
|
||||
Editor::show_verbose_duration_cursor (nframes_t start, nframes_t end, double offset, double xpos, double ypos)
|
||||
{
|
||||
char buf[128];
|
||||
SMPTE::Time smpte;
|
||||
|
|
@ -3689,8 +3689,8 @@ Editor::cancel_selection ()
|
|||
void
|
||||
Editor::start_selection_op (ArdourCanvas::Item* item, GdkEvent* event, SelectionOp op)
|
||||
{
|
||||
jack_nframes_t start = 0;
|
||||
jack_nframes_t end = 0;
|
||||
nframes_t start = 0;
|
||||
nframes_t end = 0;
|
||||
|
||||
if (session == 0) {
|
||||
return;
|
||||
|
|
@ -3747,10 +3747,10 @@ Editor::start_selection_op (ArdourCanvas::Item* item, GdkEvent* event, Selection
|
|||
void
|
||||
Editor::drag_selection (ArdourCanvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
jack_nframes_t start = 0;
|
||||
jack_nframes_t end = 0;
|
||||
jack_nframes_t length;
|
||||
jack_nframes_t pending_position;
|
||||
nframes_t start = 0;
|
||||
nframes_t end = 0;
|
||||
nframes_t length;
|
||||
nframes_t pending_position;
|
||||
|
||||
if ((int32_t) drag_info.current_pointer_frame > drag_info.pointer_frame_offset) {
|
||||
pending_position = drag_info.current_pointer_frame - drag_info.pointer_frame_offset;
|
||||
|
|
@ -3909,9 +3909,9 @@ Editor::start_trim (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
speed = tv->get_diskstream()->speed();
|
||||
}
|
||||
|
||||
jack_nframes_t region_start = (jack_nframes_t) (clicked_regionview->region()->position() / speed);
|
||||
jack_nframes_t region_end = (jack_nframes_t) (clicked_regionview->region()->last_frame() / speed);
|
||||
jack_nframes_t region_length = (jack_nframes_t) (clicked_regionview->region()->length() / speed);
|
||||
nframes_t region_start = (nframes_t) (clicked_regionview->region()->position() / speed);
|
||||
nframes_t region_end = (nframes_t) (clicked_regionview->region()->last_frame() / speed);
|
||||
nframes_t region_length = (nframes_t) (clicked_regionview->region()->length() / speed);
|
||||
|
||||
motion_frozen_playlists.clear();
|
||||
|
||||
|
|
@ -3952,7 +3952,7 @@ void
|
|||
Editor::trim_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
RegionView* rv = clicked_regionview;
|
||||
jack_nframes_t frame_delta = 0;
|
||||
nframes_t frame_delta = 0;
|
||||
bool left_direction;
|
||||
bool obey_snap = !Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier());
|
||||
|
||||
|
|
@ -4035,7 +4035,7 @@ Editor::trim_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
case EndTrim:
|
||||
if ((left_direction == true) && (drag_info.current_pointer_frame > (jack_nframes_t) (rv->region()->last_frame()/speed))) {
|
||||
if ((left_direction == true) && (drag_info.current_pointer_frame > (nframes_t) (rv->region()->last_frame()/speed))) {
|
||||
break;
|
||||
} else {
|
||||
for (list<RegionView*>::const_iterator i = selection->regions.by_layer().begin(); i != selection->regions.by_layer().end(); ++i) {
|
||||
|
|
@ -4063,10 +4063,10 @@ Editor::trim_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
|
||||
switch (trim_op) {
|
||||
case StartTrim:
|
||||
show_verbose_time_cursor((jack_nframes_t) (rv->region()->position()/speed), 10);
|
||||
show_verbose_time_cursor((nframes_t) (rv->region()->position()/speed), 10);
|
||||
break;
|
||||
case EndTrim:
|
||||
show_verbose_time_cursor((jack_nframes_t) (rv->region()->last_frame()/speed), 10);
|
||||
show_verbose_time_cursor((nframes_t) (rv->region()->last_frame()/speed), 10);
|
||||
break;
|
||||
case ContentsTrim:
|
||||
show_verbose_time_cursor(drag_info.current_pointer_frame, 10);
|
||||
|
|
@ -4078,7 +4078,7 @@ Editor::trim_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::single_contents_trim (RegionView& rv, jack_nframes_t frame_delta, bool left_direction, bool swap_direction, bool obey_snap)
|
||||
Editor::single_contents_trim (RegionView& rv, nframes_t frame_delta, bool left_direction, bool swap_direction, bool obey_snap)
|
||||
{
|
||||
boost::shared_ptr<Region> region (rv.region());
|
||||
|
||||
|
|
@ -4086,7 +4086,7 @@ Editor::single_contents_trim (RegionView& rv, jack_nframes_t frame_delta, bool l
|
|||
return;
|
||||
}
|
||||
|
||||
jack_nframes_t new_bound;
|
||||
nframes_t new_bound;
|
||||
|
||||
double speed = 1.0;
|
||||
TimeAxisView* tvp = clicked_trackview;
|
||||
|
|
@ -4098,27 +4098,27 @@ Editor::single_contents_trim (RegionView& rv, jack_nframes_t frame_delta, bool l
|
|||
|
||||
if (left_direction) {
|
||||
if (swap_direction) {
|
||||
new_bound = (jack_nframes_t) (region->position()/speed) + frame_delta;
|
||||
new_bound = (nframes_t) (region->position()/speed) + frame_delta;
|
||||
} else {
|
||||
new_bound = (jack_nframes_t) (region->position()/speed) - frame_delta;
|
||||
new_bound = (nframes_t) (region->position()/speed) - frame_delta;
|
||||
}
|
||||
} else {
|
||||
if (swap_direction) {
|
||||
new_bound = (jack_nframes_t) (region->position()/speed) - frame_delta;
|
||||
new_bound = (nframes_t) (region->position()/speed) - frame_delta;
|
||||
} else {
|
||||
new_bound = (jack_nframes_t) (region->position()/speed) + frame_delta;
|
||||
new_bound = (nframes_t) (region->position()/speed) + frame_delta;
|
||||
}
|
||||
}
|
||||
|
||||
if (obey_snap) {
|
||||
snap_to (new_bound);
|
||||
}
|
||||
region->trim_start ((jack_nframes_t) (new_bound * speed), this);
|
||||
region->trim_start ((nframes_t) (new_bound * speed), this);
|
||||
rv.region_changed (StartChanged);
|
||||
}
|
||||
|
||||
void
|
||||
Editor::single_start_trim (RegionView& rv, jack_nframes_t frame_delta, bool left_direction, bool obey_snap)
|
||||
Editor::single_start_trim (RegionView& rv, nframes_t frame_delta, bool left_direction, bool obey_snap)
|
||||
{
|
||||
boost::shared_ptr<Region> region (rv.region());
|
||||
|
||||
|
|
@ -4126,7 +4126,7 @@ Editor::single_start_trim (RegionView& rv, jack_nframes_t frame_delta, bool left
|
|||
return;
|
||||
}
|
||||
|
||||
jack_nframes_t new_bound;
|
||||
nframes_t new_bound;
|
||||
|
||||
double speed = 1.0;
|
||||
TimeAxisView* tvp = clicked_trackview;
|
||||
|
|
@ -4137,22 +4137,22 @@ Editor::single_start_trim (RegionView& rv, jack_nframes_t frame_delta, bool left
|
|||
}
|
||||
|
||||
if (left_direction) {
|
||||
new_bound = (jack_nframes_t) (region->position()/speed) - frame_delta;
|
||||
new_bound = (nframes_t) (region->position()/speed) - frame_delta;
|
||||
} else {
|
||||
new_bound = (jack_nframes_t) (region->position()/speed) + frame_delta;
|
||||
new_bound = (nframes_t) (region->position()/speed) + frame_delta;
|
||||
}
|
||||
|
||||
if (obey_snap) {
|
||||
snap_to (new_bound, (left_direction ? 0 : 1));
|
||||
}
|
||||
|
||||
region->trim_front ((jack_nframes_t) (new_bound * speed), this);
|
||||
region->trim_front ((nframes_t) (new_bound * speed), this);
|
||||
|
||||
rv.region_changed (Change (LengthChanged|PositionChanged|StartChanged));
|
||||
}
|
||||
|
||||
void
|
||||
Editor::single_end_trim (RegionView& rv, jack_nframes_t frame_delta, bool left_direction, bool obey_snap)
|
||||
Editor::single_end_trim (RegionView& rv, nframes_t frame_delta, bool left_direction, bool obey_snap)
|
||||
{
|
||||
boost::shared_ptr<Region> region (rv.region());
|
||||
|
||||
|
|
@ -4160,7 +4160,7 @@ Editor::single_end_trim (RegionView& rv, jack_nframes_t frame_delta, bool left_d
|
|||
return;
|
||||
}
|
||||
|
||||
jack_nframes_t new_bound;
|
||||
nframes_t new_bound;
|
||||
|
||||
double speed = 1.0;
|
||||
TimeAxisView* tvp = clicked_trackview;
|
||||
|
|
@ -4171,15 +4171,15 @@ Editor::single_end_trim (RegionView& rv, jack_nframes_t frame_delta, bool left_d
|
|||
}
|
||||
|
||||
if (left_direction) {
|
||||
new_bound = (jack_nframes_t) ((region->last_frame() + 1)/speed) - frame_delta;
|
||||
new_bound = (nframes_t) ((region->last_frame() + 1)/speed) - frame_delta;
|
||||
} else {
|
||||
new_bound = (jack_nframes_t) ((region->last_frame() + 1)/speed) + frame_delta;
|
||||
new_bound = (nframes_t) ((region->last_frame() + 1)/speed) + frame_delta;
|
||||
}
|
||||
|
||||
if (obey_snap) {
|
||||
snap_to (new_bound);
|
||||
}
|
||||
region->trim_end ((jack_nframes_t) (new_bound * speed), this);
|
||||
region->trim_end ((nframes_t) (new_bound * speed), this);
|
||||
rv.region_changed (LengthChanged);
|
||||
}
|
||||
|
||||
|
|
@ -4218,7 +4218,7 @@ void
|
|||
Editor::point_trim (GdkEvent* event)
|
||||
{
|
||||
RegionView* rv = clicked_regionview;
|
||||
jack_nframes_t new_bound = drag_info.current_pointer_frame;
|
||||
nframes_t new_bound = drag_info.current_pointer_frame;
|
||||
|
||||
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
|
||||
snap_to (new_bound);
|
||||
|
|
@ -4365,8 +4365,8 @@ Editor::start_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event, Ran
|
|||
void
|
||||
Editor::drag_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
jack_nframes_t start = 0;
|
||||
jack_nframes_t end = 0;
|
||||
nframes_t start = 0;
|
||||
nframes_t end = 0;
|
||||
ArdourCanvas::SimpleRect *crect = (range_marker_op == CreateRangeMarker) ? range_bar_drag_rect: transport_bar_drag_rect;
|
||||
|
||||
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
|
||||
|
|
@ -4469,8 +4469,8 @@ Editor::end_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
|
||||
if (Keyboard::no_modifier_keys_pressed (&event->button)) {
|
||||
|
||||
jack_nframes_t start;
|
||||
jack_nframes_t end;
|
||||
nframes_t start;
|
||||
nframes_t end;
|
||||
|
||||
start = session->locations()->first_mark_before (drag_info.grab_frame);
|
||||
end = session->locations()->first_mark_after (drag_info.grab_frame);
|
||||
|
|
@ -4521,8 +4521,8 @@ Editor::start_mouse_zoom (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
void
|
||||
Editor::drag_mouse_zoom (ArdourCanvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
jack_nframes_t start;
|
||||
jack_nframes_t end;
|
||||
nframes_t start;
|
||||
nframes_t end;
|
||||
|
||||
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
|
||||
snap_to (drag_info.current_pointer_frame);
|
||||
|
|
@ -4582,7 +4582,7 @@ Editor::end_mouse_zoom (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::reposition_zoom_rect (jack_nframes_t start, jack_nframes_t end)
|
||||
Editor::reposition_zoom_rect (nframes_t start, nframes_t end)
|
||||
{
|
||||
double x1 = frame_to_pixel (start);
|
||||
double x2 = frame_to_pixel (end);
|
||||
|
|
@ -4609,8 +4609,8 @@ Editor::start_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
void
|
||||
Editor::drag_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
jack_nframes_t start;
|
||||
jack_nframes_t end;
|
||||
nframes_t start;
|
||||
nframes_t end;
|
||||
double y1;
|
||||
double y2;
|
||||
|
||||
|
|
@ -4779,7 +4779,7 @@ Editor::end_time_fx (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
return;
|
||||
}
|
||||
|
||||
jack_nframes_t newlen = drag_info.last_pointer_frame - clicked_regionview->region()->position();
|
||||
nframes_t newlen = drag_info.last_pointer_frame - clicked_regionview->region()->position();
|
||||
float percentage = (float) ((double) newlen - (double) clicked_regionview->region()->length()) / ((double) newlen) * 100.0f;
|
||||
|
||||
begin_reversible_command (_("timestretch"));
|
||||
|
|
@ -4790,7 +4790,7 @@ Editor::end_time_fx (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::mouse_brush_insert_region (RegionView* rv, jack_nframes_t pos)
|
||||
Editor::mouse_brush_insert_region (RegionView* rv, nframes_t pos)
|
||||
{
|
||||
/* no brushing without a useful snap setting */
|
||||
|
||||
|
|
@ -4831,7 +4831,7 @@ Editor::mouse_brush_insert_region (RegionView* rv, jack_nframes_t pos)
|
|||
double speed = atv->get_diskstream()->speed();
|
||||
|
||||
XMLNode &before = playlist->get_state();
|
||||
playlist->add_region (boost::dynamic_pointer_cast<AudioRegion> (RegionFactory::create (arv->audio_region())), (jack_nframes_t) (pos * speed));
|
||||
playlist->add_region (boost::dynamic_pointer_cast<AudioRegion> (RegionFactory::create (arv->audio_region())), (nframes_t) (pos * speed));
|
||||
XMLNode &after = playlist->get_state();
|
||||
session->add_command(new MementoCommand<Playlist>(*playlist, &before, &after));
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ Editor::redo (uint32_t n)
|
|||
}
|
||||
|
||||
int
|
||||
Editor::ensure_cursor (jack_nframes_t *pos)
|
||||
Editor::ensure_cursor (nframes_t *pos)
|
||||
{
|
||||
*pos = edit_cursor->current_frame;
|
||||
return 0;
|
||||
|
|
@ -104,13 +104,13 @@ Editor::split_region ()
|
|||
}
|
||||
|
||||
void
|
||||
Editor::split_region_at (jack_nframes_t where)
|
||||
Editor::split_region_at (nframes_t where)
|
||||
{
|
||||
split_regions_at (where, selection->regions);
|
||||
}
|
||||
|
||||
void
|
||||
Editor::split_regions_at (jack_nframes_t where, RegionSelection& regions)
|
||||
Editor::split_regions_at (nframes_t where, RegionSelection& regions)
|
||||
{
|
||||
begin_reversible_command (_("split"));
|
||||
|
||||
|
|
@ -210,7 +210,7 @@ Editor::select_region_for_operation (int dir, TimeAxisView **tv)
|
|||
{
|
||||
RegionView* rv;
|
||||
boost::shared_ptr<Region> region;
|
||||
jack_nframes_t start = 0;
|
||||
nframes_t start = 0;
|
||||
|
||||
if (selection->time.start () == selection->time.end_frame ()) {
|
||||
|
||||
|
|
@ -253,7 +253,7 @@ Editor::extend_selection_to_end_of_region (bool next)
|
|||
{
|
||||
TimeAxisView *tv;
|
||||
boost::shared_ptr<Region> region;
|
||||
jack_nframes_t start;
|
||||
nframes_t start;
|
||||
|
||||
if ((region = select_region_for_operation (next ? 1 : 0, &tv)) == 0) {
|
||||
return;
|
||||
|
|
@ -281,7 +281,7 @@ Editor::extend_selection_to_start_of_region (bool previous)
|
|||
{
|
||||
TimeAxisView *tv;
|
||||
boost::shared_ptr<Region> region;
|
||||
jack_nframes_t end;
|
||||
nframes_t end;
|
||||
|
||||
if ((region = select_region_for_operation (previous ? -1 : 0, &tv)) == 0) {
|
||||
return;
|
||||
|
|
@ -308,8 +308,8 @@ Editor::extend_selection_to_start_of_region (bool previous)
|
|||
void
|
||||
Editor::nudge_forward (bool next)
|
||||
{
|
||||
jack_nframes_t distance;
|
||||
jack_nframes_t next_distance;
|
||||
nframes_t distance;
|
||||
nframes_t next_distance;
|
||||
|
||||
if (!session) return;
|
||||
|
||||
|
|
@ -343,8 +343,8 @@ Editor::nudge_forward (bool next)
|
|||
void
|
||||
Editor::nudge_backward (bool next)
|
||||
{
|
||||
jack_nframes_t distance;
|
||||
jack_nframes_t next_distance;
|
||||
nframes_t distance;
|
||||
nframes_t next_distance;
|
||||
|
||||
if (!session) return;
|
||||
|
||||
|
|
@ -389,7 +389,7 @@ Editor::nudge_backward (bool next)
|
|||
void
|
||||
Editor::nudge_forward_capture_offset ()
|
||||
{
|
||||
jack_nframes_t distance;
|
||||
nframes_t distance;
|
||||
|
||||
if (!session) return;
|
||||
|
||||
|
|
@ -416,7 +416,7 @@ Editor::nudge_forward_capture_offset ()
|
|||
void
|
||||
Editor::nudge_backward_capture_offset ()
|
||||
{
|
||||
jack_nframes_t distance;
|
||||
nframes_t distance;
|
||||
|
||||
if (!session) return;
|
||||
|
||||
|
|
@ -462,7 +462,7 @@ Editor::move_to_end ()
|
|||
void
|
||||
Editor::build_region_boundary_cache ()
|
||||
{
|
||||
jack_nframes_t pos = 0;
|
||||
nframes_t pos = 0;
|
||||
RegionPoint point;
|
||||
boost::shared_ptr<Region> r;
|
||||
TrackViewList tracks;
|
||||
|
|
@ -518,7 +518,7 @@ Editor::build_region_boundary_cache ()
|
|||
}
|
||||
}
|
||||
|
||||
jack_nframes_t rpos;
|
||||
nframes_t rpos;
|
||||
|
||||
switch (snap_type) {
|
||||
case SnapToRegionStart:
|
||||
|
|
@ -561,20 +561,20 @@ Editor::build_region_boundary_cache ()
|
|||
}
|
||||
|
||||
boost::shared_ptr<Region>
|
||||
Editor::find_next_region (jack_nframes_t frame, RegionPoint point, int32_t dir, TrackViewList& tracks, TimeAxisView **ontrack)
|
||||
Editor::find_next_region (nframes_t frame, RegionPoint point, int32_t dir, TrackViewList& tracks, TimeAxisView **ontrack)
|
||||
{
|
||||
TrackViewList::iterator i;
|
||||
jack_nframes_t closest = max_frames;
|
||||
nframes_t closest = max_frames;
|
||||
boost::shared_ptr<Region> ret;
|
||||
jack_nframes_t rpos = 0;
|
||||
nframes_t rpos = 0;
|
||||
|
||||
float track_speed;
|
||||
jack_nframes_t track_frame;
|
||||
nframes_t track_frame;
|
||||
AudioTimeAxisView *atav;
|
||||
|
||||
for (i = tracks.begin(); i != tracks.end(); ++i) {
|
||||
|
||||
jack_nframes_t distance;
|
||||
nframes_t distance;
|
||||
boost::shared_ptr<Region> r;
|
||||
|
||||
track_speed = 1.0f;
|
||||
|
|
@ -626,7 +626,7 @@ void
|
|||
Editor::cursor_to_region_point (Cursor* cursor, RegionPoint point, int32_t dir)
|
||||
{
|
||||
boost::shared_ptr<Region> r;
|
||||
jack_nframes_t pos = cursor->current_frame;
|
||||
nframes_t pos = cursor->current_frame;
|
||||
|
||||
if (!session) {
|
||||
return;
|
||||
|
|
@ -705,7 +705,7 @@ Editor::cursor_to_previous_region_point (Cursor* cursor, RegionPoint point)
|
|||
void
|
||||
Editor::cursor_to_selection_start (Cursor *cursor)
|
||||
{
|
||||
jack_nframes_t pos = 0;
|
||||
nframes_t pos = 0;
|
||||
switch (mouse_mode) {
|
||||
case MouseObject:
|
||||
if (!selection->regions.empty()) {
|
||||
|
|
@ -733,7 +733,7 @@ Editor::cursor_to_selection_start (Cursor *cursor)
|
|||
void
|
||||
Editor::cursor_to_selection_end (Cursor *cursor)
|
||||
{
|
||||
jack_nframes_t pos = 0;
|
||||
nframes_t pos = 0;
|
||||
|
||||
switch (mouse_mode) {
|
||||
case MouseObject:
|
||||
|
|
@ -762,8 +762,8 @@ Editor::cursor_to_selection_end (Cursor *cursor)
|
|||
void
|
||||
Editor::playhead_backward ()
|
||||
{
|
||||
jack_nframes_t pos;
|
||||
jack_nframes_t cnt;
|
||||
nframes_t pos;
|
||||
nframes_t cnt;
|
||||
float prefix;
|
||||
bool was_floating;
|
||||
|
||||
|
|
@ -771,15 +771,15 @@ Editor::playhead_backward ()
|
|||
cnt = 1;
|
||||
} else {
|
||||
if (was_floating) {
|
||||
cnt = (jack_nframes_t) floor (prefix * session->frame_rate ());
|
||||
cnt = (nframes_t) floor (prefix * session->frame_rate ());
|
||||
} else {
|
||||
cnt = (jack_nframes_t) prefix;
|
||||
cnt = (nframes_t) prefix;
|
||||
}
|
||||
}
|
||||
|
||||
pos = playhead_cursor->current_frame;
|
||||
|
||||
if ((jack_nframes_t) pos < cnt) {
|
||||
if ((nframes_t) pos < cnt) {
|
||||
pos = 0;
|
||||
} else {
|
||||
pos -= cnt;
|
||||
|
|
@ -796,8 +796,8 @@ Editor::playhead_backward ()
|
|||
void
|
||||
Editor::playhead_forward ()
|
||||
{
|
||||
jack_nframes_t pos;
|
||||
jack_nframes_t cnt;
|
||||
nframes_t pos;
|
||||
nframes_t cnt;
|
||||
bool was_floating;
|
||||
float prefix;
|
||||
|
||||
|
|
@ -805,9 +805,9 @@ Editor::playhead_forward ()
|
|||
cnt = 1;
|
||||
} else {
|
||||
if (was_floating) {
|
||||
cnt = (jack_nframes_t) floor (prefix * session->frame_rate ());
|
||||
cnt = (nframes_t) floor (prefix * session->frame_rate ());
|
||||
} else {
|
||||
cnt = (jack_nframes_t) floor (prefix);
|
||||
cnt = (nframes_t) floor (prefix);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -836,8 +836,8 @@ Editor::cursor_align (bool playhead_to_edit)
|
|||
void
|
||||
Editor::edit_cursor_backward ()
|
||||
{
|
||||
jack_nframes_t pos;
|
||||
jack_nframes_t cnt;
|
||||
nframes_t pos;
|
||||
nframes_t cnt;
|
||||
float prefix;
|
||||
bool was_floating;
|
||||
|
||||
|
|
@ -845,15 +845,15 @@ Editor::edit_cursor_backward ()
|
|||
cnt = 1;
|
||||
} else {
|
||||
if (was_floating) {
|
||||
cnt = (jack_nframes_t) floor (prefix * session->frame_rate ());
|
||||
cnt = (nframes_t) floor (prefix * session->frame_rate ());
|
||||
} else {
|
||||
cnt = (jack_nframes_t) prefix;
|
||||
cnt = (nframes_t) prefix;
|
||||
}
|
||||
}
|
||||
|
||||
pos = edit_cursor->current_frame;
|
||||
|
||||
if ((jack_nframes_t) pos < cnt) {
|
||||
if ((nframes_t) pos < cnt) {
|
||||
pos = 0;
|
||||
} else {
|
||||
pos -= cnt;
|
||||
|
|
@ -865,8 +865,8 @@ Editor::edit_cursor_backward ()
|
|||
void
|
||||
Editor::edit_cursor_forward ()
|
||||
{
|
||||
jack_nframes_t pos;
|
||||
jack_nframes_t cnt;
|
||||
nframes_t pos;
|
||||
nframes_t cnt;
|
||||
bool was_floating;
|
||||
float prefix;
|
||||
|
||||
|
|
@ -874,9 +874,9 @@ Editor::edit_cursor_forward ()
|
|||
cnt = 1;
|
||||
} else {
|
||||
if (was_floating) {
|
||||
cnt = (jack_nframes_t) floor (prefix * session->frame_rate ());
|
||||
cnt = (nframes_t) floor (prefix * session->frame_rate ());
|
||||
} else {
|
||||
cnt = (jack_nframes_t) floor (prefix);
|
||||
cnt = (nframes_t) floor (prefix);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -889,16 +889,16 @@ Editor::goto_frame ()
|
|||
{
|
||||
float prefix;
|
||||
bool was_floating;
|
||||
jack_nframes_t frame;
|
||||
nframes_t frame;
|
||||
|
||||
if (get_prefix (prefix, was_floating)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (was_floating) {
|
||||
frame = (jack_nframes_t) floor (prefix * session->frame_rate());
|
||||
frame = (nframes_t) floor (prefix * session->frame_rate());
|
||||
} else {
|
||||
frame = (jack_nframes_t) floor (prefix);
|
||||
frame = (nframes_t) floor (prefix);
|
||||
}
|
||||
|
||||
session->request_locate (frame);
|
||||
|
|
@ -907,19 +907,19 @@ Editor::goto_frame ()
|
|||
void
|
||||
Editor::scroll_backward (float pages)
|
||||
{
|
||||
jack_nframes_t frame;
|
||||
jack_nframes_t one_page = (jack_nframes_t) rint (canvas_width * frames_per_unit);
|
||||
nframes_t frame;
|
||||
nframes_t one_page = (nframes_t) rint (canvas_width * frames_per_unit);
|
||||
bool was_floating;
|
||||
float prefix;
|
||||
jack_nframes_t cnt;
|
||||
nframes_t cnt;
|
||||
|
||||
if (get_prefix (prefix, was_floating)) {
|
||||
cnt = (jack_nframes_t) floor (pages * one_page);
|
||||
cnt = (nframes_t) floor (pages * one_page);
|
||||
} else {
|
||||
if (was_floating) {
|
||||
cnt = (jack_nframes_t) floor (prefix * session->frame_rate());
|
||||
cnt = (nframes_t) floor (prefix * session->frame_rate());
|
||||
} else {
|
||||
cnt = (jack_nframes_t) floor (prefix * one_page);
|
||||
cnt = (nframes_t) floor (prefix * one_page);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -935,19 +935,19 @@ Editor::scroll_backward (float pages)
|
|||
void
|
||||
Editor::scroll_forward (float pages)
|
||||
{
|
||||
jack_nframes_t frame;
|
||||
jack_nframes_t one_page = (jack_nframes_t) rint (canvas_width * frames_per_unit);
|
||||
nframes_t frame;
|
||||
nframes_t one_page = (nframes_t) rint (canvas_width * frames_per_unit);
|
||||
bool was_floating;
|
||||
float prefix;
|
||||
jack_nframes_t cnt;
|
||||
nframes_t cnt;
|
||||
|
||||
if (get_prefix (prefix, was_floating)) {
|
||||
cnt = (jack_nframes_t) floor (pages * one_page);
|
||||
cnt = (nframes_t) floor (pages * one_page);
|
||||
} else {
|
||||
if (was_floating) {
|
||||
cnt = (jack_nframes_t) floor (prefix * session->frame_rate());
|
||||
cnt = (nframes_t) floor (prefix * session->frame_rate());
|
||||
} else {
|
||||
cnt = (jack_nframes_t) floor (prefix * one_page);
|
||||
cnt = (nframes_t) floor (prefix * one_page);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1042,17 +1042,17 @@ Editor::temporal_zoom (gdouble fpu)
|
|||
{
|
||||
if (!session) return;
|
||||
|
||||
jack_nframes_t current_page = current_page_frames();
|
||||
jack_nframes_t current_leftmost = leftmost_frame;
|
||||
jack_nframes_t current_rightmost;
|
||||
jack_nframes_t current_center;
|
||||
jack_nframes_t new_page;
|
||||
jack_nframes_t leftmost_after_zoom = 0;
|
||||
nframes_t current_page = current_page_frames();
|
||||
nframes_t current_leftmost = leftmost_frame;
|
||||
nframes_t current_rightmost;
|
||||
nframes_t current_center;
|
||||
nframes_t new_page;
|
||||
nframes_t leftmost_after_zoom = 0;
|
||||
double nfpu;
|
||||
|
||||
nfpu = fpu;
|
||||
|
||||
new_page = (jack_nframes_t) floor (canvas_width * nfpu);
|
||||
new_page = (nframes_t) floor (canvas_width * nfpu);
|
||||
|
||||
switch (zoom_focus) {
|
||||
case ZoomFocusLeft:
|
||||
|
|
@ -1116,8 +1116,8 @@ Editor::temporal_zoom_selection ()
|
|||
return;
|
||||
}
|
||||
|
||||
jack_nframes_t start = selection->time[clicked_selection].start;
|
||||
jack_nframes_t end = selection->time[clicked_selection].end;
|
||||
nframes_t start = selection->time[clicked_selection].start;
|
||||
nframes_t end = selection->time[clicked_selection].end;
|
||||
|
||||
temporal_zoom_by_frame (start, end, "zoom to selection");
|
||||
}
|
||||
|
|
@ -1133,7 +1133,7 @@ Editor::temporal_zoom_session ()
|
|||
}
|
||||
|
||||
void
|
||||
Editor::temporal_zoom_by_frame (jack_nframes_t start, jack_nframes_t end, const string & op)
|
||||
Editor::temporal_zoom_by_frame (nframes_t start, nframes_t end, const string & op)
|
||||
{
|
||||
if (!session) return;
|
||||
|
||||
|
|
@ -1141,7 +1141,7 @@ Editor::temporal_zoom_by_frame (jack_nframes_t start, jack_nframes_t end, const
|
|||
return;
|
||||
}
|
||||
|
||||
jack_nframes_t range = end - start;
|
||||
nframes_t range = end - start;
|
||||
|
||||
double new_fpu = (double)range / (double)canvas_width;
|
||||
// double p2 = 1.0;
|
||||
|
|
@ -1151,9 +1151,9 @@ Editor::temporal_zoom_by_frame (jack_nframes_t start, jack_nframes_t end, const
|
|||
// }
|
||||
// new_fpu = p2;
|
||||
|
||||
jack_nframes_t new_page = (jack_nframes_t) floor (canvas_width * new_fpu);
|
||||
jack_nframes_t middle = (jack_nframes_t) floor( (double)start + ((double)range / 2.0f ));
|
||||
jack_nframes_t new_leftmost = (jack_nframes_t) floor( (double)middle - ((double)new_page/2.0f));
|
||||
nframes_t new_page = (nframes_t) floor (canvas_width * new_fpu);
|
||||
nframes_t middle = (nframes_t) floor( (double)start + ((double)range / 2.0f ));
|
||||
nframes_t new_leftmost = (nframes_t) floor( (double)middle - ((double)new_page/2.0f));
|
||||
|
||||
if (new_leftmost > middle) new_leftmost = 0;
|
||||
|
||||
|
|
@ -1166,7 +1166,7 @@ Editor::temporal_zoom_by_frame (jack_nframes_t start, jack_nframes_t end, const
|
|||
}
|
||||
|
||||
void
|
||||
Editor::temporal_zoom_to_frame (bool coarser, jack_nframes_t frame)
|
||||
Editor::temporal_zoom_to_frame (bool coarser, nframes_t frame)
|
||||
{
|
||||
if (!session) return;
|
||||
|
||||
|
|
@ -1185,7 +1185,7 @@ Editor::temporal_zoom_to_frame (bool coarser, jack_nframes_t frame)
|
|||
|
||||
if (new_fpu == frames_per_unit) return;
|
||||
|
||||
jack_nframes_t new_leftmost = frame - (jack_nframes_t)range_before;
|
||||
nframes_t new_leftmost = frame - (nframes_t)range_before;
|
||||
|
||||
if (new_leftmost > frame) new_leftmost = 0;
|
||||
|
||||
|
|
@ -1208,8 +1208,8 @@ Editor::add_location_from_selection ()
|
|||
return;
|
||||
}
|
||||
|
||||
jack_nframes_t start = selection->time[clicked_selection].start;
|
||||
jack_nframes_t end = selection->time[clicked_selection].end;
|
||||
nframes_t start = selection->time[clicked_selection].start;
|
||||
nframes_t end = selection->time[clicked_selection].end;
|
||||
|
||||
Location *location = new Location (start, end, "selection");
|
||||
|
||||
|
|
@ -1224,7 +1224,7 @@ Editor::add_location_from_selection ()
|
|||
void
|
||||
Editor::add_location_from_playhead_cursor ()
|
||||
{
|
||||
jack_nframes_t where = session->audible_frame();
|
||||
nframes_t where = session->audible_frame();
|
||||
|
||||
Location *location = new Location (where, where, "mark", Location::IsMark);
|
||||
session->begin_reversible_command (_("add marker"));
|
||||
|
|
@ -1333,7 +1333,7 @@ Editor::invert_selection ()
|
|||
}
|
||||
|
||||
bool
|
||||
Editor::select_all_within (jack_nframes_t start, jack_nframes_t end, double top, double bot, Selection::Operation op)
|
||||
Editor::select_all_within (nframes_t start, nframes_t end, double top, double bot, Selection::Operation op)
|
||||
{
|
||||
list<Selectable *> touched;
|
||||
|
||||
|
|
@ -1427,8 +1427,8 @@ Editor::select_all_selectables_using_time_selection ()
|
|||
return;
|
||||
}
|
||||
|
||||
jack_nframes_t start = selection->time[clicked_selection].start;
|
||||
jack_nframes_t end = selection->time[clicked_selection].end;
|
||||
nframes_t start = selection->time[clicked_selection].start;
|
||||
nframes_t end = selection->time[clicked_selection].end;
|
||||
|
||||
if (end - start < 1) {
|
||||
return;
|
||||
|
|
@ -1494,8 +1494,8 @@ Editor::select_all_selectables_using_loop()
|
|||
void
|
||||
Editor::select_all_selectables_using_cursor (Cursor *cursor, bool after)
|
||||
{
|
||||
jack_nframes_t start;
|
||||
jack_nframes_t end;
|
||||
nframes_t start;
|
||||
nframes_t end;
|
||||
list<Selectable *> touched;
|
||||
|
||||
if (after) {
|
||||
|
|
@ -1525,8 +1525,8 @@ Editor::select_all_selectables_using_cursor (Cursor *cursor, bool after)
|
|||
void
|
||||
Editor::select_all_selectables_between_cursors (Cursor *cursor, Cursor *other_cursor)
|
||||
{
|
||||
jack_nframes_t start;
|
||||
jack_nframes_t end;
|
||||
nframes_t start;
|
||||
nframes_t end;
|
||||
list<Selectable *> touched;
|
||||
bool other_cursor_is_first = cursor->current_frame > other_cursor->current_frame;
|
||||
|
||||
|
|
@ -1644,7 +1644,7 @@ Editor::jump_backward_to_mark ()
|
|||
void
|
||||
Editor::set_mark ()
|
||||
{
|
||||
jack_nframes_t pos;
|
||||
nframes_t pos;
|
||||
float prefix;
|
||||
bool was_floating;
|
||||
|
||||
|
|
@ -1652,9 +1652,9 @@ Editor::set_mark ()
|
|||
pos = session->audible_frame ();
|
||||
} else {
|
||||
if (was_floating) {
|
||||
pos = (jack_nframes_t) floor (prefix * session->frame_rate ());
|
||||
pos = (nframes_t) floor (prefix * session->frame_rate ());
|
||||
} else {
|
||||
pos = (jack_nframes_t) floor (prefix);
|
||||
pos = (nframes_t) floor (prefix);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1715,7 +1715,7 @@ Editor::insert_region_list_drag (boost::shared_ptr<AudioRegion> region, int x, i
|
|||
double wx, wy;
|
||||
double cx, cy;
|
||||
TimeAxisView *tv;
|
||||
jack_nframes_t where;
|
||||
nframes_t where;
|
||||
AudioTimeAxisView *atv = 0;
|
||||
Playlist *playlist;
|
||||
|
||||
|
|
@ -2096,17 +2096,17 @@ Editor::region_from_selection ()
|
|||
return;
|
||||
}
|
||||
|
||||
jack_nframes_t start = selection->time[clicked_selection].start;
|
||||
jack_nframes_t end = selection->time[clicked_selection].end;
|
||||
nframes_t start = selection->time[clicked_selection].start;
|
||||
nframes_t end = selection->time[clicked_selection].end;
|
||||
|
||||
jack_nframes_t selection_cnt = end - start + 1;
|
||||
nframes_t selection_cnt = end - start + 1;
|
||||
|
||||
for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
|
||||
boost::shared_ptr<AudioRegion> current;
|
||||
boost::shared_ptr<Region> current_r;
|
||||
Playlist *pl;
|
||||
|
||||
jack_nframes_t internal_start;
|
||||
nframes_t internal_start;
|
||||
string new_name;
|
||||
|
||||
if ((pl = (*i)->playlist()) == 0) {
|
||||
|
|
@ -2134,15 +2134,15 @@ Editor::create_region_from_selection (vector<boost::shared_ptr<AudioRegion> >& n
|
|||
return;
|
||||
}
|
||||
|
||||
jack_nframes_t start = selection->time[clicked_selection].start;
|
||||
jack_nframes_t end = selection->time[clicked_selection].end;
|
||||
nframes_t start = selection->time[clicked_selection].start;
|
||||
nframes_t end = selection->time[clicked_selection].end;
|
||||
|
||||
for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
|
||||
|
||||
boost::shared_ptr<AudioRegion> current;
|
||||
boost::shared_ptr<Region> current_r;
|
||||
Playlist* playlist;
|
||||
jack_nframes_t internal_start;
|
||||
nframes_t internal_start;
|
||||
string new_name;
|
||||
|
||||
if ((playlist = (*i)->playlist()) == 0) {
|
||||
|
|
@ -2220,7 +2220,7 @@ Editor::separate_region_from_selection ()
|
|||
double speed = atv->get_diskstream()->speed();
|
||||
|
||||
for (list<AudioRange>::iterator t = selection->time.begin(); t != selection->time.end(); ++t) {
|
||||
playlist->partition ((jack_nframes_t)((*t).start * speed), (jack_nframes_t)((*t).end * speed), true);
|
||||
playlist->partition ((nframes_t)((*t).start * speed), (nframes_t)((*t).end * speed), true);
|
||||
}
|
||||
|
||||
if (doing_undo)
|
||||
|
|
@ -2273,7 +2273,7 @@ Editor::separate_regions_using_location (Location& loc)
|
|||
double speed = atv->get_diskstream()->speed();
|
||||
|
||||
|
||||
playlist->partition ((jack_nframes_t)(loc.start() * speed), (jack_nframes_t)(loc.end() * speed), true);
|
||||
playlist->partition ((nframes_t)(loc.start() * speed), (nframes_t)(loc.end() * speed), true);
|
||||
if (doing_undo)
|
||||
session->add_command(new MementoCommand<Playlist>(*playlist, before, &playlist->get_state()));
|
||||
}
|
||||
|
|
@ -2322,9 +2322,9 @@ Editor::crop_region_to_selection ()
|
|||
|
||||
if (!playlists.empty()) {
|
||||
|
||||
jack_nframes_t start;
|
||||
jack_nframes_t end;
|
||||
jack_nframes_t cnt;
|
||||
nframes_t start;
|
||||
nframes_t end;
|
||||
nframes_t cnt;
|
||||
|
||||
begin_reversible_command (_("trim to selection"));
|
||||
|
||||
|
|
@ -2359,7 +2359,7 @@ Editor::crop_region_to_selection ()
|
|||
void
|
||||
Editor::region_fill_track ()
|
||||
{
|
||||
jack_nframes_t end;
|
||||
nframes_t end;
|
||||
|
||||
if (!session || selection->regions.empty()) {
|
||||
return;
|
||||
|
|
@ -2419,8 +2419,8 @@ Editor::region_fill_selection ()
|
|||
TreeModel::iterator i = region_list_display.get_selection()->get_selected();
|
||||
boost::shared_ptr<Region> region = (*i)[region_list_columns.region];
|
||||
|
||||
jack_nframes_t start = selection->time[clicked_selection].start;
|
||||
jack_nframes_t end = selection->time[clicked_selection].end;
|
||||
nframes_t start = selection->time[clicked_selection].start;
|
||||
nframes_t end = selection->time[clicked_selection].end;
|
||||
|
||||
Playlist *playlist;
|
||||
|
||||
|
|
@ -2428,7 +2428,7 @@ Editor::region_fill_selection ()
|
|||
return;
|
||||
}
|
||||
|
||||
jack_nframes_t selection_length = end - start;
|
||||
nframes_t selection_length = end - start;
|
||||
float times = (float)selection_length / region->length();
|
||||
|
||||
begin_reversible_command (_("fill selection"));
|
||||
|
|
@ -2448,7 +2448,7 @@ Editor::region_fill_selection ()
|
|||
}
|
||||
|
||||
void
|
||||
Editor::set_a_regions_sync_position (boost::shared_ptr<Region> region, jack_nframes_t position)
|
||||
Editor::set_a_regions_sync_position (boost::shared_ptr<Region> region, nframes_t position)
|
||||
{
|
||||
|
||||
if (!region->covers (position)) {
|
||||
|
|
@ -2533,14 +2533,14 @@ struct RegionSortByTime {
|
|||
};
|
||||
|
||||
void
|
||||
Editor::align_selection_relative (RegionPoint point, jack_nframes_t position)
|
||||
Editor::align_selection_relative (RegionPoint point, nframes_t position)
|
||||
{
|
||||
if (selection->regions.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
jack_nframes_t distance;
|
||||
jack_nframes_t pos = 0;
|
||||
nframes_t distance;
|
||||
nframes_t pos = 0;
|
||||
int dir;
|
||||
|
||||
list<RegionView*> sorted;
|
||||
|
|
@ -2592,7 +2592,7 @@ Editor::align_selection_relative (RegionPoint point, jack_nframes_t position)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::align_selection (RegionPoint point, jack_nframes_t position)
|
||||
Editor::align_selection (RegionPoint point, nframes_t position)
|
||||
{
|
||||
if (selection->regions.empty()) {
|
||||
return;
|
||||
|
|
@ -2608,7 +2608,7 @@ Editor::align_selection (RegionPoint point, jack_nframes_t position)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::align_region (boost::shared_ptr<Region> region, RegionPoint point, jack_nframes_t position)
|
||||
Editor::align_region (boost::shared_ptr<Region> region, RegionPoint point, nframes_t position)
|
||||
{
|
||||
begin_reversible_command (_("align region"));
|
||||
align_region_internal (region, point, position);
|
||||
|
|
@ -2616,7 +2616,7 @@ Editor::align_region (boost::shared_ptr<Region> region, RegionPoint point, jack_
|
|||
}
|
||||
|
||||
void
|
||||
Editor::align_region_internal (boost::shared_ptr<Region> region, RegionPoint point, jack_nframes_t position)
|
||||
Editor::align_region_internal (boost::shared_ptr<Region> region, RegionPoint point, nframes_t position)
|
||||
{
|
||||
XMLNode &before = region->playlist()->get_state();
|
||||
|
||||
|
|
@ -2774,9 +2774,9 @@ Editor::bounce_range_selection ()
|
|||
|
||||
TrackViewList *views = get_valid_views (selection->time.track, selection->time.group);
|
||||
|
||||
jack_nframes_t start = selection->time[clicked_selection].start;
|
||||
jack_nframes_t end = selection->time[clicked_selection].end;
|
||||
jack_nframes_t cnt = end - start + 1;
|
||||
nframes_t start = selection->time[clicked_selection].start;
|
||||
nframes_t end = selection->time[clicked_selection].end;
|
||||
nframes_t cnt = end - start + 1;
|
||||
|
||||
begin_reversible_command (_("bounce range"));
|
||||
|
||||
|
|
@ -2908,7 +2908,7 @@ Editor::cut_copy_regions (CutCopyOp op)
|
|||
{
|
||||
typedef std::map<AudioPlaylist*,AudioPlaylist*> PlaylistMapping;
|
||||
PlaylistMapping pmap;
|
||||
jack_nframes_t first_position = max_frames;
|
||||
nframes_t first_position = max_frames;
|
||||
set<Playlist*> freezelist;
|
||||
pair<set<Playlist*>::iterator,bool> insert_result;
|
||||
|
||||
|
|
@ -3019,13 +3019,13 @@ Editor::mouse_paste ()
|
|||
event.button.x = wx;
|
||||
event.button.y = wy;
|
||||
|
||||
jack_nframes_t where = event_frame (&event, 0, 0);
|
||||
nframes_t where = event_frame (&event, 0, 0);
|
||||
snap_to (where);
|
||||
paste_internal (where, 1);
|
||||
}
|
||||
|
||||
void
|
||||
Editor::paste_internal (jack_nframes_t position, float times)
|
||||
Editor::paste_internal (nframes_t position, float times)
|
||||
{
|
||||
bool commit = false;
|
||||
|
||||
|
|
@ -3231,9 +3231,9 @@ void
|
|||
Editor::nudge_track (bool use_edit_cursor, bool forwards)
|
||||
{
|
||||
Playlist *playlist;
|
||||
jack_nframes_t distance;
|
||||
jack_nframes_t next_distance;
|
||||
jack_nframes_t start;
|
||||
nframes_t distance;
|
||||
nframes_t next_distance;
|
||||
nframes_t start;
|
||||
|
||||
if (use_edit_cursor) {
|
||||
start = edit_cursor->current_frame;
|
||||
|
|
@ -3444,7 +3444,7 @@ Editor::external_edit_region ()
|
|||
}
|
||||
|
||||
void
|
||||
Editor::brush (jack_nframes_t pos)
|
||||
Editor::brush (nframes_t pos)
|
||||
{
|
||||
RegionSelection sel;
|
||||
snap_to (pos);
|
||||
|
|
|
|||
|
|
@ -582,7 +582,7 @@ Editor::region_list_display_drag_data_received (const RefPtr<Gdk::DragContext>&
|
|||
vector<ustring> paths;
|
||||
|
||||
if (convert_drop_to_paths (paths, context, x, y, data, info, time) == 0) {
|
||||
jack_nframes_t pos = 0;
|
||||
nframes_t pos = 0;
|
||||
do_embed (paths, false, ImportAsRegion, 0, pos, true);
|
||||
context->drag_finish (true, false, time);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ Editor::ruler_button_release (GdkEventButton* ev)
|
|||
hide_verbose_canvas_cursor();
|
||||
stop_canvas_autoscroll();
|
||||
|
||||
jack_nframes_t where = leftmost_frame + pixel_to_frame (x);
|
||||
nframes_t where = leftmost_frame + pixel_to_frame (x);
|
||||
|
||||
switch (ev->button) {
|
||||
case 1:
|
||||
|
|
@ -229,12 +229,12 @@ Editor::ruler_mouse_motion (GdkEventMotion* ev)
|
|||
track_canvas.c2w (x, y, wcx, wcy);
|
||||
track_canvas.w2c (wcx, wcy, cx, cy);
|
||||
|
||||
jack_nframes_t where = leftmost_frame + pixel_to_frame (x);
|
||||
nframes_t where = leftmost_frame + pixel_to_frame (x);
|
||||
|
||||
|
||||
/// ripped from maybe_autoscroll, and adapted to work here
|
||||
jack_nframes_t one_page = (jack_nframes_t) rint (canvas_width * frames_per_unit);
|
||||
jack_nframes_t rightmost_frame = leftmost_frame + one_page;
|
||||
nframes_t one_page = (nframes_t) rint (canvas_width * frames_per_unit);
|
||||
nframes_t rightmost_frame = leftmost_frame + one_page;
|
||||
|
||||
if (autoscroll_timeout_tag < 0) {
|
||||
if (where > rightmost_frame) {
|
||||
|
|
@ -288,7 +288,7 @@ Editor::ruler_mouse_motion (GdkEventMotion* ev)
|
|||
|
||||
|
||||
void
|
||||
Editor::popup_ruler_menu (jack_nframes_t where, ItemType t)
|
||||
Editor::popup_ruler_menu (nframes_t where, ItemType t)
|
||||
{
|
||||
using namespace Menu_Helpers;
|
||||
|
||||
|
|
@ -695,8 +695,8 @@ Editor::update_just_smpte ()
|
|||
an uint32_t (or larger) to a float ... what to do ?
|
||||
*/
|
||||
|
||||
jack_nframes_t page = (jack_nframes_t) floor (canvas_width * frames_per_unit);
|
||||
jack_nframes_t rightmost_frame = leftmost_frame + page;
|
||||
nframes_t page = (nframes_t) floor (canvas_width * frames_per_unit);
|
||||
nframes_t rightmost_frame = leftmost_frame + page;
|
||||
|
||||
if (ruler_shown[ruler_metric_smpte]) {
|
||||
gtk_custom_ruler_set_range (GTK_CUSTOM_RULER(_smpte_ruler), leftmost_frame, rightmost_frame,
|
||||
|
|
@ -707,7 +707,7 @@ Editor::update_just_smpte ()
|
|||
void
|
||||
Editor::update_fixed_rulers ()
|
||||
{
|
||||
jack_nframes_t rightmost_frame;
|
||||
nframes_t rightmost_frame;
|
||||
|
||||
if (session == 0) {
|
||||
return;
|
||||
|
|
@ -717,7 +717,7 @@ Editor::update_fixed_rulers ()
|
|||
an uint32_t (or larger) to a float ... what to do ?
|
||||
*/
|
||||
|
||||
jack_nframes_t page = (jack_nframes_t) floor (canvas_width * frames_per_unit);
|
||||
nframes_t page = (nframes_t) floor (canvas_width * frames_per_unit);
|
||||
|
||||
ruler_metrics[ruler_metric_smpte].units_per_pixel = frames_per_unit;
|
||||
ruler_metrics[ruler_metric_frames].units_per_pixel = frames_per_unit;
|
||||
|
|
@ -756,7 +756,7 @@ Editor::update_tempo_based_rulers ()
|
|||
an uint32_t (or larger) to a float ... what to do ?
|
||||
*/
|
||||
|
||||
jack_nframes_t page = (jack_nframes_t) floor (canvas_width * frames_per_unit);
|
||||
nframes_t page = (nframes_t) floor (canvas_width * frames_per_unit);
|
||||
ruler_metrics[ruler_metric_bbt].units_per_pixel = frames_per_unit;
|
||||
|
||||
if (ruler_shown[ruler_metric_bbt]) {
|
||||
|
|
@ -794,10 +794,10 @@ Editor::_metric_get_minsec (GtkCustomRulerMark **marks, gdouble lower, gdouble u
|
|||
gint
|
||||
Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble upper, gint maxchars)
|
||||
{
|
||||
jack_nframes_t range;
|
||||
jack_nframes_t pos;
|
||||
jack_nframes_t spacer;
|
||||
jack_nframes_t fr;
|
||||
nframes_t range;
|
||||
nframes_t pos;
|
||||
nframes_t spacer;
|
||||
nframes_t fr;
|
||||
SMPTE::Time smpte;
|
||||
gchar buf[16];
|
||||
gint nmarks = 0;
|
||||
|
|
@ -815,13 +815,13 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble upp
|
|||
|
||||
fr = session->frame_rate();
|
||||
|
||||
if (lower > (spacer = (jack_nframes_t)(128 * Editor::get_current_zoom ()))) {
|
||||
if (lower > (spacer = (nframes_t)(128 * Editor::get_current_zoom ()))) {
|
||||
lower = lower - spacer;
|
||||
} else {
|
||||
lower = 0;
|
||||
}
|
||||
upper = upper + spacer;
|
||||
range = (jack_nframes_t) floor (upper - lower);
|
||||
range = (nframes_t) floor (upper - lower);
|
||||
|
||||
if (range < (2 * session->frames_per_smpte_frame())) { /* 0 - 2 frames */
|
||||
show_bits = true;
|
||||
|
|
@ -830,19 +830,19 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble upp
|
|||
} else if (range <= (fr / 4)) { /* 2 frames - 0.250 second */
|
||||
show_frames = true;
|
||||
mark_modulo = 1;
|
||||
nmarks = 1 + (range / (jack_nframes_t)session->frames_per_smpte_frame());
|
||||
nmarks = 1 + (range / (nframes_t)session->frames_per_smpte_frame());
|
||||
} else if (range <= (fr / 2)) { /* 0.25-0.5 second */
|
||||
show_frames = true;
|
||||
mark_modulo = 2;
|
||||
nmarks = 1 + (range / (jack_nframes_t)session->frames_per_smpte_frame());
|
||||
nmarks = 1 + (range / (nframes_t)session->frames_per_smpte_frame());
|
||||
} else if (range <= fr) { /* 0.5-1 second */
|
||||
show_frames = true;
|
||||
mark_modulo = 5;
|
||||
nmarks = 1 + (range / (jack_nframes_t)session->frames_per_smpte_frame());
|
||||
nmarks = 1 + (range / (nframes_t)session->frames_per_smpte_frame());
|
||||
} else if (range <= 2 * fr) { /* 1-2 seconds */
|
||||
show_frames = true;
|
||||
mark_modulo = 10;
|
||||
nmarks = 1 + (range / (jack_nframes_t)session->frames_per_smpte_frame());
|
||||
nmarks = 1 + (range / (nframes_t)session->frames_per_smpte_frame());
|
||||
} else if (range <= 8 * fr) { /* 2-8 seconds */
|
||||
show_seconds = true;
|
||||
mark_modulo = 1;
|
||||
|
|
@ -893,14 +893,14 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble upp
|
|||
nmarks = 1 + 24;
|
||||
} else {
|
||||
|
||||
/* not possible if jack_nframes_t is a 32 bit quantity */
|
||||
/* not possible if nframes_t is a 32 bit quantity */
|
||||
|
||||
show_hours = true;
|
||||
mark_modulo = 4;
|
||||
nmarks = 1 + 24;
|
||||
}
|
||||
|
||||
pos = (jack_nframes_t) floor (lower);
|
||||
pos = (nframes_t) floor (lower);
|
||||
|
||||
*marks = (GtkCustomRulerMark *) g_malloc (sizeof(GtkCustomRulerMark) * nmarks);
|
||||
|
||||
|
|
@ -1043,12 +1043,12 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble upper
|
|||
gint nmarks;
|
||||
char buf[64];
|
||||
gint n;
|
||||
jack_nframes_t pos;
|
||||
nframes_t pos;
|
||||
bool bar_helper_on = true;
|
||||
|
||||
BBT_Time next_beat;
|
||||
jack_nframes_t next_beat_pos;
|
||||
jack_nframes_t ilower = (jack_nframes_t) floor (lower);
|
||||
nframes_t next_beat_pos;
|
||||
nframes_t ilower = (nframes_t) floor (lower);
|
||||
|
||||
if ((desirable_marks = maxchars / 7) == 0) {
|
||||
return 0;
|
||||
|
|
@ -1101,7 +1101,7 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble upper
|
|||
uint32_t tick = 0;
|
||||
uint32_t skip;
|
||||
uint32_t t;
|
||||
jack_nframes_t frame_skip;
|
||||
nframes_t frame_skip;
|
||||
double frame_skip_error;
|
||||
double accumulated_error;
|
||||
double position_of_helper;
|
||||
|
|
@ -1172,7 +1172,7 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble upper
|
|||
|
||||
next_beat_pos = session->tempo_map().frame_time(next_beat);
|
||||
|
||||
frame_skip = (jack_nframes_t) floor (frame_skip_error = (session->frame_rate() * 60) / (bbt_beat_subdivision * (*i).tempo->beats_per_minute()));
|
||||
frame_skip = (nframes_t) floor (frame_skip_error = (session->frame_rate() * 60) / (bbt_beat_subdivision * (*i).tempo->beats_per_minute()));
|
||||
frame_skip_error -= frame_skip;
|
||||
skip = (uint32_t) (Meter::ticks_per_beat / bbt_beat_subdivision);
|
||||
|
||||
|
|
@ -1198,7 +1198,7 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble upper
|
|||
|
||||
(*marks)[n].label = g_strdup (buf);
|
||||
|
||||
/* Error compensation for float to jack_nframes_t*/
|
||||
/* Error compensation for float to nframes_t*/
|
||||
accumulated_error += frame_skip_error;
|
||||
if (accumulated_error > 1) {
|
||||
pos += 1;
|
||||
|
|
@ -1326,10 +1326,10 @@ Editor::metric_get_bbt (GtkCustomRulerMark **marks, gdouble lower, gdouble upper
|
|||
gint
|
||||
Editor::metric_get_frames (GtkCustomRulerMark **marks, gdouble lower, gdouble upper, gint maxchars)
|
||||
{
|
||||
jack_nframes_t mark_interval;
|
||||
jack_nframes_t pos;
|
||||
jack_nframes_t ilower = (jack_nframes_t) floor (lower);
|
||||
jack_nframes_t iupper = (jack_nframes_t) floor (upper);
|
||||
nframes_t mark_interval;
|
||||
nframes_t pos;
|
||||
nframes_t ilower = (nframes_t) floor (lower);
|
||||
nframes_t iupper = (nframes_t) floor (upper);
|
||||
gchar buf[16];
|
||||
gint nmarks;
|
||||
gint n;
|
||||
|
|
@ -1357,15 +1357,15 @@ Editor::metric_get_frames (GtkCustomRulerMark **marks, gdouble lower, gdouble up
|
|||
}
|
||||
|
||||
static void
|
||||
sample_to_clock_parts ( jack_nframes_t sample,
|
||||
jack_nframes_t sample_rate,
|
||||
sample_to_clock_parts ( nframes_t sample,
|
||||
nframes_t sample_rate,
|
||||
long *hrs_p,
|
||||
long *mins_p,
|
||||
long *secs_p,
|
||||
long *millisecs_p)
|
||||
|
||||
{
|
||||
jack_nframes_t left;
|
||||
nframes_t left;
|
||||
long hrs;
|
||||
long mins;
|
||||
long secs;
|
||||
|
|
@ -1391,11 +1391,11 @@ sample_to_clock_parts ( jack_nframes_t sample,
|
|||
gint
|
||||
Editor::metric_get_minsec (GtkCustomRulerMark **marks, gdouble lower, gdouble upper, gint maxchars)
|
||||
{
|
||||
jack_nframes_t range;
|
||||
jack_nframes_t fr;
|
||||
jack_nframes_t mark_interval;
|
||||
jack_nframes_t pos;
|
||||
jack_nframes_t spacer;
|
||||
nframes_t range;
|
||||
nframes_t fr;
|
||||
nframes_t mark_interval;
|
||||
nframes_t pos;
|
||||
nframes_t spacer;
|
||||
long hrs, mins, secs, millisecs;
|
||||
gchar buf[16];
|
||||
gint nmarks;
|
||||
|
|
@ -1404,8 +1404,8 @@ Editor::metric_get_minsec (GtkCustomRulerMark **marks, gdouble lower, gdouble up
|
|||
bool show_seconds = false;
|
||||
bool show_minutes = false;
|
||||
bool show_hours = false;
|
||||
jack_nframes_t ilower = (jack_nframes_t) floor (lower);
|
||||
jack_nframes_t iupper = (jack_nframes_t) floor (upper);
|
||||
nframes_t ilower = (nframes_t) floor (lower);
|
||||
nframes_t iupper = (nframes_t) floor (upper);
|
||||
|
||||
if (session == 0) {
|
||||
return 0;
|
||||
|
|
@ -1414,7 +1414,7 @@ Editor::metric_get_minsec (GtkCustomRulerMark **marks, gdouble lower, gdouble up
|
|||
fr = session->frame_rate();
|
||||
|
||||
/* to prevent 'flashing' */
|
||||
if (lower > (spacer = (jack_nframes_t)(128 * Editor::get_current_zoom ()))) {
|
||||
if (lower > (spacer = (nframes_t)(128 * Editor::get_current_zoom ()))) {
|
||||
lower = lower - spacer;
|
||||
} else {
|
||||
lower = 0;
|
||||
|
|
@ -1486,7 +1486,7 @@ Editor::metric_get_minsec (GtkCustomRulerMark **marks, gdouble lower, gdouble up
|
|||
mark_modulo = 2;
|
||||
} else {
|
||||
|
||||
/* not possible if jack_nframes_t is a 32 bit quantity */
|
||||
/* not possible if nframes_t is a 32 bit quantity */
|
||||
|
||||
mark_interval = 4 * 60 * 60 * fr; /* show 4 hrs */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ Editor::draw_measures ()
|
|||
}
|
||||
|
||||
void
|
||||
Editor::mouse_add_new_tempo_event (jack_nframes_t frame)
|
||||
Editor::mouse_add_new_tempo_event (nframes_t frame)
|
||||
{
|
||||
if (session == 0) {
|
||||
return;
|
||||
|
|
@ -302,7 +302,7 @@ Editor::mouse_add_new_tempo_event (jack_nframes_t frame)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::mouse_add_new_meter_event (jack_nframes_t frame)
|
||||
Editor::mouse_add_new_meter_event (nframes_t frame)
|
||||
{
|
||||
if (session == 0) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -581,7 +581,7 @@ ExportDialog::save_state()
|
|||
}
|
||||
|
||||
void
|
||||
ExportDialog::set_range (jack_nframes_t start, jack_nframes_t end)
|
||||
ExportDialog::set_range (nframes_t start, nframes_t end)
|
||||
{
|
||||
spec.start_frame = start;
|
||||
spec.end_frame = end;
|
||||
|
|
@ -595,7 +595,7 @@ ExportDialog::progress_timeout ()
|
|||
}
|
||||
|
||||
void
|
||||
frames_to_cd_frames_string (char* buf, jack_nframes_t when, jack_nframes_t fr)
|
||||
frames_to_cd_frames_string (char* buf, nframes_t when, nframes_t fr)
|
||||
{
|
||||
|
||||
long unsigned int remainder;
|
||||
|
|
@ -1022,7 +1022,7 @@ void
|
|||
ExportDialog::sample_rate_chosen ()
|
||||
{
|
||||
string sr_str = sample_rate_combo.get_active_text();
|
||||
jack_nframes_t rate;
|
||||
nframes_t rate;
|
||||
|
||||
if (sr_str == N_("22.05kHz")) {
|
||||
rate = 22050;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class ExportDialog : public ArdourDialog
|
|||
~ExportDialog ();
|
||||
|
||||
void connect_to_session (ARDOUR::Session*);
|
||||
virtual void set_range (jack_nframes_t start, jack_nframes_t end);
|
||||
virtual void set_range (nframes_t start, nframes_t end);
|
||||
void start_export ();
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ ExportRangeMarkersDialog::init_progress_computing(Locations::LocationList& locat
|
|||
// flush vector
|
||||
range_markers_durations_aggregated.resize(0);
|
||||
|
||||
jack_nframes_t duration_before_current_location = 0;
|
||||
nframes_t duration_before_current_location = 0;
|
||||
Locations::LocationList::iterator locationIter;
|
||||
|
||||
for (locationIter = locations.begin(); locationIter != locations.end(); ++locationIter) {
|
||||
|
|
@ -176,7 +176,7 @@ ExportRangeMarkersDialog::init_progress_computing(Locations::LocationList& locat
|
|||
range_markers_durations_aggregated.push_back(
|
||||
duration_before_current_location);
|
||||
|
||||
jack_nframes_t duration =
|
||||
nframes_t duration =
|
||||
currentLocation->end() - currentLocation->start();
|
||||
|
||||
range_markers_durations.push_back(duration);
|
||||
|
|
|
|||
|
|
@ -37,10 +37,10 @@ class ExportRangeMarkersDialog : public ExportDialog
|
|||
|
||||
private:
|
||||
// keeps the duration of all range_markers before the current
|
||||
vector<jack_nframes_t> range_markers_durations_aggregated;
|
||||
vector<jack_nframes_t> range_markers_durations;
|
||||
vector<nframes_t> range_markers_durations_aggregated;
|
||||
vector<nframes_t> range_markers_durations;
|
||||
// duration of all range markers
|
||||
jack_nframes_t total_duration;
|
||||
nframes_t total_duration;
|
||||
// index of range marker, that get's exported right now
|
||||
unsigned int current_range_marker_index;
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ ExportSessionDialog::export_audio_data ()
|
|||
|
||||
|
||||
void
|
||||
ExportSessionDialog::set_range (jack_nframes_t start, jack_nframes_t end)
|
||||
ExportSessionDialog::set_range (nframes_t start, nframes_t end)
|
||||
{
|
||||
ExportDialog::set_range (start, end);
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class ExportSessionDialog : public ExportDialog
|
|||
{
|
||||
public:
|
||||
ExportSessionDialog (PublicEditor&);
|
||||
void set_range (jack_nframes_t start, jack_nframes_t end);
|
||||
void set_range (nframes_t start, nframes_t end);
|
||||
|
||||
protected:
|
||||
void export_audio_data();
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ GainAutomationTimeAxisView::~GainAutomationTimeAxisView ()
|
|||
}
|
||||
|
||||
void
|
||||
GainAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, jack_nframes_t when, double y)
|
||||
GainAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, nframes_t when, double y)
|
||||
{
|
||||
double x = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class GainAutomationTimeAxisView : public AutomationTimeAxisView
|
|||
|
||||
~GainAutomationTimeAxisView();
|
||||
|
||||
void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, jack_nframes_t, double);
|
||||
void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, nframes_t, double);
|
||||
|
||||
private:
|
||||
ARDOUR::Curve& curve;
|
||||
|
|
|
|||
|
|
@ -538,7 +538,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(jack_nframes_t pos, void* src, ImageFrameView* item)
|
||||
ImageFrameSocketHandler::send_imageframe_view_position_change(nframes_t pos, void* src, ImageFrameView* item)
|
||||
{
|
||||
// ENSURE_GUI_THREAD(bind (mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_view_position_change), pos, src, item));
|
||||
|
||||
|
|
@ -574,7 +574,7 @@ ImageFrameSocketHandler::send_imageframe_view_position_change(jack_nframes_t pos
|
|||
* @param item the item which has had a duration change
|
||||
*/
|
||||
void
|
||||
ImageFrameSocketHandler::send_imageframe_view_duration_change(jack_nframes_t dur, void* src, ImageFrameView* item)
|
||||
ImageFrameSocketHandler::send_imageframe_view_duration_change(nframes_t dur, void* src, ImageFrameView* item)
|
||||
{
|
||||
// ENSURE_GUI_THREAD(bind (mem_fun(*this, &ImageFrameSocketHandler::send_imageframe_view_duration_change), dur, src, item));
|
||||
|
||||
|
|
@ -688,7 +688,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(jack_nframes_t pos, void* src, MarkerView* item)
|
||||
ImageFrameSocketHandler::send_marker_view_position_change(nframes_t pos, void* src, MarkerView* item)
|
||||
{
|
||||
if(this == src || src == 0)
|
||||
{
|
||||
|
|
@ -722,7 +722,7 @@ ImageFrameSocketHandler::send_marker_view_position_change(jack_nframes_t pos, vo
|
|||
* @param item the time axis item whos position has changed
|
||||
*/
|
||||
void
|
||||
ImageFrameSocketHandler::send_marker_view_duration_change(jack_nframes_t dur, void* src, MarkerView* item)
|
||||
ImageFrameSocketHandler::send_marker_view_duration_change(nframes_t dur, void* src, MarkerView* item)
|
||||
{
|
||||
if(this == src || src == 0)
|
||||
{
|
||||
|
|
@ -1337,11 +1337,11 @@ ImageFrameSocketHandler::handle_insert_imageframe_view(const char* msg)
|
|||
position += image_id_size ;
|
||||
|
||||
// get the start frame value
|
||||
jack_nframes_t start = strtoul((get_message_part(position,10,msg).c_str()),0,10) ;
|
||||
nframes_t start = strtoul((get_message_part(position,10,msg).c_str()),0,10) ;
|
||||
position += 10 ;
|
||||
|
||||
// get the duration value
|
||||
jack_nframes_t duration = strtoul((get_message_part(position,10,msg).c_str()),0,10) ;
|
||||
nframes_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
|
||||
|
|
@ -1673,7 +1673,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) ;
|
||||
|
||||
jack_nframes_t start_frame = strtoul(get_message_part(position, ardourvis::TIME_VALUE_CHARS, msg).c_str(), 0, 10) ;
|
||||
nframes_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
|
||||
|
|
@ -1725,7 +1725,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) ;
|
||||
|
||||
jack_nframes_t duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
|
||||
nframes_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
|
||||
|
|
@ -1828,7 +1828,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) ;
|
||||
|
||||
jack_nframes_t max_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
|
||||
nframes_t max_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
|
||||
position += ardourvis::TIME_VALUE_CHARS ;
|
||||
|
||||
int errcode ;
|
||||
|
|
@ -1916,7 +1916,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) ;
|
||||
|
||||
jack_nframes_t min_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
|
||||
nframes_t min_duration = strtoul(get_message_part(position,ardourvis::TIME_VALUE_CHARS,msg).c_str(),0,10) ;
|
||||
position += ardourvis::TIME_VALUE_CHARS ;
|
||||
|
||||
int errcode ;
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ class ImageFrameSocketHandler : public sigc::trackable
|
|||
* @param src the identity of the object that initiated the change
|
||||
* @param item the time axis item whos position has changed
|
||||
*/
|
||||
void send_imageframe_view_position_change(jack_nframes_t pos, void* src, ImageFrameView* item) ;
|
||||
void send_imageframe_view_position_change(nframes_t pos, void* src, ImageFrameView* item) ;
|
||||
|
||||
/**
|
||||
* Send a Image Frame View item duration changed message
|
||||
|
|
@ -204,7 +204,7 @@ class ImageFrameSocketHandler : public sigc::trackable
|
|||
* @param src the identity of the object that initiated the change
|
||||
* @param item the item which has had a duration change
|
||||
*/
|
||||
void send_imageframe_view_duration_change(jack_nframes_t dur, void* src, ImageFrameView* item) ;
|
||||
void send_imageframe_view_duration_change(nframes_t dur, void* src, ImageFrameView* item) ;
|
||||
|
||||
/**
|
||||
* Send a message indicating that an ImageFrameView has been renamed
|
||||
|
|
@ -234,7 +234,7 @@ class ImageFrameSocketHandler : public sigc::trackable
|
|||
* @param src the identity of the object that initiated the change
|
||||
* @param item the time axis item whos position has changed
|
||||
*/
|
||||
void send_marker_view_position_change(jack_nframes_t pos, void* src, MarkerView* item) ;
|
||||
void send_marker_view_position_change(nframes_t pos, void* src, MarkerView* item) ;
|
||||
|
||||
/**
|
||||
* Send a Marker View item duration changed message
|
||||
|
|
@ -243,7 +243,7 @@ class ImageFrameSocketHandler : public sigc::trackable
|
|||
* @param src the identity of the object that initiated the change
|
||||
* @param item the time axis item whos position has changed
|
||||
*/
|
||||
void send_marker_view_duration_change(jack_nframes_t dur, void* src, MarkerView* item) ;
|
||||
void send_marker_view_duration_change(nframes_t dur, void* src, MarkerView* item) ;
|
||||
|
||||
/**
|
||||
* Send a message indicating that a MarkerView has been renamed
|
||||
|
|
|
|||
|
|
@ -195,7 +195,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, jack_nframes_t start, jack_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, nframes_t start, nframes_t duration, unsigned char* rgb_data, uint32_t width, uint32_t height, uint32_t num_channels, void* src)
|
||||
{
|
||||
ImageFrameView* ifv = 0 ;
|
||||
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ class ImageFrameTimeAxisGroup : public sigc::trackable
|
|||
* @param num_channels the number of channles within the rgb_data
|
||||
* @param src the identity of the object that initiated the change
|
||||
*/
|
||||
ImageFrameView* add_imageframe_item(const string & item_id, jack_nframes_t start, jack_nframes_t duration, unsigned char* rgb_data, uint32_t width, uint32_t height, uint32_t num_channels, void* src) ;
|
||||
ImageFrameView* add_imageframe_item(const string & item_id, nframes_t start, nframes_t duration, unsigned char* rgb_data, uint32_t width, uint32_t height, uint32_t num_channels, void* src) ;
|
||||
|
||||
/**
|
||||
* Returns the named ImageFrameView or 0 if the named view does not exist on this view helper
|
||||
|
|
|
|||
|
|
@ -410,7 +410,7 @@ ImageFrameTimeAxisView::set_imageframe_duration_sec(double sec)
|
|||
{
|
||||
if(selected_imageframe_group && selected_imageframe_view)
|
||||
{
|
||||
selected_imageframe_view->set_duration((jack_nframes_t) (sec * _trackview.editor.current_session()->frame_rate()), this) ;
|
||||
selected_imageframe_view->set_duration((nframes_t) (sec * _trackview.editor.current_session()->frame_rate()), this) ;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,8 +62,8 @@ ImageFrameView::ImageFrameView(const string & item_id,
|
|||
ImageFrameTimeAxisGroup* item_group,
|
||||
double spu,
|
||||
Gdk::Color& basic_color,
|
||||
jack_nframes_t start,
|
||||
jack_nframes_t duration,
|
||||
nframes_t start,
|
||||
nframes_t duration,
|
||||
unsigned char* rgb_data,
|
||||
uint32_t width,
|
||||
uint32_t height,
|
||||
|
|
@ -172,9 +172,9 @@ delete imageframe;
|
|||
* @return true if the position change was a success, false otherwise
|
||||
*/
|
||||
bool
|
||||
ImageFrameView::set_position(jack_nframes_t pos, void* src, double* delta)
|
||||
ImageFrameView::set_position(nframes_t pos, void* src, double* delta)
|
||||
{
|
||||
jack_nframes_t old_pos = frame_position ;
|
||||
nframes_t old_pos = frame_position ;
|
||||
|
||||
// do the standard stuff
|
||||
bool ret = TimeAxisViewItem::set_position(pos, src, delta) ;
|
||||
|
|
@ -186,7 +186,7 @@ ImageFrameView::set_position(jack_nframes_t pos, void* src, double* delta)
|
|||
{
|
||||
// calculate the offset of the marker
|
||||
MarkerView* mv = (MarkerView*)*i ;
|
||||
jack_nframes_t marker_old_pos = mv->get_position() ;
|
||||
nframes_t marker_old_pos = mv->get_position() ;
|
||||
|
||||
mv->set_position(pos + (marker_old_pos - old_pos), src) ;
|
||||
}
|
||||
|
|
@ -203,7 +203,7 @@ ImageFrameView::set_position(jack_nframes_t pos, void* src, double* delta)
|
|||
* @return true if the duration change was succesful, false otherwise
|
||||
*/
|
||||
bool
|
||||
ImageFrameView::set_duration(jack_nframes_t dur, void* src)
|
||||
ImageFrameView::set_duration(nframes_t dur, void* src)
|
||||
{
|
||||
/* do the standard stuff */
|
||||
bool ret = TimeAxisViewItem::set_duration(dur, src) ;
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@ class ImageFrameView : public TimeAxisViewItem
|
|||
ImageFrameTimeAxisGroup* group,
|
||||
double spu,
|
||||
Gdk::Color& base_color,
|
||||
jack_nframes_t start,
|
||||
jack_nframes_t duration,
|
||||
nframes_t start,
|
||||
nframes_t duration,
|
||||
unsigned char* rgb_data,
|
||||
uint32_t width,
|
||||
uint32_t height,
|
||||
|
|
@ -91,7 +91,7 @@ class ImageFrameView : public TimeAxisViewItem
|
|||
* @param src the identity of the object that initiated the change
|
||||
* @return true if the position change was a success, false otherwise
|
||||
*/
|
||||
virtual bool set_position(jack_nframes_t pos, void* src, double* delta = 0) ;
|
||||
virtual bool set_position(nframes_t pos, void* src, double* delta = 0) ;
|
||||
|
||||
/**
|
||||
* Sets the duration of this item
|
||||
|
|
@ -100,7 +100,7 @@ class ImageFrameView : public TimeAxisViewItem
|
|||
* @param src the identity of the object that initiated the change
|
||||
* @return true if the duration change was succesful, false otherwise
|
||||
*/
|
||||
virtual bool set_duration(jack_nframes_t dur, void* src) ;
|
||||
virtual bool set_duration(nframes_t dur, void* src) ;
|
||||
|
||||
//---------------------------------------------------------------------------------------//
|
||||
// Parent Component Methods
|
||||
|
|
|
|||
|
|
@ -771,7 +771,7 @@ void
|
|||
LocationUI::add_new_location()
|
||||
{
|
||||
if (session) {
|
||||
jack_nframes_t where = session->audible_frame();
|
||||
nframes_t where = session->audible_frame();
|
||||
Location *location = new Location (where, where, "mark", Location::IsMark);
|
||||
session->begin_reversible_command (_("add marker"));
|
||||
XMLNode &before = session->locations()->get_state();
|
||||
|
|
@ -787,7 +787,7 @@ void
|
|||
LocationUI::add_new_range()
|
||||
{
|
||||
if (session) {
|
||||
jack_nframes_t where = session->audible_frame();
|
||||
nframes_t where = session->audible_frame();
|
||||
Location *location = new Location (where, where, "unnamed",
|
||||
Location::IsRangeMarker);
|
||||
session->begin_reversible_command (_("add range marker"));
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, const string& annotation,
|
||||
Type type, jack_nframes_t frame, bool handle_events)
|
||||
Type type, nframes_t frame, bool handle_events)
|
||||
|
||||
: editor (ed), _type(type)
|
||||
{
|
||||
|
|
@ -289,7 +289,7 @@ Marker::set_name (const string& name)
|
|||
}
|
||||
|
||||
void
|
||||
Marker::set_position (jack_nframes_t frame)
|
||||
Marker::set_position (nframes_t frame)
|
||||
{
|
||||
double new_unit_position = editor.frame_to_unit (frame);
|
||||
new_unit_position -= shift;
|
||||
|
|
|
|||
|
|
@ -52,13 +52,13 @@ class Marker : public sigc::trackable
|
|||
|
||||
|
||||
Marker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text, Type,
|
||||
jack_nframes_t frame = 0, bool handle_events = true);
|
||||
nframes_t frame = 0, bool handle_events = true);
|
||||
|
||||
virtual ~Marker ();
|
||||
|
||||
ArdourCanvas::Item& the_item() const;
|
||||
|
||||
void set_position (jack_nframes_t);
|
||||
void set_position (nframes_t);
|
||||
void set_name (const string&);
|
||||
void set_color_rgba (uint32_t rgba);
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ class Marker : public sigc::trackable
|
|||
ArdourCanvas::Points *points;
|
||||
|
||||
double unit_position;
|
||||
jack_nframes_t frame_position;
|
||||
nframes_t frame_position;
|
||||
unsigned char shift; /* should be double, but its always small and integral */
|
||||
Type _type;
|
||||
|
||||
|
|
|
|||
|
|
@ -199,7 +199,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, jack_nframes_t start, jack_nframes_t dur, void* src)
|
||||
MarkerTimeAxisView::add_marker_view(ImageFrameView* ifv, std::string mark_type, std::string mark_id, nframes_t start, nframes_t dur, void* src)
|
||||
{
|
||||
if(ifv->has_marker_view_item(mark_id))
|
||||
{
|
||||
|
|
@ -345,7 +345,7 @@ MarkerTimeAxisView::set_marker_duration_sec(double sec)
|
|||
{
|
||||
if(get_selected_time_axis_item() != 0)
|
||||
{
|
||||
get_selected_time_axis_item()->set_duration((jack_nframes_t) (sec * _trackview.editor.current_session()->frame_rate()), this) ;
|
||||
get_selected_time_axis_item()->set_duration((nframes_t) (sec * _trackview.editor.current_session()->frame_rate()), this) ;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ class MarkerTimeAxisView : public sigc::trackable
|
|||
* @param duration the duration the new item should be placed upon the timeline
|
||||
* @param src the identity of the object that initiated the change
|
||||
*/
|
||||
MarkerView* add_marker_view(ImageFrameView* ifv, std::string mark_type, std::string mark_id, jack_nframes_t start, jack_nframes_t dur, void* src) ;
|
||||
MarkerView* add_marker_view(ImageFrameView* ifv, std::string mark_type, std::string mark_id, nframes_t start, nframes_t dur, void* src) ;
|
||||
|
||||
/**
|
||||
* Returns the named MarkerView or 0 if the named marker does not exist
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ MarkerView::MarkerView(ArdourCanvas::Group *parent,
|
|||
Gdk::Color& basic_color,
|
||||
std::string mark_type,
|
||||
std::string mark_id,
|
||||
jack_nframes_t start,
|
||||
jack_nframes_t duration)
|
||||
nframes_t start,
|
||||
nframes_t duration)
|
||||
: TimeAxisViewItem(mark_id, *parent,*tv,spu,basic_color,start,duration)
|
||||
{
|
||||
mark_type_text = mark_type ;
|
||||
|
|
|
|||
|
|
@ -65,8 +65,8 @@ class MarkerView : public TimeAxisViewItem
|
|||
Gdk::Color& base_color,
|
||||
std::string mark_type,
|
||||
std::string mark_id,
|
||||
jack_nframes_t start,
|
||||
jack_nframes_t duration) ;
|
||||
nframes_t start,
|
||||
nframes_t duration) ;
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@ MeterBridgeStrip::MeterBridgeStrip (AudioEngine &eng,
|
|||
Session& s,
|
||||
Route& r,
|
||||
string name,
|
||||
jack_nframes_t long_over,
|
||||
jack_nframes_t short_over,
|
||||
jack_nframes_t meter_hold)
|
||||
nframes_t long_over,
|
||||
nframes_t short_over,
|
||||
nframes_t meter_hold)
|
||||
: engine (eng),
|
||||
session (s),
|
||||
_route (r),
|
||||
|
|
|
|||
|
|
@ -50,9 +50,9 @@ class MeterBridgeStrip : public sigc::trackable
|
|||
ARDOUR::Session&,
|
||||
ARDOUR::Route&,
|
||||
string label,
|
||||
jack_nframes_t long_over,
|
||||
jack_nframes_t short_over,
|
||||
jack_nframes_t meter_hold);
|
||||
nframes_t long_over,
|
||||
nframes_t short_over,
|
||||
nframes_t meter_hold);
|
||||
|
||||
void update (); /* called by meter timeout handler from ARDOUR_UI */
|
||||
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ OptionEditor::short_xfade_adjustment_changed ()
|
|||
|
||||
/* val is in msecs */
|
||||
|
||||
Crossfade::set_short_xfade_length ((jack_nframes_t) floor (session->frame_rate() * (val / 1000.0)));
|
||||
Crossfade::set_short_xfade_length ((nframes_t) floor (session->frame_rate() * (val / 1000.0)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -366,7 +366,7 @@ void
|
|||
OptionEditor::smpte_offset_chosen()
|
||||
{
|
||||
if (session) {
|
||||
jack_nframes_t frames = smpte_offset_clock.current_duration();
|
||||
nframes_t frames = smpte_offset_clock.current_duration();
|
||||
session->set_smpte_offset (frames);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ PanAutomationTimeAxisView::~PanAutomationTimeAxisView ()
|
|||
}
|
||||
|
||||
void
|
||||
PanAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, jack_nframes_t when, double y)
|
||||
PanAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, nframes_t when, double y)
|
||||
{
|
||||
if (lines.empty()) {
|
||||
/* no data, possibly caused by no outputs/inputs */
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class PanAutomationTimeAxisView : public AutomationTimeAxisView
|
|||
|
||||
~PanAutomationTimeAxisView();
|
||||
|
||||
void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, jack_nframes_t, double);
|
||||
void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, nframes_t, double);
|
||||
|
||||
void clear_lines ();
|
||||
void add_line (AutomationLine&);
|
||||
|
|
|
|||
|
|
@ -86,11 +86,11 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
|
|||
virtual void separate_region_from_selection () = 0;
|
||||
virtual void toggle_playback (bool with_abort) = 0;
|
||||
virtual void set_edit_menu (Gtk::Menu&) = 0;
|
||||
virtual jack_nframes_t unit_to_frame (double unit) = 0;
|
||||
virtual double frame_to_unit (jack_nframes_t frame) = 0;
|
||||
virtual nframes_t unit_to_frame (double unit) = 0;
|
||||
virtual double frame_to_unit (nframes_t frame) = 0;
|
||||
virtual double frame_to_unit (double frame) = 0;
|
||||
virtual jack_nframes_t pixel_to_frame (double pixel) = 0;
|
||||
virtual gulong frame_to_pixel (jack_nframes_t frame) = 0;
|
||||
virtual nframes_t pixel_to_frame (double pixel) = 0;
|
||||
virtual gulong frame_to_pixel (nframes_t frame) = 0;
|
||||
virtual Selection& get_selection() const = 0;
|
||||
virtual Selection& get_cut_buffer() const = 0;
|
||||
virtual void play_selection () = 0;
|
||||
|
|
@ -118,14 +118,14 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
|
|||
virtual void ensure_float (Gtk::Window&) = 0;
|
||||
virtual void show_window () = 0;
|
||||
virtual TrackViewList* get_valid_views (TimeAxisView*, ARDOUR::RouteGroup* grp = 0) = 0;
|
||||
virtual jack_nframes_t leftmost_position() const = 0;
|
||||
virtual jack_nframes_t current_page_frames() const = 0;
|
||||
virtual nframes_t leftmost_position() const = 0;
|
||||
virtual nframes_t current_page_frames() const = 0;
|
||||
virtual void temporal_zoom_step (bool coarser) = 0;
|
||||
virtual void scroll_tracks_down_line () = 0;
|
||||
virtual void scroll_tracks_up_line () = 0;
|
||||
virtual bool new_regionviews_display_gain () = 0;
|
||||
virtual void prepare_for_cleanup () = 0;
|
||||
virtual void reposition_x_origin (jack_nframes_t frame) = 0;
|
||||
virtual void reposition_x_origin (nframes_t frame) = 0;
|
||||
virtual void remove_last_capture () = 0;
|
||||
virtual void maximise_editing_space() = 0;
|
||||
virtual void restore_editing_space() = 0;
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ RedirectAutomationTimeAxisView::~RedirectAutomationTimeAxisView ()
|
|||
}
|
||||
|
||||
void
|
||||
RedirectAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, jack_nframes_t when, double y)
|
||||
RedirectAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, nframes_t when, double y)
|
||||
{
|
||||
double x = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class RedirectAutomationTimeAxisView : public AutomationTimeAxisView
|
|||
|
||||
~RedirectAutomationTimeAxisView();
|
||||
|
||||
void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, jack_nframes_t, double);
|
||||
void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, nframes_t, double);
|
||||
|
||||
guint32 show_at (double y, int& nth, Gtk::VBox *parent);
|
||||
void hide ();
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ RegionSelection::remove (RegionView* rv)
|
|||
|
||||
/* reset current start */
|
||||
|
||||
jack_nframes_t ref = max_frames;
|
||||
nframes_t ref = max_frames;
|
||||
|
||||
for (i = begin (); i != end(); ++i) {
|
||||
if (region->first_frame() < ref) {
|
||||
|
|
@ -164,7 +164,7 @@ RegionSelection::remove (RegionView* rv)
|
|||
|
||||
/* reset current end */
|
||||
|
||||
jack_nframes_t ref = 0;
|
||||
nframes_t ref = 0;
|
||||
|
||||
for (i = begin (); i != end(); ++i) {
|
||||
if (region->first_frame() > ref) {
|
||||
|
|
|
|||
|
|
@ -47,13 +47,13 @@ class RegionSelection : public set<RegionView*, RegionComparator>, public sigc::
|
|||
|
||||
void clear_all();
|
||||
|
||||
jack_nframes_t start () const {
|
||||
nframes_t start () const {
|
||||
return _current_start;
|
||||
}
|
||||
|
||||
/* collides with list<>::end */
|
||||
|
||||
jack_nframes_t end_frame () const {
|
||||
nframes_t end_frame () const {
|
||||
return _current_end;
|
||||
}
|
||||
|
||||
|
|
@ -65,8 +65,8 @@ class RegionSelection : public set<RegionView*, RegionComparator>, public sigc::
|
|||
|
||||
void add_to_layer (RegionView *);
|
||||
|
||||
jack_nframes_t _current_start;
|
||||
jack_nframes_t _current_end;
|
||||
nframes_t _current_start;
|
||||
nframes_t _current_end;
|
||||
|
||||
list<RegionView *> _bylayer;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -299,7 +299,7 @@ RegionView::lower_to_bottom ()
|
|||
}
|
||||
|
||||
bool
|
||||
RegionView::set_position (jack_nframes_t pos, void* src, double* ignored)
|
||||
RegionView::set_position (nframes_t pos, void* src, double* ignored)
|
||||
{
|
||||
double delta;
|
||||
bool ret;
|
||||
|
|
@ -335,7 +335,7 @@ RegionView::set_samples_per_unit (gdouble spu)
|
|||
}
|
||||
|
||||
bool
|
||||
RegionView::set_duration (jack_nframes_t frames, void *src)
|
||||
RegionView::set_duration (nframes_t frames, void *src)
|
||||
{
|
||||
if (!TimeAxisViewItem::set_duration (frames, src)) {
|
||||
return false;
|
||||
|
|
@ -417,7 +417,7 @@ RegionView::region_sync_changed ()
|
|||
}
|
||||
|
||||
int sync_dir;
|
||||
jack_nframes_t sync_offset;
|
||||
nframes_t sync_offset;
|
||||
|
||||
sync_offset = _region->sync_offset (sync_dir);
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class RegionView : public TimeAxisViewItem
|
|||
|
||||
virtual void set_height (double) = 0;
|
||||
virtual void set_samples_per_unit (double);
|
||||
virtual bool set_duration (jack_nframes_t, void*);
|
||||
virtual bool set_duration (nframes_t, void*);
|
||||
|
||||
void move (double xdelta, double ydelta);
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ class RegionView : public TimeAxisViewItem
|
|||
void lower ();
|
||||
void lower_to_bottom ();
|
||||
|
||||
bool set_position(jack_nframes_t pos, void* src, double* delta = 0);
|
||||
bool set_position(nframes_t pos, void* src, double* delta = 0);
|
||||
|
||||
virtual void show_region_editor () = 0;
|
||||
virtual void hide_region_editor();
|
||||
|
|
|
|||
|
|
@ -469,7 +469,7 @@ RouteTimeAxisView::build_display_menu ()
|
|||
|
||||
|
||||
void
|
||||
RouteTimeAxisView::show_timestretch (jack_nframes_t start, jack_nframes_t end)
|
||||
RouteTimeAxisView::show_timestretch (nframes_t start, nframes_t end)
|
||||
{
|
||||
double x1;
|
||||
double x2;
|
||||
|
|
@ -902,7 +902,7 @@ RouteTimeAxisView::set_selected_regionviews (RegionSelection& regions)
|
|||
}
|
||||
|
||||
void
|
||||
RouteTimeAxisView::get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable*>& results)
|
||||
RouteTimeAxisView::get_selectables (nframes_t start, nframes_t end, double top, double bot, list<Selectable*>& results)
|
||||
{
|
||||
double speed = 1.0;
|
||||
|
||||
|
|
@ -910,8 +910,8 @@ RouteTimeAxisView::get_selectables (jack_nframes_t start, jack_nframes_t end, do
|
|||
speed = get_diskstream()->speed();
|
||||
}
|
||||
|
||||
jack_nframes_t start_adjusted = session_frame_to_track_frame(start, speed);
|
||||
jack_nframes_t end_adjusted = session_frame_to_track_frame(end, speed);
|
||||
nframes_t start_adjusted = session_frame_to_track_frame(start, speed);
|
||||
nframes_t 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, results);
|
||||
|
|
@ -1005,7 +1005,7 @@ RouteTimeAxisView::hide_click ()
|
|||
}
|
||||
|
||||
boost::shared_ptr<Region>
|
||||
RouteTimeAxisView::find_next_region (jack_nframes_t pos, RegionPoint point, int32_t dir)
|
||||
RouteTimeAxisView::find_next_region (nframes_t pos, RegionPoint point, int32_t dir)
|
||||
{
|
||||
boost::shared_ptr<Diskstream> stream;
|
||||
Playlist *playlist;
|
||||
|
|
@ -1070,7 +1070,7 @@ RouteTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
|
|||
}
|
||||
|
||||
bool
|
||||
RouteTimeAxisView::paste (jack_nframes_t pos, float times, Selection& selection, size_t nth)
|
||||
RouteTimeAxisView::paste (nframes_t pos, float times, Selection& selection, size_t nth)
|
||||
{
|
||||
if (!is_track()) {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -73,19 +73,19 @@ public:
|
|||
|
||||
void set_samples_per_unit (double);
|
||||
void set_height (TimeAxisView::TrackHeight);
|
||||
void show_timestretch (jack_nframes_t start, jack_nframes_t end);
|
||||
void show_timestretch (nframes_t start, nframes_t end);
|
||||
void hide_timestretch ();
|
||||
void selection_click (GdkEventButton*);
|
||||
void set_selected_points (PointSelection&);
|
||||
void set_selected_regionviews (RegionSelection&);
|
||||
void get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable *>&);
|
||||
void get_selectables (nframes_t start, nframes_t end, double top, double bot, list<Selectable *>&);
|
||||
void get_inverted_selectables (Selection&, list<Selectable*>&);
|
||||
|
||||
boost::shared_ptr<ARDOUR::Region> find_next_region (jack_nframes_t pos, ARDOUR::RegionPoint, int32_t dir);
|
||||
boost::shared_ptr<ARDOUR::Region> find_next_region (nframes_t pos, ARDOUR::RegionPoint, int32_t dir);
|
||||
|
||||
/* Editing operations */
|
||||
bool cut_copy_clear (Selection&, Editing::CutCopyOp);
|
||||
bool paste (jack_nframes_t, float times, Selection&, size_t nth);
|
||||
bool paste (nframes_t, float times, Selection&, size_t nth);
|
||||
|
||||
list<TimeAxisView*> get_child_list();
|
||||
|
||||
|
|
@ -203,7 +203,7 @@ protected:
|
|||
virtual void show_existing_automation ();
|
||||
virtual void hide_all_automation ();
|
||||
|
||||
void timestretch (jack_nframes_t start, jack_nframes_t end);
|
||||
void timestretch (nframes_t start, nframes_t end);
|
||||
|
||||
void visual_click ();
|
||||
void hide_click ();
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ Selection::toggle (vector<RegionView*>& r)
|
|||
}
|
||||
|
||||
long
|
||||
Selection::toggle (jack_nframes_t start, jack_nframes_t end)
|
||||
Selection::toggle (nframes_t start, nframes_t end)
|
||||
{
|
||||
AudioRangeComparator cmp;
|
||||
|
||||
|
|
@ -344,7 +344,7 @@ Selection::add (vector<RegionView*>& v)
|
|||
}
|
||||
|
||||
long
|
||||
Selection::add (jack_nframes_t start, jack_nframes_t end)
|
||||
Selection::add (nframes_t start, nframes_t end)
|
||||
{
|
||||
AudioRangeComparator cmp;
|
||||
|
||||
|
|
@ -360,7 +360,7 @@ Selection::add (jack_nframes_t start, jack_nframes_t end)
|
|||
}
|
||||
|
||||
void
|
||||
Selection::replace (uint32_t sid, jack_nframes_t start, jack_nframes_t end)
|
||||
Selection::replace (uint32_t sid, nframes_t start, nframes_t end)
|
||||
{
|
||||
for (list<AudioRange>::iterator i = time.begin(); i != time.end(); ++i) {
|
||||
if ((*i).id == sid) {
|
||||
|
|
@ -484,7 +484,7 @@ Selection::remove (uint32_t selection_id)
|
|||
}
|
||||
|
||||
void
|
||||
Selection::remove (jack_nframes_t start, jack_nframes_t end)
|
||||
Selection::remove (nframes_t start, nframes_t end)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -550,7 +550,7 @@ Selection::set (vector<RegionView*>& v)
|
|||
}
|
||||
|
||||
long
|
||||
Selection::set (TimeAxisView* track, jack_nframes_t start, jack_nframes_t end)
|
||||
Selection::set (TimeAxisView* track, nframes_t start, nframes_t end)
|
||||
{
|
||||
if ((start == 0 && end == 0) || end < start) {
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ class Selection : public sigc::trackable
|
|||
void set (const list<TimeAxisView*>&);
|
||||
void set (RegionView*);
|
||||
void set (std::vector<RegionView*>&);
|
||||
long set (TimeAxisView*, jack_nframes_t, jack_nframes_t);
|
||||
long set (TimeAxisView*, nframes_t, nframes_t);
|
||||
void set (ARDOUR::AutomationList*);
|
||||
void set (ARDOUR::Playlist*);
|
||||
void set (const list<ARDOUR::Playlist*>&);
|
||||
|
|
@ -109,7 +109,7 @@ class Selection : public sigc::trackable
|
|||
void toggle (const list<TimeAxisView*>&);
|
||||
void toggle (RegionView*);
|
||||
void toggle (std::vector<RegionView*>&);
|
||||
long toggle (jack_nframes_t, jack_nframes_t);
|
||||
long toggle (nframes_t, nframes_t);
|
||||
void toggle (ARDOUR::AutomationList*);
|
||||
void toggle (ARDOUR::Playlist*);
|
||||
void toggle (const list<ARDOUR::Playlist*>&);
|
||||
|
|
@ -119,7 +119,7 @@ class Selection : public sigc::trackable
|
|||
void add (const list<TimeAxisView*>&);
|
||||
void add (RegionView*);
|
||||
void add (std::vector<RegionView*>&);
|
||||
long add (jack_nframes_t, jack_nframes_t);
|
||||
long add (nframes_t, nframes_t);
|
||||
void add (ARDOUR::AutomationList*);
|
||||
void add (ARDOUR::Playlist*);
|
||||
void add (const list<ARDOUR::Playlist*>&);
|
||||
|
|
@ -129,13 +129,13 @@ class Selection : public sigc::trackable
|
|||
void remove (const list<TimeAxisView*>&);
|
||||
void remove (RegionView*);
|
||||
void remove (uint32_t selection_id);
|
||||
void remove (jack_nframes_t, jack_nframes_t);
|
||||
void remove (nframes_t, nframes_t);
|
||||
void remove (ARDOUR::AutomationList*);
|
||||
void remove (ARDOUR::Playlist*);
|
||||
void remove (const list<ARDOUR::Playlist*>&);
|
||||
void remove (boost::shared_ptr<ARDOUR::Redirect>);
|
||||
|
||||
void replace (uint32_t time_index, jack_nframes_t start, jack_nframes_t end);
|
||||
void replace (uint32_t time_index, nframes_t start, nframes_t end);
|
||||
|
||||
void clear_regions();
|
||||
void clear_tracks ();
|
||||
|
|
|
|||
|
|
@ -333,7 +333,7 @@ StreamView::update_rec_box ()
|
|||
if (rec_active && rec_rects.size() > 0) {
|
||||
/* only update the last box */
|
||||
RecBoxInfo & rect = rec_rects.back();
|
||||
jack_nframes_t at = _trackview.get_diskstream()->current_capture_end();
|
||||
nframes_t at = _trackview.get_diskstream()->current_capture_end();
|
||||
double xstart;
|
||||
double xend;
|
||||
|
||||
|
|
@ -398,7 +398,7 @@ StreamView::set_selected_regionviews (RegionSelection& regions)
|
|||
}
|
||||
|
||||
void
|
||||
StreamView::get_selectables (jack_nframes_t start, jack_nframes_t end, list<Selectable*>& results)
|
||||
StreamView::get_selectables (nframes_t start, nframes_t end, list<Selectable*>& results)
|
||||
{
|
||||
for (list<RegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
|
||||
if ((*i)->region()->coverage(start, end) != OverlapNone) {
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ namespace ARDOUR {
|
|||
|
||||
struct RecBoxInfo {
|
||||
ArdourCanvas::SimpleRect* rectangle;
|
||||
jack_nframes_t start;
|
||||
jack_nframes_t length;
|
||||
nframes_t start;
|
||||
nframes_t length;
|
||||
};
|
||||
|
||||
class PublicEditor;
|
||||
|
|
@ -87,7 +87,7 @@ public:
|
|||
void foreach_regionview (sigc::slot<void,RegionView*> slot);
|
||||
|
||||
void set_selected_regionviews (RegionSelection&);
|
||||
void get_selectables (jack_nframes_t start, jack_nframes_t end, list<Selectable* >&);
|
||||
void get_selectables (nframes_t start, nframes_t end, list<Selectable* >&);
|
||||
void get_inverted_selectables (Selection&, list<Selectable* >& results);
|
||||
|
||||
void add_region_view (boost::shared_ptr<ARDOUR::Region>);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ using namespace Gtkmm2ext;
|
|||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
TempoDialog::TempoDialog (TempoMap& map, jack_nframes_t frame, const string & action)
|
||||
TempoDialog::TempoDialog (TempoMap& map, nframes_t frame, const string & action)
|
||||
: ArdourDialog ("tempo dialog"),
|
||||
bpm_frame (_("Beats per minute")),
|
||||
ok_button (action),
|
||||
|
|
@ -194,7 +194,7 @@ TempoDialog::get_bbt_time (BBT_Time& requested)
|
|||
}
|
||||
|
||||
|
||||
MeterDialog::MeterDialog (TempoMap& map, jack_nframes_t frame, const string & action)
|
||||
MeterDialog::MeterDialog (TempoMap& map, nframes_t frame, const string & action)
|
||||
: ArdourDialog ("meter dialog"),
|
||||
note_frame (_("Meter denominator")),
|
||||
bpb_frame (_("Beats per bar")),
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ struct TempoDialog : public ArdourDialog
|
|||
Gtk::Frame when_frame;
|
||||
char buf[64];
|
||||
|
||||
TempoDialog (ARDOUR::TempoMap&, jack_nframes_t, const string & action);
|
||||
TempoDialog (ARDOUR::TempoMap&, nframes_t, const string & action);
|
||||
TempoDialog (ARDOUR::TempoSection&, const string & action);
|
||||
|
||||
double get_bpm ();
|
||||
|
|
@ -66,7 +66,7 @@ struct MeterDialog : public ArdourDialog
|
|||
Gtk::Frame when_frame;
|
||||
char buf[64];
|
||||
|
||||
MeterDialog (ARDOUR::TempoMap&, jack_nframes_t, const string & action);
|
||||
MeterDialog (ARDOUR::TempoMap&, nframes_t, const string & action);
|
||||
MeterDialog (ARDOUR::MeterSection&, const string & action);
|
||||
|
||||
double get_bpb ();
|
||||
|
|
|
|||
|
|
@ -575,7 +575,7 @@ TimeAxisView::set_samples_per_unit (double spu)
|
|||
}
|
||||
|
||||
void
|
||||
TimeAxisView::show_timestretch (jack_nframes_t start, jack_nframes_t end)
|
||||
TimeAxisView::show_timestretch (nframes_t start, nframes_t end)
|
||||
{
|
||||
for (vector<TimeAxisView*>::iterator i = children.begin(); i != children.end(); ++i) {
|
||||
(*i)->show_timestretch (start, end);
|
||||
|
|
@ -617,7 +617,7 @@ TimeAxisView::show_selection (TimeSelection& ts)
|
|||
selection_group->raise_to_top();
|
||||
|
||||
for (list<AudioRange>::iterator i = ts.begin(); i != ts.end(); ++i) {
|
||||
jack_nframes_t start, end, cnt;
|
||||
nframes_t start, end, cnt;
|
||||
|
||||
start = (*i).start;
|
||||
end = (*i).end;
|
||||
|
|
@ -795,7 +795,7 @@ TimeAxisView::remove_child (TimeAxisView* child)
|
|||
}
|
||||
|
||||
void
|
||||
TimeAxisView::get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable*>& result)
|
||||
TimeAxisView::get_selectables (nframes_t start, nframes_t end, double top, double bot, list<Selectable*>& result)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ class TimeAxisView : public virtual AxisView
|
|||
virtual void show_selection (TimeSelection&);
|
||||
virtual void hide_selection ();
|
||||
virtual void reshow_selection (TimeSelection&);
|
||||
virtual void show_timestretch (jack_nframes_t start, jack_nframes_t end);
|
||||
virtual void show_timestretch (nframes_t start, nframes_t end);
|
||||
virtual void hide_timestretch ();
|
||||
|
||||
virtual void hide_dependent_views (TimeAxisViewItem&) {}
|
||||
|
|
@ -181,18 +181,18 @@ class TimeAxisView : public virtual AxisView
|
|||
/* editing operations */
|
||||
|
||||
virtual bool cut_copy_clear (Selection&, Editing::CutCopyOp) { return false; }
|
||||
virtual bool paste (jack_nframes_t, float times, Selection&, size_t nth) { return false; }
|
||||
virtual bool paste (nframes_t, float times, Selection&, size_t nth) { return false; }
|
||||
|
||||
virtual void set_selected_regionviews (RegionSelection&) {}
|
||||
virtual void set_selected_points (PointSelection&) {}
|
||||
|
||||
virtual boost::shared_ptr<ARDOUR::Region> find_next_region (jack_nframes_t pos, ARDOUR::RegionPoint, int32_t dir) {
|
||||
virtual boost::shared_ptr<ARDOUR::Region> find_next_region (nframes_t pos, ARDOUR::RegionPoint, int32_t dir) {
|
||||
return boost::shared_ptr<ARDOUR::Region> ();
|
||||
}
|
||||
|
||||
void order_selection_trims (ArdourCanvas::Item *item, bool put_start_on_top);
|
||||
|
||||
virtual void get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable*>& results);
|
||||
virtual void get_selectables (nframes_t start, nframes_t end, double top, double bot, list<Selectable*>& results);
|
||||
virtual void get_inverted_selectables (Selection&, list<Selectable *>& results);
|
||||
|
||||
/* state/serialization management */
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ double TimeAxisViewItem::NAME_HIGHLIGHT_THRESH;
|
|||
* @param duration the duration of this item
|
||||
*/
|
||||
TimeAxisViewItem::TimeAxisViewItem(const string & it_name, ArdourCanvas::Group& parent, TimeAxisView& tv, double spu, Gdk::Color& base_color,
|
||||
jack_nframes_t start, jack_nframes_t duration,
|
||||
nframes_t start, nframes_t duration,
|
||||
Visibility vis)
|
||||
: trackview (tv)
|
||||
{
|
||||
|
|
@ -242,7 +242,7 @@ TimeAxisViewItem::~TimeAxisViewItem()
|
|||
* @return true if the position change was a success, false otherwise
|
||||
*/
|
||||
bool
|
||||
TimeAxisViewItem::set_position(jack_nframes_t pos, void* src, double* delta)
|
||||
TimeAxisViewItem::set_position(nframes_t pos, void* src, double* delta)
|
||||
{
|
||||
if (position_locked) {
|
||||
return false;
|
||||
|
|
@ -282,7 +282,7 @@ TimeAxisViewItem::set_position(jack_nframes_t pos, void* src, double* delta)
|
|||
*
|
||||
* @return the position of this item
|
||||
*/
|
||||
jack_nframes_t
|
||||
nframes_t
|
||||
TimeAxisViewItem::get_position() const
|
||||
{
|
||||
return frame_position;
|
||||
|
|
@ -296,7 +296,7 @@ TimeAxisViewItem::get_position() const
|
|||
* @return true if the duration change was succesful, false otherwise
|
||||
*/
|
||||
bool
|
||||
TimeAxisViewItem::set_duration (jack_nframes_t dur, void* src)
|
||||
TimeAxisViewItem::set_duration (nframes_t dur, void* src)
|
||||
{
|
||||
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)
|
||||
|
|
@ -322,7 +322,7 @@ TimeAxisViewItem::set_duration (jack_nframes_t dur, void* src)
|
|||
* Returns the duration of this item
|
||||
*
|
||||
*/
|
||||
jack_nframes_t
|
||||
nframes_t
|
||||
TimeAxisViewItem::get_duration() const
|
||||
{
|
||||
return (item_duration);
|
||||
|
|
@ -335,7 +335,7 @@ TimeAxisViewItem::get_duration() const
|
|||
* @param src the identity of the object that initiated the change
|
||||
*/
|
||||
void
|
||||
TimeAxisViewItem::set_max_duration(jack_nframes_t dur, void* src)
|
||||
TimeAxisViewItem::set_max_duration(nframes_t dur, void* src)
|
||||
{
|
||||
max_item_duration = dur ;
|
||||
MaxDurationChanged(max_item_duration, src) ; /* EMIT_SIGNAL */
|
||||
|
|
@ -346,7 +346,7 @@ TimeAxisViewItem::set_max_duration(jack_nframes_t dur, void* src)
|
|||
*
|
||||
* @return the maximum duration that this item may be set to
|
||||
*/
|
||||
jack_nframes_t
|
||||
nframes_t
|
||||
TimeAxisViewItem::get_max_duration() const
|
||||
{
|
||||
return (max_item_duration) ;
|
||||
|
|
@ -359,7 +359,7 @@ TimeAxisViewItem::get_max_duration() const
|
|||
* @param src the identity of the object that initiated the change
|
||||
*/
|
||||
void
|
||||
TimeAxisViewItem::set_min_duration(jack_nframes_t dur, void* src)
|
||||
TimeAxisViewItem::set_min_duration(nframes_t dur, void* src)
|
||||
{
|
||||
min_item_duration = dur ;
|
||||
MinDurationChanged(max_item_duration, src) ; /* EMIT_SIGNAL */
|
||||
|
|
@ -370,7 +370,7 @@ TimeAxisViewItem::set_min_duration(jack_nframes_t dur, void* src)
|
|||
*
|
||||
* @return the nimum duration that this item mey be set to
|
||||
*/
|
||||
jack_nframes_t
|
||||
nframes_t
|
||||
TimeAxisViewItem::get_min_duration() const
|
||||
{
|
||||
return(min_item_duration) ;
|
||||
|
|
|
|||
|
|
@ -48,14 +48,14 @@ class TimeAxisViewItem : public Selectable
|
|||
* @param src the identity of the object that initiated the change
|
||||
* @return true if the position change was a success, false otherwise
|
||||
*/
|
||||
virtual bool set_position(jack_nframes_t pos, void* src, double* delta = 0) ;
|
||||
virtual bool set_position(nframes_t pos, void* src, double* delta = 0) ;
|
||||
|
||||
/**
|
||||
* Return the position of this item upon the timeline
|
||||
*
|
||||
* @return the position of this item
|
||||
*/
|
||||
jack_nframes_t get_position() const ;
|
||||
nframes_t get_position() const ;
|
||||
|
||||
/**
|
||||
* Sets the duration of this item
|
||||
|
|
@ -64,13 +64,13 @@ class TimeAxisViewItem : public Selectable
|
|||
* @param src the identity of the object that initiated the change
|
||||
* @return true if the duration change was succesful, false otherwise
|
||||
*/
|
||||
virtual bool set_duration(jack_nframes_t dur, void* src) ;
|
||||
virtual bool set_duration(nframes_t dur, void* src) ;
|
||||
|
||||
/**
|
||||
* Returns the duration of this item
|
||||
*
|
||||
*/
|
||||
jack_nframes_t get_duration() const ;
|
||||
nframes_t get_duration() const ;
|
||||
|
||||
/**
|
||||
* Sets the maximum duration that this item make have.
|
||||
|
|
@ -78,14 +78,14 @@ class TimeAxisViewItem : public Selectable
|
|||
* @param dur the new maximum duration
|
||||
* @param src the identity of the object that initiated the change
|
||||
*/
|
||||
virtual void set_max_duration(jack_nframes_t dur, void* src) ;
|
||||
virtual void set_max_duration(nframes_t dur, void* src) ;
|
||||
|
||||
/**
|
||||
* Returns the maxmimum duration that this item may be set to
|
||||
*
|
||||
* @return the maximum duration that this item may be set to
|
||||
*/
|
||||
jack_nframes_t get_max_duration() const ;
|
||||
nframes_t get_max_duration() const ;
|
||||
|
||||
/**
|
||||
* Sets the minimu duration that this item may be set to
|
||||
|
|
@ -93,14 +93,14 @@ class TimeAxisViewItem : public Selectable
|
|||
* @param the minimum duration that this item may be set to
|
||||
* @param src the identity of the object that initiated the change
|
||||
*/
|
||||
virtual void set_min_duration(jack_nframes_t dur, void* src) ;
|
||||
virtual void set_min_duration(nframes_t dur, void* src) ;
|
||||
|
||||
/**
|
||||
* Returns the minimum duration that this item mey be set to
|
||||
*
|
||||
* @return the nimum duration that this item mey be set to
|
||||
*/
|
||||
jack_nframes_t get_min_duration() const ;
|
||||
nframes_t get_min_duration() const ;
|
||||
|
||||
/**
|
||||
* Sets whether the position of this Item is locked to its current position
|
||||
|
|
@ -295,19 +295,19 @@ class TimeAxisViewItem : public Selectable
|
|||
sigc::signal<void,std::string,std::string,void*> NameChanged ;
|
||||
|
||||
/** Emiited when the position of this item changes */
|
||||
sigc::signal<void,jack_nframes_t,void*> PositionChanged ;
|
||||
sigc::signal<void,nframes_t,void*> PositionChanged ;
|
||||
|
||||
/** Emitted when the position lock of this item is changed */
|
||||
sigc::signal<void,bool,void*> PositionLockChanged ;
|
||||
|
||||
/** Emitted when the duration of this item changes */
|
||||
sigc::signal<void,jack_nframes_t,void*> DurationChanged ;
|
||||
sigc::signal<void,nframes_t,void*> DurationChanged ;
|
||||
|
||||
/** Emitted when the maximum item duration is changed */
|
||||
sigc::signal<void,jack_nframes_t,void*> MaxDurationChanged ;
|
||||
sigc::signal<void,nframes_t,void*> MaxDurationChanged ;
|
||||
|
||||
/** Emitted when the mionimum item duration is changed */
|
||||
sigc::signal<void,jack_nframes_t,void*> MinDurationChanged ;
|
||||
sigc::signal<void,nframes_t,void*> MinDurationChanged ;
|
||||
|
||||
protected:
|
||||
|
||||
|
|
@ -334,7 +334,7 @@ class TimeAxisViewItem : public Selectable
|
|||
* @param duration the duration of this item
|
||||
*/
|
||||
TimeAxisViewItem(const std::string & it_name, ArdourCanvas::Group& parent, TimeAxisView& tv, double spu, Gdk::Color& base_color,
|
||||
jack_nframes_t start, jack_nframes_t duration, Visibility v = Visibility (0));
|
||||
nframes_t start, nframes_t duration, Visibility v = Visibility (0));
|
||||
|
||||
/**
|
||||
* Calculates some contrasting color for displaying various parts of this item, based upon the base color
|
||||
|
|
@ -379,16 +379,16 @@ class TimeAxisViewItem : public Selectable
|
|||
bool position_locked ;
|
||||
|
||||
/** The posotion of this item on the timeline */
|
||||
jack_nframes_t frame_position ;
|
||||
nframes_t frame_position ;
|
||||
|
||||
/** the duration of this item upon the timeline */
|
||||
jack_nframes_t item_duration ;
|
||||
nframes_t item_duration ;
|
||||
|
||||
/** the maximum duration that we allow this item to take */
|
||||
jack_nframes_t max_item_duration ;
|
||||
nframes_t max_item_duration ;
|
||||
|
||||
/** the minimu duration that we allow this item to take */
|
||||
jack_nframes_t min_item_duration ;
|
||||
nframes_t min_item_duration ;
|
||||
|
||||
/** indicates whether this Max Duration constraint is active */
|
||||
bool max_duration_active ;
|
||||
|
|
|
|||
|
|
@ -69,14 +69,14 @@ TimeSelection::consolidate ()
|
|||
return changed;
|
||||
}
|
||||
|
||||
jack_nframes_t
|
||||
nframes_t
|
||||
TimeSelection::start ()
|
||||
{
|
||||
if (empty()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
jack_nframes_t first = max_frames;
|
||||
nframes_t first = max_frames;
|
||||
|
||||
for (std::list<AudioRange>::iterator i = begin(); i != end(); ++i) {
|
||||
if ((*i).start < first) {
|
||||
|
|
@ -86,10 +86,10 @@ TimeSelection::start ()
|
|||
return first;
|
||||
}
|
||||
|
||||
jack_nframes_t
|
||||
nframes_t
|
||||
TimeSelection::end_frame ()
|
||||
{
|
||||
jack_nframes_t last = 0;
|
||||
nframes_t last = 0;
|
||||
|
||||
/* XXX make this work like RegionSelection: no linear search needed */
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ TimeSelection::end_frame ()
|
|||
return last;
|
||||
}
|
||||
|
||||
jack_nframes_t
|
||||
nframes_t
|
||||
TimeSelection::length()
|
||||
{
|
||||
return end_frame() - start() + 1;
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@ struct TimeSelection : public std::list<ARDOUR::AudioRange> {
|
|||
|
||||
ARDOUR::AudioRange& operator[](uint32_t);
|
||||
|
||||
jack_nframes_t start();
|
||||
jack_nframes_t end_frame();
|
||||
jack_nframes_t length();
|
||||
nframes_t start();
|
||||
nframes_t end_frame();
|
||||
nframes_t length();
|
||||
|
||||
bool consolidate ();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -420,7 +420,7 @@ VisualTimeAxis::name_entry_key_release_handler(GdkEventKey* ev)
|
|||
// Super class methods not handled by VisualTimeAxis
|
||||
|
||||
void
|
||||
VisualTimeAxis::show_timestretch (jack_nframes_t start, jack_nframes_t end)
|
||||
VisualTimeAxis::show_timestretch (nframes_t start, nframes_t end)
|
||||
{
|
||||
// Not handled by purely visual TimeAxis
|
||||
}
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ class VisualTimeAxis : public TimeAxisView
|
|||
*
|
||||
* @todo should VisualTimeAxis handle this?
|
||||
*/
|
||||
void show_timestretch (jack_nframes_t start, jack_nframes_t end);
|
||||
void show_timestretch (nframes_t start, nframes_t end);
|
||||
|
||||
/**
|
||||
* Not handle by purely visual TimeAxis
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ namespace ARDOUR {
|
|||
|
||||
extern OSC* osc;
|
||||
|
||||
static const jack_nframes_t max_frames = JACK_MAX_FRAMES;
|
||||
static const nframes_t max_frames = JACK_MAX_FRAMES;
|
||||
|
||||
int init (bool with_vst, bool try_optimization);
|
||||
int cleanup ();
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ class AudioDiskstream : public Diskstream
|
|||
}
|
||||
}
|
||||
|
||||
static void swap_by_ptr (Sample *first, Sample *last, jack_nframes_t n) {
|
||||
static void swap_by_ptr (Sample *first, Sample *last, nframes_t n) {
|
||||
while (n--) {
|
||||
Sample tmp = *first;
|
||||
*first++ = *last;
|
||||
|
|
@ -151,22 +151,22 @@ class AudioDiskstream : public Diskstream
|
|||
|
||||
void set_pending_overwrite(bool);
|
||||
int overwrite_existing_buffers ();
|
||||
void set_block_size (jack_nframes_t);
|
||||
int internal_playback_seek (jack_nframes_t distance);
|
||||
int can_internal_playback_seek (jack_nframes_t distance);
|
||||
void set_block_size (nframes_t);
|
||||
int internal_playback_seek (nframes_t distance);
|
||||
int can_internal_playback_seek (nframes_t distance);
|
||||
int rename_write_sources ();
|
||||
void reset_write_sources (bool, bool force = false);
|
||||
void non_realtime_input_change ();
|
||||
|
||||
protected:
|
||||
friend class Auditioner;
|
||||
int seek (jack_nframes_t which_sample, bool complete_refill = false);
|
||||
int seek (nframes_t which_sample, bool complete_refill = false);
|
||||
|
||||
protected:
|
||||
friend class AudioTrack;
|
||||
|
||||
int process (jack_nframes_t transport_frame, jack_nframes_t nframes, jack_nframes_t offset, bool can_record, bool rec_monitors_input);
|
||||
bool commit (jack_nframes_t nframes);
|
||||
int process (nframes_t transport_frame, nframes_t nframes, nframes_t offset, bool can_record, bool rec_monitors_input);
|
||||
bool commit (nframes_t nframes);
|
||||
|
||||
private:
|
||||
|
||||
|
|
@ -197,7 +197,7 @@ class AudioDiskstream : public Diskstream
|
|||
|
||||
RingBufferNPT<CaptureTransition> * capture_transition_buf;
|
||||
// the following are used in the butler thread only
|
||||
jack_nframes_t curr_capture_cnt;
|
||||
nframes_t curr_capture_cnt;
|
||||
};
|
||||
|
||||
/* The two central butler operations */
|
||||
|
|
@ -207,7 +207,7 @@ class AudioDiskstream : public Diskstream
|
|||
int do_refill_with_alloc();
|
||||
|
||||
int read (Sample* buf, Sample* mixdown_buffer, float* gain_buffer,
|
||||
jack_nframes_t& start, jack_nframes_t cnt,
|
||||
nframes_t& start, nframes_t cnt,
|
||||
ChannelInfo& channel_info, int channel, bool reversed);
|
||||
|
||||
void finish_capture (bool rec_monitors_input);
|
||||
|
|
@ -227,7 +227,7 @@ class AudioDiskstream : public Diskstream
|
|||
int use_pending_capture_data (XMLNode& node);
|
||||
|
||||
void get_input_sources ();
|
||||
void check_record_status (jack_nframes_t transport_frame, jack_nframes_t nframes, bool can_record);
|
||||
void check_record_status (nframes_t transport_frame, nframes_t nframes, bool can_record);
|
||||
void set_align_style_from_io();
|
||||
void setup_destructive_playlist ();
|
||||
void use_destructive_playlist ();
|
||||
|
|
|
|||
|
|
@ -37,35 +37,35 @@ class AudioTrack : public Track
|
|||
AudioTrack (Session&, const XMLNode&);
|
||||
~AudioTrack ();
|
||||
|
||||
int roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame,
|
||||
jack_nframes_t offset, int declick, bool can_record, bool rec_monitors_input);
|
||||
int roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
|
||||
nframes_t offset, int declick, bool can_record, bool rec_monitors_input);
|
||||
|
||||
int no_roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame,
|
||||
jack_nframes_t offset, bool state_changing, bool can_record, bool rec_monitors_input);
|
||||
int no_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
|
||||
nframes_t offset, bool state_changing, bool can_record, bool rec_monitors_input);
|
||||
|
||||
int silent_roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame,
|
||||
jack_nframes_t offset, bool can_record, bool rec_monitors_input);
|
||||
int silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
|
||||
nframes_t offset, bool can_record, bool rec_monitors_input);
|
||||
|
||||
boost::shared_ptr<AudioDiskstream> audio_diskstream() const;
|
||||
|
||||
int use_diskstream (string name);
|
||||
int use_diskstream (const PBD::ID& id);
|
||||
|
||||
int export_stuff (vector<Sample*>& buffers, uint32_t nbufs, jack_nframes_t nframes, jack_nframes_t end_frame);
|
||||
int export_stuff (vector<Sample*>& buffers, uint32_t nbufs, nframes_t nframes, nframes_t end_frame);
|
||||
|
||||
void freeze (InterThreadInfo&);
|
||||
void unfreeze ();
|
||||
|
||||
void bounce (InterThreadInfo&);
|
||||
void bounce_range (jack_nframes_t start, jack_nframes_t end, InterThreadInfo&);
|
||||
void bounce_range (nframes_t start, nframes_t end, InterThreadInfo&);
|
||||
|
||||
int set_state(const XMLNode& node);
|
||||
|
||||
protected:
|
||||
XMLNode& state (bool full);
|
||||
|
||||
void passthru_silence (jack_nframes_t start_frame, jack_nframes_t end_frame,
|
||||
jack_nframes_t nframes, jack_nframes_t offset, int declick,
|
||||
void passthru_silence (nframes_t start_frame, nframes_t end_frame,
|
||||
nframes_t nframes, nframes_t offset, int declick,
|
||||
bool meter);
|
||||
|
||||
uint32_t n_process_buffers ();
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class AUPlugin : public ARDOUR::Plugin
|
|||
const char * maker () const;
|
||||
uint32_t parameter_count () const;
|
||||
float default_value (uint32_t port);
|
||||
jack_nframes_t latency () const;
|
||||
nframes_t latency () const;
|
||||
void set_parameter (uint32_t which, float val);
|
||||
float get_parameter (uint32_t which) const;
|
||||
|
||||
|
|
@ -62,9 +62,9 @@ class AUPlugin : public ARDOUR::Plugin
|
|||
uint32_t nth_parameter (uint32_t which, bool& ok) const;
|
||||
void activate ();
|
||||
void deactivate ();
|
||||
void set_block_size (jack_nframes_t nframes);
|
||||
void set_block_size (nframes_t nframes);
|
||||
|
||||
int connect_and_run (vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in, int32_t& out, jack_nframes_t nframes, jack_nframes_t offset);
|
||||
int connect_and_run (vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in, int32_t& out, nframes_t nframes, nframes_t offset);
|
||||
std::set<uint32_t> automatable() const;
|
||||
void store_state (ARDOUR::PluginState&);
|
||||
void restore_state (ARDOUR::PluginState&);
|
||||
|
|
|
|||
|
|
@ -67,30 +67,30 @@ class AudioEngine : public sigc::trackable
|
|||
|
||||
Glib::Mutex& process_lock() { return _process_lock; }
|
||||
|
||||
jack_nframes_t frame_rate();
|
||||
jack_nframes_t frames_per_cycle();
|
||||
nframes_t frame_rate();
|
||||
nframes_t frames_per_cycle();
|
||||
|
||||
int usecs_per_cycle () const { return _usecs_per_cycle; }
|
||||
|
||||
bool get_sync_offset (jack_nframes_t& offset) const;
|
||||
bool get_sync_offset (nframes_t& offset) const;
|
||||
|
||||
jack_nframes_t frames_since_cycle_start () {
|
||||
nframes_t frames_since_cycle_start () {
|
||||
if (!_running || !_jack) return 0;
|
||||
return jack_frames_since_cycle_start (_jack);
|
||||
}
|
||||
jack_nframes_t frame_time () {
|
||||
nframes_t frame_time () {
|
||||
if (!_running || !_jack) return 0;
|
||||
return jack_frame_time (_jack);
|
||||
}
|
||||
|
||||
jack_nframes_t transport_frame () const {
|
||||
nframes_t transport_frame () const {
|
||||
if (!_running || !_jack) return 0;
|
||||
return jack_get_current_transport_frame (_jack);
|
||||
}
|
||||
|
||||
int request_buffer_size (jack_nframes_t);
|
||||
int request_buffer_size (nframes_t);
|
||||
|
||||
jack_nframes_t set_monitor_check_interval (jack_nframes_t);
|
||||
nframes_t set_monitor_check_interval (nframes_t);
|
||||
|
||||
float get_cpu_load() {
|
||||
if (!_running || !_jack) return 0;
|
||||
|
|
@ -134,7 +134,7 @@ class AudioEngine : public sigc::trackable
|
|||
return get_nth_physical (n, JackPortIsOutput);
|
||||
}
|
||||
|
||||
jack_nframes_t get_port_total_latency (const Port&);
|
||||
nframes_t get_port_total_latency (const Port&);
|
||||
void update_total_latencies ();
|
||||
|
||||
/* the caller may not delete the object pointed to by
|
||||
|
|
@ -152,7 +152,7 @@ class AudioEngine : public sigc::trackable
|
|||
|
||||
void transport_start ();
|
||||
void transport_stop ();
|
||||
void transport_locate (jack_nframes_t);
|
||||
void transport_locate (nframes_t);
|
||||
TransportState transport_state ();
|
||||
|
||||
int reset_timebase ();
|
||||
|
|
@ -166,7 +166,7 @@ class AudioEngine : public sigc::trackable
|
|||
the regular process() call to session->process() is not made.
|
||||
*/
|
||||
|
||||
sigc::signal<int,jack_nframes_t> Freewheel;
|
||||
sigc::signal<int,nframes_t> Freewheel;
|
||||
|
||||
sigc::signal<void> Xrun;
|
||||
|
||||
|
|
@ -176,7 +176,7 @@ class AudioEngine : public sigc::trackable
|
|||
|
||||
/* this signal is emitted if the sample rate changes */
|
||||
|
||||
sigc::signal<void,jack_nframes_t> SampleRateChanged;
|
||||
sigc::signal<void,nframes_t> SampleRateChanged;
|
||||
|
||||
/* this signal is sent if JACK ever disconnects us */
|
||||
|
||||
|
|
@ -202,21 +202,21 @@ class AudioEngine : public sigc::trackable
|
|||
bool session_remove_pending;
|
||||
bool _running;
|
||||
bool _has_run;
|
||||
jack_nframes_t _buffer_size;
|
||||
jack_nframes_t _frame_rate;
|
||||
jack_nframes_t monitor_check_interval;
|
||||
jack_nframes_t last_monitor_check;
|
||||
jack_nframes_t _processed_frames;
|
||||
nframes_t _buffer_size;
|
||||
nframes_t _frame_rate;
|
||||
nframes_t monitor_check_interval;
|
||||
nframes_t last_monitor_check;
|
||||
nframes_t _processed_frames;
|
||||
bool _freewheeling;
|
||||
bool _freewheel_thread_registered;
|
||||
sigc::slot<int,jack_nframes_t> freewheel_action;
|
||||
sigc::slot<int,nframes_t> freewheel_action;
|
||||
bool reconnect_on_halt;
|
||||
int _usecs_per_cycle;
|
||||
|
||||
typedef std::set<Port*> Ports;
|
||||
SerializedRCUManager<Ports> ports;
|
||||
|
||||
int process_callback (jack_nframes_t nframes);
|
||||
int process_callback (nframes_t nframes);
|
||||
void remove_all_ports ();
|
||||
|
||||
typedef std::pair<std::string,std::string> PortConnection;
|
||||
|
|
@ -229,17 +229,17 @@ class AudioEngine : public sigc::trackable
|
|||
|
||||
static int _xrun_callback (void *arg);
|
||||
static int _graph_order_callback (void *arg);
|
||||
static int _process_callback (jack_nframes_t nframes, void *arg);
|
||||
static int _sample_rate_callback (jack_nframes_t nframes, void *arg);
|
||||
static int _bufsize_callback (jack_nframes_t nframes, void *arg);
|
||||
static void _jack_timebase_callback (jack_transport_state_t, jack_nframes_t, jack_position_t*, int, void*);
|
||||
static int _process_callback (nframes_t nframes, void *arg);
|
||||
static int _sample_rate_callback (nframes_t nframes, void *arg);
|
||||
static int _bufsize_callback (nframes_t nframes, void *arg);
|
||||
static void _jack_timebase_callback (jack_transport_state_t, nframes_t, jack_position_t*, int, void*);
|
||||
static int _jack_sync_callback (jack_transport_state_t, jack_position_t*, void *arg);
|
||||
static void _freewheel_callback (int , void *arg);
|
||||
|
||||
void jack_timebase_callback (jack_transport_state_t, jack_nframes_t, jack_position_t*, int);
|
||||
void jack_timebase_callback (jack_transport_state_t, nframes_t, jack_position_t*, int);
|
||||
int jack_sync_callback (jack_transport_state_t, jack_position_t*);
|
||||
int jack_bufsize_callback (jack_nframes_t);
|
||||
int jack_sample_rate_callback (jack_nframes_t);
|
||||
int jack_bufsize_callback (nframes_t);
|
||||
int jack_sample_rate_callback (nframes_t);
|
||||
|
||||
static void halted (void *);
|
||||
|
||||
|
|
|
|||
|
|
@ -65,12 +65,12 @@ class AudioFileSource : public AudioSource {
|
|||
for files used in destructive recording.
|
||||
*/
|
||||
|
||||
virtual jack_nframes_t last_capture_start_frame() const { return 0; }
|
||||
virtual void mark_capture_start (jack_nframes_t) {}
|
||||
virtual nframes_t last_capture_start_frame() const { return 0; }
|
||||
virtual void mark_capture_start (nframes_t) {}
|
||||
virtual void mark_capture_end () {}
|
||||
virtual void clear_capture_marks() {}
|
||||
|
||||
virtual int update_header (jack_nframes_t when, struct tm&, time_t) = 0;
|
||||
virtual int update_header (nframes_t when, struct tm&, time_t) = 0;
|
||||
virtual int flush_header () = 0;
|
||||
|
||||
int move_to_trash (const string trash_dir_name);
|
||||
|
|
@ -86,7 +86,7 @@ class AudioFileSource : public AudioSource {
|
|||
static void set_bwf_serial_number (int);
|
||||
|
||||
static void set_search_path (string);
|
||||
static void set_header_position_offset (jack_nframes_t offset );
|
||||
static void set_header_position_offset (nframes_t offset );
|
||||
|
||||
static sigc::signal<void> HeaderPositionOffsetChanged;
|
||||
|
||||
|
|
@ -132,7 +132,7 @@ class AudioFileSource : public AudioSource {
|
|||
|
||||
static uint64_t header_position_offset;
|
||||
|
||||
virtual void set_timeline_position (jack_nframes_t pos);
|
||||
virtual void set_timeline_position (nframes_t pos);
|
||||
virtual void set_header_timeline_position () = 0;
|
||||
|
||||
bool find (std::string path, bool must_exist, bool& is_new);
|
||||
|
|
|
|||
|
|
@ -56,11 +56,11 @@ class AudioPlaylist : public ARDOUR::Playlist
|
|||
AudioPlaylist (Session&, const XMLNode&, bool hidden = false);
|
||||
AudioPlaylist (Session&, string name, bool hidden = false);
|
||||
AudioPlaylist (const AudioPlaylist&, string name, bool hidden = false);
|
||||
AudioPlaylist (const AudioPlaylist&, jack_nframes_t start, jack_nframes_t cnt, string name, bool hidden = false);
|
||||
AudioPlaylist (const AudioPlaylist&, nframes_t start, nframes_t cnt, string name, bool hidden = false);
|
||||
|
||||
void clear (bool with_save = true);
|
||||
|
||||
jack_nframes_t read (Sample *dst, Sample *mixdown, float *gain_buffer, jack_nframes_t start, jack_nframes_t cnt, uint32_t chan_n=0);
|
||||
nframes_t read (Sample *dst, Sample *mixdown, float *gain_buffer, nframes_t start, nframes_t cnt, uint32_t chan_n=0);
|
||||
|
||||
int set_state (const XMLNode&);
|
||||
UndoAction get_memento() const;
|
||||
|
|
@ -68,7 +68,7 @@ class AudioPlaylist : public ARDOUR::Playlist
|
|||
sigc::signal<void,Crossfade *> NewCrossfade;
|
||||
|
||||
template<class T> void foreach_crossfade (T *t, void (T::*func)(Crossfade *));
|
||||
void crossfades_at (jack_nframes_t frame, Crossfades&);
|
||||
void crossfades_at (nframes_t frame, Crossfades&);
|
||||
|
||||
template<class T> void apply_to_history (T& obj, void (T::*method)(const ARDOUR::StateManager::StateMap&, state_id_t)) {
|
||||
RegionLock rlock (this);
|
||||
|
|
|
|||
|
|
@ -90,24 +90,24 @@ class AudioRegion : public Region
|
|||
Curve& fade_out() { return _fade_out; }
|
||||
Curve& envelope() { return _envelope; }
|
||||
|
||||
jack_nframes_t read_peaks (PeakData *buf, jack_nframes_t npeaks,
|
||||
jack_nframes_t offset, jack_nframes_t cnt,
|
||||
nframes_t read_peaks (PeakData *buf, nframes_t npeaks,
|
||||
nframes_t offset, nframes_t cnt,
|
||||
uint32_t chan_n=0, double samples_per_unit= 1.0) const;
|
||||
|
||||
virtual jack_nframes_t read_at (Sample *buf, Sample *mixdown_buf,
|
||||
float *gain_buf, jack_nframes_t position, jack_nframes_t cnt,
|
||||
virtual nframes_t read_at (Sample *buf, Sample *mixdown_buf,
|
||||
float *gain_buf, nframes_t position, nframes_t cnt,
|
||||
uint32_t chan_n = 0,
|
||||
jack_nframes_t read_frames = 0,
|
||||
jack_nframes_t skip_frames = 0) const;
|
||||
nframes_t read_frames = 0,
|
||||
nframes_t skip_frames = 0) const;
|
||||
|
||||
jack_nframes_t master_read_at (Sample *buf, Sample *mixdown_buf,
|
||||
nframes_t master_read_at (Sample *buf, Sample *mixdown_buf,
|
||||
float *gain_buf,
|
||||
jack_nframes_t position, jack_nframes_t cnt, uint32_t chan_n=0) const;
|
||||
nframes_t position, nframes_t cnt, uint32_t chan_n=0) const;
|
||||
|
||||
XMLNode& state (bool);
|
||||
int set_state (const XMLNode&);
|
||||
|
||||
static void set_default_fade (float steepness, jack_nframes_t len);
|
||||
static void set_default_fade (float steepness, nframes_t len);
|
||||
|
||||
enum FadeShape {
|
||||
Linear,
|
||||
|
|
@ -119,13 +119,13 @@ class AudioRegion : public Region
|
|||
|
||||
void set_fade_in_active (bool yn);
|
||||
void set_fade_in_shape (FadeShape);
|
||||
void set_fade_in_length (jack_nframes_t);
|
||||
void set_fade_in (FadeShape, jack_nframes_t);
|
||||
void set_fade_in_length (nframes_t);
|
||||
void set_fade_in (FadeShape, nframes_t);
|
||||
|
||||
void set_fade_out_active (bool yn);
|
||||
void set_fade_out_shape (FadeShape);
|
||||
void set_fade_out_length (jack_nframes_t);
|
||||
void set_fade_out (FadeShape, jack_nframes_t);
|
||||
void set_fade_out_length (nframes_t);
|
||||
void set_fade_out (FadeShape, nframes_t);
|
||||
|
||||
void set_envelope_active (bool yn);
|
||||
|
||||
|
|
@ -153,10 +153,10 @@ class AudioRegion : public Region
|
|||
private:
|
||||
friend class RegionFactory;
|
||||
|
||||
AudioRegion (boost::shared_ptr<AudioSource>, jack_nframes_t start, jack_nframes_t length);
|
||||
AudioRegion (boost::shared_ptr<AudioSource>, jack_nframes_t start, jack_nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags);
|
||||
AudioRegion (SourceList &, jack_nframes_t start, jack_nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags);
|
||||
AudioRegion (boost::shared_ptr<const AudioRegion>, jack_nframes_t start, jack_nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags);
|
||||
AudioRegion (boost::shared_ptr<AudioSource>, nframes_t start, nframes_t length);
|
||||
AudioRegion (boost::shared_ptr<AudioSource>, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags);
|
||||
AudioRegion (SourceList &, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags);
|
||||
AudioRegion (boost::shared_ptr<const AudioRegion>, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags);
|
||||
AudioRegion (boost::shared_ptr<const AudioRegion>);
|
||||
AudioRegion (boost::shared_ptr<AudioSource>, const XMLNode&);
|
||||
AudioRegion (SourceList &, const XMLNode&);
|
||||
|
|
@ -173,16 +173,16 @@ class AudioRegion : public Region
|
|||
void recompute_gain_at_end ();
|
||||
void recompute_gain_at_start ();
|
||||
|
||||
jack_nframes_t _read_at (const SourceList&, Sample *buf, Sample *mixdown_buffer,
|
||||
float *gain_buffer, jack_nframes_t position, jack_nframes_t cnt,
|
||||
nframes_t _read_at (const SourceList&, Sample *buf, Sample *mixdown_buffer,
|
||||
float *gain_buffer, nframes_t position, nframes_t cnt,
|
||||
uint32_t chan_n = 0,
|
||||
jack_nframes_t read_frames = 0,
|
||||
jack_nframes_t skip_frames = 0) const;
|
||||
nframes_t read_frames = 0,
|
||||
nframes_t skip_frames = 0) const;
|
||||
|
||||
bool verify_start (jack_nframes_t position);
|
||||
bool verify_length (jack_nframes_t position);
|
||||
bool verify_start_mutable (jack_nframes_t& start);
|
||||
bool verify_start_and_length (jack_nframes_t start, jack_nframes_t length);
|
||||
bool verify_start (nframes_t position);
|
||||
bool verify_length (nframes_t position);
|
||||
bool verify_start_mutable (nframes_t& start);
|
||||
bool verify_start_and_length (nframes_t start, nframes_t length);
|
||||
void recompute_at_start ();
|
||||
void recompute_at_end ();
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ using std::string;
|
|||
|
||||
namespace ARDOUR {
|
||||
|
||||
const jack_nframes_t frames_per_peak = 256;
|
||||
const nframes_t frames_per_peak = 256;
|
||||
|
||||
class AudioSource : public Source
|
||||
{
|
||||
|
|
@ -56,18 +56,18 @@ class AudioSource : public Source
|
|||
so its here in AudioSource for now.
|
||||
*/
|
||||
|
||||
virtual jack_nframes_t natural_position() const { return 0; }
|
||||
virtual nframes_t natural_position() const { return 0; }
|
||||
|
||||
/* returns the number of items in this `audio_source' */
|
||||
|
||||
virtual jack_nframes_t length() const {
|
||||
virtual nframes_t length() const {
|
||||
return _length;
|
||||
}
|
||||
|
||||
virtual jack_nframes_t available_peaks (double zoom) const;
|
||||
virtual nframes_t available_peaks (double zoom) const;
|
||||
|
||||
virtual jack_nframes_t read (Sample *dst, jack_nframes_t start, jack_nframes_t cnt) const;
|
||||
virtual jack_nframes_t write (Sample *src, jack_nframes_t cnt);
|
||||
virtual nframes_t read (Sample *dst, nframes_t start, nframes_t cnt) const;
|
||||
virtual nframes_t write (Sample *src, nframes_t cnt);
|
||||
|
||||
virtual float sample_rate () const = 0;
|
||||
|
||||
|
|
@ -80,12 +80,12 @@ class AudioSource : public Source
|
|||
uint32_t read_data_count() const { return _read_data_count; }
|
||||
uint32_t write_data_count() const { return _write_data_count; }
|
||||
|
||||
int read_peaks (PeakData *peaks, jack_nframes_t npeaks, jack_nframes_t start, jack_nframes_t cnt, double samples_per_unit) const;
|
||||
int read_peaks (PeakData *peaks, nframes_t npeaks, nframes_t start, nframes_t cnt, double samples_per_unit) const;
|
||||
int build_peaks ();
|
||||
bool peaks_ready (sigc::slot<void>, sigc::connection&) const;
|
||||
|
||||
mutable sigc::signal<void> PeaksReady;
|
||||
mutable sigc::signal<void,jack_nframes_t,jack_nframes_t> PeakRangeReady;
|
||||
mutable sigc::signal<void,nframes_t,nframes_t> PeakRangeReady;
|
||||
|
||||
XMLNode& get_state ();
|
||||
int set_state (const XMLNode&);
|
||||
|
|
@ -94,6 +94,7 @@ class AudioSource : public Source
|
|||
static void stop_peak_thread ();
|
||||
|
||||
int rename_peakfile (std::string newpath);
|
||||
void touch_peakfile ();
|
||||
|
||||
static void set_build_missing_peakfiles (bool yn) {
|
||||
_build_missing_peakfiles = yn;
|
||||
|
|
@ -109,7 +110,7 @@ class AudioSource : public Source
|
|||
|
||||
bool _peaks_built;
|
||||
mutable Glib::Mutex _lock;
|
||||
jack_nframes_t _length;
|
||||
nframes_t _length;
|
||||
bool next_peak_clear_should_notify;
|
||||
string peakpath;
|
||||
string _captured_for;
|
||||
|
|
@ -120,14 +121,14 @@ class AudioSource : public Source
|
|||
int initialize_peakfile (bool newfile, string path);
|
||||
void build_peaks_from_scratch ();
|
||||
|
||||
int do_build_peak (jack_nframes_t, jack_nframes_t);
|
||||
int do_build_peak (nframes_t, nframes_t);
|
||||
|
||||
virtual jack_nframes_t read_unlocked (Sample *dst, jack_nframes_t start, jack_nframes_t cnt) const = 0;
|
||||
virtual jack_nframes_t write_unlocked (Sample *dst, jack_nframes_t cnt) = 0;
|
||||
virtual nframes_t read_unlocked (Sample *dst, nframes_t start, nframes_t cnt) const = 0;
|
||||
virtual nframes_t write_unlocked (Sample *dst, nframes_t cnt) = 0;
|
||||
virtual string peak_path(string audio_path) = 0;
|
||||
virtual string old_peak_path(string audio_path) = 0;
|
||||
|
||||
void update_length (jack_nframes_t pos, jack_nframes_t cnt);
|
||||
void update_length (nframes_t pos, nframes_t cnt);
|
||||
|
||||
static pthread_t peak_thread;
|
||||
static bool have_peak_thread;
|
||||
|
|
@ -149,10 +150,10 @@ class AudioSource : public Source
|
|||
static void clear_queue_for_peaks ();
|
||||
|
||||
struct PeakBuildRecord {
|
||||
jack_nframes_t frame;
|
||||
jack_nframes_t cnt;
|
||||
nframes_t frame;
|
||||
nframes_t cnt;
|
||||
|
||||
PeakBuildRecord (jack_nframes_t f, jack_nframes_t c)
|
||||
PeakBuildRecord (nframes_t f, nframes_t c)
|
||||
: frame (f), cnt (c) {}
|
||||
PeakBuildRecord (const PeakBuildRecord& other) {
|
||||
frame = other.frame;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class Auditioner : public AudioTrack
|
|||
ARDOUR::AudioPlaylist& prepare_playlist ();
|
||||
void audition_current_playlist ();
|
||||
|
||||
int play_audition (jack_nframes_t nframes);
|
||||
int play_audition (nframes_t nframes);
|
||||
|
||||
void cancel_audition () {
|
||||
g_atomic_int_set (&_active, 0);
|
||||
|
|
@ -55,10 +55,10 @@ class Auditioner : public AudioTrack
|
|||
|
||||
private:
|
||||
boost::shared_ptr<AudioRegion> the_region;
|
||||
jack_nframes_t current_frame;
|
||||
nframes_t current_frame;
|
||||
mutable gint _active;
|
||||
Glib::Mutex lock;
|
||||
jack_nframes_t length;
|
||||
nframes_t length;
|
||||
|
||||
void drop_ports ();
|
||||
static void *_drop_ports (void *);
|
||||
|
|
|
|||
|
|
@ -76,10 +76,10 @@ CONFIG_VARIABLE (float, shuttle_speed_threshold, "shuttle-speed-threshold", 5.0f
|
|||
CONFIG_VARIABLE (float, smpte_frames_per_second, "smpte-frames-per-second", 30.0f)
|
||||
CONFIG_VARIABLE (float, video_pullup, "video-pullup", 0.0f)
|
||||
CONFIG_VARIABLE (bool, smpte_drop_frames, "smpte-drop-frames", false)
|
||||
CONFIG_VARIABLE (jack_nframes_t, preroll, "preroll", 0)
|
||||
CONFIG_VARIABLE (jack_nframes_t, postroll, "postroll", 0)
|
||||
CONFIG_VARIABLE (jack_nframes_t, over_length_short, "over-length-short", 2)
|
||||
CONFIG_VARIABLE (jack_nframes_t, over_length_long, "over-length-long", 10)
|
||||
CONFIG_VARIABLE (nframes_t, preroll, "preroll", 0)
|
||||
CONFIG_VARIABLE (nframes_t, postroll, "postroll", 0)
|
||||
CONFIG_VARIABLE (nframes_t, over_length_short, "over-length-short", 2)
|
||||
CONFIG_VARIABLE (nframes_t, over_length_long, "over-length-long", 10)
|
||||
CONFIG_VARIABLE (bool, full_xfades_unmuted, "full-xfades-unmuted", true)
|
||||
CONFIG_VARIABLE (float, short_xfade_seconds, "short-xfade-seconds", 0.015)
|
||||
CONFIG_VARIABLE (SlaveSource, slave_source, "slave-source", None)
|
||||
|
|
|
|||
|
|
@ -33,24 +33,21 @@ class CoreAudioSource : public AudioFileSource {
|
|||
~CoreAudioSource ();
|
||||
|
||||
float sample_rate() const;
|
||||
int update_header (jack_nframes_t when, struct tm&, time_t);
|
||||
int update_header (nframes_t when, struct tm&, time_t);
|
||||
|
||||
int flush_header () {return 0;};
|
||||
void set_header_timeline_position () {};
|
||||
|
||||
protected:
|
||||
jack_nframes_t read_unlocked (Sample *dst, jack_nframes_t start, jack_nframes_t cnt) const;
|
||||
|
||||
jack_nframes_t write_unlocked (Sample *dst, jack_nframes_t cnt)
|
||||
{ return 0; }
|
||||
|
||||
nframes_t read_unlocked (Sample *dst, nframes_t start, nframes_t cnt) const;
|
||||
nframes_t write_unlocked (Sample *dst, nframes_t cnt) { return 0; }
|
||||
|
||||
private:
|
||||
mutable CAAudioFile af;
|
||||
uint16_t n_channels;
|
||||
|
||||
mutable float *tmpbuf;
|
||||
mutable jack_nframes_t tmpbufsize;
|
||||
mutable nframes_t tmpbufsize;
|
||||
mutable Glib::Mutex _tmpbuf_lock;
|
||||
|
||||
void init (const string &str);
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ struct CrossfadeState : public StateManager::State {
|
|||
|
||||
UndoAction fade_in_memento;
|
||||
UndoAction fade_out_memento;
|
||||
jack_nframes_t position;
|
||||
jack_nframes_t length;
|
||||
nframes_t position;
|
||||
nframes_t length;
|
||||
AnchorPoint anchor_point;
|
||||
bool follow_overlap;
|
||||
bool active;
|
||||
|
|
@ -65,8 +65,8 @@ class Crossfade : public PBD::StatefulDestructible, public StateManager
|
|||
/* constructor for "fixed" xfades at each end of an internal overlap */
|
||||
|
||||
Crossfade (boost::shared_ptr<ARDOUR::AudioRegion> in, boost::shared_ptr<ARDOUR::AudioRegion> out,
|
||||
jack_nframes_t position,
|
||||
jack_nframes_t initial_length,
|
||||
nframes_t position,
|
||||
nframes_t initial_length,
|
||||
AnchorPoint);
|
||||
|
||||
/* constructor for xfade between two regions that are overlapped in any way
|
||||
|
|
@ -93,11 +93,11 @@ class Crossfade : public PBD::StatefulDestructible, public StateManager
|
|||
boost::shared_ptr<ARDOUR::AudioRegion> in() const { return _in; }
|
||||
boost::shared_ptr<ARDOUR::AudioRegion> out() const { return _out; }
|
||||
|
||||
jack_nframes_t read_at (Sample *buf, Sample *mixdown_buffer,
|
||||
float *gain_buffer, jack_nframes_t position, jack_nframes_t cnt,
|
||||
nframes_t read_at (Sample *buf, Sample *mixdown_buffer,
|
||||
float *gain_buffer, nframes_t position, nframes_t cnt,
|
||||
uint32_t chan_n,
|
||||
jack_nframes_t read_frames = 0,
|
||||
jack_nframes_t skip_frames = 0);
|
||||
nframes_t read_frames = 0,
|
||||
nframes_t skip_frames = 0);
|
||||
|
||||
bool refresh ();
|
||||
|
||||
|
|
@ -117,21 +117,21 @@ class Crossfade : public PBD::StatefulDestructible, public StateManager
|
|||
return (_in == a && _out == b) || (_in == b && _out == a);
|
||||
}
|
||||
|
||||
jack_nframes_t length() const { return _length; }
|
||||
jack_nframes_t overlap_length() const;
|
||||
jack_nframes_t position() const { return _position; }
|
||||
nframes_t length() const { return _length; }
|
||||
nframes_t overlap_length() const;
|
||||
nframes_t position() const { return _position; }
|
||||
|
||||
sigc::signal<void,Crossfade*> Invalidated;
|
||||
|
||||
bool covers (jack_nframes_t frame) const {
|
||||
bool covers (nframes_t frame) const {
|
||||
return _position <= frame && frame < _position + _length;
|
||||
}
|
||||
|
||||
OverlapType coverage (jack_nframes_t start, jack_nframes_t end) const;
|
||||
OverlapType coverage (nframes_t start, nframes_t end) const;
|
||||
|
||||
UndoAction get_memento() const;
|
||||
|
||||
static void set_buffer_size (jack_nframes_t);
|
||||
static void set_buffer_size (nframes_t);
|
||||
|
||||
bool active () const { return _active; }
|
||||
void set_active (bool yn);
|
||||
|
|
@ -143,10 +143,10 @@ class Crossfade : public PBD::StatefulDestructible, public StateManager
|
|||
Curve& fade_in() { return _fade_in; }
|
||||
Curve& fade_out() { return _fade_out; }
|
||||
|
||||
jack_nframes_t set_length (jack_nframes_t);
|
||||
nframes_t set_length (nframes_t);
|
||||
|
||||
static jack_nframes_t short_xfade_length() { return _short_xfade_length; }
|
||||
static void set_short_xfade_length (jack_nframes_t n);
|
||||
static nframes_t short_xfade_length() { return _short_xfade_length; }
|
||||
static void set_short_xfade_length (nframes_t n);
|
||||
|
||||
static Change ActiveChanged;
|
||||
|
||||
|
|
@ -154,15 +154,15 @@ class Crossfade : public PBD::StatefulDestructible, public StateManager
|
|||
friend struct CrossfadeComparePtr;
|
||||
friend class AudioPlaylist;
|
||||
|
||||
static jack_nframes_t _short_xfade_length;
|
||||
static nframes_t _short_xfade_length;
|
||||
|
||||
boost::shared_ptr<ARDOUR::AudioRegion> _in;
|
||||
boost::shared_ptr<ARDOUR::AudioRegion> _out;
|
||||
bool _active;
|
||||
bool _in_update;
|
||||
OverlapType overlap_type;
|
||||
jack_nframes_t _length;
|
||||
jack_nframes_t _position;
|
||||
nframes_t _length;
|
||||
nframes_t _position;
|
||||
AnchorPoint _anchor_point;
|
||||
bool _follow_overlap;
|
||||
bool _fixed;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ namespace ARDOUR {
|
|||
|
||||
class DestructiveFileSource : public SndFileSource {
|
||||
public:
|
||||
DestructiveFileSource (Session&, std::string path, SampleFormat samp_format, HeaderFormat hdr_format, jack_nframes_t rate,
|
||||
DestructiveFileSource (Session&, std::string path, SampleFormat samp_format, HeaderFormat hdr_format, nframes_t rate,
|
||||
Flag flags = AudioFileSource::Flag (AudioFileSource::Writable));
|
||||
|
||||
DestructiveFileSource (Session&, std::string path, Flag flags);
|
||||
|
|
@ -39,34 +39,34 @@ class DestructiveFileSource : public SndFileSource {
|
|||
DestructiveFileSource (Session&, const XMLNode&);
|
||||
~DestructiveFileSource ();
|
||||
|
||||
jack_nframes_t last_capture_start_frame() const;
|
||||
void mark_capture_start (jack_nframes_t);
|
||||
nframes_t last_capture_start_frame() const;
|
||||
void mark_capture_start (nframes_t);
|
||||
void mark_capture_end ();
|
||||
void clear_capture_marks();
|
||||
|
||||
XMLNode& get_state ();
|
||||
|
||||
static void setup_standard_crossfades (jack_nframes_t sample_rate);
|
||||
static void setup_standard_crossfades (nframes_t sample_rate);
|
||||
|
||||
protected:
|
||||
jack_nframes_t write_unlocked (Sample *src, jack_nframes_t cnt);
|
||||
nframes_t write_unlocked (Sample *src, nframes_t cnt);
|
||||
|
||||
virtual void handle_header_position_change ();
|
||||
|
||||
private:
|
||||
static jack_nframes_t xfade_frames;
|
||||
static nframes_t xfade_frames;
|
||||
static gain_t* out_coefficient;
|
||||
static gain_t* in_coefficient;
|
||||
|
||||
bool _capture_start;
|
||||
bool _capture_end;
|
||||
jack_nframes_t capture_start_frame;
|
||||
jack_nframes_t file_pos; // unit is frames
|
||||
nframes_t capture_start_frame;
|
||||
nframes_t file_pos; // unit is frames
|
||||
Sample* xfade_buf;
|
||||
|
||||
void init ();
|
||||
jack_nframes_t crossfade (Sample* data, jack_nframes_t cnt, int dir);
|
||||
void set_timeline_position (jack_nframes_t);
|
||||
nframes_t crossfade (Sample* data, nframes_t cnt, int dir);
|
||||
void set_timeline_position (nframes_t);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
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