mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
post-rebase conflict resolution cleanup
This commit is contained in:
parent
10231299e9
commit
d6d1eef868
4 changed files with 31 additions and 85 deletions
|
|
@ -711,6 +711,8 @@ protected:
|
|||
|
||||
SlavableControlList slavables () const;
|
||||
|
||||
void fill_buffers_with_input (BufferSet& bufs, boost::shared_ptr<IO> io, pframes_t nframes);
|
||||
|
||||
private:
|
||||
/* no copy construction */
|
||||
Route (Route const &);
|
||||
|
|
@ -751,7 +753,6 @@ private:
|
|||
pframes_t latency_preroll (pframes_t nframes, samplepos_t& start_sample, samplepos_t& end_sample);
|
||||
|
||||
void run_route (samplepos_t start_sample, samplepos_t end_sample, pframes_t nframes, bool gain_automation_ok, bool run_disk_reader);
|
||||
void fill_buffers_with_input (BufferSet& bufs, boost::shared_ptr<IO> io, pframes_t nframes);
|
||||
|
||||
void reset_instrument_info ();
|
||||
void solo_control_changed (bool self, PBD::Controllable::GroupControlDisposition);
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class LIBARDOUR_API Trigger {
|
|||
Trigger() {}
|
||||
virtual ~Trigger() {}
|
||||
|
||||
virtual void bang (TriggerTrack&, Evoral::Beats, framepos_t) = 0;
|
||||
virtual void bang (TriggerTrack&, Temporal::Beats const &, samplepos_t) = 0;
|
||||
};
|
||||
|
||||
class LIBARDOUR_API AudioTrigger : public Trigger {
|
||||
|
|
@ -54,15 +54,15 @@ class LIBARDOUR_API AudioTrigger : public Trigger {
|
|||
AudioTrigger (boost::shared_ptr<AudioRegion>);
|
||||
~AudioTrigger ();
|
||||
|
||||
void bang (TriggerTrack&, Evoral::Beats, framepos_t);
|
||||
Sample* run (uint32_t channel, pframes_t& nframes, framepos_t start_frame, framepos_t end_frame, bool& need_butler);
|
||||
void bang (TriggerTrack&, Temporal::Beats const & , samplepos_t);
|
||||
Sample* run (uint32_t channel, pframes_t& nframes, samplepos_t start_frame, samplepos_t end_frame, bool& need_butler);
|
||||
|
||||
private:
|
||||
boost::shared_ptr<AudioRegion> region;
|
||||
bool running;
|
||||
std::vector<Sample*> data;
|
||||
framecnt_t read_index;
|
||||
framecnt_t length;
|
||||
samplecnt_t read_index;
|
||||
samplecnt_t length;
|
||||
};
|
||||
|
||||
class LIBARDOUR_API TriggerTrack : public Track
|
||||
|
|
@ -73,25 +73,21 @@ public:
|
|||
|
||||
int init ();
|
||||
|
||||
int roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick, bool& need_butler);
|
||||
int roll (pframes_t nframes, samplepos_t start_frame, samplepos_t end_frame, int declick, bool& need_butler);
|
||||
|
||||
void realtime_handle_transport_stopped ();
|
||||
void realtime_locate ();
|
||||
void non_realtime_locate (framepos_t);
|
||||
|
||||
boost::shared_ptr<Diskstream> create_diskstream ();
|
||||
void set_diskstream (boost::shared_ptr<Diskstream>);
|
||||
void realtime_locate (bool);
|
||||
void non_realtime_locate (samplepos_t);
|
||||
|
||||
int set_mode (TrackMode m);
|
||||
bool can_use_mode (TrackMode m, bool& bounce_required);
|
||||
|
||||
void freeze_me (ARDOUR::InterThreadInfo&);
|
||||
void unfreeze ();
|
||||
boost::shared_ptr<ARDOUR::Region> bounce (ARDOUR::InterThreadInfo&);
|
||||
boost::shared_ptr<ARDOUR::Region> bounce_range (framepos_t, framepos_t, ARDOUR::InterThreadInfo&, boost::shared_ptr<Processor>, bool);
|
||||
int export_stuff (BufferSet&, framepos_t, framecnt_t, boost::shared_ptr<Processor>, bool, bool, bool);
|
||||
boost::shared_ptr<ARDOUR::Region> bounce (ARDOUR::InterThreadInfo&, std::string const &);
|
||||
boost::shared_ptr<ARDOUR::Region> bounce_range (samplepos_t, samplepos_t, ARDOUR::InterThreadInfo&, boost::shared_ptr<Processor>, bool, std::string const &);
|
||||
int export_stuff (BufferSet&, samplepos_t, samplecnt_t, boost::shared_ptr<Processor>, bool, bool, bool, MidiStateTracker&);
|
||||
void set_state_part_two ();
|
||||
boost::shared_ptr<Diskstream> diskstream_factory (const XMLNode&);
|
||||
|
||||
DataType data_type () const {
|
||||
return DataType::AUDIO;
|
||||
|
|
@ -110,14 +106,14 @@ protected:
|
|||
private:
|
||||
boost::shared_ptr<MidiPort> _midi_port;
|
||||
|
||||
RingBuffer<Trigger*> _trigger_queue;
|
||||
PBD::RingBuffer<Trigger*> _trigger_queue;
|
||||
|
||||
typedef std::vector<Trigger*> Triggers;
|
||||
Triggers active_triggers;
|
||||
Glib::Threads::Mutex trigger_lock;
|
||||
Triggers all_triggers;
|
||||
|
||||
int no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, bool state_changing);
|
||||
int no_roll (pframes_t nframes, samplepos_t start_frame, samplepos_t end_frame, bool state_changing);
|
||||
|
||||
void note_on (int note_number, int velocity);
|
||||
void note_off (int note_number, int velocity);
|
||||
|
|
|
|||
|
|
@ -2774,22 +2774,6 @@ Session::new_trigger_track (const ChanCount& input_channels, const ChanCount& ou
|
|||
track->set_strict_io (true);
|
||||
}
|
||||
|
||||
if (ARDOUR::Profile->get_trx ()) {
|
||||
// TRACKS considers it's not a USE CASE, it's
|
||||
// a piece of behavior of the session model:
|
||||
//
|
||||
// Gain for a newly created route depends on
|
||||
// the current output_auto_connect mode:
|
||||
//
|
||||
// 0 for Stereo Out mode
|
||||
// 0 Multi Out mode
|
||||
if (Config->get_output_auto_connect() & AutoConnectMaster) {
|
||||
track->gain_control()->set_value (dB_to_coefficient (0), Controllable::NoGroup);
|
||||
}
|
||||
}
|
||||
|
||||
track->use_new_diskstream();
|
||||
|
||||
BOOST_MARK_TRACK (track);
|
||||
|
||||
{
|
||||
|
|
@ -2816,9 +2800,6 @@ Session::new_trigger_track (const ChanCount& input_channels, const ChanCount& ou
|
|||
route_group->add (track);
|
||||
}
|
||||
|
||||
track->non_realtime_input_change();
|
||||
|
||||
track->DiskstreamChanged.connect_same_thread (*this, boost::bind (&Session::resort_routes, this));
|
||||
|
||||
new_routes.push_back (track);
|
||||
ret.push_back (track);
|
||||
|
|
@ -2841,11 +2822,7 @@ Session::new_trigger_track (const ChanCount& input_channels, const ChanCount& ou
|
|||
failed:
|
||||
if (!new_routes.empty()) {
|
||||
StateProtector sp (this);
|
||||
if (Profile->get_trx()) {
|
||||
add_routes (new_routes, false, false, false, order);
|
||||
} else {
|
||||
add_routes (new_routes, true, true, false, order);
|
||||
}
|
||||
add_routes (new_routes, true, true, order);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
#include "ardour/audio_buffer.h"
|
||||
#include "ardour/audioengine.h"
|
||||
#include "ardour/audio_diskstream.h"
|
||||
#include "ardour/audio_port.h"
|
||||
#include "ardour/audioregion.h"
|
||||
#include "ardour/io.h"
|
||||
|
|
@ -114,14 +113,14 @@ TriggerTrack::queue_trigger (Trigger* trigger)
|
|||
}
|
||||
|
||||
int
|
||||
TriggerTrack::no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, bool state_changing)
|
||||
TriggerTrack::no_roll (pframes_t nframes, samplepos_t start_frame, samplepos_t end_frame, bool state_changing)
|
||||
{
|
||||
bool ignored;
|
||||
return roll (nframes, start_frame, end_frame, state_changing, ignored);
|
||||
}
|
||||
|
||||
int
|
||||
TriggerTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick, bool& need_butler)
|
||||
TriggerTrack::roll (pframes_t nframes, samplepos_t start_frame, samplepos_t end_frame, int declick, bool& need_butler)
|
||||
{
|
||||
/* check MIDI port input buffers for triggers */
|
||||
|
||||
|
|
@ -139,8 +138,8 @@ TriggerTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_fr
|
|||
/* find offset to next bar * and beat start
|
||||
*/
|
||||
|
||||
framepos_t next_beat = 0;
|
||||
Evoral::Beats beats_now;
|
||||
samplepos_t next_beat = 0;
|
||||
Temporal::Beats beats_now;
|
||||
|
||||
/* if next beat occurs in this process cycle, see if we have any triggers waiting
|
||||
*/
|
||||
|
|
@ -179,12 +178,9 @@ TriggerTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_fr
|
|||
|
||||
need_butler = false;
|
||||
|
||||
uint32_t nchans = _diskstream->n_channels().n_audio();
|
||||
boost::shared_ptr<AudioDiskstream> ads = boost::dynamic_pointer_cast<AudioDiskstream> (_diskstream);
|
||||
|
||||
if (!ads) {
|
||||
return 0;
|
||||
}
|
||||
uint32_t nchans = 1; /* XXX used to get this from the diskstream
|
||||
* .. where now?
|
||||
*/
|
||||
|
||||
bool err = false;
|
||||
|
||||
|
|
@ -233,32 +229,15 @@ TriggerTrack::realtime_handle_transport_stopped ()
|
|||
}
|
||||
|
||||
void
|
||||
TriggerTrack::realtime_locate ()
|
||||
TriggerTrack::realtime_locate (bool)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
TriggerTrack::non_realtime_locate (framepos_t)
|
||||
TriggerTrack::non_realtime_locate (samplepos_t)
|
||||
{
|
||||
}
|
||||
|
||||
boost::shared_ptr<Diskstream>
|
||||
TriggerTrack::create_diskstream ()
|
||||
{
|
||||
return boost::shared_ptr<Diskstream> (new AudioDiskstream (_session, name(), AudioDiskstream::Recordable));
|
||||
}
|
||||
|
||||
void
|
||||
TriggerTrack::set_diskstream (boost::shared_ptr<Diskstream> ds)
|
||||
{
|
||||
Track::set_diskstream (ds);
|
||||
_diskstream->set_track (this);
|
||||
_diskstream->set_record_enabled (false);
|
||||
_diskstream->request_input_monitoring (false);
|
||||
|
||||
DiskstreamChanged (); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
int
|
||||
TriggerTrack::set_state (const XMLNode& root, int version)
|
||||
{
|
||||
|
|
@ -314,19 +293,19 @@ TriggerTrack::unfreeze ()
|
|||
}
|
||||
|
||||
boost::shared_ptr<Region>
|
||||
TriggerTrack::bounce (ARDOUR::InterThreadInfo&)
|
||||
TriggerTrack::bounce (ARDOUR::InterThreadInfo&, std::string const &)
|
||||
{
|
||||
return boost::shared_ptr<Region> ();
|
||||
}
|
||||
|
||||
boost::shared_ptr<Region>
|
||||
TriggerTrack::bounce_range (framepos_t, framepos_t, ARDOUR::InterThreadInfo&, boost::shared_ptr<Processor>, bool)
|
||||
TriggerTrack::bounce_range (samplepos_t, samplepos_t, ARDOUR::InterThreadInfo&, boost::shared_ptr<Processor>, bool, std::string const &)
|
||||
{
|
||||
return boost::shared_ptr<Region> ();
|
||||
}
|
||||
|
||||
int
|
||||
TriggerTrack::export_stuff (BufferSet&, framepos_t, framecnt_t, boost::shared_ptr<Processor>, bool, bool, bool)
|
||||
TriggerTrack::export_stuff (BufferSet&, samplepos_t, samplecnt_t, boost::shared_ptr<Processor>, bool, bool, bool, MidiStateTracker&)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -336,13 +315,6 @@ TriggerTrack::set_state_part_two ()
|
|||
{
|
||||
}
|
||||
|
||||
boost::shared_ptr<Diskstream>
|
||||
TriggerTrack::diskstream_factory (const XMLNode& node)
|
||||
{
|
||||
return boost::shared_ptr<Diskstream> (new AudioDiskstream (_session, node));
|
||||
}
|
||||
|
||||
|
||||
/*--------------------*/
|
||||
|
||||
AudioTrigger::AudioTrigger (boost::shared_ptr<AudioRegion> r)
|
||||
|
|
@ -374,7 +346,7 @@ AudioTrigger::~AudioTrigger ()
|
|||
}
|
||||
|
||||
void
|
||||
AudioTrigger::bang (TriggerTrack& /*track*/, Evoral::Beats bangpos, framepos_t framepos)
|
||||
AudioTrigger::bang (TriggerTrack& /*track*/, Temporal::Beats const &, samplepos_t)
|
||||
{
|
||||
/* user triggered this, and we need to get things set up for calls to
|
||||
* run()
|
||||
|
|
@ -385,7 +357,7 @@ AudioTrigger::bang (TriggerTrack& /*track*/, Evoral::Beats bangpos, framepos_t f
|
|||
}
|
||||
|
||||
Sample*
|
||||
AudioTrigger::run (uint32_t channel, pframes_t& nframes, framepos_t start_frame, framepos_t end_frame, bool& need_butler)
|
||||
AudioTrigger::run (uint32_t channel, pframes_t& nframes, samplepos_t start_frame, samplepos_t end_frame, bool& need_butler)
|
||||
{
|
||||
if (!running) {
|
||||
return 0;
|
||||
|
|
@ -399,7 +371,7 @@ AudioTrigger::run (uint32_t channel, pframes_t& nframes, framepos_t start_frame,
|
|||
return 0;
|
||||
}
|
||||
|
||||
nframes = (pframes_t) std::min ((framecnt_t) nframes, (length - read_index));
|
||||
nframes = (pframes_t) std::min ((samplecnt_t) nframes, (length - read_index));
|
||||
|
||||
Sample* ret = data[channel] + read_index;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue