#include "ardour/buffer_set.h"
#include "ardour/configuration.h"
#include "ardour/io.h"
+#include "ardour/midi_buffer.h"
#include "ardour/mute_master.h"
#include "ardour/session.h"
add_control(_gain_control);
}
+std::string
+Amp::display_name() const
+{
+ return _("Fader");
+}
+
bool
Amp::can_support_io_configuration (const ChanCount& in, ChanCount& out) const
{
}
void
-Amp::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes)
+Amp::run (BufferSet& bufs, sframes_t /*start_frame*/, sframes_t /*end_frame*/, nframes_t nframes)
{
gain_t mute_gain;
+ if (!_active && !_pending_active) {
+ return;
+ }
+
if (_mute_master) {
mute_gain = _mute_master->mute_gain_at (MuteMaster::PreFader);
} else {
}
}
}
+
+ _active = _pending_active;
}
void
delta = target - initial;
}
+ /* MIDI Gain */
+
+ for (BufferSet::midi_iterator i = bufs.midi_begin(); i != bufs.midi_end(); ++i) {
+#if 0
+ MidiBuffer& mb (*i);
+
+ for (MidiBuffer::iterator m = mb.begin(); m != mb.end(); ++m) {
+ Evoral::MIDIEvent<MidiBuffer::TimeType> ev (*m);
+ if (ev.buffer()[0] == MIDI_CMD_NOTE_ON) {
+ ev.buffer()[2] = (uint8_t) rint (ev.buffer()[2] * 1.0);
+ }
+ }
+#endif
+ }
+
+ /* Audio Gain */
+
for (BufferSet::audio_iterator i = bufs.audio_begin(); i != bufs.audio_end(); ++i) {
Sample* const buffer = i->data();
-
+
fractional_pos = 1.0;
for (nframes_t nx = 0; nx < declick; ++nx) {
_apply_gain_automation = false;
}
}
+
+bool
+Amp::visible() const
+{
+ return true;
+}