mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-23 15:16:25 +01:00
Remove unused buffers and associated support code from
InternalReturn. git-svn-id: svn://localhost/ardour2/branches/3.0@10942 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
32c1c8a1c7
commit
26366a4062
3 changed files with 2 additions and 55 deletions
|
|
@ -34,27 +34,18 @@ class InternalReturn : public Return
|
||||||
public:
|
public:
|
||||||
InternalReturn (Session&);
|
InternalReturn (Session&);
|
||||||
|
|
||||||
XMLNode& state(bool full);
|
XMLNode& state (bool full);
|
||||||
XMLNode& get_state(void);
|
XMLNode& get_state ();
|
||||||
int set_state(const XMLNode&, int version);
|
|
||||||
|
|
||||||
void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool);
|
void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool);
|
||||||
bool configure_io (ChanCount in, ChanCount out);
|
|
||||||
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
|
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
|
||||||
int set_block_size (pframes_t);
|
|
||||||
|
|
||||||
void add_send (InternalSend *);
|
void add_send (InternalSend *);
|
||||||
void remove_send (InternalSend *);
|
void remove_send (InternalSend *);
|
||||||
|
|
||||||
static PBD::Signal1<void, pframes_t> CycleStart;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BufferSet buffers;
|
|
||||||
/** sends that we are receiving data from */
|
/** sends that we are receiving data from */
|
||||||
std::list<InternalSend*> _sends;
|
std::list<InternalSend*> _sends;
|
||||||
|
|
||||||
void allocate_buffers (pframes_t);
|
|
||||||
void cycle_start (pframes_t);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace ARDOUR
|
} // namespace ARDOUR
|
||||||
|
|
|
||||||
|
|
@ -492,7 +492,6 @@ AudioEngine::process_callback (pframes_t nframes)
|
||||||
Delivery::CycleStart (nframes);
|
Delivery::CycleStart (nframes);
|
||||||
Port::set_global_port_buffer_offset (0);
|
Port::set_global_port_buffer_offset (0);
|
||||||
Port::set_cycle_framecnt (nframes);
|
Port::set_cycle_framecnt (nframes);
|
||||||
InternalReturn::CycleStart (nframes);
|
|
||||||
|
|
||||||
/* tell all Ports that we're starting a new cycle */
|
/* tell all Ports that we're starting a new cycle */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,9 @@
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace ARDOUR;
|
using namespace ARDOUR;
|
||||||
|
|
||||||
PBD::Signal1<void, pframes_t> InternalReturn::CycleStart;
|
|
||||||
|
|
||||||
InternalReturn::InternalReturn (Session& s)
|
InternalReturn::InternalReturn (Session& s)
|
||||||
: Return (s, true)
|
: Return (s, true)
|
||||||
{
|
{
|
||||||
CycleStart.connect_same_thread (*this, boost::bind (&InternalReturn::cycle_start, this, _1));
|
|
||||||
_display_to_user = false;
|
_display_to_user = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -57,28 +54,6 @@ InternalReturn::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*e
|
||||||
_active = _pending_active;
|
_active = _pending_active;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
InternalReturn::configure_io (ChanCount in, ChanCount out)
|
|
||||||
{
|
|
||||||
IOProcessor::configure_io (in, out);
|
|
||||||
allocate_buffers (_session.engine().frames_per_cycle());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
InternalReturn::set_block_size (pframes_t nframes)
|
|
||||||
{
|
|
||||||
allocate_buffers (nframes);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
InternalReturn::allocate_buffers (pframes_t nframes)
|
|
||||||
{
|
|
||||||
buffers.ensure_buffers (_configured_input, nframes);
|
|
||||||
buffers.set_count (_configured_input);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
InternalReturn::add_send (InternalSend* send)
|
InternalReturn::add_send (InternalSend* send)
|
||||||
{
|
{
|
||||||
|
|
@ -93,16 +68,6 @@ InternalReturn::remove_send (InternalSend* send)
|
||||||
_sends.remove (send);
|
_sends.remove (send);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
InternalReturn::cycle_start (pframes_t nframes)
|
|
||||||
{
|
|
||||||
/* called from process cycle - no lock necessary */
|
|
||||||
if (!_sends.empty ()) {
|
|
||||||
/* don't bother with this if nobody is going to feed us anything */
|
|
||||||
buffers.silence (nframes, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
XMLNode&
|
XMLNode&
|
||||||
InternalReturn::state (bool full)
|
InternalReturn::state (bool full)
|
||||||
{
|
{
|
||||||
|
|
@ -118,17 +83,9 @@ InternalReturn::get_state()
|
||||||
return state (true);
|
return state (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
InternalReturn::set_state (const XMLNode& node, int version)
|
|
||||||
{
|
|
||||||
return Return::set_state (node, version);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
InternalReturn::can_support_io_configuration (const ChanCount& in, ChanCount& out) const
|
InternalReturn::can_support_io_configuration (const ChanCount& in, ChanCount& out) const
|
||||||
{
|
{
|
||||||
out = in;
|
out = in;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue