<div dir="ltr">Hello,<blockquote type="cite" style="color:rgb(80,0,80)"><pre>problem is get_supplied_options() returns 0 options when called from the UI.</pre></blockquote><div class="gmail_extra">get_supplied_options() should work fine both in UIs and Plugins.   My guess is the host only gives the sampleRate option to the Plugin and not the UI.   Which host are you working with?<br>
<br>Also, you can compile the UI with a  -DLVTK_DEBUG=1, and the console will print the validation status for any features passed in by the host.<br><br>You could also from the UI send a patch get message and make sure the Plugin knows how to respond appropriately.<br>
<br><br><div class="gmail_quote">On Sat, Oct 12, 2013 at 1:16 PM, Filipe Coelho <span dir="ltr"><<a href="mailto:falktx@gmail.com" target="_blank">falktx@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

  
    
  
  <div bgcolor="#333333" text="#CCCCCC"><div class="im">
    <div>On 10/12/2013 04:36 PM, Aurélien
      Leblond wrote:<br>
    </div>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre>LV2 UIs can get the sample-rate using the options extension.
Hosts will set the appropriate option lv2param:sampleRate which the UI
can get on initialization.
</pre>
      </blockquote>
      <pre>I tried that but without success.
I'm using the LVTK library to develop this plugin. My approach is to:
- use the get_supplied_options() method to access the host supplied options
- iterate until I find SampleRate

problem is get_supplied_options() returns 0 options when called from the UI.

Any advice?</pre>
    </blockquote></div>
    Speak to your host developer.<br>
    <br>
    In my host LV2 UI code I have this:<br>
<a href="https://github.com/falkTX/Carla/blob/master/source/bridges/CarlaBridgeUI-LV2.cpp#L124" target="_blank">https://github.com/falkTX/Carla/blob/master/source/bridges/CarlaBridgeUI-LV2.cpp#L124</a><br>
    <br>
    The sample-rate is passed via options feature to the UI, among other
    things.<br>
    <br>
    <br>
    btw, option extension uses lv2:sampleRate and not
    lv2param:sampleRate, my mistake.<br>
    <br>
  </div>

<br>_______________________________________________<br>
Linux-audio-dev mailing list<br>
<a href="mailto:Linux-audio-dev@lists.linuxaudio.org">Linux-audio-dev@lists.linuxaudio.org</a><br>
<a href="http://lists.linuxaudio.org/listinfo/linux-audio-dev" target="_blank">http://lists.linuxaudio.org/listinfo/linux-audio-dev</a><br>
<br></blockquote></div><br></div></div>