projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "fix LXVST support for plugins that make audioMaster callbacks from
[ardour.git]
/
gtk2_ardour
/
editor_imageframe.cc
diff --git
a/gtk2_ardour/editor_imageframe.cc
b/gtk2_ardour/editor_imageframe.cc
index bac689b48ff779e30f18f5ddd3319106c0896557..f4c8f1bb0bd67c3c68f4275ba826f0a34bd76d24 100644
(file)
--- a/
gtk2_ardour/editor_imageframe.cc
+++ b/
gtk2_ardour/editor_imageframe.cc
@@
-113,10
+113,10
@@
void
Editor::scroll_timeaxis_to_imageframe_item(const TimeAxisViewItem* item)
{
// GTK2FIX
Editor::scroll_timeaxis_to_imageframe_item(const TimeAxisViewItem* item)
{
// GTK2FIX
- //
nframes64_t offset = static_cast<nframes64
_t>(frames_per_unit * (edit_hscroll_slider_width/2)) ;
-
nframes64
_t offset = 0;
+ //
framepos_t offset = static_cast<framepos
_t>(frames_per_unit * (edit_hscroll_slider_width/2)) ;
+
framepos
_t offset = 0;
-
nframes64
_t x_pos = 0 ;
+
framepos
_t x_pos = 0 ;
if (item->get_position() < offset) {
x_pos = 0 ;
if (item->get_position() < offset) {
x_pos = 0 ;
@@
-489,14
+489,14
@@
Editor::markerview_drag_motion_callback(ArdourCanvas::Item*, GdkEvent* event)
double cx, cy ;
MarkerView* mv = reinterpret_cast<MarkerView*>(drag_info.data) ;
double cx, cy ;
MarkerView* mv = reinterpret_cast<MarkerView*>(drag_info.data) ;
-
nframes64
_t pending_region_position ;
-
nframes64
_t pointer_frame ;
+
framepos
_t pending_region_position ;
+
framepos
_t pointer_frame ;
pointer_frame = event_frame(event, &cx, &cy) ;
snap_to(pointer_frame) ;
pointer_frame = event_frame(event, &cx, &cy) ;
snap_to(pointer_frame) ;
- if (pointer_frame > (
nframes64
_t) drag_info.pointer_frame_offset)
+ if (pointer_frame > (
framepos
_t) drag_info.pointer_frame_offset)
{
pending_region_position = pointer_frame - drag_info.pointer_frame_offset ;
snap_to(pending_region_position) ;
{
pending_region_position = pointer_frame - drag_info.pointer_frame_offset ;
snap_to(pending_region_position) ;
@@
-537,14
+537,14
@@
Editor::imageframe_drag_motion_callback(ArdourCanvas::Item*, GdkEvent* event)
ImageFrameView* ifv = reinterpret_cast<ImageFrameView*>(drag_info.data) ;
ImageFrameView* ifv = reinterpret_cast<ImageFrameView*>(drag_info.data) ;
-
nframes64
_t pending_region_position;
-
nframes64
_t pointer_frame;
+
framepos
_t pending_region_position;
+
framepos
_t pointer_frame;
pointer_frame = event_frame(event, &cx, &cy) ;
snap_to(pointer_frame) ;
pointer_frame = event_frame(event, &cx, &cy) ;
snap_to(pointer_frame) ;
- if (pointer_frame > (
nframes64
_t) drag_info.pointer_frame_offset)
+ if (pointer_frame > (
framepos
_t) drag_info.pointer_frame_offset)
{
pending_region_position = pointer_frame - drag_info.pointer_frame_offset ;
snap_to(pending_region_position) ;
{
pending_region_position = pointer_frame - drag_info.pointer_frame_offset ;
snap_to(pending_region_position) ;
@@
-572,7
+572,7
@@
Editor::imageframe_drag_motion_callback(ArdourCanvas::Item*, GdkEvent* event)
void
Editor::timeaxis_item_drag_finished_callback(ArdourCanvas::Item*, GdkEvent* event)
{
void
Editor::timeaxis_item_drag_finished_callback(ArdourCanvas::Item*, GdkEvent* event)
{
-
nframes64
_t where ;
+
framepos
_t where ;
TimeAxisViewItem* tavi = reinterpret_cast<TimeAxisViewItem*>(drag_info.data) ;
bool item_x_movement = (drag_info.last_frame_position != tavi->get_position()) ;
TimeAxisViewItem* tavi = reinterpret_cast<TimeAxisViewItem*>(drag_info.data) ;
bool item_x_movement = (drag_info.last_frame_position != tavi->get_position()) ;
@@
-603,7
+603,12
@@
Editor::timeaxis_item_drag_finished_callback(ArdourCanvas::Item*, GdkEvent* even
//where = tavi->get_position() ;
}
//where = tavi->get_position() ;
}
-
+/*
+ //locate so user can audition the edit
+ if ( !session->transport_rolling() && Config->get_always_play_range()) {
+ locate_with_edit_preroll ( arv->region()->position() );
+ }
+*/
}
}
@@
-670,9
+675,9
@@
Editor::imageframe_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
{
ImageFrameView* ifv = reinterpret_cast<ImageFrameView*> (drag_info.data) ;
{
ImageFrameView* ifv = reinterpret_cast<ImageFrameView*> (drag_info.data) ;
-
nframes64
_t start = 0 ;
-
nframes64
_t end = 0 ;
-
nframes64
_t pointer_frame = event_frame(event) ;
+
framepos
_t start = 0 ;
+
framepos
_t end = 0 ;
+
framepos
_t pointer_frame = event_frame(event) ;
// chekc th eposition of the item is not locked
if(!ifv->get_position_locked()) {
// chekc th eposition of the item is not locked
if(!ifv->get_position_locked()) {
@@
-689,7
+694,7
@@
Editor::imageframe_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
}
// are we getting bigger or smaller?
}
// are we getting bigger or smaller?
-
nframes64
_t new_dur_val = end - start ;
+
framepos
_t new_dur_val = end - start ;
// start handle, so a smaller pointer frame increases our component size
if(pointer_frame <= drag_info.grab_frame)
// start handle, so a smaller pointer frame increases our component size
if(pointer_frame <= drag_info.grab_frame)
@@
-747,10
+752,10
@@
Editor::imageframe_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* eve
}
else
{
}
else
{
-
nframes64
_t temp = ifv->get_position() + ifv->get_duration() ;
+
framepos
_t temp = ifv->get_position() + ifv->get_duration() ;
- ifv->set_position((
nframes64
_t) (temp - drag_info.cumulative_x_drag), this) ;
- ifv->set_duration((
nframes64
_t) drag_info.cumulative_x_drag, this) ;
+ ifv->set_position((
framepos
_t) (temp - drag_info.cumulative_x_drag), this) ;
+ ifv->set_duration((
framepos
_t) drag_info.cumulative_x_drag, this) ;
}
}
}
}
@@
-759,10
+764,10
@@
Editor::imageframe_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* ev
{
ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
{
ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
-
nframes64
_t start = 0 ;
-
nframes64
_t end = 0 ;
-
nframes64
_t pointer_frame = event_frame(event) ;
-
nframes64
_t new_dur_val = 0 ;
+
framepos
_t start = 0 ;
+
framepos
_t end = 0 ;
+
framepos
_t pointer_frame = event_frame(event) ;
+
framepos
_t new_dur_val = 0 ;
snap_to(pointer_frame) ;
snap_to(pointer_frame) ;
@@
-824,7
+829,7
@@
Editor::imageframe_end_handle_end_trim (ArdourCanvas::Item* item, GdkEvent* even
}
else
{
}
else
{
-
nframes64_t new_duration = (nframes64
_t)drag_info.cumulative_x_drag ;
+
framepos_t new_duration = (framepos
_t)drag_info.cumulative_x_drag ;
if((new_duration <= ifv->get_max_duration()) && (new_duration >= ifv->get_min_duration()))
{
ifv->set_duration(new_duration, this) ;
if((new_duration <= ifv->get_max_duration()) && (new_duration >= ifv->get_min_duration()))
{
ifv->set_duration(new_duration, this) ;
@@
-884,9
+889,9
@@
Editor::markerview_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
{
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
{
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
-
nframes64
_t start = 0 ;
-
nframes64
_t end = 0 ;
-
nframes64
_t pointer_frame = event_frame(event) ;
+
framepos
_t start = 0 ;
+
framepos
_t end = 0 ;
+
framepos
_t pointer_frame = event_frame(event) ;
// chekc th eposition of the item is not locked
if(!mv->get_position_locked())
// chekc th eposition of the item is not locked
if(!mv->get_position_locked())
@@
-907,7
+912,7
@@
Editor::markerview_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent*
}
// are we getting bigger or smaller?
}
// are we getting bigger or smaller?
-
nframes64
_t new_dur_val = end - start ;
+
framepos
_t new_dur_val = end - start ;
if(pointer_frame <= drag_info.grab_frame)
{
if(pointer_frame <= drag_info.grab_frame)
{
@@
-964,10
+969,10
@@
Editor::markerview_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* eve
}
else
{
}
else
{
-
nframes64
_t temp = mv->get_position() + mv->get_duration() ;
+
framepos
_t temp = mv->get_position() + mv->get_duration() ;
- mv->set_position((
nframes64
_t) (temp - drag_info.cumulative_x_drag), this) ;
- mv->set_duration((
nframes64
_t) drag_info.cumulative_x_drag, this) ;
+ mv->set_position((
framepos
_t) (temp - drag_info.cumulative_x_drag), this) ;
+ mv->set_duration((
framepos
_t) drag_info.cumulative_x_drag, this) ;
}
}
}
}
@@
-976,10
+981,10
@@
Editor::markerview_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* ev
{
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
{
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
-
nframes64
_t start = 0 ;
-
nframes64
_t end = 0 ;
-
nframes64
_t pointer_frame = event_frame(event) ;
-
nframes64
_t new_dur_val = 0 ;
+
framepos
_t start = 0 ;
+
framepos
_t end = 0 ;
+
framepos
_t pointer_frame = event_frame(event) ;
+
framepos
_t new_dur_val = 0 ;
snap_to(pointer_frame) ;
snap_to(pointer_frame) ;
@@
-1004,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() ;
{
// we cant extend beyond the item we are marking
ImageFrameView* marked_item = mv->get_marked_item() ;
-
nframes64
_t marked_end = marked_item->get_position() + marked_item->get_duration() ;
+
framepos
_t marked_end = marked_item->get_position() + marked_item->get_duration() ;
if(mv->get_max_duration_active() && (new_dur_val > mv->get_max_duration()))
{
if(mv->get_max_duration_active() && (new_dur_val > mv->get_max_duration()))
{
@@
-1058,7
+1063,7
@@
Editor::markerview_end_handle_end_trim (ArdourCanvas::Item* item, GdkEvent* even
}
else
{
}
else
{
-
nframes64_t new_duration = (nframes64
_t)drag_info.cumulative_x_drag ;
+
framepos_t new_duration = (framepos
_t)drag_info.cumulative_x_drag ;
mv->set_duration(new_duration, this) ;
}
}
mv->set_duration(new_duration, this) ;
}
}