[ardour-dev] frames ruler patch
nick mainsbridge
beatroot at optushome.com.au
Tue Apr 6 06:26:54 PDT 2004
this patch causes the frames ruler to pay some attention to the session
sample rate, as requested by paul.
hopefully it does something close to what he meant.
--
nick mainsbridge <beatroot at optushome.com.au>
-------------- next part --------------
--- ../Desktop/ardour/gtk_ardour/editor_rulers.cc Tue Apr 6 23:14:09 2004
+++ gtk_ardour/editor_rulers.cc Tue Apr 6 23:07:09 2004
@@ -1402,6 +1403,11 @@
}
mark_interval = (upper - lower) / 5;
+ if (mark_interval > session->frame_rate()) {
+ mark_interval -= mark_interval % session->frame_rate();
+ } else {
+ mark_interval = session->frame_rate() / (session->frame_rate() / mark_interval ) ;
+ }
nmarks = 5;
*marks = (GtkCustomRulerMark *) g_malloc (sizeof(GtkCustomRulerMark) * nmarks);
for (n = 0, pos = lower; n < nmarks; pos += mark_interval, ++n) {
More information about the Ardour-Dev
mailing list