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

From: Lars Luthman <lars.luthman@email-addr-hidden>
Date: Wed Apr 16 2008 - 19:57:56 EEST

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

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user

Received on Wed Apr 16 20:15:18 2008

This archive was generated by hypermail 2.1.8 : Wed Apr 16 2008 - 20:15:18 EEST