- static void apply_gain (BufferSet& bufs, nframes_t nframes, gain_t initial, gain_t target);
- static void apply_simple_gain(BufferSet& bufs, nframes_t nframes, gain_t target);
-
- gain_t gain () const { return _gain_control->user_float(); }
-
- virtual void set_gain (gain_t g, void *src);
- void inc_gain (gain_t delta, void *src);
-
- static void update_meters();
-
- /* automation */
-
- struct GainControl : public AutomationControl {
- GainControl (std::string name, Session& session, Amp* a, const Evoral::Parameter ¶m,
- boost::shared_ptr<AutomationList> al = boost::shared_ptr<AutomationList>() )
- : AutomationControl (session, param, al, name)
- , _amp (a)
- {}
-
- void set_value (float val);
- float get_value (void) const;
-
- Amp* _amp;
- };
+ static gain_t apply_gain (AudioBuffer& buf, samplecnt_t sample_rate, samplecnt_t nframes, gain_t initial, gain_t target, sampleoffset_t offset = 0);
+ static void apply_simple_gain (AudioBuffer& buf, samplecnt_t nframes, gain_t target, sampleoffset_t offset = 0);