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.
https://github.com/tim-janik/beast/pull/78
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.