ardour
capturing_processor.cc
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 Paul Davis
3  Author: Sakari Bergen
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 
19 */
20 
22 #include "ardour/session.h"
23 #include "ardour/audioengine.h"
24 
25 #include "i18n.h"
26 
27 namespace ARDOUR {
28 
30  : Processor (session, X_("capture point"))
31  , block_size (AudioEngine::instance()->samples_per_cycle())
32 {
33  realloc_buffers ();
34 }
35 
37 {
38 }
39 
40 int
42 {
43  block_size = nframes;
45  return 0;
46 }
47 
48 void
50 {
51  if (active()) {
52  capture_buffers.read_from (bufs, nframes);
53  }
54 }
55 
56 bool
58 {
59  Processor::configure_io (in, out);
61  return true;
62 }
63 
64 bool
66 {
67  out = in;
68  return true;
69 }
70 
71 void
73 {
75 }
76 
77 XMLNode &
79 {
80  XMLNode& node = Processor::state (full);
81 
82  node.add_property (X_("type"), X_("capture"));
83  return node;
84 }
85 
86 } // namespace ARDOUR
bool can_support_io_configuration(const ChanCount &in, ChanCount &out)
void ensure_buffers(DataType type, size_t num_buffers, size_t buffer_capacity)
Definition: buffer_set.cc:149
uint32_t pframes_t
Definition: types.h:61
void read_from(const BufferSet &in, framecnt_t nframes)
Definition: buffer_set.cc:434
CapturingProcessor(Session &session)
#define X_(Text)
Definition: i18n.h:13
void run(BufferSet &bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool result_required)
Definition: amp.h:29
virtual XMLNode & state(bool)
virtual bool configure_io(ChanCount in, ChanCount out)
Definition: processor.cc:246
int64_t framepos_t
Definition: types.h:66
XMLProperty * add_property(const char *name, const std::string &value)
bool configure_io(ChanCount in, ChanCount out)
Definition: xml++.h:95
virtual XMLNode & state(bool full)
Definition: processor.cc:109
int set_block_size(pframes_t nframes)
bool active() const
Definition: processor.h:61
ChanCount _configured_input
Definition: processor.h:131