-Amp::apply_simple_gain (AudioBuffer& buf, nframes_t nframes, gain_t target)
-{
- if (target == 0.0) {
- memset (buf.data(), 0, sizeof (Sample) * nframes);
- } else if (target != 1.0) {
- apply_gain_to_buffer (buf.data(), nframes, target);
- }
-}
-
-void
-Amp::inc_gain (gain_t factor, void *src)
-{
- float desired_gain = _gain_control->user_double();
-
- if (desired_gain == 0.0f) {
- set_gain (0.000001f + (0.000001f * factor), src);
- } else {
- set_gain (desired_gain + (desired_gain * factor), src);
- }
-}
-
-void
-Amp::set_gain (gain_t val, void *src)
+Amp::apply_simple_gain (AudioBuffer& buf, samplecnt_t nframes, gain_t target, sampleoffset_t offset)