[LV2] Usual way for UI to access sample rate
David Robillard
d at drobilla.net
Mon Aug 28 09:21:44 PDT 2017
On Fri, 2017-07-28 at 03:08 -0700, Hanspeter Portner wrote:
> On Fri, Jul 28, 2017, at 01:27 AM, Filipe Coelho wrote:
> > On 28.07.2017 10:15, Hermann Meyer wrote:
> > > Usually all hosts I know do it right.
> > > Samplerate is given in init.
> >
> > Only for plugins, not the UI.
> > Do you know a host which passes the samplerate to the UIs?
> > (I do it in Carla, but I think I might be doing it the wrong
> > way...)
>
> This should be done via the options extensions. The corresponding
> parameter is [1].
>
> [1] http://lv2plug.in/ns/ext/parameters/parameters.html#sampleRate
>
> The value in the UI can then be read via the options feature like in
> [2].
>
> [2]
> https://gitlab.com/OpenMusicKontrollers/synthpod/blob/master/plugins/
> synthpod_common_nk.c#L6144
This is indeed the correct way to do this.
--
dr
More information about the Devel
mailing list