free (_port);
}
- void cycle_start(jack_nframes_t nframes);
- void cycle_end();
+ void cycle_start(nframes_t nframes) {
+ _buffer.set_data ((Sample*) jack_port_get_buffer (_port, nframes), nframes);
+ }
+
+ void cycle_end() {}
DataType type() const { return DataType(DataType::AUDIO); }
uint32_t short_overs () const { return _short_overs; }
uint32_t long_overs () const { return _long_overs; }
- static void set_short_over_length (jack_nframes_t);
- static void set_long_over_length (jack_nframes_t);
-
- /** Assumes that the port is an audio output port */
- void silence (jack_nframes_t nframes, jack_nframes_t offset) {
- if (!_silent) {
- _buffer.clear(offset);
- if (offset == 0 && nframes == _buffer.capacity()) {
- _silent = true;
- }
- }
- }
-
+ static void set_short_over_length (nframes_t);
+ static void set_long_over_length (nframes_t);
+
protected:
friend class AudioEngine;
AudioBuffer _buffer;
- jack_nframes_t _overlen;
+ nframes_t _overlen;
jack_default_audio_sample_t _peak;
float _peak_db;
uint32_t _short_overs;
uint32_t _long_overs;
- static jack_nframes_t _long_over_length;
- static jack_nframes_t _short_over_length;
+ static nframes_t _long_over_length;
+ static nframes_t _short_over_length;
};
} // namespace ARDOUR