mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +01:00
Consolidate common bounce code of Audio and MIDI Track
This commit is contained in:
parent
b736c50d83
commit
15d560c5e4
6 changed files with 31 additions and 47 deletions
|
|
@ -44,10 +44,7 @@ class LIBARDOUR_API AudioTrack : public Track
|
||||||
void unfreeze ();
|
void unfreeze ();
|
||||||
|
|
||||||
bool bounceable (std::shared_ptr<Processor>, bool include_endpoint) const;
|
bool bounceable (std::shared_ptr<Processor>, bool include_endpoint) const;
|
||||||
std::shared_ptr<Region> bounce (InterThreadInfo&, std::string const& name);
|
|
||||||
std::shared_ptr<Region> bounce_range (samplepos_t start, samplepos_t end, InterThreadInfo&,
|
|
||||||
std::shared_ptr<Processor> endpoint, bool include_endpoint,
|
|
||||||
std::string const& name);
|
|
||||||
int export_stuff (BufferSet& bufs, samplepos_t start_sample, samplecnt_t nframes,
|
int export_stuff (BufferSet& bufs, samplepos_t start_sample, samplecnt_t nframes,
|
||||||
std::shared_ptr<Processor> endpoint, bool include_endpoint, bool for_export, bool for_freeze,
|
std::shared_ptr<Processor> endpoint, bool include_endpoint, bool for_export, bool for_freeze,
|
||||||
MidiNoteTracker&);
|
MidiNoteTracker&);
|
||||||
|
|
|
||||||
|
|
@ -53,14 +53,7 @@ public:
|
||||||
void freeze_me (InterThreadInfo&);
|
void freeze_me (InterThreadInfo&);
|
||||||
void unfreeze ();
|
void unfreeze ();
|
||||||
|
|
||||||
bool bounceable (std::shared_ptr<Processor>, bool) const { return false; }
|
bool bounceable (std::shared_ptr<Processor>, bool include_endpoint) const;
|
||||||
std::shared_ptr<Region> bounce (InterThreadInfo&, std::string const&);
|
|
||||||
std::shared_ptr<Region> bounce_range (samplepos_t start,
|
|
||||||
samplepos_t end,
|
|
||||||
InterThreadInfo& iti,
|
|
||||||
std::shared_ptr<Processor> endpoint,
|
|
||||||
bool include_endpoint,
|
|
||||||
std::string const& name);
|
|
||||||
|
|
||||||
int export_stuff (BufferSet& bufs,
|
int export_stuff (BufferSet& bufs,
|
||||||
samplepos_t start_sample,
|
samplepos_t start_sample,
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ public:
|
||||||
* @param itt asynchronous progress report and cancel
|
* @param itt asynchronous progress report and cancel
|
||||||
* @return a new audio region (or nil in case of error)
|
* @return a new audio region (or nil in case of error)
|
||||||
*/
|
*/
|
||||||
virtual std::shared_ptr<Region> bounce (InterThreadInfo& itt, std::string const& name) = 0;
|
virtual std::shared_ptr<Region> bounce (InterThreadInfo& itt, std::string const& name);
|
||||||
|
|
||||||
/** Bounce the given range to a new audio region.
|
/** Bounce the given range to a new audio region.
|
||||||
* @param start start time (in samples)
|
* @param start start time (in samples)
|
||||||
|
|
@ -110,7 +110,7 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual std::shared_ptr<Region> bounce_range (samplepos_t start, samplepos_t end, InterThreadInfo& itt,
|
virtual std::shared_ptr<Region> bounce_range (samplepos_t start, samplepos_t end, InterThreadInfo& itt,
|
||||||
std::shared_ptr<Processor> endpoint, bool include_endpoint,
|
std::shared_ptr<Processor> endpoint, bool include_endpoint,
|
||||||
std::string const& name) = 0;
|
std::string const& name);
|
||||||
|
|
||||||
virtual int export_stuff (BufferSet& bufs, samplepos_t start_sample, samplecnt_t nframes,
|
virtual int export_stuff (BufferSet& bufs, samplepos_t start_sample, samplecnt_t nframes,
|
||||||
std::shared_ptr<Processor> endpoint, bool include_endpoint, bool for_export, bool for_freeze,
|
std::shared_ptr<Processor> endpoint, bool include_endpoint, bool for_export, bool for_freeze,
|
||||||
|
|
|
||||||
|
|
@ -306,24 +306,6 @@ AudioTrack::bounceable (std::shared_ptr<Processor> endpoint, bool include_endpoi
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Region>
|
|
||||||
AudioTrack::bounce (InterThreadInfo& itt, std::string const& name)
|
|
||||||
{
|
|
||||||
return bounce_range (_session.current_start_sample(), _session.current_end_sample(), itt, main_outs(), false, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::shared_ptr<Region>
|
|
||||||
AudioTrack::bounce_range (samplepos_t start,
|
|
||||||
samplepos_t end,
|
|
||||||
InterThreadInfo& itt,
|
|
||||||
std::shared_ptr<Processor> endpoint,
|
|
||||||
bool include_endpoint,
|
|
||||||
std::string const& name)
|
|
||||||
{
|
|
||||||
vector<std::shared_ptr<Source> > srcs;
|
|
||||||
return _session.write_one_track (*this, start, end, false, srcs, itt, endpoint, include_endpoint, false, false, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioTrack::freeze_me (InterThreadInfo& itt)
|
AudioTrack::freeze_me (InterThreadInfo& itt)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -604,22 +604,16 @@ MidiTrack::export_stuff (BufferSet& buffers,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Region>
|
bool
|
||||||
MidiTrack::bounce (InterThreadInfo& itt, std::string const& name)
|
MidiTrack::bounceable (std::shared_ptr<Processor> endpoint, bool include_endpoint) const
|
||||||
{
|
{
|
||||||
return bounce_range (_session.current_start_sample(), _session.current_end_sample(), itt, main_outs(), false, name);
|
if (!endpoint && !include_endpoint) {
|
||||||
}
|
/* no processing - just read from the playlist and create new
|
||||||
|
* files: always possible.
|
||||||
std::shared_ptr<Region>
|
*/
|
||||||
MidiTrack::bounce_range (samplepos_t start,
|
return true;
|
||||||
samplepos_t end,
|
}
|
||||||
InterThreadInfo& itt,
|
return false; // a lie, Session::write_one_track can handle this.
|
||||||
std::shared_ptr<Processor> endpoint,
|
|
||||||
bool include_endpoint,
|
|
||||||
std::string const& name)
|
|
||||||
{
|
|
||||||
vector<std::shared_ptr<Source> > srcs;
|
|
||||||
return _session.write_one_track (*this, start, end, false, srcs, itt, endpoint, include_endpoint, false, false, name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -931,6 +931,24 @@ Track::set_processor_state (XMLNode const& node, int version, XMLProperty const*
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::shared_ptr<Region>
|
||||||
|
Track::bounce (InterThreadInfo& itt, std::string const& name)
|
||||||
|
{
|
||||||
|
return bounce_range (_session.current_start_sample(), _session.current_end_sample(), itt, main_outs(), false, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::shared_ptr<Region>
|
||||||
|
Track::bounce_range (samplepos_t start,
|
||||||
|
samplepos_t end,
|
||||||
|
InterThreadInfo& itt,
|
||||||
|
std::shared_ptr<Processor> endpoint,
|
||||||
|
bool include_endpoint,
|
||||||
|
std::string const& name)
|
||||||
|
{
|
||||||
|
vector<std::shared_ptr<Source> > srcs;
|
||||||
|
return _session.write_one_track (*this, start, end, false, srcs, itt, endpoint, include_endpoint, false, false, name);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Track::use_captured_sources (SourceList& srcs, CaptureInfos const & capture_info)
|
Track::use_captured_sources (SourceList& srcs, CaptureInfos const & capture_info)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue