[LAU] [LV2] [ANN] lv2-c++-tools 1.0.0

Lars Luthman lars.luthman at gmail.com
Wed Apr 16 12:57:56 EDT 2008


On Wed, 2008-04-16 at 17:48 +0200, Lars Luthman wrote:
>  #include <lv2plugin.hpp>
>  #include "gain.peg"
>  
>  class Gain : public LV2::Plugin<Gain> {
>  public:
>    Gain(double rate) : LV2::Plugin<Gain>(p_n_ports) { }
>    void run(uint32_t nframes) {
>      for (uint32_t i = 0; i < nframes; ++i)
>        p(p_out)[i] = p(p_gain) * p(p_in);    // <-------
>    }
>  };
>  
>  static int _ = Gain::register_class("http://my.plugin/");

As pointed out by Pau Arumí Albó on LAD, the line marked with an arrow
should of course be 

       p(p_out)[i] = *p(p_gain) * p(p_in)[i];

The original code would give a compilation error.


--ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.linuxaudio.org/pipermail/linux-audio-user/attachments/20080416/c657196a/attachment.pgp 


More information about the Linux-audio-user mailing list