mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Some further notes (and experiments) on optimizations
This commit is contained in:
parent
da4cea0526
commit
4cdd3f5df6
1 changed files with 9 additions and 4 deletions
|
|
@ -755,7 +755,7 @@ PortManager::cycle_start (pframes_t nframes, Session* s)
|
||||||
|
|
||||||
/* TODO optimize
|
/* TODO optimize
|
||||||
* - when speed == 1.0, the resampler copies data without processing
|
* - when speed == 1.0, the resampler copies data without processing
|
||||||
* it may be more efficient to just run all in sequence
|
* it may (or may not) be more efficient to just run all in sequence.
|
||||||
*
|
*
|
||||||
* - single sequential task for 'lightweight' tasks would make sense
|
* - single sequential task for 'lightweight' tasks would make sense
|
||||||
* (run it in parallel with 'heavy' resampling.
|
* (run it in parallel with 'heavy' resampling.
|
||||||
|
|
@ -766,8 +766,13 @@ PortManager::cycle_start (pframes_t nframes, Session* s)
|
||||||
* amount of work (how many connected ports are there, how
|
* amount of work (how many connected ports are there, how
|
||||||
* many resamplers need to run) vs. available CPU cores and semaphore
|
* many resamplers need to run) vs. available CPU cores and semaphore
|
||||||
* synchronization overhead.
|
* synchronization overhead.
|
||||||
|
*
|
||||||
|
* - input ports: it would make sense to resample each input only once
|
||||||
|
* (rather than resample into each ardour-owned input port).
|
||||||
|
* A single external source-port may be connected to many ardour
|
||||||
|
* input-ports. Currently re-sampling is per input.
|
||||||
*/
|
*/
|
||||||
if (s && s->rt_tasklist () /* && fabs (Port::speed_ratio ()) != 1.0 */) {
|
if (s && s->rt_tasklist () && fabs (Port::speed_ratio ()) != 1.0) {
|
||||||
RTTaskList::TaskList tl;
|
RTTaskList::TaskList tl;
|
||||||
for (Ports::iterator p = _cycle_ports->begin(); p != _cycle_ports->end(); ++p) {
|
for (Ports::iterator p = _cycle_ports->begin(); p != _cycle_ports->end(); ++p) {
|
||||||
tl.push_back (boost::bind (&Port::cycle_start, p->second, nframes));
|
tl.push_back (boost::bind (&Port::cycle_start, p->second, nframes));
|
||||||
|
|
@ -784,7 +789,7 @@ void
|
||||||
PortManager::cycle_end (pframes_t nframes, Session* s)
|
PortManager::cycle_end (pframes_t nframes, Session* s)
|
||||||
{
|
{
|
||||||
// see optimzation note in ::cycle_start()
|
// see optimzation note in ::cycle_start()
|
||||||
if (s && s->rt_tasklist () /* && fabs (Port::speed_ratio ()) != 1.0 */) {
|
if (s && s->rt_tasklist () && fabs (Port::speed_ratio ()) != 1.0) {
|
||||||
RTTaskList::TaskList tl;
|
RTTaskList::TaskList tl;
|
||||||
for (Ports::iterator p = _cycle_ports->begin(); p != _cycle_ports->end(); ++p) {
|
for (Ports::iterator p = _cycle_ports->begin(); p != _cycle_ports->end(); ++p) {
|
||||||
tl.push_back (boost::bind (&Port::cycle_end, p->second, nframes));
|
tl.push_back (boost::bind (&Port::cycle_end, p->second, nframes));
|
||||||
|
|
@ -887,7 +892,7 @@ void
|
||||||
PortManager::cycle_end_fade_out (gain_t base_gain, gain_t gain_step, pframes_t nframes, Session* s)
|
PortManager::cycle_end_fade_out (gain_t base_gain, gain_t gain_step, pframes_t nframes, Session* s)
|
||||||
{
|
{
|
||||||
// see optimzation note in ::cycle_start()
|
// see optimzation note in ::cycle_start()
|
||||||
if (s && s->rt_tasklist () /* && fabs (Port::speed_ratio ()) != 1.0 */) {
|
if (s && s->rt_tasklist () && fabs (Port::speed_ratio ()) != 1.0) {
|
||||||
RTTaskList::TaskList tl;
|
RTTaskList::TaskList tl;
|
||||||
for (Ports::iterator p = _cycle_ports->begin(); p != _cycle_ports->end(); ++p) {
|
for (Ports::iterator p = _cycle_ports->begin(); p != _cycle_ports->end(); ++p) {
|
||||||
tl.push_back (boost::bind (&Port::cycle_end, p->second, nframes));
|
tl.push_back (boost::bind (&Port::cycle_end, p->second, nframes));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue