diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-01-23 13:41:20 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-01-23 13:41:20 -0500 |
commit | 7000afdc66c9e0ae8dcf9ec080517dabba1e7f34 (patch) | |
tree | 19574ed8a1fbafa6bed222d8cf817ee1c8098314 /libs/ardour/ardour | |
parent | 065e1e63342633f72725a5309926f71c87804293 (diff) | |
parent | 40d8c5ae01f25e02457c554170a53d537246a7d4 (diff) |
fix merge conflict with master
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/audio_diskstream.h | 4 | ||||
-rw-r--r-- | libs/ardour/ardour/auditioner.h | 61 | ||||
-rw-r--r-- | libs/ardour/ardour/internal_send.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/midi_diskstream.h | 5 | ||||
-rw-r--r-- | libs/ardour/ardour/rc_configuration_vars.h | 1 | ||||
-rw-r--r-- | libs/ardour/ardour/send.h | 4 | ||||
-rw-r--r-- | libs/ardour/ardour/session.h | 3 |
7 files changed, 65 insertions, 15 deletions
diff --git a/libs/ardour/ardour/audio_diskstream.h b/libs/ardour/ardour/audio_diskstream.h index 6741ba0ed4..c0b78bad13 100644 --- a/libs/ardour/ardour/audio_diskstream.h +++ b/libs/ardour/ardour/audio_diskstream.h @@ -146,10 +146,8 @@ class LIBARDOUR_API AudioDiskstream : public Diskstream protected: friend class Auditioner; - int seek (framepos_t which_sample, bool complete_refill = false); - - protected: friend class AudioTrack; + int seek (framepos_t which_sample, bool complete_refill = false); int process (BufferSet&, framepos_t transport_frame, pframes_t nframes, framecnt_t &, bool need_disk_signal); frameoffset_t calculate_playback_distance (pframes_t nframes); diff --git a/libs/ardour/ardour/auditioner.h b/libs/ardour/ardour/auditioner.h index 26e395f93e..94d4eab479 100644 --- a/libs/ardour/ardour/auditioner.h +++ b/libs/ardour/ardour/auditioner.h @@ -26,6 +26,10 @@ #include "ardour/ardour.h" #include "ardour/audio_track.h" +#include "ardour/midi_region.h" + +#include "ardour/audio_diskstream.h" +#include "ardour/midi_diskstream.h" namespace ARDOUR { @@ -33,14 +37,14 @@ class Session; class AudioRegion; class AudioPlaylist; -class LIBARDOUR_API Auditioner : public AudioTrack +class LIBARDOUR_API Auditioner : public Track { public: Auditioner (Session&); ~Auditioner (); int init (); - int connect (); + int connect (); void audition_region (boost::shared_ptr<Region>); @@ -63,11 +67,52 @@ class LIBARDOUR_API Auditioner : public AudioTrack virtual ChanCount input_streams () const; frameoffset_t seek_frame() const { return _seeking ? _seek_frame : -1;} - void seek_response(frameoffset_t pos) { _seek_complete = true; if (_seeking) { current_frame = pos; _seek_complete = true;} } + void seek_response(frameoffset_t pos) { + _seek_complete = true; + if (_seeking) { current_frame = pos; _seek_complete = true;} + } + PBD::Signal2<void, ARDOUR::framecnt_t, ARDOUR::framecnt_t> AuditionProgress; + /* Track */ + int roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick, bool& need_butler); + DataType data_type () const; + + int roll_audio (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick, bool& need_butler); + int roll_midi (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick, bool& need_butler); + + boost::shared_ptr<Diskstream> create_diskstream (); + void set_diskstream (boost::shared_ptr<Diskstream> ds); + + /* fake track */ + void set_state_part_two () {} + int set_state (const XMLNode&, int) { return 0; } + bool bounceable (boost::shared_ptr<Processor>, bool) const { return false; } + void freeze_me (InterThreadInfo&) {} + void unfreeze () {} + + boost::shared_ptr<Region> bounce (InterThreadInfo&) + { return boost::shared_ptr<Region> (); } + + boost::shared_ptr<Region> bounce_range (framepos_t, framepos_t, InterThreadInfo&, boost::shared_ptr<Processor>, bool) + { return boost::shared_ptr<Region> (); } + + int export_stuff (BufferSet&, framepos_t, framecnt_t, boost::shared_ptr<Processor>, bool, bool) + { return -1; } + + boost::shared_ptr<Diskstream> diskstream_factory (XMLNode const &) + { return boost::shared_ptr<Diskstream> (); } + + boost::shared_ptr<AudioDiskstream> audio_diskstream() const + { return boost::dynamic_pointer_cast<AudioDiskstream> (_diskstream); } + + boost::shared_ptr<MidiDiskstream> midi_diskstream() const + { return boost::dynamic_pointer_cast<MidiDiskstream> (_diskstream); } + + private: boost::shared_ptr<AudioRegion> the_region; + boost::shared_ptr<MidiRegion> midi_region; framepos_t current_frame; mutable gint _auditioning; Glib::Threads::Mutex lock; @@ -76,8 +121,18 @@ class LIBARDOUR_API Auditioner : public AudioTrack bool _seeking; bool _seek_complete; bool via_monitor; + bool _midi_audition; + bool _synth_added; + bool _synth_changed; + bool _queue_panic; + + boost::shared_ptr<Diskstream> _diskstream_audio; + boost::shared_ptr<Diskstream> _diskstream_midi; + boost::shared_ptr<Processor> asynth; void drop_ports (); + void lookup_synth (); + void config_changed (std::string); static void *_drop_ports (void *); void actually_drop_ports (); void output_changed (IOChange, void*); diff --git a/libs/ardour/ardour/internal_send.h b/libs/ardour/ardour/internal_send.h index 9bfbc4c659..a06bf39906 100644 --- a/libs/ardour/ardour/internal_send.h +++ b/libs/ardour/ardour/internal_send.h @@ -28,7 +28,7 @@ namespace ARDOUR { class LIBARDOUR_API InternalSend : public Send { public: - InternalSend (Session&, boost::shared_ptr<Pannable>, boost::shared_ptr<MuteMaster>, boost::shared_ptr<Route> send_to, Delivery::Role role); + InternalSend (Session&, boost::shared_ptr<Pannable>, boost::shared_ptr<MuteMaster>, boost::shared_ptr<Route> send_to, Delivery::Role role = Delivery::Aux, bool ignore_bitslot = false); virtual ~InternalSend (); std::string display_name() const; diff --git a/libs/ardour/ardour/midi_diskstream.h b/libs/ardour/ardour/midi_diskstream.h index e3f2673871..01e8904736 100644 --- a/libs/ardour/ardour/midi_diskstream.h +++ b/libs/ardour/ardour/midi_diskstream.h @@ -119,10 +119,9 @@ class LIBARDOUR_API MidiDiskstream : public Diskstream static void set_readahead_frames (framecnt_t frames_ahead) { midi_readahead = frames_ahead; } protected: - int seek (framepos_t which_sample, bool complete_refill = false); - - protected: friend class MidiTrack; + friend class Auditioner; + int seek (framepos_t which_sample, bool complete_refill = false); int process (BufferSet&, framepos_t transport_frame, pframes_t nframes, framecnt_t &, bool need_diskstream); frameoffset_t calculate_playback_distance (pframes_t nframes); diff --git a/libs/ardour/ardour/rc_configuration_vars.h b/libs/ardour/ardour/rc_configuration_vars.h index adae854ca7..19500ccf74 100644 --- a/libs/ardour/ardour/rc_configuration_vars.h +++ b/libs/ardour/ardour/rc_configuration_vars.h @@ -114,6 +114,7 @@ CONFIG_VARIABLE (std::string, monitor_bus_preferred_bundle, "monitor-bus-preferr CONFIG_VARIABLE (bool, quieten_at_speed, "quieten-at-speed", true) CONFIG_VARIABLE (bool, link_send_and_route_panner, "link-send-and-route-panner", true) +CONFIG_VARIABLE (std::string, midi_audition_synth_uri, "midi-audition-synth-uri", "https://community.ardour.org/node/7596") /* click */ diff --git a/libs/ardour/ardour/send.h b/libs/ardour/ardour/send.h index 9b30dcf792..a9d2c5dacd 100644 --- a/libs/ardour/ardour/send.h +++ b/libs/ardour/ardour/send.h @@ -35,7 +35,7 @@ class Amp; class LIBARDOUR_API Send : public Delivery { public: - Send (Session&, boost::shared_ptr<Pannable> pannable, boost::shared_ptr<MuteMaster>, Delivery::Role r = Delivery::Send); + Send (Session&, boost::shared_ptr<Pannable> pannable, boost::shared_ptr<MuteMaster>, Delivery::Role r = Delivery::Send, bool ignore_bitslot = false); virtual ~Send (); uint32_t bit_slot() const { return _bitslot; } @@ -67,7 +67,7 @@ class LIBARDOUR_API Send : public Delivery std::string value_as_string (boost::shared_ptr<AutomationControl>) const; static uint32_t how_many_sends(); - static std::string name_and_id_new_send (Session&, Delivery::Role r, uint32_t&); + static std::string name_and_id_new_send (Session&, Delivery::Role r, uint32_t&, bool); protected: bool _metering; diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 7295828d2f..f77e09736f 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -1356,9 +1356,6 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop private: SourceMap sources; - public: - SourceMap get_sources() { return sources; } - private: int load_sources (const XMLNode& node); XMLNode& get_sources_as_xml (); |