I managed to port all Bus properties that have a simple type (non-object, non-sequence) to C++. There are two things worth mentioning here.
(1) in bseapi.idl, we have to use non-computed constants, so there is no elegant way of expressing that the maximum is +24dB - however I think we can live with precomputed factors here for implementing volume_clamp(), it would be nice if we wouldn't have to duplicate the magic numbers. I originally thought the best way to achieve this would be to be able to access the defaults from the parameter, somewhat like ``` left_volume = CLAMP (val, p_left_volume::min(), p_left_volume::max()) ``` However, while implementing the code, I've got a new idea: we could simply offer a way to access the bseapi.idl constants, like ``` Const BUS_VOLUME_MIN = 1.58489319246111e-05; /* -96dB */ ``` should define a C++ constant, also, and this could be used to implement volume_clamp(). (2) I think C++ properties are commonly referred to as "left_volume" (underscore instead of minus) - I however found the introspected paramspecs in the ui code contain minus, so I use a hacky translation for finding the pspec - not sure if that is the right thing to do here. You can view, comment on, or merge this pull request online at: https://github.com/tim-janik/beast/pull/78 -- Commit Summary -- * BSE: bseitem: fix undo resolve crash * BSE: Bus::mute: port property to C++ * BEAST-GTK: bstbuseditor: support both, aida and old style properties * BSE: Bus::solo: port property to C++ * BSE: Bus::sync: port property to C++ * BSE: Bus::left_volume: port property to C++ * BEAST-GTK: bstbuseditor: use left_volume C++ property * BSE: Bus::right_volume: port property to C++ * BEAST-GTK: bstbuseditor: use right_volume C++ property * BSE: Bus::master_output: port property to C++ -- File Changes -- M beast-gtk/bstbuseditor.cc (37) M bse/bseapi.idl (23) M bse/bsebus.cc (363) M bse/bsebus.hh (22) M bse/bseitem.cc (2) -- Patch Links -- https://github.com/tim-janik/beast/pull/78.patch https://github.com/tim-janik/beast/pull/78.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/78
_______________________________________________ beast mailing list [email protected] https://mail.gnome.org/mailman/listinfo/beast
