40 PortInsert::name_and_id_new_insert (
Session& s, uint32_t& bitslot)
47 :
IOProcessor (s, true, true, name_and_id_new_insert (s, _bitslot),
"",
DataType::AUDIO, true)
105 if (
_output->n_ports().n_total() == 0) {
111 if (
_input->n_ports().n_audio() != 0) {
114 Sample* in =
_input->ports().nth_audio_port(0)->get_audio_buffer (nframes).data();
115 Sample* out = outbuf.data();
119 outbuf.set_written (
true);
147 _out->run (bufs, start_frame, end_frame, nframes,
true);
166 snprintf (buf,
sizeof (buf),
"%" PRIu32,
_bitslot);
184 const XMLNode* insert_node = &node;
187 for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
188 if ((*niter)->name() ==
"Redirect") {
189 insert_node = *niter;
196 if ((prop = node.
property (
"type")) == 0) {
197 error <<
_(
"XML node describing port insert is missing the `type' field") <<
endmsg;
201 if (prop->
value() !=
"port") {
202 error <<
_(
"non-port insert XML used for port plugin insert") <<
endmsg;
206 uint32_t blocksize = 0;
207 if ((prop = node.
property (
"block_size")) != 0) {
208 sscanf (prop->
value().c_str(),
"%u", &blocksize);
218 if (!node.
property (
"ignore-bitslot")) {
219 if ((prop = node.
property (
"bitslot")) == 0) {
252 #ifndef PLATFORM_WINDOWS
258 if (
_input->ensure_io (in,
false,
this) != 0) {
262 if (
_output->ensure_io (out,
false,
this) != 0) {
281 ret = (ret &&
_input->set_name (name) &&
_output->set_name (name));
XMLNodeList::iterator XMLNodeIterator
ARDOUR::Session & _session
void run(BufferSet &bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool)
framecnt_t _latency_flush_frames
const std::string & value() const
pframes_t samples_per_cycle() const
std::list< XMLProperty * > XMLPropertyList
int process(size_t len, float *inp, float *out)
bool configure_io(ChanCount in, ChanCount out)
LIBPBD_API Transmitter error
const XMLNodeList & children(const std::string &str=std::string()) const
std::ostream & endmsg(std::ostream &ostr)
void stop_latency_detection()
static AudioEngine * instance()
framecnt_t frame_rate() const
boost::shared_ptr< IO > _output
void unmark_insert_id(uint32_t)
std::list< XMLNode * > XMLNodeList
XMLNode & get_state(void)
int set_state(const XMLNode &, int version)
virtual void deactivate()
XMLProperty * property(const char *)
bool set_name(const std::string &name)
virtual bool set_name(const std::string &str)
virtual bool configure_io(ChanCount in, ChanCount out)
framecnt_t signal_latency() const
void silence(framecnt_t nframes)
XMLProperty * add_property(const char *name, const std::string &value)
XMLNode & state(bool full_state)
bool can_support_io_configuration(const ChanCount &in, ChanCount &out)
boost::shared_ptr< Delivery > _out
pframes_t get_block_size() const
framecnt_t _measured_latency
boost::shared_ptr< IO > _input
void set_measured_latency(framecnt_t)
void start_latency_detection()
void mark_insert_id(uint32_t)
static const ChanCount ZERO
std::string string_compose(const std::string &fmt, const T1 &o1)
framecnt_t latency() const
XMLNode & state(bool full)
int set_state(const XMLNode &, int version)
uint32_t next_insert_id()