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



@tim-janik commented on this pull request.

Thanks a lot, minor comments inline.


In bse/bsesong.cc:

> +
+void
+SongImpl::tick_pointer (int tick)
+{
+  BseSong *self = as<BseSong*>();
+
+  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.


In beast-gtk/bsttrackrollctrl.cc:

> @@ -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, view it on GitHub, or mute the thread.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]