Re: [tim-janik/beast] Port Song::loop_right, Song::tick_pointer (#68)

2018-08-28 Thread Tim Janik via beast
Merged #68 into master.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/tim-janik/beast/pull/68#event-1812662311___
beast mailing list
beast@gnome.org
https://mail.gnome.org/mailman/listinfo/beast


Re: [tim-janik/beast] Port Song::loop_right, Song::tick_pointer (#68)

2018-08-28 Thread Tim Janik via beast
tim-janik commented on this pull request.

Thanks a lot, minor comments inline.

> +
+void
+SongImpl::tick_pointer (int tick)
+{
+  BseSong *self = as();
+
+  if (uint (tick) != self->tick_SL)
+{
+  // this property has no undo
+
+  BSE_SEQUENCER_LOCK ();
+  self->tick_SL = tick;
+  for (SfiRing *ring = self->tracks_SL; ring; ring = sfi_ring_walk (ring, 
self->tracks_SL))
+{
+  BseTrack *track = (BseTrack*) ring->data;
+  track->track_done_SL = FALSE;/* let sequencer recheck if 
playing */

While you're at it, the C macros TRUE and FALSE should be converted to C++'s 
true and false.

> @@ -565,7 +565,8 @@ pointer_move (BstTrackRollController *self,
   drag->type != GXK_DRAG_DONE) /* skip release events */
 {
   guint tick = bst_track_roll_controller_quantize (self, 
drag->current_tick);
-  bse_proxy_set (self->song, "tick-pointer", tick, NULL);
+  Bse::SongH song = Bse::SongH::down_cast (bse_server.from_proxy 
(self->song));

It might (soon) be time to convert self->song into a scoped handle. Please keep 
an eye on when it's easier or not too much effort to use a Bse::SongS in the 
track controller and go for it, so we can avoid all those from_proxy down casts.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/tim-janik/beast/pull/68#pullrequestreview-150049358___
beast mailing list
beast@gnome.org
https://mail.gnome.org/mailman/listinfo/beast


[tim-janik/beast] Port Song::loop_right, Song::tick_pointer (#68)

2018-08-27 Thread Stefan Westerfeld via beast
2 more properties ported to C++
You can view, comment on, or merge this pull request online at:

  https://github.com/tim-janik/beast/pull/68

-- Commit Summary --

  * BSE: Song::loop_right: port property to C++
  * BEAST-GTK: use C++ property Song::loop_right
  * BSE: Song::tick_pointer: port property to C++
  * BEAST-GTK: use C++ property Song::tick_pointer

-- File Changes --

M beast-gtk/bsttrackrollctrl.cc (6)
M beast-gtk/bsttrackview.cc (11)
M bse/bseapi.idl (5)
M bse/bsesong.cc (116)
M bse/bsesong.hh (4)

-- Patch Links --

https://github.com/tim-janik/beast/pull/68.patch
https://github.com/tim-janik/beast/pull/68.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/tim-janik/beast/pull/68
___
beast mailing list
beast@gnome.org
https://mail.gnome.org/mailman/listinfo/beast