summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-10-05 16:17:49 +0200
committerRobin Gareus <robin@gareus.org>2015-10-05 16:17:49 +0200
commit22b07e0233a29d9633ffa825a79503befaf2e16e (patch)
tree1d8b06056f8e12197158f5d906319767d3dedda5 /libs/ardour
parente11ba7b79d68bc1070b170236c22123966d7bcc3 (diff)
NOOP, remove trailing tabs/whitespace.
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/ardour/ardour.h2
-rw-r--r--libs/ardour/ardour/async_midi_port.h4
-rw-r--r--libs/ardour/ardour/audio_buffer.h2
-rw-r--r--libs/ardour/ardour/audio_track.h2
-rw-r--r--libs/ardour/ardour/audio_unit.h2
-rw-r--r--libs/ardour/ardour/audioengine.h8
-rw-r--r--libs/ardour/ardour/audioregion.h4
-rw-r--r--libs/ardour/ardour/automation_list.h4
-rw-r--r--libs/ardour/ardour/control_protocol_manager.h4
-rw-r--r--libs/ardour/ardour/delivery.h2
-rw-r--r--libs/ardour/ardour/engine_state_controller.h2
-rw-r--r--libs/ardour/ardour/export_format_specification.h12
-rw-r--r--libs/ardour/ardour/file_source.h4
-rw-r--r--libs/ardour/ardour/graph.h2
-rw-r--r--libs/ardour/ardour/graphnode.h2
-rw-r--r--libs/ardour/ardour/midi_diskstream.h2
-rw-r--r--libs/ardour/ardour/midi_port.h4
-rw-r--r--libs/ardour/ardour/midi_scene_change.h2
-rw-r--r--libs/ardour/ardour/midi_track.h2
-rw-r--r--libs/ardour/ardour/midiport_manager.h2
-rw-r--r--libs/ardour/ardour/panner.h2
-rw-r--r--libs/ardour/ardour/playlist.h2
-rw-r--r--libs/ardour/ardour/plugin.h4
-rw-r--r--libs/ardour/ardour/plugin_insert.h2
-rw-r--r--libs/ardour/ardour/plugin_manager.h2
-rw-r--r--libs/ardour/ardour/port_manager.h10
-rw-r--r--libs/ardour/ardour/region.h10
-rw-r--r--libs/ardour/ardour/region_factory.h2
-rw-r--r--libs/ardour/ardour/revision.h2
-rw-r--r--libs/ardour/ardour/route.h8
-rw-r--r--libs/ardour/ardour/route_graph.h8
-rw-r--r--libs/ardour/ardour/scene_change.h2
-rw-r--r--libs/ardour/ardour/scene_changer.h4
-rw-r--r--libs/ardour/ardour/send.h2
-rw-r--r--libs/ardour/ardour/session.h36
-rw-r--r--libs/ardour/ardour/session_event.h2
-rw-r--r--libs/ardour/ardour/session_route.h6
-rw-r--r--libs/ardour/ardour/slave.h8
-rw-r--r--libs/ardour/ardour/smf_source.h2
-rw-r--r--libs/ardour/ardour/tempo.h20
-rw-r--r--libs/ardour/ardour/track.h6
-rw-r--r--libs/ardour/ardour/utils.h6
-rw-r--r--libs/ardour/ardour/vst_plugin.h8
-rw-r--r--libs/ardour/ardour/vst_types.h18
-rw-r--r--libs/ardour/ardour/windows_vst_plugin.h2
-rw-r--r--libs/ardour/async_midi_port.cc24
-rw-r--r--libs/ardour/audio_diskstream.cc58
-rw-r--r--libs/ardour/audio_playlist.cc12
-rw-r--r--libs/ardour/audio_playlist_importer.cc2
-rw-r--r--libs/ardour/audio_track.cc8
-rw-r--r--libs/ardour/audio_track_importer.cc6
-rw-r--r--libs/ardour/audio_unit.cc22
-rw-r--r--libs/ardour/audioengine.cc70
-rw-r--r--libs/ardour/audiofilesource.cc2
-rw-r--r--libs/ardour/audioregion.cc76
-rw-r--r--libs/ardour/audiosource.cc14
-rw-r--r--libs/ardour/auditioner.cc10
-rw-r--r--libs/ardour/automatable.cc4
-rw-r--r--libs/ardour/automation_list.cc4
-rw-r--r--libs/ardour/automation_watch.cc10
-rw-r--r--libs/ardour/buffer_set.cc2
-rw-r--r--libs/ardour/bundle.cc6
-rw-r--r--libs/ardour/butler.cc16
-rw-r--r--libs/ardour/control_protocol_manager.cc22
-rw-r--r--libs/ardour/cycle_timer.cc6
-rw-r--r--libs/ardour/delivery.cc4
-rw-r--r--libs/ardour/diskstream.cc8
-rw-r--r--libs/ardour/engine_slave.cc2
-rw-r--r--libs/ardour/engine_state_controller.cc8
-rw-r--r--libs/ardour/enums.cc2
-rw-r--r--libs/ardour/event_type_map.cc2
-rw-r--r--libs/ardour/export_filename.cc2
-rw-r--r--libs/ardour/export_graph_builder.cc2
-rw-r--r--libs/ardour/export_handler.cc16
-rw-r--r--libs/ardour/export_profile_manager.cc8
-rw-r--r--libs/ardour/file_source.cc12
-rw-r--r--libs/ardour/filesystem_paths.cc10
-rw-r--r--libs/ardour/filter.cc6
-rw-r--r--libs/ardour/globals.cc38
-rw-r--r--libs/ardour/graph.cc2
-rw-r--r--libs/ardour/import.cc6
-rw-r--r--libs/ardour/instrument_info.cc18
-rw-r--r--libs/ardour/internal_return.cc2
-rw-r--r--libs/ardour/internal_send.cc6
-rw-r--r--libs/ardour/io.cc22
-rw-r--r--libs/ardour/io_processor.cc16
-rw-r--r--libs/ardour/ladspa_plugin.cc8
-rw-r--r--libs/ardour/linux_vst_support.cc104
-rw-r--r--libs/ardour/location.cc12
-rw-r--r--libs/ardour/lv2_plugin.cc2
-rw-r--r--libs/ardour/midi_buffer.cc42
-rw-r--r--libs/ardour/midi_diskstream.cc38
-rw-r--r--libs/ardour/midi_model.cc10
-rw-r--r--libs/ardour/midi_patch_manager.cc4
-rw-r--r--libs/ardour/midi_port.cc28
-rw-r--r--libs/ardour/midi_ring_buffer.cc2
-rw-r--r--libs/ardour/midi_scene_change.cc2
-rw-r--r--libs/ardour/midi_scene_changer.cc26
-rw-r--r--libs/ardour/midi_state_tracker.cc2
-rw-r--r--libs/ardour/midi_track.cc24
-rw-r--r--libs/ardour/midi_ui.cc10
-rw-r--r--libs/ardour/midiport_manager.cc6
-rw-r--r--libs/ardour/monitor_processor.cc2
-rw-r--r--libs/ardour/pannable.cc2
-rw-r--r--libs/ardour/panner_shell.cc4
-rw-r--r--libs/ardour/playlist.cc82
-rw-r--r--libs/ardour/playlist_factory.cc18
-rw-r--r--libs/ardour/plugin.cc2
-rw-r--r--libs/ardour/plugin_insert.cc10
-rw-r--r--libs/ardour/port.cc12
-rw-r--r--libs/ardour/port_insert.cc2
-rw-r--r--libs/ardour/port_manager.cc24
-rw-r--r--libs/ardour/port_set.cc4
-rw-r--r--libs/ardour/processor.cc10
-rw-r--r--libs/ardour/quantize.cc10
-rw-r--r--libs/ardour/region.cc4
-rw-r--r--libs/ardour/region_factory.cc14
-rw-r--r--libs/ardour/route.cc76
-rw-r--r--libs/ardour/route_graph.cc12
-rw-r--r--libs/ardour/route_group.cc4
-rw-r--r--libs/ardour/search_paths.cc2
-rw-r--r--libs/ardour/send.cc8
-rw-r--r--libs/ardour/session.cc284
-rw-r--r--libs/ardour/session_click.cc4
-rw-r--r--libs/ardour/session_events.cc2
-rw-r--r--libs/ardour/session_export.cc8
-rw-r--r--libs/ardour/session_metadata.cc2
-rw-r--r--libs/ardour/session_midi.cc6
-rw-r--r--libs/ardour/session_playlists.cc2
-rw-r--r--libs/ardour/session_process.cc8
-rw-r--r--libs/ardour/session_rtevents.cc6
-rw-r--r--libs/ardour/session_transport.cc82
-rw-r--r--libs/ardour/smf_source.cc10
-rw-r--r--libs/ardour/sndfilesource.cc10
-rw-r--r--libs/ardour/soundcloud_upload.cc2
-rw-r--r--libs/ardour/source.cc2
-rw-r--r--libs/ardour/source_factory.cc4
-rw-r--r--libs/ardour/sse_functions_avx.cc2
-rw-r--r--libs/ardour/template_utils.cc4
-rw-r--r--libs/ardour/tempo.cc188
-rw-r--r--libs/ardour/test/audio_region_read_test.cc6
-rw-r--r--libs/ardour/test/audio_region_test.cc6
-rw-r--r--libs/ardour/test/automation_list_property_test.cc2
-rw-r--r--libs/ardour/test/bbt_test.cc2
-rw-r--r--libs/ardour/test/combine_regions_test.cc14
-rw-r--r--libs/ardour/test/control_surfaces_test.cc2
-rw-r--r--libs/ardour/test/framepos_minus_beats_test.cc14
-rw-r--r--libs/ardour/test/framepos_plus_beats_test.cc14
-rw-r--r--libs/ardour/test/framewalk_to_beats_test.cc14
-rw-r--r--libs/ardour/test/jack_utils_test.cc2
-rw-r--r--libs/ardour/test/load_session.cc2
-rw-r--r--libs/ardour/test/midi_clock_slave_test.h2
-rw-r--r--libs/ardour/test/mtdm_test.cc2
-rw-r--r--libs/ardour/test/playlist_equivalent_regions_test.cc2
-rw-r--r--libs/ardour/test/playlist_read_test.cc16
-rw-r--r--libs/ardour/test/playlist_read_test.h4
-rw-r--r--libs/ardour/test/profiling/load_session.cc2
-rw-r--r--libs/ardour/test/tempo_test.cc6
-rw-r--r--libs/ardour/test/test_util.cc2
-rw-r--r--libs/ardour/test/testrunner.cc10
-rw-r--r--libs/ardour/ticker.cc16
-rw-r--r--libs/ardour/track.cc44
-rw-r--r--libs/ardour/utils.cc2
-rw-r--r--libs/ardour/windows_vst_plugin.cc2
164 files changed, 1122 insertions, 1122 deletions
diff --git a/libs/ardour/ardour/ardour.h b/libs/ardour/ardour/ardour.h
index 25e2518c83..ddea43f889 100644
--- a/libs/ardour/ardour/ardour.h
+++ b/libs/ardour/ardour/ardour.h
@@ -69,7 +69,7 @@ namespace ARDOUR {
LIBARDOUR_API void make_property_quarks ();
extern LIBARDOUR_API PBD::PropertyChange bounds_change;
-
+
extern LIBARDOUR_API const char* const ardour_config_info;
LIBARDOUR_API void find_bindings_files (std::map<std::string,std::string>&);
diff --git a/libs/ardour/ardour/async_midi_port.h b/libs/ardour/ardour/async_midi_port.h
index db86fda798..e28c6922d2 100644
--- a/libs/ardour/ardour/async_midi_port.h
+++ b/libs/ardour/ardour/async_midi_port.h
@@ -77,7 +77,7 @@ class LIBARDOUR_API AsyncMIDIPort : public ARDOUR::MidiPort, public MIDI::Port {
static pthread_t get_process_thread () { return _process_thread; }
static bool is_process_thread();
- private:
+ private:
bool _currently_in_cycle;
MIDI::timestamp_t _last_write_timestamp;
bool have_timer;
@@ -90,7 +90,7 @@ class LIBARDOUR_API AsyncMIDIPort : public ARDOUR::MidiPort, public MIDI::Port {
int create_port ();
/** Channel used to signal to the MidiControlUI that input has arrived */
-
+
std::string _connections;
PBD::ScopedConnection connect_connection;
PBD::ScopedConnection halt_connection;
diff --git a/libs/ardour/ardour/audio_buffer.h b/libs/ardour/ardour/audio_buffer.h
index 91f463cc7f..f3ec2ed25a 100644
--- a/libs/ardour/ardour/audio_buffer.h
+++ b/libs/ardour/ardour/audio_buffer.h
@@ -103,7 +103,7 @@ public:
const Sample* const src_raw = src + src_offset;
mix_buffers_no_gain(dst_raw, src_raw, len);
-
+
_silent = false;
_written = true;
}
diff --git a/libs/ardour/ardour/audio_track.h b/libs/ardour/ardour/audio_track.h
index e4a5dc356d..17e2223680 100644
--- a/libs/ardour/ardour/audio_track.h
+++ b/libs/ardour/ardour/audio_track.h
@@ -71,7 +71,7 @@ class LIBARDOUR_API AudioTrack : public Track
private:
boost::shared_ptr<Diskstream> diskstream_factory (XMLNode const &);
-
+
int deprecated_use_diskstream_connections ();
void set_state_part_two ();
void set_state_part_three ();
diff --git a/libs/ardour/ardour/audio_unit.h b/libs/ardour/ardour/audio_unit.h
index fe5327fd03..41654a811a 100644
--- a/libs/ardour/ardour/audio_unit.h
+++ b/libs/ardour/ardour/audio_unit.h
@@ -93,7 +93,7 @@ class LIBARDOUR_API AUPlugin : public ARDOUR::Plugin
bool parameter_is_control (uint32_t) const;
bool parameter_is_input (uint32_t) const;
bool parameter_is_output (uint32_t) const;
-
+
void set_info (PluginInfoPtr);
int set_state(const XMLNode& node, int);
diff --git a/libs/ardour/ardour/audioengine.h b/libs/ardour/ardour/audioengine.h
index e2ae52996d..330af8d900 100644
--- a/libs/ardour/ardour/audioengine.h
+++ b/libs/ardour/ardour/audioengine.h
@@ -243,10 +243,10 @@ class LIBARDOUR_API AudioEngine : public SessionHandlePtr, public PortManager
* countdown, whose duration will be reduced to half of its previous
* value.
*/
-
+
PBD::Signal0<void> BecameSilent;
void reset_silence_countdown ();
-
+
private:
AudioEngine ();
@@ -308,10 +308,10 @@ class LIBARDOUR_API AudioEngine : public SessionHandlePtr, public PortManager
#ifdef SILENCE_AFTER
framecnt_t _silence_countdown;
uint32_t _silence_hit_cnt;
-#endif
+#endif
};
-
+
} // namespace ARDOUR
#endif /* __ardour_audioengine_h__ */
diff --git a/libs/ardour/ardour/audioregion.h b/libs/ardour/ardour/audioregion.h
index 3de6de11fa..45b7fea520 100644
--- a/libs/ardour/ardour/audioregion.h
+++ b/libs/ardour/ardour/audioregion.h
@@ -140,7 +140,7 @@ class LIBARDOUR_API AudioRegion : public Region
void set_default_fade_out ();
framecnt_t verify_xfade_bounds (framecnt_t, bool start);
-
+
void set_envelope_active (bool yn);
void set_default_envelope ();
@@ -187,7 +187,7 @@ class LIBARDOUR_API AudioRegion : public Region
private:
friend class ::AudioRegionReadTest;
friend class ::PlaylistReadTest;
-
+
PBD::Property<bool> _envelope_active;
PBD::Property<bool> _default_fade_in;
PBD::Property<bool> _default_fade_out;
diff --git a/libs/ardour/ardour/automation_list.h b/libs/ardour/ardour/automation_list.h
index cfeaeafa86..bc47f2fe06 100644
--- a/libs/ardour/ardour/automation_list.h
+++ b/libs/ardour/ardour/automation_list.h
@@ -52,9 +52,9 @@ public:
AutomationListProperty (PBD::PropertyDescriptor<boost::shared_ptr<AutomationList> > d, Ptr o, Ptr c)
: PBD::SharedStatefulProperty<AutomationList> (d.property_id, o, c)
{}
-
+
PBD::PropertyBase* clone () const;
-
+
private:
/* No copy-construction nor assignment */
AutomationListProperty (AutomationListProperty const &);
diff --git a/libs/ardour/ardour/control_protocol_manager.h b/libs/ardour/ardour/control_protocol_manager.h
index 8d196b36d7..0c14d2a049 100644
--- a/libs/ardour/ardour/control_protocol_manager.h
+++ b/libs/ardour/ardour/control_protocol_manager.h
@@ -65,10 +65,10 @@ class LIBARDOUR_API ControlProtocolManager : public PBD::Stateful, public ARDOUR
void load_mandatory_protocols ();
void midi_connectivity_established ();
void drop_protocols ();
-
+
int activate (ControlProtocolInfo&);
int deactivate (ControlProtocolInfo&);
-
+
std::list<ControlProtocolInfo*> control_protocol_info;
static const std::string state_node_name;
diff --git a/libs/ardour/ardour/delivery.h b/libs/ardour/ardour/delivery.h
index e19eef719f..13e1cdcda3 100644
--- a/libs/ardour/ardour/delivery.h
+++ b/libs/ardour/ardour/delivery.h
@@ -114,7 +114,7 @@ public:
private:
bool _no_outs_cuz_we_no_monitor;
boost::shared_ptr<MuteMaster> _mute_master;
-
+
static bool panners_legal;
static PBD::Signal0<void> PannersLegal;
diff --git a/libs/ardour/ardour/engine_state_controller.h b/libs/ardour/ardour/engine_state_controller.h
index 76ed08b3ab..7cf4e057dc 100644
--- a/libs/ardour/ardour/engine_state_controller.h
+++ b/libs/ardour/ardour/engine_state_controller.h
@@ -472,7 +472,7 @@ class EngineStateController
std::string device_name; ///< state device name
ARDOUR::framecnt_t sample_rate; ///< sample rate used by the device in this state
ARDOUR::pframes_t buffer_size; ///< buffer size used by the device in this state
-
+
PortStateList input_channel_states; ///< states of device Audio inputs
PortStateList multi_out_channel_states; ///< states of device Audio inputs in Multi Out mode
PortStateList stereo_out_channel_states; ///< states of device Audio inputs in Stereo Out mode
diff --git a/libs/ardour/ardour/export_format_specification.h b/libs/ardour/ardour/export_format_specification.h
index 87a7729887..1223fa2d4b 100644
--- a/libs/ardour/ardour/export_format_specification.h
+++ b/libs/ardour/ardour/export_format_specification.h
@@ -114,36 +114,36 @@ class LIBARDOUR_API ExportFormatSpecification : public ExportFormatBase {
std::string format_name () const { return _format_name; }
Type type () const { return _type; }
-
+
FormatId format_id () const {
if (!format_ids.empty() )
return *format_ids.begin();
else
return FormatId(0);
}
-
+
Endianness endianness () const {
if (!endiannesses.empty() )
return *endiannesses.begin();
else
return Endianness(0);
}
-
+
SampleFormat sample_format () const {
if (!sample_formats.empty() )
return *sample_formats.begin();
else
return SampleFormat(0);
}
-
+
SampleRate sample_rate () const {
if (!sample_rates.empty() )
return *sample_rates.begin();
else
return SampleRate(0);
-
+
}
-
+
Quality quality () const {
if (!qualities.empty() )
return *qualities.begin();
diff --git a/libs/ardour/ardour/file_source.h b/libs/ardour/ardour/file_source.h
index 0929c3303f..00fb74b426 100644
--- a/libs/ardour/ardour/file_source.h
+++ b/libs/ardour/ardour/file_source.h
@@ -47,7 +47,7 @@ public:
virtual ~FileSource ();
const std::string& path() const { return _path; }
-
+
virtual bool safe_file_extension (const std::string& path) const = 0;
int move_to_trash (const std::string& trash_dir_name);
@@ -79,7 +79,7 @@ public:
const std::string& origin() const { return _origin; }
virtual void set_path (const std::string&);
-
+
static PBD::Signal2<int,std::string,std::vector<std::string> > AmbiguousFileName;
void existence_check ();
diff --git a/libs/ardour/ardour/graph.h b/libs/ardour/ardour/graph.h
index 7a2ac9455a..2d4a0adb30 100644
--- a/libs/ardour/ardour/graph.h
+++ b/libs/ardour/ardour/graph.h
@@ -45,7 +45,7 @@ class Graph;
class Route;
class Session;
-class GraphEdges;
+class GraphEdges;
typedef boost::shared_ptr<GraphNode> node_ptr_t;
diff --git a/libs/ardour/ardour/graphnode.h b/libs/ardour/ardour/graphnode.h
index 55867eac4c..aa04d9b20a 100644
--- a/libs/ardour/ardour/graphnode.h
+++ b/libs/ardour/ardour/graphnode.h
@@ -37,7 +37,7 @@ typedef boost::shared_ptr<GraphNode> node_ptr_t;
typedef std::set< node_ptr_t > node_set_t;
typedef std::list< node_ptr_t > node_list_t;
-/** A node on our processing graph, ie a Route */
+/** A node on our processing graph, ie a Route */
class LIBARDOUR_API GraphNode
{
public:
diff --git a/libs/ardour/ardour/midi_diskstream.h b/libs/ardour/ardour/midi_diskstream.h
index b55a976023..17ebf86034 100644
--- a/libs/ardour/ardour/midi_diskstream.h
+++ b/libs/ardour/ardour/midi_diskstream.h
@@ -71,7 +71,7 @@ class LIBARDOUR_API MidiDiskstream : public Diskstream
void set_record_enabled (bool yn);
void set_record_safe (bool yn);
-
+
void reset_tracker ();
void resolve_tracker (Evoral::EventSink<framepos_t>& buffer, framepos_t time);
diff --git a/libs/ardour/ardour/midi_port.h b/libs/ardour/ardour/midi_port.h
index b410f3d5af..eb90dc1e35 100644
--- a/libs/ardour/ardour/midi_port.h
+++ b/libs/ardour/ardour/midi_port.h
@@ -57,7 +57,7 @@ class LIBARDOUR_API MidiPort : public Port {
void set_always_parse (bool yn);
void set_trace_on (bool yn);
-
+
MIDI::Parser& self_parser() { return _self_parser; }
protected:
@@ -72,7 +72,7 @@ class LIBARDOUR_API MidiPort : public Port {
bool _input_active;
bool _always_parse;
bool _trace_on;
-
+
/* Naming this is tricky. AsyncMIDIPort inherits (for now, aug 2013) from
* both MIDI::Port, which has _parser, and this (ARDOUR::MidiPort). We
* need parsing support in this object, independently of what the
diff --git a/libs/ardour/ardour/midi_scene_change.h b/libs/ardour/ardour/midi_scene_change.h
index 41167f167d..245b749272 100644
--- a/libs/ardour/ardour/midi_scene_change.h
+++ b/libs/ardour/ardour/midi_scene_change.h
@@ -62,6 +62,6 @@ class MIDISceneChange : public SceneChange
};
} /* namespace */
-
+
#endif /* __libardour_scene_change_h__ */
diff --git a/libs/ardour/ardour/midi_track.h b/libs/ardour/ardour/midi_track.h
index 2ba57e4e01..c48f384ce9 100644
--- a/libs/ardour/ardour/midi_track.h
+++ b/libs/ardour/ardour/midi_track.h
@@ -150,7 +150,7 @@ private:
MidiChannelFilter _capture_filter;
virtual boost::shared_ptr<Diskstream> diskstream_factory (XMLNode const &);
-
+
boost::shared_ptr<MidiDiskstream> midi_diskstream () const;
void write_out_of_band_data (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, framecnt_t nframes);
diff --git a/libs/ardour/ardour/midiport_manager.h b/libs/ardour/ardour/midiport_manager.h
index fade9c8beb..4e0f98cb3c 100644
--- a/libs/ardour/ardour/midiport_manager.h
+++ b/libs/ardour/ardour/midiport_manager.h
@@ -42,7 +42,7 @@ class LIBARDOUR_API MidiPortManager {
public:
MidiPortManager();
virtual ~MidiPortManager ();
-
+
/* Ports used for control. These are read/written to outside of the
* process callback (asynchronously with respect to when data
* actually arrives).
diff --git a/libs/ardour/ardour/panner.h b/libs/ardour/ardour/panner.h
index 56c65a4dc2..1838fb5f56 100644
--- a/libs/ardour/ardour/panner.h
+++ b/libs/ardour/ardour/panner.h
@@ -159,7 +159,7 @@ public:
int set_state (const XMLNode&, int version);
XMLNode& get_state ();
-
+
boost::shared_ptr<Pannable> pannable() const { return _pannable; }
static bool equivalent (pan_t a, pan_t b) {
diff --git a/libs/ardour/ardour/playlist.h b/libs/ardour/ardour/playlist.h
index 1b3f1d530f..de5a5dcb05 100644
--- a/libs/ardour/ardour/playlist.h
+++ b/libs/ardour/ardour/playlist.h
@@ -237,7 +237,7 @@ public:
void set_layer (boost::shared_ptr<Region>, double);
void set_capture_insertion_in_progress (bool yn);
-
+
protected:
friend class Session;
diff --git a/libs/ardour/ardour/plugin.h b/libs/ardour/ardour/plugin.h
index c927c1c061..f9831afcad 100644
--- a/libs/ardour/ardour/plugin.h
+++ b/libs/ardour/ardour/plugin.h
@@ -144,11 +144,11 @@ class LIBARDOUR_API Plugin : public PBD::StatefulDestructible, public Latent
struct PresetRecord {
PresetRecord () : number (-1), user (true) {}
PresetRecord (const std::string& u, const std::string& l, int n = -1, bool s = true) : uri (u), label (l), number (n), user (s) {}
-
+
bool operator!= (PresetRecord const & a) const {
return number != a.number || uri != a.uri || label != a.label;
}
-
+
std::string uri;
std::string label;
int number; // if <0, invalid
diff --git a/libs/ardour/ardour/plugin_insert.h b/libs/ardour/ardour/plugin_insert.h
index f9578a188d..8788778a3a 100644
--- a/libs/ardour/ardour/plugin_insert.h
+++ b/libs/ardour/ardour/plugin_insert.h
@@ -191,7 +191,7 @@ class LIBARDOUR_API PluginInsert : public Processor
struct Match {
Match () : method (Impossible), plugins (0) {}
Match (MatchingMethod m, int32_t p, ChanCount h = ChanCount ()) : method (m), plugins (p), hide (h) {}
-
+
MatchingMethod method; ///< method to employ
int32_t plugins; ///< number of copies of the plugin that we need
ChanCount hide; ///< number of channels to hide
diff --git a/libs/ardour/ardour/plugin_manager.h b/libs/ardour/ardour/plugin_manager.h
index 663bb92324..2c081ddfa3 100644
--- a/libs/ardour/ardour/plugin_manager.h
+++ b/libs/ardour/ardour/plugin_manager.h
@@ -135,7 +135,7 @@ class LIBARDOUR_API PluginManager : public boost::noncopyable {
int windows_vst_discover_from_path (std::string path, bool cache_only = false);
int windows_vst_discover (std::string path, bool cache_only = false);
-
+
int lxvst_discover_from_path (std::string path, bool cache_only = false);
int lxvst_discover (std::string path, bool cache_only = false);
diff --git a/libs/ardour/ardour/port_manager.h b/libs/ardour/ardour/port_manager.h
index d76016c6a3..97b7a9c2f5 100644
--- a/libs/ardour/ardour/port_manager.h
+++ b/libs/ardour/ardour/port_manager.h
@@ -106,11 +106,11 @@ class LIBARDOUR_API PortManager
public:
PortRegistrationFailure (std::string const & why = "")
: reason (why) {}
-
+
~PortRegistrationFailure () throw () {}
-
+
const char *what() const throw () { return reason.c_str(); }
-
+
private:
std::string reason;
};
@@ -157,7 +157,7 @@ class LIBARDOUR_API PortManager
* Realtime safe.
*/
void cycle_start (pframes_t nframes);
-
+
/** Signal the end of an audio cycle.
* This signifies that the cycle began with @ref cycle_start has ended.
* This MUST be called at the end of each cycle.
@@ -167,7 +167,7 @@ class LIBARDOUR_API PortManager
};
-
+
} // namespace
#endif /* __libardour_port_manager_h__ */
diff --git a/libs/ardour/ardour/region.h b/libs/ardour/ardour/region.h
index 54cfd57fea..60999bf73a 100644
--- a/libs/ardour/ardour/region.h
+++ b/libs/ardour/ardour/region.h
@@ -153,7 +153,7 @@ class LIBARDOUR_API Region
Evoral::Range<framepos_t> last_range () const {
return Evoral::Range<framepos_t> (_last_position, _last_position + _last_length - 1);
}
-
+
Evoral::Range<framepos_t> range () const {
return Evoral::Range<framepos_t> (first_frame(), last_frame());
}
@@ -354,7 +354,7 @@ class LIBARDOUR_API Region
virtual void set_position_internal (framepos_t pos, bool allow_bbt_recompute);
virtual void set_length_internal (framecnt_t);
virtual void set_start_internal (framecnt_t);
-
+
DataType _type;
PBD::Property<bool> _sync_marked;
@@ -366,15 +366,15 @@ class LIBARDOUR_API Region
PBD::Property<framepos_t> _position;
/** Sync position relative to the start of our file */
PBD::Property<framepos_t> _sync_position;
-
+
SourceList _sources;
/** Used when timefx are applied, so we can always use the original source */
SourceList _master_sources;
AnalysisFeatureList _transients;
-
+
boost::weak_ptr<ARDOUR::Playlist> _playlist;
-
+
private:
void mid_thaw (const PBD::PropertyChange&);
diff --git a/libs/ardour/ardour/region_factory.h b/libs/ardour/ardour/region_factory.h
index d5228fadb7..08d9affc91 100644
--- a/libs/ardour/ardour/region_factory.h
+++ b/libs/ardour/ardour/region_factory.h
@@ -117,7 +117,7 @@ public:
* announce=false but they still need to be in the map soon after
* creation.
*/
-
+
static void map_add (boost::shared_ptr<Region>);
private:
diff --git a/libs/ardour/ardour/revision.h b/libs/ardour/ardour/revision.h
index 7d746f2e2f..da589278b2 100644
--- a/libs/ardour/ardour/revision.h
+++ b/libs/ardour/ardour/revision.h
@@ -25,7 +25,7 @@
namespace ARDOUR {
extern LIBARDOUR_API const char* revision;
-
+
extern "C" {
LIBARDOUR_API const char* get_ardour_revision();
}
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h
index c4decd48c8..d59c1e0610 100644
--- a/libs/ardour/ardour/route.h
+++ b/libs/ardour/ardour/route.h
@@ -113,7 +113,7 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
virtual MonitorState monitoring_state () const;
virtual MeterState metering_state () const;
-
+
/* these are the core of the API of a Route. see the protected sections as well */
virtual int roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
@@ -152,7 +152,7 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
bool muted () const;
void set_mute (bool yn, void* src);
-
+
bool muted_by_others() const;
/* controls use set_solo() to modify this route's solo state
@@ -547,7 +547,7 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
uint32_t _solo_isolated_by_upstream;
void mod_solo_isolated_by_upstream (bool, void*);
-
+
bool _denormal_protection;
bool _recordable : 1;
@@ -668,7 +668,7 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
Route (Route const &);
void maybe_note_meter_position ();
-
+
/** true if we've made a note of a custom meter position in these variables */
bool _custom_meter_position_noted;
/** the processor that came after the meter when it was last set to a custom position,
diff --git a/libs/ardour/ardour/route_graph.h b/libs/ardour/ardour/route_graph.h
index 77e74ceafd..e1e1049cd6 100644
--- a/libs/ardour/ardour/route_graph.h
+++ b/libs/ardour/ardour/route_graph.h
@@ -41,7 +41,7 @@ class LIBARDOUR_API GraphEdges
{
public:
typedef std::map<GraphVertex, std::set<GraphVertex> > EdgeMap;
-
+
void add (GraphVertex from, GraphVertex to, bool via_sends_only);
bool has (GraphVertex from, GraphVertex to, bool* via_sends_only);
std::set<GraphVertex> from (GraphVertex r) const;
@@ -49,12 +49,12 @@ public:
bool has_none_to (GraphVertex to) const;
bool empty () const;
void dump () const;
-
+
private:
void insert (EdgeMap& e, GraphVertex a, GraphVertex b);
-
+
typedef std::multimap<GraphVertex, std::pair<GraphVertex, bool> > EdgeMapWithSends;
-
+
EdgeMapWithSends::iterator find_in_from_to_with_sends (GraphVertex, GraphVertex);
/** map of edges with from as `first' and to as `second' */
diff --git a/libs/ardour/ardour/scene_change.h b/libs/ardour/ardour/scene_change.h
index 1513622ed0..adb65546b5 100644
--- a/libs/ardour/ardour/scene_change.h
+++ b/libs/ardour/ardour/scene_change.h
@@ -54,6 +54,6 @@ class SceneChange : public PBD::Stateful
};
} /* namespace */
-
+
#endif /* __libardour_scene_change_h__ */
diff --git a/libs/ardour/ardour/scene_changer.h b/libs/ardour/ardour/scene_changer.h
index 6019ed9c6c..4b837f4cdb 100644
--- a/libs/ardour/ardour/scene_changer.h
+++ b/libs/ardour/ardour/scene_changer.h
@@ -45,12 +45,12 @@ class SceneChanger : public SessionHandleRef
public:
SceneChanger (Session& s) : SessionHandleRef (s) {}
virtual ~SceneChanger () {};
-
+
virtual void run (framepos_t start, framepos_t end) = 0;
virtual void locate (framepos_t where) = 0;
};
} /* namespace */
-
+
#endif /* __libardour_scene_change_h__ */
diff --git a/libs/ardour/ardour/send.h b/libs/ardour/ardour/send.h
index 17343bff96..f944dcabfb 100644
--- a/libs/ardour/ardour/send.h
+++ b/libs/ardour/ardour/send.h
@@ -72,7 +72,7 @@ class LIBARDOUR_API Send : public Delivery
bool set_name (const std::string& str);
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&, bool);
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 2e6024badb..3d280be016 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -312,7 +312,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
/* Timecode status signals */
PBD::Signal1<void, bool> MTCSyncStateChanged;
- PBD::Signal1<void, bool> LTCSyncStateChanged;
+ PBD::Signal1<void, bool> LTCSyncStateChanged;
/* Record status signals */
@@ -362,7 +362,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
/* Timecode state signals */
PBD::Signal0<void> MtcOrLtcInputPortChanged;
-
+
void queue_event (SessionEvent*);
void request_roll_at_and_return (framepos_t start, framepos_t return_to);
@@ -427,7 +427,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
framecnt_t worst_input_latency () const { return _worst_input_latency; }
framecnt_t worst_track_latency () const { return _worst_track_latency; }
framecnt_t worst_playback_latency () const { return _worst_output_latency + _worst_track_latency; }
-
+
struct SaveAs {
std::string new_parent_folder; /* parent folder where new session folder will be created */
std::string new_name; /* name of newly saved session */
@@ -437,7 +437,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
bool copy_external; /* true if external media should be consolidated into the newly saved session; false otherwise */
std::string final_session_folder_name; /* filled in by * Session::save_as(), provides full path to newly saved session */
-
+
/* emitted as we make progress. 3 arguments passed to signal
* handler:
*
@@ -582,7 +582,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
AudioEngine const & engine () const { return _engine; }
static std::string default_track_name_pattern (DataType);
-
+
/* Time */
framepos_t transport_frame () const {return _transport_frame; }
@@ -625,7 +625,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
bool synced_to_engine() const { return _slave && config.get_external_sync() && Config->get_sync_source() == Engine; }
bool synced_to_mtc () const { return config.get_external_sync() && Config->get_sync_source() == MTC && g_atomic_int_get (const_cast<gint*>(&_mtc_active)); }
bool synced_to_ltc () const { return config.get_external_sync() && Config->get_sync_source() == LTC && g_atomic_int_get (const_cast<gint*>(&_ltc_active)); }
-
+
double transport_speed() const { return _transport_speed; }
bool transport_stopped() const { return _transport_speed == 0.0f; }
bool transport_rolling() const { return _transport_speed != 0.0f; }
@@ -877,7 +877,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
void set_object_selection (framepos_t start, framepos_t end);
void clear_range_selection ();
void clear_object_selection ();
-
+
/* buffers for gain and pan */
gain_t* gain_automation_buffer () const;
@@ -901,7 +901,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
void* ptr,
float opt
);
-
+
static PBD::Signal0<void> SendFeedback;
/* Speakers */
@@ -1025,7 +1025,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
boost::shared_ptr<MidiPort> scene_in () const;
boost::shared_ptr<MidiPort> scene_out () const;
-
+
boost::shared_ptr<MidiPort> midi_clock_output_port () const;
boost::shared_ptr<MidiPort> midi_clock_input_port () const;
boost::shared_ptr<MidiPort> mtc_output_port () const;
@@ -1039,7 +1039,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
void reconnect_ltc_input ();
void reconnect_ltc_output ();
-
+
protected:
friend class AudioEngine;
void set_block_size (pframes_t nframes);
@@ -1115,7 +1115,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
PBD::ScopedConnection mtc_status_connection;
void ltc_status_changed (bool);
PBD::ScopedConnection ltc_status_connection;
-
+
void initialize_latencies ();
void set_worst_io_latencies ();
void set_worst_playback_latency ();
@@ -1319,7 +1319,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
int post_engine_init ();
int immediately_post_engine ();
void remove_empty_sounds ();
-
+
void session_loaded ();
void setup_midi_control ();
@@ -1485,7 +1485,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
void set_track_loop (bool);
bool select_playhead_priority_target (framepos_t&);
void follow_playhead_priority ();
-
+
/* These are synchronous and so can only be called from within the process
* cycle
*/
@@ -1712,7 +1712,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
*/
Evoral::Range<framepos_t> _range_selection;
Evoral::Range<framepos_t> _object_selection;
-
+
/* main outs */
uint32_t main_outs;
@@ -1770,7 +1770,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
ev->rt_slot = boost::bind (method, this, rl, targ, group_override);
ev->rt_return = after;
ev->event_loop = PBD::EventLoop::get_event_loop_for_thread ();
-
+
return ev;
}
@@ -1824,16 +1824,16 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
/* Scene Changing */
SceneChanger* _scene_changer;
-
+
/* persistent, non-track related MIDI ports */
MidiPortManager* _midi_ports;
MIDI::MachineControl* _mmc;
-
+
void setup_ltc ();
void setup_click ();
void setup_click_state (const XMLNode*);
void setup_bundles ();
-
+
void save_as_bring_callback (uint32_t, uint32_t, std::string);
static int get_session_info_from_path (XMLTree& state_tree, const std::string& xmlpath);
diff --git a/libs/ardour/ardour/session_event.h b/libs/ardour/ardour/session_event.h
index 02759bba7e..cca7f1274e 100644
--- a/libs/ardour/ardour/session_event.h
+++ b/libs/ardour/ardour/session_event.h
@@ -139,7 +139,7 @@ public:
static void init_event_pool ();
CrossThreadPool* event_pool() const { return own_pool; }
-
+
private:
static PerThreadPool* pool;
CrossThreadPool* own_pool;
diff --git a/libs/ardour/ardour/session_route.h b/libs/ardour/ardour/session_route.h
index 61a5737afa..22bfc1f032 100644
--- a/libs/ardour/ardour/session_route.h
+++ b/libs/ardour/ardour/session_route.h
@@ -34,11 +34,11 @@ Session::foreach_route (T *obj, void (T::*func)(Route&), bool sort)
{
boost::shared_ptr<RouteList> r = routes.reader();
RouteList public_order (*r);
-
+
if (sort) {
public_order.sort (RoutePublicOrderSorter());
}
-
+
for (RouteList::iterator i = public_order.begin(); i != public_order.end(); i++) {
(obj->*func) (**i);
}
@@ -64,7 +64,7 @@ Session::foreach_route (T *obj, void (T::*func)(Route&, A), A arg1, bool sort)
{
boost::shared_ptr<RouteList> r = routes.reader();
RouteList public_order (*r);
-
+
if (sort) {
public_order.sort (RoutePublicOrderSorter());
}
diff --git a/libs/ardour/ardour/slave.h b/libs/ardour/ardour/slave.h
index bda47ceba0..cf8060d029 100644
--- a/libs/ardour/ardour/slave.h
+++ b/libs/ardour/ardour/slave.h
@@ -238,19 +238,19 @@ struct LIBARDOUR_API SafeTime {
class LIBARDOUR_API TimecodeSlave : public Slave {
public:
TimecodeSlave () {}
-
+
virtual Timecode::TimecodeFormat apparent_timecode_format() const = 0;
-
+
/* this is intended to be used by a UI and polled from a timeout. it should
return a string describing the current position of the TC source. it
should NOT do any computation, but should use a cached value
of the TC source position.
*/
virtual std::string approximate_current_position() const = 0;
-
+
framepos_t timecode_offset;
bool timecode_negative_offset;
-
+
PBD::Signal1<void, bool> ActiveChanged;
};
diff --git a/libs/ardour/ardour/smf_source.h b/libs/ardour/ardour/smf_source.h
index 35e0c89297..8f58fda2fe 100644
--- a/libs/ardour/ardour/smf_source.h
+++ b/libs/ardour/ardour/smf_source.h
@@ -86,7 +86,7 @@ public:
mutable framepos_t _smf_last_read_time;
int open_for_write ();
-
+
void ensure_disk_file (const Lock& lock);
framecnt_t read_unlocked (const Lock& lock,
diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h
index 09b3d8b5eb..bb22a79c8e 100644
--- a/libs/ardour/ardour/tempo.h
+++ b/libs/ardour/ardour/tempo.h
@@ -158,7 +158,7 @@ class LIBARDOUR_API TempoSection : public MetricSection, public Tempo {
the tempo section is located in. A value of 0.0 indicates that
it occurs on the first beat of the bar, a value of 0.5 indicates
that it occurs halfway through the bar and so on.
-
+
this enables us to keep the tempo change at the same relative
position within the bar if/when the meter changes.
*/
@@ -228,7 +228,7 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible
BBTPoint (const MeterSection& m, const TempoSection& t, framepos_t f,
uint32_t b, uint32_t e)
: frame (f), meter (&m), tempo (&t), bar (b), beat (e) {}
-
+
Timecode::BBT_Time bbt() const { return Timecode::BBT_Time (bar, beat, 0); }
operator Timecode::BBT_Time() const { return bbt(); }
operator framepos_t() const { return frame; }
@@ -244,13 +244,13 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible
void get_grid (BBTPointList::const_iterator&, BBTPointList::const_iterator&,
framepos_t start, framepos_t end);
-
+
/* TEMPO- AND METER-SENSITIVE FUNCTIONS
bbt_time(), bbt_time_rt(), frame_time() and bbt_duration_at()
are all sensitive to tempo and meter, and will give answers
that align with the grid formed by tempo and meter sections.
-
+
They SHOULD NOT be used to determine the position of events
whose location is canonically defined in beats.
*/
@@ -266,7 +266,7 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible
framecnt_t bbt_duration_at (framepos_t, const Timecode::BBT_Time&, int dir);
/* TEMPO-SENSITIVE FUNCTIONS
-
+
These next 4 functions will all take tempo in account and should be
used to determine position (and in the last case, distance in beats)
when tempo matters but meter does not.
@@ -324,7 +324,7 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible
void insert_time (framepos_t, framecnt_t);
bool remove_time (framepos_t where, framecnt_t amount); //returns true if anything was moved
-
+
int n_tempos () const;
int n_meters () const;
@@ -335,7 +335,7 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible
friend class ::BBTTest;
friend class ::FrameposPlusBeatsTest;
friend class ::TempoTest;
-
+
static Tempo _default_tempo;
static Meter _default_meter;
@@ -355,16 +355,16 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible
BBTPointList::const_iterator bbt_before_or_at (framepos_t);
BBTPointList::const_iterator bbt_before_or_at (const Timecode::BBT_Time&);
BBTPointList::const_iterator bbt_after_or_at (framepos_t);
-
+
framepos_t round_to_type (framepos_t fr, RoundMode dir, BBTPointType);
void bbt_time (framepos_t, Timecode::BBT_Time&, const BBTPointList::const_iterator&);
framecnt_t bbt_duration_at_unlocked (const Timecode::BBT_Time& when, const Timecode::BBT_Time& bbt, int dir);
-
+
const MeterSection& first_meter() const;
MeterSection& first_meter();
const TempoSection& first_tempo() const;
TempoSection& first_tempo();
-
+
void do_insert (MetricSection* section);
void add_tempo_locked (const Tempo&, Timecode::BBT_Time where, bool recompute);
diff --git a/libs/ardour/ardour/track.h b/libs/ardour/ardour/track.h
index 2d67a0aa75..31ae261ea7 100644
--- a/libs/ardour/ardour/track.h
+++ b/libs/ardour/ardour/track.h
@@ -57,7 +57,7 @@ class LIBARDOUR_API Track : public Route, public PublicDiskstream
PBD::Signal0<void> MonitoringChanged;
MeterState metering_state () const;
-
+
virtual int no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
bool state_changing);
@@ -221,13 +221,13 @@ class LIBARDOUR_API Track : public Route, public PublicDiskstream
void maybe_declick (BufferSet&, framecnt_t, int);
boost::shared_ptr<RecEnableControl> _rec_enable_control;
-
+
framecnt_t check_initial_delay (framecnt_t nframes, framepos_t&);
private:
virtual boost::shared_ptr<Diskstream> diskstream_factory (XMLNode const &) = 0;
-
+
void diskstream_playlist_changed ();
void diskstream_record_enable_changed ();
void diskstream_record_safe_changed ();
diff --git a/libs/ardour/ardour/utils.h b/libs/ardour/ardour/utils.h
index d073588b9e..f3767d471a 100644
--- a/libs/ardour/ardour/utils.h
+++ b/libs/ardour/ardour/utils.h
@@ -93,7 +93,7 @@ gain_to_slider_position (ARDOUR::gain_t g)
K = 7.8990885960495589E+00
*/
-
+
return 8.2857630370864188E-01 * pow(g,5.1526743785019269E-01) * exp (-g/7.8990885960495589E+00);
#else
return pow((6.0*log(g)/log(2.0)+192.0)/198.0, 8.0);
@@ -110,9 +110,9 @@ slider_position_to_gain (double pos)
#ifndef OLD_GAIN_MATH
/* 5th order polynomial function fit to data from a TC Spectra console
fader (image of fader gradations).
-
+
y = a + bx1 + cx2 + dx3 + fx4 + gx5
-
+
a = -1.1945480381045521E-02
b = 1.5809476525537265E+00
c = -1.5850710838966151E+01
diff --git a/libs/ardour/ardour/vst_plugin.h b/libs/ardour/ardour/vst_plugin.h
index 3450e2a480..8e2e313c1f 100644
--- a/libs/ardour/ardour/vst_plugin.h
+++ b/libs/ardour/ardour/vst_plugin.h
@@ -56,7 +56,7 @@ public:
bool parameter_is_control (uint32_t) const { return true; }
bool parameter_is_input (uint32_t) const { return true; }
bool parameter_is_output (uint32_t) const { return false; }
-
+
int connect_and_run (
BufferSet&, ChanMapping in, ChanMapping out,
pframes_t nframes, framecnt_t offset
@@ -70,7 +70,7 @@ public:
void print_parameter (uint32_t, char*, uint32_t len) const;
bool has_editor () const;
-
+
AEffect * plugin () const { return _plugin; }
VSTState * state () const { return _state; }
MidiBuffer * midi_buffer () const { return _midi_out_buf; }
@@ -78,7 +78,7 @@ public:
int set_state (XMLNode const &, int);
int first_user_preset_index () const;
-
+
protected:
void set_plugin (AEffect *);
gchar* get_chunk (bool) const;
@@ -91,7 +91,7 @@ protected:
XMLTree * presets_tree () const;
std::string presets_file () const;
void find_presets ();
-
+
VSTHandle* _handle;
VSTState* _state;
AEffect* _plugin;
diff --git a/libs/ardour/ardour/vst_types.h b/libs/ardour/ardour/vst_types.h
index 9d4fc3450f..2e1c4074f2 100644
--- a/libs/ardour/ardour/vst_types.h
+++ b/libs/ardour/ardour/vst_types.h
@@ -44,12 +44,12 @@ struct LIBARDOUR_API _VSTInfo
int numInputs;
int numOutputs;
int numParams;
-
+
int wantMidi;
int wantEvents;
int hasEditor;
int canProcessReplacing;
-
+
char** ParamNames;
char** ParamLabels;
};
@@ -63,7 +63,7 @@ struct LIBARDOUR_API _VSTHandle
void* dll;
char* name;
char* path;
-
+
main_entry_t main_entry;
int plugincnt;
@@ -83,13 +83,13 @@ struct LIBARDOUR_API _VSTState
void* windows_window;
int xid; ///< X11 XWindow
-
+
int want_resize; ///< Set to signal the plugin resized its UI
void* extra_data; ///< Pointer to any extra data
-
+
void * event_callback_thisptr;
void (* eventProc) (void * event);
-
+
VSTHandle* handle;
int width;
@@ -102,9 +102,9 @@ struct LIBARDOUR_API _VSTState
int destroy;
int vst_version;
int has_editor;
-
+
int program_set_without_editor;
-
+
int want_program;
int want_chunk;
int n_pending_keys;
@@ -112,7 +112,7 @@ struct LIBARDOUR_API _VSTState
int wanted_chunk_size;
float * want_params;
float * set_params;
-
+
VSTKey pending_keys[16];
int dispatcher_wantcall;
diff --git a/libs/ardour/ardour/windows_vst_plugin.h b/libs/ardour/ardour/windows_vst_plugin.h
index 17b72ac8da..c4648564af 100644
--- a/libs/ardour/ardour/windows_vst_plugin.h
+++ b/libs/ardour/ardour/windows_vst_plugin.h
@@ -26,7 +26,7 @@ struct LIBARDOUR_API _VSTHandle;
typedef struct _VSTHandle VSTHandle;
namespace ARDOUR {
-
+
class AudioEngine;
class Session;
diff --git a/libs/ardour/async_midi_port.cc b/libs/ardour/async_midi_port.cc
index 86f111b520..6c5625e716 100644
--- a/libs/ardour/async_midi_port.cc
+++ b/libs/ardour/async_midi_port.cc
@@ -73,15 +73,15 @@ AsyncMIDIPort::flush_output_fifo (MIDI::pframes_t nframes)
output_fifo.get_read_vector (&vec);
MidiBuffer& mb (get_midi_buffer (nframes));
-
+
if (vec.len[0]) {
Evoral::Event<double>* evp = vec.buf[0];
-
+
for (size_t n = 0; n < vec.len[0]; ++n, ++evp) {
mb.push_back (evp->time(), evp->size(), evp->buffer());
}
}
-
+
if (vec.len[1]) {
Evoral::Event<double>* evp = vec.buf[1];
@@ -89,7 +89,7 @@ AsyncMIDIPort::flush_output_fifo (MIDI::pframes_t nframes)
mb.push_back (evp->time(), evp->size(), evp->buffer());
}
}
-
+
if ((written = vec.len[0] + vec.len[1]) != 0) {
output_fifo.increment_read_idx (written);
}
@@ -108,7 +108,7 @@ AsyncMIDIPort::cycle_start (MIDI::pframes_t nframes)
if (ARDOUR::Port::sends_output()) {
flush_output_fifo (nframes);
}
-
+
/* copy incoming data from the port buffer into the input FIFO
and if necessary wakeup the reader
*/
@@ -116,7 +116,7 @@ AsyncMIDIPort::cycle_start (MIDI::pframes_t nframes)
if (ARDOUR::Port::receives_input()) {
MidiBuffer& mb (get_midi_buffer (nframes));
framecnt_t when;
-
+
if (have_timer) {
when = timer ();
} else {
@@ -194,7 +194,7 @@ AsyncMIDIPort::write (const MIDI::byte * msg, size_t msglen, MIDI::timestamp_t t
/* this is the best estimate of "when" this MIDI data is being
* delivered
*/
-
+
_parser->set_timestamp (AudioEngine::instance()->sample_time() + timestamp);
for (size_t n = 0; n < msglen; ++n) {
_parser->scanner (msg[n]);
@@ -202,7 +202,7 @@ AsyncMIDIPort::write (const MIDI::byte * msg, size_t msglen, MIDI::timestamp_t t
Glib::Threads::Mutex::Lock lm (output_fifo_lock);
RingBuffer< Evoral::Event<double> >::rw_vector vec = { { 0, 0 }, { 0, 0} };
-
+
output_fifo.get_write_vector (&vec);
if (vec.len[0] + vec.len[1] < 1) {
@@ -223,7 +223,7 @@ AsyncMIDIPort::write (const MIDI::byte * msg, size_t msglen, MIDI::timestamp_t t
}
output_fifo.increment_write_idx (1);
-
+
ret = msglen;
} else {
@@ -249,11 +249,11 @@ AsyncMIDIPort::write (const MIDI::byte * msg, size_t msglen, MIDI::timestamp_t t
if (_currently_in_cycle) {
MidiBuffer& mb (get_midi_buffer (_cycle_nframes));
-
+
if (timestamp == 0) {
timestamp = _last_write_timestamp;
}
-
+
if (mb.push_back (timestamp, msglen, msg)) {
ret = msglen;
_last_write_timestamp = timestamp;
@@ -279,7 +279,7 @@ AsyncMIDIPort::read (MIDI::byte *, size_t)
if (!ARDOUR::Port::receives_input()) {
return 0;
}
-
+
timestamp_t time;
Evoral::EventType type;
uint32_t size;
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc
index 31baf47039..3d719cc30b 100644
--- a/libs/ardour/audio_diskstream.cc
+++ b/libs/ardour/audio_diskstream.cc
@@ -524,7 +524,7 @@ AudioDiskstream::process (BufferSet& bufs, framepos_t transport_frame, pframes_t
Sample *buf = bufs.get_audio (n).data(rec_offset);
memcpy (chaninfo->current_capture_buffer, buf, sizeof (Sample) * rec_nframes);
-
+
} else {
framecnt_t total = chaninfo->capture_vector.len[0] + chaninfo->capture_vector.len[1];
@@ -600,7 +600,7 @@ AudioDiskstream::process (BufferSet& bufs, framepos_t transport_frame, pframes_t
}
if ((_track->monitoring_state () & MonitoringDisk) || collect_playback) {
-
+
/* we're doing playback */
framecnt_t necessary_samples;
@@ -656,7 +656,7 @@ AudioDiskstream::process (BufferSet& bufs, framepos_t transport_frame, pframes_t
memcpy ((char *) chaninfo->playback_wrap_buffer,
chaninfo->playback_vector.buf[0],
chaninfo->playback_vector.len[0] * sizeof (Sample));
-
+
/* Copy buf[1] from playback_buf */
memcpy (chaninfo->playback_wrap_buffer + chaninfo->playback_vector.len[0],
chaninfo->playback_vector.buf[1],
@@ -675,13 +675,13 @@ AudioDiskstream::process (BufferSet& bufs, framepos_t transport_frame, pframes_t
int channel = 0;
for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan, ++channel) {
ChannelInfo* chaninfo (*chan);
-
+
playback_distance = interpolation.interpolate (
channel, nframes, chaninfo->current_playback_buffer, chaninfo->speed_buffer);
-
+
chaninfo->current_playback_buffer = chaninfo->speed_buffer;
}
-
+
} else {
playback_distance = nframes;
}
@@ -692,20 +692,20 @@ AudioDiskstream::process (BufferSet& bufs, framepos_t transport_frame, pframes_t
if (need_disk_signal) {
/* copy data over to buffer set */
-
+
size_t n_buffers = bufs.count().n_audio();
size_t n_chans = c->size();
gain_t scaling = 1.0f;
-
+
if (n_chans > n_buffers) {
scaling = ((float) n_buffers)/n_chans;
}
for (n = 0, chan = c->begin(); chan != c->end(); ++chan, ++n) {
-
+
AudioBuffer& buf (bufs.get_audio (n%n_buffers));
ChannelInfo* chaninfo (*chan);
-
+
if (n < n_chans) {
if (scaling != 1.0f) {
buf.read_from_with_gain (chaninfo->current_playback_buffer, nframes, scaling);
@@ -725,7 +725,7 @@ AudioDiskstream::process (BufferSet& bufs, framepos_t transport_frame, pframes_t
ChanCount cnt (DataType::AUDIO, n_chans);
cnt.set (DataType::MIDI, bufs.count().n_midi());
bufs.set_count (cnt);
-
+
/* extra buffers will already be silent, so leave them alone */
}
@@ -1124,11 +1124,11 @@ AudioDiskstream::_do_refill (Sample* mixdown_buffer, float* gain_buffer, framecn
/* do not read from disk while session is marked as Loading, to avoid
useless redundant I/O.
*/
-
+
if (_session.state_of_the_state() & Session::Loading) {
return 0;
}
-
+
if (c->empty()) {
return 0;
}
@@ -1263,14 +1263,14 @@ AudioDiskstream::_do_refill (Sample* mixdown_buffer, float* gain_buffer, framecn
/* now back to samples */
framecnt_t samples_to_read = byte_size_for_read / (bits_per_sample / 8);
-
+
//cerr << name() << " will read " << byte_size_for_read << " out of total bytes " << total_bytes << " in buffer of "
// << c->front()->playback_buf->bufsize() * bits_per_sample / 8 << " bps = " << bits_per_sample << endl;
// cerr << name () << " read samples = " << samples_to_read << " out of total space " << total_space << " in buffer of " << c->front()->playback_buf->bufsize() << " samples\n";
// uint64_t before = g_get_monotonic_time ();
// uint64_t elapsed;
-
+
for (chan_n = 0, i = c->begin(); i != c->end(); ++i, ++chan_n) {
ChannelInfo* chan (*i);
@@ -1352,14 +1352,14 @@ AudioDiskstream::_do_refill (Sample* mixdown_buffer, float* gain_buffer, framecn
// elapsed = g_get_monotonic_time () - before;
// cerr << "\tbandwidth = " << (byte_size_for_read / 1048576.0) / (elapsed/1000000.0) << "MB/sec\n";
-
+
file_frame = file_frame_tmp;
assert (file_frame >= 0);
ret = ((total_space - samples_to_read) > disk_read_chunk_frames);
-
+
c->front()->playback_buf->get_write_vector (&vector);
-
+
out:
return ret;
}
@@ -1630,7 +1630,7 @@ AudioDiskstream::transport_stopped_wallclock (struct tm& when, time_t twhen, boo
}
_last_capture_sources.insert (_last_capture_sources.end(), srcs.begin(), srcs.end());
-
+
_playlist->clear_changes ();
_playlist->set_capture_insertion_in_progress (true);
_playlist->freeze ();
@@ -1774,7 +1774,7 @@ AudioDiskstream::finish_capture (boost::shared_ptr<ChannelList> c)
*/
DEBUG_TRACE (DEBUG::CaptureAlignment, string_compose ("Finish capture, add new CI, %1 + %2\n", ci->start, ci->frames));
-
+
capture_info.push_back (ci);
capture_captured = 0;
@@ -1816,25 +1816,25 @@ AudioDiskstream::set_record_safe (bool yn)
if (!recordable() || !_session.record_enabling_legal() || _io->n_ports().n_audio() == 0) {
return;
}
-
+
/* can't rec-safe in destructive mode if transport is before start ????
REQUIRES REVIEW */
-
+
if (destructive() && yn && _session.transport_frame() < _session.current_start_frame()) {
return;
}
-
+
/* yes, i know that this not proof against race conditions, but its
good enough. i think.
*/
-
+
if (record_safe () != yn) {
if (yn) {
engage_record_safe ();
} else {
disengage_record_safe ();
}
-
+
RecordSafeChanged (); /* EMIT SIGNAL */
}
}
@@ -2334,11 +2334,11 @@ AudioDiskstream::use_pending_capture_data (XMLNode& node)
boost::shared_ptr<AudioRegion> wf_region;
boost::shared_ptr<AudioRegion> region;
-
+
/* First create the whole file region */
PropertyList plist;
-
+
plist.add (Properties::start, 0);
plist.add (Properties::length, first_fs->length (first_fs->timeline_position()));
plist.add (Properties::name, region_name_from_path (first_fs->name(), true));
@@ -2353,7 +2353,7 @@ AudioDiskstream::use_pending_capture_data (XMLNode& node)
* the playlist */
region = boost::dynamic_pointer_cast<AudioRegion> (RegionFactory::create (pending_sources, plist));
-
+
_playlist->add_region (region, position);
}
@@ -2414,7 +2414,7 @@ AudioDiskstream::can_become_destructive (bool& requires_bounce) const
if (Profile->get_trx()) {
return false;
}
-
+
if (!_playlist) {
requires_bounce = false;
return false;
diff --git a/libs/ardour/audio_playlist.cc b/libs/ardour/audio_playlist.cc
index 06d5f476a1..0553206367 100644
--- a/libs/ardour/audio_playlist.cc
+++ b/libs/ardour/audio_playlist.cc
@@ -152,7 +152,7 @@ struct ReadSorter {
/** A segment of region that needs to be read */
struct Segment {
Segment (boost::shared_ptr<AudioRegion> r, Evoral::Range<framepos_t> a) : region (r), range (a) {}
-
+
boost::shared_ptr<AudioRegion> region; ///< the region
Evoral::Range<framepos_t> range; ///< range of the region to read, in session frames
};
@@ -493,7 +493,7 @@ AudioPlaylist::load_legacy_crossfades (const XMLNode& node, int version)
if (!string_is_affirmative (p->value())) {
continue;
}
-
+
if ((p = (*i)->property (X_("in"))) == 0) {
continue;
}
@@ -537,7 +537,7 @@ AudioPlaylist::load_legacy_crossfades (const XMLNode& node, int version)
*/
const XMLNodeList c = (*i)->children ();
-
+
for (XMLNodeConstIterator j = c.begin(); j != c.end(); ++j) {
if ((*j)->name() == X_("FadeOut")) {
out_a->fade_out()->set_state (**j, version);
@@ -545,7 +545,7 @@ AudioPlaylist::load_legacy_crossfades (const XMLNode& node, int version)
out_a->inverse_fade_out()->set_state (**j, version);
}
}
-
+
out_a->set_fade_out_active (true);
} else {
@@ -555,7 +555,7 @@ AudioPlaylist::load_legacy_crossfades (const XMLNode& node, int version)
*/
const XMLNodeList c = (*i)->children ();
-
+
for (XMLNodeConstIterator j = c.begin(); j != c.end(); ++j) {
if ((*j)->name() == X_("FadeIn")) {
in_a->fade_in()->set_state (**j, version);
@@ -563,7 +563,7 @@ AudioPlaylist::load_legacy_crossfades (const XMLNode& node, int version)
in_a->inverse_fade_in()->set_state (**j, version);
}
}
-
+
in_a->set_fade_in_active (true);
}
}
diff --git a/libs/ardour/audio_playlist_importer.cc b/libs/ardour/audio_playlist_importer.cc
index 08cd090cdb..5390f1c9d4 100644
--- a/libs/ardour/audio_playlist_importer.cc
+++ b/libs/ardour/audio_playlist_importer.cc
@@ -177,7 +177,7 @@ AudioPlaylistImporter::_prepare_move ()
}
name = rename_pair.second;
}
-
+
XMLProperty* p = xml_playlist.property ("name");
if (!p) {
error << _("badly-formed XML in imported playlist") << endmsg;
diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc
index 4f414ac2fd..99115d5d6f 100644
--- a/libs/ardour/audio_track.cc
+++ b/libs/ardour/audio_track.cc
@@ -355,7 +355,7 @@ AudioTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_fram
int dret;
framecnt_t playback_distance;
-
+
if ((nframes = check_initial_delay (nframes, transport_frame)) == 0) {
/* need to do this so that the diskstream sets its
@@ -386,7 +386,7 @@ AudioTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_fram
BufferSet& bufs = _session.get_route_buffers (n_process_buffers ());
fill_buffers_with_input (bufs, _input, nframes);
-
+
if (_meter_point == MeterInput && (_monitoring & MonitorInput || _diskstream->record_enabled())) {
_meter->run (bufs, start_frame, end_frame, nframes, true);
}
@@ -486,7 +486,7 @@ AudioTrack::bounceable (boost::shared_ptr<Processor> endpoint, bool include_endp
/* does the output from the last considered processor match the
* input to this one?
*/
-
+
if (naudio != (*r)->input_streams().n_audio()) {
return false;
}
@@ -591,7 +591,7 @@ AudioTrack::freeze_me (InterThreadInfo& itt)
(*r)->deactivate ();
}
}
-
+
_session.set_dirty ();
}
}
diff --git a/libs/ardour/audio_track_importer.cc b/libs/ardour/audio_track_importer.cc
index cf9a25962c..43a40101cf 100644
--- a/libs/ardour/audio_track_importer.cc
+++ b/libs/ardour/audio_track_importer.cc
@@ -247,7 +247,7 @@ AudioTrackImporter::_prepare_move ()
}
name = rename_pair.second;
}
-
+
XMLNode* c = xml_track.child ("IO");
if (!c) {
error << _("badly-formed XML in imported track") << endmsg;
@@ -259,9 +259,9 @@ AudioTrackImporter::_prepare_move ()
error << _("badly-formed XML in imported track") << endmsg;
return false;
}
-
+
p->set_value (name);
-
+
track_handler.add_name (name);
return true;
diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc
index 9f91d3f9bd..485e4ef56a 100644
--- a/libs/ardour/audio_unit.cc
+++ b/libs/ardour/audio_unit.cc
@@ -471,7 +471,7 @@ AUPlugin::~AUPlugin ()
AUListenerDispose (_parameter_listener);
_parameter_listener = 0;
}
-
+
if (unit) {
DEBUG_TRACE (DEBUG::AudioUnits, "about to call uninitialize in plugin destructor\n");
unit->Uninitialize ();
@@ -569,12 +569,12 @@ AUPlugin::init ()
if (input_elements > 0) {
/* setup render callback: the plugin calls this to get input data
*/
-
+
AURenderCallbackStruct renderCallbackInfo;
-
+
renderCallbackInfo.inputProc = _render_callback;
renderCallbackInfo.inputProcRefCon = this;
-
+
DEBUG_TRACE (DEBUG::AudioUnits, "set render callback in input scope\n");
if ((err = unit->SetProperty (kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input,
0, (void*) &renderCallbackInfo, sizeof(renderCallbackInfo))) != 0) {
@@ -1062,7 +1062,7 @@ AUPlugin::configure_io (ChanCount in, ChanCount out)
}
/* reset plugin info to show currently configured state */
-
+
_info->n_inputs = in;
_info->n_outputs = out;
@@ -1495,14 +1495,14 @@ AUPlugin::connect_and_run (BufferSet& bufs, ChanMapping in_map, ChanMapping out_
uint32_t nmidi = bufs.count().n_midi();
for (uint32_t i = 0; i < nmidi; ++i) {
-
+
/* one MIDI port/buffer only */
-
+
MidiBuffer& m = bufs.get_midi (i);
-
+
for (MidiBuffer::iterator i = m.begin(); i != m.end(); ++i) {
Evoral::MIDIEvent<framepos_t> ev (*i);
-
+
if (ev.is_channel_event()) {
const uint8_t* b = ev.buffer();
DEBUG_TRACE (DEBUG::AudioUnits, string_compose ("%1: MIDI event %2\n", name(), ev));
@@ -2550,7 +2550,7 @@ AUPluginInfo::discover_by_description (PluginInfoList& plugs, CAComponentDescrip
int32_t possible_in = info->cache.io_configs.front().first;
int32_t possible_out = info->cache.io_configs.front().second;
-
+
if (possible_in > 0) {
info->n_inputs.set (DataType::AUDIO, possible_in);
} else {
@@ -2917,7 +2917,7 @@ void
AUPlugin::set_info (PluginInfoPtr info)
{
Plugin::set_info (info);
-
+
AUPluginInfoPtr pinfo = boost::dynamic_pointer_cast<AUPluginInfo>(get_info());
_has_midi_input = pinfo->needs_midi_input ();
_has_midi_output = false;
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc
index 50284128de..c5566e1630 100644
--- a/libs/ardour/audioengine.cc
+++ b/libs/ardour/audioengine.cc
@@ -121,7 +121,7 @@ AudioEngine::create ()
}
_instance = new AudioEngine ();
-
+
return _instance;
}
@@ -158,7 +158,7 @@ AudioEngine::sample_rate_change (pframes_t nframes)
#ifdef SILENCE_AFTER_SECONDS
_silence_countdown = nframes * SILENCE_AFTER_SECONDS;
#endif
-
+
return 0;
}
@@ -219,11 +219,11 @@ AudioEngine::process_callback (pframes_t nframes)
if (_measuring_latency == MeasureAudio && _mtdm) {
/* run a normal cycle from the perspective of the PortManager
so that we get silence on all registered ports.
-
+
we overwrite the silence on the two ports used for latency
measurement.
*/
-
+
PortManager::cycle_start (nframes);
PortManager::silence (nframes);
@@ -262,7 +262,7 @@ AudioEngine::process_callback (pframes_t nframes)
return_after_remove_check = true;
} else if (_latency_flush_frames) {
-
+
/* wait for the appropriate duration for the MTDM signal to
* drain from the ports before we revert to normal behaviour.
*/
@@ -270,7 +270,7 @@ AudioEngine::process_callback (pframes_t nframes)
PortManager::cycle_start (nframes);
PortManager::silence (nframes);
PortManager::cycle_end (nframes);
-
+
if (_latency_flush_frames > nframes) {
_latency_flush_frames -= nframes;
} else {
@@ -294,7 +294,7 @@ AudioEngine::process_callback (pframes_t nframes)
} else if (session_removal_countdown > 0) {
/* we'll be fading audio out.
-
+
if this is the last time we do this as part
of session removal, do a MIDI panic now
to get MIDI stopped. This relies on the fact
@@ -362,7 +362,7 @@ AudioEngine::process_callback (pframes_t nframes)
}
if (last_monitor_check + monitor_check_interval < next_processed_frames) {
-
+
PortManager::check_monitoring ();
last_monitor_check = next_processed_frames;
}
@@ -370,7 +370,7 @@ AudioEngine::process_callback (pframes_t nframes)
#ifdef SILENCE_AFTER_SECONDS
bool was_silent = (_silence_countdown == 0);
-
+
if (_silence_countdown >= nframes) {
_silence_countdown -= nframes;
} else {
@@ -385,17 +385,17 @@ AudioEngine::process_callback (pframes_t nframes)
if (_silence_countdown == 0 || _session->silent()) {
PortManager::silence (nframes);
}
-
-#else
+
+#else
if (_session->silent()) {
PortManager::silence (nframes);
}
#endif
-
+
if (session_remove_pending && session_removal_countdown) {
PortManager::fade_out (session_removal_gain, session_removal_gain_step, nframes);
-
+
if (session_removal_countdown > nframes) {
session_removal_countdown -= nframes;
} else {
@@ -410,7 +410,7 @@ AudioEngine::process_callback (pframes_t nframes)
_processed_frames = next_processed_frames;
PT_TIMING_CHECK (2);
-
+
return 0;
}
@@ -462,12 +462,12 @@ AudioEngine::do_reset_backend()
while (!_stop_hw_reset_processing) {
if (g_atomic_int_get (&_hw_reset_request_count) != 0 && _backend) {
-
+
_reset_request_lock.unlock();
-
+
Glib::Threads::RecMutex::Lock pl (_state_lock);
g_atomic_int_dec_and_test (&_hw_reset_request_count);
-
+
std::cout << "AudioEngine::RESET::Reset request processing. Requests left: " << _hw_reset_request_count << std::endl;
DeviceResetStarted(); // notify about device reset to be started
@@ -478,9 +478,9 @@ AudioEngine::do_reset_backend()
if ( ( 0 == stop () ) &&
( 0 == _backend->reset_device () ) &&
( 0 == start () ) ) {
-
+
std::cout << "AudioEngine::RESET::Engine started..." << std::endl;
-
+
// inform about possible changes
BufferSizeChanged (_backend->buffer_size() );
DeviceResetFinished(); // notify about device reset finish
@@ -491,7 +491,7 @@ AudioEngine::do_reset_backend()
// we've got an error
DeviceError();
}
-
+
std::cout << "AudioEngine::RESET::Done." << std::endl;
_reset_request_lock.lock();
@@ -574,7 +574,7 @@ AudioEngine::stop_hw_event_processing()
_hw_devicelist_update_thread->join ();
_hw_devicelist_update_thread = 0;
}
-
+
}
@@ -633,7 +633,7 @@ AudioEngine::reconnect_session_routes (bool reconnect_inputs, bool reconnect_out
if (_session) {
_session->reconnect_existing_routes(true, true, reconnect_inputs, reconnect_outputs);
}
-#endif
+#endif
}
@@ -733,13 +733,13 @@ AudioEngine::backend_discover (const string& path)
Glib::Module::get_last_error()) << endmsg;
return 0;
}
-
+
if (!module.get_symbol ("descriptor", func)) {
error << string_compose(_("AudioEngine: backend at \"%1\" has no descriptor function."), path) << endmsg;
error << Glib::Module::get_last_error() << endmsg;
return 0;
}
-
+
dfunc = (AudioBackendInfo* (*)(void))func;
info = dfunc();
if (!info->available()) {
@@ -747,7 +747,7 @@ AudioEngine::backend_discover (const string& path)
}
module.make_resident ();
-
+
return info;
}
@@ -755,7 +755,7 @@ vector<const AudioBackendInfo*>
AudioEngine::available_backends() const
{
vector<const AudioBackendInfo*> r;
-
+
for (BackendMap::const_iterator i = _backends.begin(); i != _backends.end(); ++i) {
r.push_back (i->second);
}
@@ -805,12 +805,12 @@ AudioEngine::set_backend (const std::string& name, const std::string& arg1, cons
}
drop_backend ();
-
+
try {
if (b->second->instantiate (arg1, arg2)) {
throw failed_constructor ();
}
-
+
_backend = b->second->factory (*this);
} catch (exception& e) {
@@ -846,20 +846,20 @@ AudioEngine::start (bool for_latency)
}
_running = true;
-
+
if (_session) {
_session->set_frame_rate (_backend->sample_rate());
-
+
if (_session->config.get_jack_time_master()) {
_backend->set_time_master (true);
}
}
-
+
if (!for_latency) {
Running(); /* EMIT SIGNAL */
}
-
+
return 0;
}
@@ -898,13 +898,13 @@ AudioEngine::stop (bool for_latency)
_latency_output_port = 0;
_latency_input_port = 0;
_started_for_latency = false;
-
+
Port::PortDrop ();
if (!for_latency) {
Stopped (); /* EMIT SIGNAL */
}
-
+
return 0;
}
@@ -1264,7 +1264,7 @@ AudioEngine::setup_required () const
return false;
}
}
-
+
return true;
}
diff --git a/libs/ardour/audiofilesource.cc b/libs/ardour/audiofilesource.cc
index 722d6acc17..257d396fb8 100644
--- a/libs/ardour/audiofilesource.cc
+++ b/libs/ardour/audiofilesource.cc
@@ -343,4 +343,4 @@ AudioFileSource::get_interleave_buffer (framecnt_t size)
return ssb->buf;
}
-
+
diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc
index 361b463450..8f5228ad6a 100644
--- a/libs/ardour/audioregion.cc
+++ b/libs/ardour/audioregion.cc
@@ -131,13 +131,13 @@ merge_curves (boost::shared_ptr<Evoral::ControlList> dst,
if (size != curve2->size()) {
return;
}
-
+
Evoral::ControlList::const_iterator c1 = curve1->begin();
int count = 0;
for (Evoral::ControlList::const_iterator c2 = curve2->begin(); c2!=curve2->end(); c2++ ) {
float v1 = accurate_coefficient_to_dB((*c1)->value);
float v2 = accurate_coefficient_to_dB((*c2)->value);
-
+
double interp = v1 * ( 1.0-( (double)count / (double)size) );
interp += v2 * ( (double)count / (double)size );
@@ -491,7 +491,7 @@ AudioRegion::read_at (Sample *buf, Sample *mixdown_buffer, float *gain_buffer,
*/
assert (cnt >= 0);
-
+
if (n_channels() == 0) {
return 0;
}
@@ -521,29 +521,29 @@ AudioRegion::read_at (Sample *buf, Sample *mixdown_buffer, float *gain_buffer,
of any fade out that we are dealing with
*/
frameoffset_t fade_out_offset = 0;
-
+
/* Amount (length) of fade out that we are dealing with in this read */
framecnt_t fade_out_limit = 0;
framecnt_t fade_interval_start = 0;
/* Fade in */
-
+
if (_fade_in_active && _session.config.get_use_region_fades()) {
-
+
framecnt_t fade_in_length = (framecnt_t) _fade_in->back()->when;
/* see if this read is within the fade in */
-
+
if (internal_offset < fade_in_length) {
fade_in_limit = min (to_read, fade_in_length - internal_offset);
}
}
-
+
/* Fade out */
-
+
if (_fade_out_active && _session.config.get_use_region_fades()) {
-
+
/* see if some part of this read is within the fade out */
/* ................. >| REGION
@@ -565,7 +565,7 @@ AudioRegion::read_at (Sample *buf, Sample *mixdown_buffer, float *gain_buffer,
fade_interval_start = max (internal_offset, _length - framecnt_t (_fade_out->back()->when));
framecnt_t fade_interval_end = min(internal_offset + to_read, _length.val());
-
+
if (fade_interval_end > fade_interval_start) {
/* (part of the) the fade out is in this buffer */
fade_out_limit = fade_interval_end - fade_interval_start;
@@ -616,26 +616,26 @@ AudioRegion::read_at (Sample *buf, Sample *mixdown_buffer, float *gain_buffer,
/* explicit inverse fade in curve (e.g. for constant
* power), so we have to fetch it.
*/
-
+
_inverse_fade_in->curve().get_vector (internal_offset, internal_offset + fade_in_limit, gain_buffer, fade_in_limit);
-
+
/* Fade the data from lower layers out */
for (framecnt_t n = 0; n < fade_in_limit; ++n) {
buf[n] *= gain_buffer[n];
}
-
+
/* refill gain buffer with the fade in */
-
+
_fade_in->curve().get_vector (internal_offset, internal_offset + fade_in_limit, gain_buffer, fade_in_limit);
-
+
} else {
-
+
/* no explicit inverse fade in, so just use (1 - fade
* in) for the fade out of lower layers
*/
-
+
_fade_in->curve().get_vector (internal_offset, internal_offset + fade_in_limit, gain_buffer, fade_in_limit);
-
+
for (framecnt_t n = 0; n < fade_in_limit; ++n) {
buf[n] *= 1 - gain_buffer[n];
}
@@ -656,27 +656,27 @@ AudioRegion::read_at (Sample *buf, Sample *mixdown_buffer, float *gain_buffer,
if (opaque()) {
if (_inverse_fade_out) {
-
+
_inverse_fade_out->curve().get_vector (curve_offset, curve_offset + fade_out_limit, gain_buffer, fade_out_limit);
-
+
/* Fade the data from lower levels in */
for (framecnt_t n = 0, m = fade_out_offset; n < fade_out_limit; ++n, ++m) {
buf[m] *= gain_buffer[n];
}
-
+
/* fetch the actual fade out */
_fade_out->curve().get_vector (curve_offset, curve_offset + fade_out_limit, gain_buffer, fade_out_limit);
-
+
} else {
/* no explicit inverse fade out (which is
* actually a fade in), so just use (1 - fade
* out) for the fade in of lower layers
*/
-
+
_fade_out->curve().get_vector (curve_offset, curve_offset + fade_out_limit, gain_buffer, fade_out_limit);
-
+
for (framecnt_t n = 0, m = fade_out_offset; n < fade_out_limit; ++n, ++m) {
buf[m] *= 1 - gain_buffer[n];
}
@@ -692,7 +692,7 @@ AudioRegion::read_at (Sample *buf, Sample *mixdown_buffer, float *gain_buffer,
buf[m] += mixdown_buffer[m] * gain_buffer[n];
}
}
-
+
/* MIX OR COPY THE REGION BODY FROM mixdown_buffer INTO buf */
framecnt_t const N = to_read - fade_in_limit - fade_out_limit;
@@ -733,7 +733,7 @@ AudioRegion::read_from_sources (SourceList const & srcs, framecnt_t limit, Sampl
if (to_read == 0) {
return 0;
}
-
+
if (chan_n < n_channels()) {
boost::shared_ptr<AudioSource> src = boost::dynamic_pointer_cast<AudioSource> (srcs[chan_n]);
@@ -759,7 +759,7 @@ AudioRegion::read_from_sources (SourceList const & srcs, framecnt_t limit, Sampl
}
} else {
-
+
/* use silence */
memset (buf, 0, sizeof (Sample) * to_read);
}
@@ -921,7 +921,7 @@ AudioRegion::_set_state (const XMLNode& node, int version, PropertyChange& what_
_fade_out->set_state (*grandchild, version);
}
}
-
+
if ((prop = child->property ("active")) != 0) {
if (string_is_affirmative (prop->value())) {
set_fade_out_active (true);
@@ -929,7 +929,7 @@ AudioRegion::_set_state (const XMLNode& node, int version, PropertyChange& what_
set_fade_out_active (false);
}
}
-
+
} else if ( (child->name() == "InverseFadeIn") || (child->name() == "InvFadeIn") ) {
XMLNode* grandchild = child->child ("AutomationList");
if (grandchild) {
@@ -1063,7 +1063,7 @@ AudioRegion::set_fade_in (FadeShape shape, framecnt_t len)
_fade_in->fast_simple_add (len, GAIN_COEFF_UNITY);
reverse_curve (_inverse_fade_in.val(), _fade_in.val());
break;
-
+
case FadeSymmetric:
//start with a nearly linear cuve
_fade_in->fast_simple_add (0, 1);
@@ -1119,12 +1119,12 @@ AudioRegion::set_fade_out (FadeShape shape, framecnt_t len)
_fade_out->fast_simple_add (len, GAIN_COEFF_SMALL);
reverse_curve (_inverse_fade_out.val(), _fade_out.val());
break;
-
+
case FadeFast:
generate_db_fade (_fade_out.val(), len, num_steps, -60);
generate_inverse_power_curve (_inverse_fade_out.val(), _fade_out.val());
break;
-
+
case FadeSlow:
generate_db_fade (c1, len, num_steps, -1); //start off with a slow fade
generate_db_fade (c2, len, num_steps, -80); //end with a fast fade
@@ -1143,7 +1143,7 @@ AudioRegion::set_fade_out (FadeShape shape, framecnt_t len)
_fade_out->fast_simple_add (len, GAIN_COEFF_SMALL);
reverse_curve (_inverse_fade_out.val(), _fade_out.val());
break;
-
+
case FadeSymmetric:
//start with a nearly linear cuve
_fade_out->fast_simple_add (0, 1);
@@ -1173,7 +1173,7 @@ AudioRegion::set_fade_in_length (framecnt_t len)
if (len > _length) {
len = _length - 1;
}
-
+
if (len < 64) {
len = 64;
}
@@ -1204,7 +1204,7 @@ AudioRegion::set_fade_out_length (framecnt_t len)
bool changed = _fade_out->extend_to (len);
if (changed) {
-
+
if (_inverse_fade_out) {
_inverse_fade_out->extend_to (len);
}
@@ -1893,7 +1893,7 @@ AudioRegion::get_single_other_xfade_region (bool start) const
} else {
rl = pl->regions_at (last_frame());
}
-
+
RegionList::iterator i;
boost::shared_ptr<Region> other;
uint32_t n = 0;
@@ -1946,6 +1946,6 @@ AudioRegion::verify_xfade_bounds (framecnt_t len, bool start)
}
return min (length(), min (maxlen, len));
-
+
}
diff --git a/libs/ardour/audiosource.cc b/libs/ardour/audiosource.cc
index 89e1e0593b..9c4c49e737 100644
--- a/libs/ardour/audiosource.cc
+++ b/libs/ardour/audiosource.cc
@@ -317,7 +317,7 @@ framecnt_t
AudioSource::read (Sample *dst, framepos_t start, framecnt_t cnt, int /*channel*/) const
{
assert (cnt >= 0);
-
+
Glib::Threads::Mutex::Lock lm (_lock);
return read_unlocked (dst, start, cnt);
}
@@ -370,7 +370,7 @@ AudioSource::read_peaks_with_fpp (PeakData *peaks, framecnt_t npeaks, framepos_t
}
if (!_captured_for.empty()) {
-
+
/* _captured_for is only set after a capture pass is
* complete. so we know that capturing is finished for this
* file, and now we can check actual size of the peakfile is at
@@ -382,9 +382,9 @@ AudioSource::read_peaks_with_fpp (PeakData *peaks, framecnt_t npeaks, framepos_t
* might decided to get rid of that anyway.
*
*/
-
+
const off_t expected_file_size = (_length / (double) samples_per_file_peak) * sizeof (PeakData);
-
+
if (statbuf.st_size < expected_file_size) {
warning << string_compose (_("peak file %1 is truncated from %2 to %3"), _peakpath, expected_file_size, statbuf.st_size) << endmsg;
const_cast<AudioSource*>(this)->build_peaks_from_scratch ();
@@ -404,7 +404,7 @@ AudioSource::read_peaks_with_fpp (PeakData *peaks, framecnt_t npeaks, framepos_t
error << string_compose (_("Cannot open peakfile @ %1 for reading (%2)"), _peakpath, strerror (errno)) << endmsg;
return -1;
}
-
+
scale = npeaks/expected_peaks;
@@ -728,7 +728,7 @@ AudioSource::build_peaks_from_scratch ()
/* hold lock while building peaks */
Glib::Threads::Mutex::Lock lp (_lock);
-
+
if (prepare_for_peakfile_writes ()) {
goto out;
}
@@ -743,7 +743,7 @@ AudioSource::build_peaks_from_scratch ()
framecnt_t frames_to_read = min (bufsize, cnt);
framecnt_t frames_read;
-
+
if ((frames_read = read_unlocked (buf.get(), current_frame, frames_to_read)) != frames_to_read) {
error << string_compose(_("%1: could not write read raw data for peak computation (%2)"), _name, strerror (errno)) << endmsg;
done_with_peakfile_writes (false);
diff --git a/libs/ardour/auditioner.cc b/libs/ardour/auditioner.cc
index 27d56d7e1b..fe84a2d717 100644
--- a/libs/ardour/auditioner.cc
+++ b/libs/ardour/auditioner.cc
@@ -165,20 +165,20 @@ Auditioner::connect ()
/* create (and connect) new ports */
_main_outs->defer_pan_reset ();
-
+
if (left.length()) {
_output->add_port (left, this, DataType::AUDIO);
}
-
+
if (right.length()) {
_output->add_port (right, this, DataType::AUDIO);
}
-
+
_main_outs->allow_pan_reset ();
_main_outs->reset_panner ();
} else {
-
+
/* reconnect existing ports */
boost::shared_ptr<Port> oleft (_output->nth (0));
@@ -190,7 +190,7 @@ Auditioner::connect ()
oright->connect (right);
}
}
-
+
}
return 0;
diff --git a/libs/ardour/automatable.cc b/libs/ardour/automatable.cc
index f928ee01b3..a2ce81acca 100644
--- a/libs/ardour/automatable.cc
+++ b/libs/ardour/automatable.cc
@@ -66,7 +66,7 @@ Automatable::~Automatable ()
{
{
Glib::Threads::Mutex::Lock lm (_control_lock);
-
+
for (Controls::const_iterator li = _controls.begin(); li != _controls.end(); ++li) {
boost::dynamic_pointer_cast<AutomationControl>(li->second)->drop_references ();
}
@@ -288,7 +288,7 @@ Automatable::get_parameter_automation_state (Evoral::Parameter param)
AutoState result = Off;
boost::shared_ptr<AutomationControl> c = automation_control(param);
-
+
if (c) {
result = c->automation_state();
}
diff --git a/libs/ardour/automation_list.cc b/libs/ardour/automation_list.cc
index 3cf3d6af8b..91609f6acb 100644
--- a/libs/ardour/automation_list.cc
+++ b/libs/ardour/automation_list.cc
@@ -224,7 +224,7 @@ AutomationList::stop_touch (bool mark, double)
if (_state == Touch) {
if (mark) {
-
+
/* XXX need to mark the last added point with the
* current time
*/
@@ -520,4 +520,4 @@ AutomationListProperty::clone () const
boost::shared_ptr<AutomationList> (new AutomationList (*this->_current.get()))
);
}
-
+
diff --git a/libs/ardour/automation_watch.cc b/libs/ardour/automation_watch.cc
index e9fecb5973..6ebf1aab71 100644
--- a/libs/ardour/automation_watch.cc
+++ b/libs/ardour/automation_watch.cc
@@ -47,7 +47,7 @@ AutomationWatch::AutomationWatch ()
, _last_time (0)
, _run_thread (false)
{
-
+
}
AutomationWatch::~AutomationWatch ()
@@ -85,7 +85,7 @@ AutomationWatch::add_automation_watch (boost::shared_ptr<AutomationControl> ac)
* creates reference cycles. we don't need to make the weak_ptr<>
* explicit here, but it helps to remind us what is going on.
*/
-
+
boost::weak_ptr<AutomationControl> wac (ac);
ac->DropReferences.connect_same_thread (*this, boost::bind (&AutomationWatch::remove_weak_automation_watch, this, wac));
}
@@ -139,7 +139,7 @@ AutomationWatch::timer ()
}
}
}
-
+
_last_time = time;
}
@@ -171,7 +171,7 @@ AutomationWatch::set_session (Session* s)
if (_session) {
_run_thread = true;
_thread = Glib::Threads::Thread::create (boost::bind (&AutomationWatch::thread, this));
-
+
_session->TransportStateChange.connect_same_thread (transport_connection, boost::bind (&AutomationWatch::transport_state_change, this));
}
}
@@ -184,7 +184,7 @@ AutomationWatch::transport_state_change ()
}
bool rolling = _session->transport_rolling();
-
+
_last_time = _session->audible_frame ();
{
diff --git a/libs/ardour/buffer_set.cc b/libs/ardour/buffer_set.cc
index 82e96be750..92f5272b3b 100644
--- a/libs/ardour/buffer_set.cc
+++ b/libs/ardour/buffer_set.cc
@@ -187,7 +187,7 @@ BufferSet::ensure_buffers(DataType type, size_t num_buffers, size_t buffer_capac
for (size_t i = 0; i < num_buffers; ++i) {
bufs.push_back(Buffer::create(type, buffer_capacity));
}
-
+
_available.set(type, num_buffers);
_count.set (type, num_buffers);
}
diff --git a/libs/ardour/bundle.cc b/libs/ardour/bundle.cc
index 7e50807c6e..99340839d2 100644
--- a/libs/ardour/bundle.cc
+++ b/libs/ardour/bundle.cc
@@ -568,7 +568,7 @@ Bundle::type_channel_to_overall (DataType t, uint32_t c) const
if (t == DataType::NIL) {
return c;
}
-
+
Glib::Threads::Mutex::Lock lm (_channel_mutex);
vector<Channel>::const_iterator i = _channel.begin ();
@@ -602,11 +602,11 @@ Bundle::overall_channel_to_type (DataType t, uint32_t c) const
if (t == DataType::NIL) {
return c;
}
-
+
Glib::Threads::Mutex::Lock lm (_channel_mutex);
uint32_t s = 0;
-
+
vector<Channel>::const_iterator i = _channel.begin ();
for (uint32_t j = 0; j < c; ++j) {
if (i->type == t) {
diff --git a/libs/ardour/butler.cc b/libs/ardour/butler.cc
index 272612f7b5..62f3a525ea 100644
--- a/libs/ardour/butler.cc
+++ b/libs/ardour/butler.cc
@@ -106,7 +106,7 @@ Butler::start_thread()
{
// set up capture and playback buffering
Diskstream::set_buffering_parameters (Config->get_buffering_preset());
-
+
/* size is in Samples, not bytes */
const float rate = (float)_session.frame_rate();
audio_dstream_capture_buffer_size = (uint32_t) floor (Config->get_audio_capture_buffer_seconds() * rate);
@@ -133,7 +133,7 @@ Butler::start_thread()
// we are ready to request buffer adjustments
_session.adjust_capture_buffering ();
_session.adjust_playback_buffering ();
-
+
return 0;
}
@@ -198,7 +198,7 @@ Butler::thread_work ()
}
}
-
+
restart:
DEBUG_TRACE (DEBUG::Butler, "at restart for disk work\n");
disk_work_outstanding = false;
@@ -244,7 +244,7 @@ Butler::thread_work ()
case 0:
DEBUG_TRACE (DEBUG::Butler, string_compose ("\ttrack refill done %1\n", tr->name()));
break;
-
+
case 1:
DEBUG_TRACE (DEBUG::Butler, string_compose ("\ttrack refill unfinished %1\n", tr->name()));
disk_work_outstanding = true;
@@ -315,7 +315,7 @@ Butler::flush_tracks_to_disk_normal (boost::shared_ptr<RouteList> rl, uint32_t&
for (RouteList::iterator i = rl->begin(); !transport_work_requested() && should_run && i != rl->end(); ++i) {
// cerr << "write behind for " << (*i)->name () << endl;
-
+
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
if (!tr) {
@@ -350,7 +350,7 @@ Butler::flush_tracks_to_disk_normal (boost::shared_ptr<RouteList> rl, uint32_t&
}
return disk_work_outstanding;
-}
+}
bool
Butler::flush_tracks_to_disk_after_locate (boost::shared_ptr<RouteList> rl, uint32_t& errors)
@@ -360,7 +360,7 @@ Butler::flush_tracks_to_disk_after_locate (boost::shared_ptr<RouteList> rl, uint
/* almost the same as the "normal" version except that we do not test
* for transport_work_requested() and we force flushes.
*/
-
+
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
// cerr << "write behind for " << (*i)->name () << endl;
@@ -399,7 +399,7 @@ Butler::flush_tracks_to_disk_after_locate (boost::shared_ptr<RouteList> rl, uint
}
return disk_work_outstanding;
-}
+}
void
Butler::schedule_transport_work ()
diff --git a/libs/ardour/control_protocol_manager.cc b/libs/ardour/control_protocol_manager.cc
index 8b137843dd..4e2cb7d9f7 100644
--- a/libs/ardour/control_protocol_manager.cc
+++ b/libs/ardour/control_protocol_manager.cc
@@ -113,7 +113,7 @@ ControlProtocolManager::activate (ControlProtocolInfo& cpi)
cp->set_active (true);
return 0;
-}
+}
int
ControlProtocolManager::deactivate (ControlProtocolInfo& cpi)
@@ -137,15 +137,15 @@ ControlProtocolManager::drop_protocols ()
/* called explicitly by Session::destroy() so that we can clean up
* before the process cycle stops and ports vanish.
*/
-
+
Glib::Threads::Mutex::Lock lm (protocols_lock);
-
+
for (list<ControlProtocol*>::iterator p = control_protocols.begin(); p != control_protocols.end(); ++p) {
delete *p;
}
-
+
control_protocols.clear ();
-
+
for (list<ControlProtocolInfo*>::iterator p = control_protocol_info.begin(); p != control_protocol_info.end(); ++p) {
// mark existing protocols as requested
// otherwise the ControlProtocol instances are not recreated in set_session
@@ -154,7 +154,7 @@ ControlProtocolManager::drop_protocols ()
(*p)->protocol = 0;
}
}
-}
+}
ControlProtocol*
ControlProtocolManager::instantiate (ControlProtocolInfo& cpi)
@@ -202,7 +202,7 @@ ControlProtocolManager::teardown (ControlProtocolInfo& cpi)
if (cpi.mandatory) {
return 0;
}
-
+
/* save current state */
delete cpi.state;
@@ -288,7 +288,7 @@ ControlProtocolManager::discover_control_protocols ()
DEBUG_TRACE (DEBUG::ControlProtocols,
string_compose (_("looking for control protocols in %1\n"), control_protocol_search_path().to_string()));
-
+
for (vector<std::string>::iterator i = cp_modules.begin(); i != cp_modules.end(); ++i) {
control_protocol_discover (*i);
}
@@ -409,16 +409,16 @@ ControlProtocolManager::set_state (const XMLNode& node, int /*version*/)
}
bool active = string_is_affirmative (prop->value());
-
+
if ((prop = (*citer)->property (X_("name"))) == 0) {
continue;
}
ControlProtocolInfo* cpi = cpi_by_name (prop->value());
-
+
if (cpi) {
cpi->state = new XMLNode (**citer);
-
+
if (active) {
if (_session) {
instantiate (*cpi);
diff --git a/libs/ardour/cycle_timer.cc b/libs/ardour/cycle_timer.cc
index 84dafd00cc..ad91fa6874 100644
--- a/libs/ardour/cycle_timer.cc
+++ b/libs/ardour/cycle_timer.cc
@@ -85,7 +85,7 @@ StoringTimer::StoringTimer (int N)
_max_points = N;
_points = 0;
}
-
+
void
StoringTimer::dump (string const & file)
@@ -114,11 +114,11 @@ StoringTimer::check (int p)
} else if (_points > _max_points) {
return;
}
-
+
_point[_points] = p;
_value[_points] = get_cycles ();
_ref[_points] = _current_ref;
-
+
++_points;
}
diff --git a/libs/ardour/delivery.cc b/libs/ardour/delivery.cc
index 7bccf3121d..b70d86a75d 100644
--- a/libs/ardour/delivery.cc
+++ b/libs/ardour/delivery.cc
@@ -97,7 +97,7 @@ Delivery::Delivery (Session& s, boost::shared_ptr<Pannable> pannable, boost::sha
Delivery::~Delivery()
{
- DEBUG_TRACE (DEBUG::Destruction, string_compose ("delivery %1 destructor\n", _name));
+ DEBUG_TRACE (DEBUG::Destruction, string_compose ("delivery %1 destructor\n", _name));
/* this object should vanish from any signal callback lists
that it is on before we get any further. The full qualification
@@ -462,7 +462,7 @@ Delivery::flush_buffers (framecnt_t nframes)
if (!_output) {
return;
}
-
+
PortSet& ports (_output->ports());
for (PortSet::iterator i = ports.begin(); i != ports.end(); ++i) {
diff --git a/libs/ardour/diskstream.cc b/libs/ardour/diskstream.cc
index f2da7982fe..c0ed359bdd 100644
--- a/libs/ardour/diskstream.cc
+++ b/libs/ardour/diskstream.cc
@@ -504,7 +504,7 @@ Diskstream::set_state (const XMLNode& node, int /*version*/)
error << string_compose (_("%1: this session uses destructive tracks, which are not supported"), PROGRAM_NAME) << endmsg;
return -1;
}
-
+
if ((prop = node.property (X_("capture-alignment"))) != 0) {
set_align_choice (AlignChoice (string_2_enum (prop->value(), _alignment_choice)), true);
} else {
@@ -526,7 +526,7 @@ Diskstream::set_state (const XMLNode& node, int /*version*/)
non_realtime_set_speed ();
}
}
-
+
if ((prop = node.property ("record-safe")) != 0) {
_record_safe = PBD::string_is_affirmative (prop->value()) ? 1 : 0;
}
@@ -799,7 +799,7 @@ framecnt_t
Diskstream::default_disk_read_chunk_frames()
{
return 65536;
-}
+}
framecnt_t
Diskstream::default_disk_write_chunk_frames ()
@@ -818,7 +818,7 @@ Diskstream::set_buffering_parameters (BufferingPreset bp)
if (!get_buffering_presets (bp, read_chunk_size, read_buffer_size, write_chunk_size, write_buffer_size)) {
return;
}
-
+
disk_read_chunk_frames = read_chunk_size;
disk_write_chunk_frames = write_chunk_size;
Config->set_audio_capture_buffer_seconds (write_buffer_size);
diff --git a/libs/ardour/engine_slave.cc b/libs/ardour/engine_slave.cc
index 849b7320d3..8b7c3ba510 100644
--- a/libs/ardour/engine_slave.cc
+++ b/libs/ardour/engine_slave.cc
@@ -62,6 +62,6 @@ Engine_Slave::speed_and_position (double& sp, framepos_t& position)
} else {
_starting = false;
}
-
+
return true;
}
diff --git a/libs/ardour/engine_state_controller.cc b/libs/ardour/engine_state_controller.cc
index 991af4cf4e..57b8a84888 100644
--- a/libs/ardour/engine_state_controller.cc
+++ b/libs/ardour/engine_state_controller.cc
@@ -583,7 +583,7 @@ EngineStateController::_validate_current_device_state ()
// if current is not found switch to default if is supported
if (bs_iter == buffer_sizes.end ()) {
bs_iter = std::find (buffer_sizes.begin (), buffer_sizes.end (), backend->default_buffer_size (_current_state->device_name));
-
+
if (bs_iter != buffer_sizes.end ()) {
_current_state->buffer_size = backend->default_buffer_size (_current_state->device_name);
} else {
@@ -1423,7 +1423,7 @@ EngineStateController::_on_session_loaded ()
// This is done during session construction
// _session->reconnect_ltc_input ();
// _session->reconnect_ltc_output ();
-
+
framecnt_t desired_sample_rate = _session->nominal_frame_rate ();
if ( desired_sample_rate > 0 && set_new_sample_rate_in_controller (desired_sample_rate))
{
@@ -1780,7 +1780,7 @@ bool
EngineStateController::push_current_state_to_backend (bool start)
{
boost::shared_ptr<AudioBackend> backend = AudioEngine::instance ()->current_backend ();
-
+
if (!backend) {
return false;
}
@@ -1820,7 +1820,7 @@ EngineStateController::push_current_state_to_backend (bool start)
if (!result ) {
std::cout << "EngineStateController::Setting device sample rate " << _current_state->sample_rate << std::endl;
result = backend->set_sample_rate (_current_state->sample_rate);
-
+
if (result) {
error << string_compose (_("Cannot set sample rate to %1"), get_current_sample_rate ()) << endmsg;
}
diff --git a/libs/ardour/enums.cc b/libs/ardour/enums.cc
index f6044aeb08..e681eacbac 100644
--- a/libs/ardour/enums.cc
+++ b/libs/ardour/enums.cc
@@ -405,7 +405,7 @@ setup_enum_writer ()
REGISTER_CLASS_ENUM (SessionEvent, Replace);
REGISTER_CLASS_ENUM (SessionEvent, Clear);
REGISTER (_SessionEvent_Action);
-
+
REGISTER_CLASS_ENUM (Session, Stopped);
REGISTER_CLASS_ENUM (Session, Waiting);
REGISTER_CLASS_ENUM (Session, Running);
diff --git a/libs/ardour/event_type_map.cc b/libs/ardour/event_type_map.cc
index 8782162304..28f688df81 100644
--- a/libs/ardour/event_type_map.cc
+++ b/libs/ardour/event_type_map.cc
@@ -195,7 +195,7 @@ EventTypeMap::from_symbol(const string& str) const
} else {
PBD::warning << "Unknown Parameter '" << str << "'" << endmsg;
}
-
+
return Evoral::Parameter(p_type, p_channel, p_id);
}
diff --git a/libs/ardour/export_filename.cc b/libs/ardour/export_filename.cc
index 945af25dee..077106a4b0 100644
--- a/libs/ardour/export_filename.cc
+++ b/libs/ardour/export_filename.cc
@@ -128,7 +128,7 @@ ExportFilename::set_state (const XMLNode & node)
folder = tmp;
}
}
-
+
if (folder.empty()) {
folder = session.session_directory().export_path();
}
diff --git a/libs/ardour/export_graph_builder.cc b/libs/ardour/export_graph_builder.cc
index 8ef69f2472..c054d85242 100644
--- a/libs/ardour/export_graph_builder.cc
+++ b/libs/ardour/export_graph_builder.cc
@@ -378,7 +378,7 @@ ExportGraphBuilder::Normalizer::Normalizer (ExportGraphBuilder & parent, FileSpe
config = new_config;
uint32_t const channels = config.channel_config->get_n_chans();
max_frames_out = 4086 - (4086 % channels); // TODO good chunk size
-
+
buffer.reset (new AllocatingProcessContext<Sample> (max_frames_out, channels));
peak_reader.reset (new PeakReader ());
normalizer.reset (new AudioGrapher::Normalizer (config.format->normalize_target()));
diff --git a/libs/ardour/export_handler.cc b/libs/ardour/export_handler.cc
index 16aee32a3c..c7dd71040b 100644
--- a/libs/ardour/export_handler.cc
+++ b/libs/ardour/export_handler.cc
@@ -168,7 +168,7 @@ ExportHandler::start_timespan ()
this is the timespan to do this time
*/
current_timespan = config_map.begin()->first;
-
+
export_status->total_frames_current_timespan = current_timespan->get_length();
export_status->timespan_name = current_timespan->name();
export_status->processed_frames_current_timespan = 0;
@@ -564,7 +564,7 @@ ExportHandler::write_cue_header (CDMarkerStatus & status)
BINARY = "header-less" audio (44.1 kHz, 16 Bit, little endian),
MOTOROLA = "header-less" audio (44.1 kHz, 16 Bit, big endian),
and MP3
-
+
We try to use these file types whenever appropriate and
default to our own names otherwise.
*/
@@ -688,14 +688,14 @@ ExportHandler::write_track_info_toc (CDMarkerStatus & status)
status.out << "CD_TEXT {" << endl << " LANGUAGE 0 {" << endl;
status.out << " TITLE " << toc_escape_cdtext (status.marker->name()) << endl;
-
+
status.out << " PERFORMER ";
if (status.marker->cd_info.find("performer") != status.marker->cd_info.end()) {
status.out << toc_escape_cdtext (status.marker->cd_info["performer"]) << endl;
} else {
status.out << "\"\"" << endl;
}
-
+
if (status.marker->cd_info.find("composer") != status.marker->cd_info.end()) {
status.out << " SONGWRITER " << toc_escape_cdtext (status.marker->cd_info["composer"]) << endl;
}
@@ -816,7 +816,7 @@ ExportHandler::toc_escape_cdtext (const std::string& txt)
out += buf;
}
}
-
+
out += '"';
return out;
@@ -841,7 +841,7 @@ ExportHandler::toc_escape_filename (const std::string& txt)
out += *c;
}
}
-
+
out += '"';
return out;
@@ -852,13 +852,13 @@ ExportHandler::cue_escape_cdtext (const std::string& txt)
{
std::string latin1_txt;
std::string out;
-
+
try {
latin1_txt = Glib::convert (txt, "ISO-8859-1", "UTF-8");
} catch (Glib::ConvertError& err) {
throw Glib::ConvertError (err.code(), string_compose (_("Cannot convert %1 to Latin-1 text"), txt));
}
-
+
// does not do much mor than UTF-8 to Latin1 translation yet, but
// that may have to change if cue parsers in burning programs change
out = '"' + latin1_txt + '"';
diff --git a/libs/ardour/export_profile_manager.cc b/libs/ardour/export_profile_manager.cc
index a4d6239ae4..e94486bd46 100644
--- a/libs/ardour/export_profile_manager.cc
+++ b/libs/ardour/export_profile_manager.cc
@@ -400,7 +400,7 @@ ExportProfileManager::init_timespans (XMLNodeList nodes)
} else {
session_range = session.locations()->session_range_location();
}
-
+
if (!session_range) { return false; }
ExportTimespanPtr timespan = handler->add_timespan();
@@ -789,7 +789,7 @@ std::string
ExportProfileManager::get_sample_filename_for_format (ExportFilenamePtr filename, ExportFormatSpecPtr format)
{
assert (format);
-
+
if (channel_configs.empty()) { return ""; }
std::list<string> filenames;
@@ -829,7 +829,7 @@ ExportProfileManager::get_warnings ()
if (!channel_configs.empty ()) {
channel_config_state = channel_configs.front();
}
-
+
TimespanStatePtr timespan_state = timespans.front();
/*** Check "global" config ***/
@@ -867,7 +867,7 @@ ExportProfileManager::get_warnings ()
check_config (warnings, timespan_state, channel_config_state, *format_it, *filename_it);
}
}
-
+
return warnings;
}
diff --git a/libs/ardour/file_source.cc b/libs/ardour/file_source.cc
index f5c241eaf8..3ec561d667 100644
--- a/libs/ardour/file_source.cc
+++ b/libs/ardour/file_source.cc
@@ -274,7 +274,7 @@ FileSource::find (Session& s, DataType type, const string& path, bool must_exist
vector<string>::iterator j = i;
++j;
-
+
while (j != hits.end()) {
if (PBD::equivalent_paths (*i, *j)) {
/* *i and *j are the same file; break out of the loop early */
@@ -316,10 +316,10 @@ FileSource::find (Session& s, DataType type, const string& path, bool must_exist
} else {
/* only one match: happy days */
-
+
keeppath = de_duped_hits[0];
}
-
+
} else {
keeppath = path;
}
@@ -566,7 +566,7 @@ FileSource::is_stub () const
if (!empty()) {
return false;
}
-
+
if (!removable()) {
return false;
}
@@ -577,7 +577,7 @@ FileSource::is_stub () const
return true;
}
-
+
int
FileSource::rename (const string& newpath)
{
@@ -604,4 +604,4 @@ FileSource::rename (const string& newpath)
return 0;
}
-
+
diff --git a/libs/ardour/filesystem_paths.cc b/libs/ardour/filesystem_paths.cc
index c5cd864590..fcdf42cbbe 100644
--- a/libs/ardour/filesystem_paths.cc
+++ b/libs/ardour/filesystem_paths.cc
@@ -53,14 +53,14 @@ user_config_directory_name (int version = -1)
called, so rely on build-time detection of the
product name etc.
*/
-
+
#ifdef USE_TRACKS_CODE_FEATURES
/* Tracks does not use versioned configuration folders, which may or
may not be problematic in the future.
*/
return X_(PROGRAM_NAME);
-#else
+#else
const string config_dir_name = string_compose ("%1%2", X_(PROGRAM_NAME), version);
#if defined (__APPLE__) || defined (PLATFORM_WINDOWS)
@@ -70,8 +70,8 @@ user_config_directory_name (int version = -1)
/* use lower case folder name on Linux */
return downcase (config_dir_name);
#endif
-#endif
-}
+#endif
+}
std::string
user_config_directory (int version)
@@ -208,7 +208,7 @@ ardour_dll_directory ()
if (s.empty()) {
std::cerr << _("ARDOUR_DLL_PATH not set in environment - exiting\n");
::exit (1);
- }
+ }
return s;
#endif
}
diff --git a/libs/ardour/filter.cc b/libs/ardour/filter.cc
index 382e6d9d86..36a74da0f5 100644
--- a/libs/ardour/filter.cc
+++ b/libs/ardour/filter.cc
@@ -75,19 +75,19 @@ Filter::make_new_sources (boost::shared_ptr<Region> region, SourceList& nsrcs, s
sample_rate = session.frame_rate();
} else {
boost::shared_ptr<AudioRegion> aregion = boost::dynamic_pointer_cast<AudioRegion>(region);
-
+
if (aregion) {
sample_rate = aregion->audio_source()->sample_rate();
} else {
return -1;
}
}
-
+
nsrcs.push_back (boost::dynamic_pointer_cast<Source> (
SourceFactory::createWritable (region->data_type(), session,
path, false, sample_rate)));
}
-
+
catch (failed_constructor& err) {
error << string_compose (_("filter: error creating new file %1 (%2)"), path, strerror (errno)) << endmsg;
return -1;
diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc
index 5ef66c10c2..d9e0602f6c 100644
--- a/libs/ardour/globals.cc
+++ b/libs/ardour/globals.cc
@@ -168,15 +168,15 @@ setup_hardware_optimization (bool try_optimization)
#ifdef PLATFORM_WINDOWS
/* We have AVX-optimized code for Windows */
-
+
if (fpu->has_avx()) {
-#else
+#else
/* AVX code doesn't compile on Linux yet */
-
+
if (false) {
-#endif
+#endif
info << "Using AVX optimized routines" << endmsg;
-
+
// AVX SET
compute_peak = x86_sse_avx_compute_peak;
find_peaks = x86_sse_avx_find_peaks;
@@ -287,9 +287,9 @@ copy_configuration_files (string const & old_dir, string const & new_dir, int ol
if (g_mkdir_with_parents (new_dir.c_str(), 0755)) {
return -1;
}
-
+
if (old_version == 3) {
-
+
old_name = Glib::build_filename (old_dir, X_("recent"));
new_name = Glib::build_filename (new_dir, X_("recent"));
@@ -307,7 +307,7 @@ copy_configuration_files (string const & old_dir, string const & new_dir, int ol
* $CONFIG/ardour.rc. Pick up the newer "old" config file,
* to avoid confusion.
*/
-
+
string old_name = Glib::build_filename (old_dir, X_("config"));
if (!Glib::file_test (old_name, Glib::FILE_TEST_EXISTS)) {
@@ -334,7 +334,7 @@ copy_configuration_files (string const & old_dir, string const & new_dir, int ol
old_name = Glib::build_filename (old_dir, X_("presets"));
new_name = Glib::build_filename (new_dir, X_("presets"));
-
+
copy_recurse (old_name, new_name);
/* presets */
@@ -343,12 +343,12 @@ copy_configuration_files (string const & old_dir, string const & new_dir, int ol
new_name = Glib::build_filename (new_dir, X_("plugin_statuses"));
copy_file (old_name, new_name);
-
+
/* export formats */
old_name = Glib::build_filename (old_dir, export_formats_dir_name);
new_name = Glib::build_filename (new_dir, export_formats_dir_name);
-
+
vector<string> export_formats;
g_mkdir_with_parents (Glib::build_filename (new_dir, export_formats_dir_name).c_str(), 0755);
find_files_matching_pattern (export_formats, old_name, X_("*.format"));
@@ -366,7 +366,7 @@ void
ARDOUR::check_for_old_configuration_files ()
{
int current_version = atoi (X_(PROGRAM_VERSION));
-
+
if (current_version <= 1) {
return;
}
@@ -515,7 +515,7 @@ ARDOUR::init (bool use_windows_vst, bool try_optimization, const char* localedir
surface support that would list their port names, we do have to
list them here.
*/
-
+
char const * const reserved[] = {
_("Monitor"),
_("Master"),
@@ -528,7 +528,7 @@ ARDOUR::init (bool use_windows_vst, bool try_optimization, const char* localedir
for (int n = 0; reserved[n]; ++n) {
reserved_io_names.push_back (reserved[n]);
}
-
+
libardour_initialized = true;
return true;
@@ -612,7 +612,7 @@ void
ARDOUR::setup_fpu ()
{
FPU* fpu = FPU::instance ();
-
+
if (getenv ("ARDOUR_RUNNING_UNDER_VALGRIND")) {
// valgrind doesn't understand this assembler stuff
// September 10th, 2007
@@ -632,7 +632,7 @@ ARDOUR::setup_fpu ()
#ifdef DEBUG_DENORMAL_EXCEPTION
/* This will raise a FP exception if a denormal is detected */
MXCSR &= ~_MM_MASK_DENORM;
-#endif
+#endif
switch (Config->get_denormal_model()) {
case DenormalNone:
@@ -709,15 +709,15 @@ ARDOUR::set_translations_enabled (bool yn)
if (fd < 0) {
return false;
}
-
+
char c;
-
+
if (yn) {
c = '1';
} else {
c = '0';
}
-
+
(void) ::write (fd, &c, 1);
(void) ::close (fd);
diff --git a/libs/ardour/graph.cc b/libs/ardour/graph.cc
index 8cce0efdbc..ff4f860d68 100644
--- a/libs/ardour/graph.cc
+++ b/libs/ardour/graph.cc
@@ -435,7 +435,7 @@ Graph::main_thread()
again:
_callback_start_sem.wait ();
-
+
DEBUG_TRACE(DEBUG::ProcessThreads, "main thread is awake\n");
if (!_threads_active) {
diff --git a/libs/ardour/import.cc b/libs/ardour/import.cc
index 2524a3c0b0..87ef3d2476 100644
--- a/libs/ardour/import.cc
+++ b/libs/ardour/import.cc
@@ -488,7 +488,7 @@ Session::import_files (ImportStatus& status)
return;
}
}
-
+
if (channels == 0) {
error << _("Import: file contains no channels.") << endmsg;
continue;
@@ -553,7 +553,7 @@ Session::import_files (ImportStatus& status)
Analyser::queue_source_for_analysis (boost::static_pointer_cast<Source>(*x), false);
}
}
-
+
/* imported, copied files cannot be written or removed
*/
@@ -591,7 +591,7 @@ Session::import_files (ImportStatus& status)
} catch (...) {
error << _("Failed to remove some files after failed/cancelled import operation") << endmsg;
}
-
+
}
status.done = true;
diff --git a/libs/ardour/instrument_info.cc b/libs/ardour/instrument_info.cc
index c2055e207e..c673170b72 100644
--- a/libs/ardour/instrument_info.cc
+++ b/libs/ardour/instrument_info.cc
@@ -88,7 +88,7 @@ InstrumentInfo::get_patch_name (uint16_t bank, uint8_t program, uint8_t channel)
}
MIDI::Name::PatchPrimaryKey patch_key (program, bank);
-
+
boost::shared_ptr<MIDI::Name::Patch> patch =
MIDI::Name::MidiPatchManager::instance().find_patch (external_instrument_model,
external_instrument_mode, channel, patch_key);
@@ -102,7 +102,7 @@ InstrumentInfo::get_patch_name (uint16_t bank, uint8_t program, uint8_t channel)
return string_compose ("prg %1 bnk %2",program + MIDI_BP_ZERO , bank + MIDI_BP_ZERO);
}
-}
+}
string
InstrumentInfo::get_controller_name (Evoral::Parameter param) const
@@ -118,7 +118,7 @@ InstrumentInfo::get_controller_name (Evoral::Parameter param) const
if (!dev_names) {
return "";
}
-
+
boost::shared_ptr<ChannelNameSet> chan_names(
dev_names->channel_name_set_by_channel(
external_instrument_mode, param.channel()));
@@ -133,7 +133,7 @@ InstrumentInfo::get_controller_name (Evoral::Parameter param) const
}
return control_names->control(param.id())->name();
-}
+}
boost::shared_ptr<MIDI::Name::ChannelNameSet>
InstrumentInfo::get_patches (uint8_t channel)
@@ -164,7 +164,7 @@ InstrumentInfo::plugin_programs_to_channel_name_set (boost::shared_ptr<Processor
}
boost::shared_ptr<Plugin> pp = insert->plugin();
-
+
if (pp->current_preset_uses_general_midi()) {
patch_list = InstrumentInfo::general_midi_patches ();
@@ -174,11 +174,11 @@ InstrumentInfo::plugin_programs_to_channel_name_set (boost::shared_ptr<Processor
std::vector<Plugin::PresetRecord> presets = pp->get_presets ();
std::vector<Plugin::PresetRecord>::iterator i;
int n;
-
+
/* XXX note the assumption that plugin presets start their numbering at
* zero
*/
-
+
for (n = 0, i = presets.begin(); i != presets.end(); ++i, ++n) {
if ((*i).number >= 0) {
patch_list.push_back (boost::shared_ptr<Patch> (new Patch ((*i).label, n)));
@@ -202,7 +202,7 @@ InstrumentInfo::plugin_programs_to_channel_name_set (boost::shared_ptr<Processor
cns->set_patch_banks (patch_banks);
return cns;
-}
+}
const MIDI::Name::PatchNameList&
InstrumentInfo::general_midi_patches()
@@ -222,7 +222,7 @@ InstrumentInfo::get_plugin_patch_name (boost::shared_ptr<Processor> p, uint16_t
boost::shared_ptr<PluginInsert> insert = boost::dynamic_pointer_cast<PluginInsert> (p);
if (insert) {
boost::shared_ptr<Plugin> pp = insert->plugin();
-
+
if (pp->current_preset_uses_general_midi()) {
return MIDI::Name::general_midi_program_names[std::min((uint8_t) 127,program)];
}
diff --git a/libs/ardour/internal_return.cc b/libs/ardour/internal_return.cc
index 1eae5d3171..4947231c84 100644
--- a/libs/ardour/internal_return.cc
+++ b/libs/ardour/internal_return.cc
@@ -39,7 +39,7 @@ InternalReturn::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*e
}
Glib::Threads::Mutex::Lock lm (_sends_mutex, Glib::Threads::TRY_LOCK);
-
+
if (lm.locked ()) {
for (list<InternalSend*>::iterator i = _sends.begin(); i != _sends.end(); ++i) {
if ((*i)->active () && (!(*i)->source_route() || (*i)->source_route()->active())) {
diff --git a/libs/ardour/internal_send.cc b/libs/ardour/internal_send.cc
index e8e560c7c0..60de2087f3 100644
--- a/libs/ardour/internal_send.cc
+++ b/libs/ardour/internal_send.cc
@@ -148,10 +148,10 @@ InternalSend::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame
} else {
if (role() == Listen) {
/* We're going to the monitor bus, so discard MIDI data */
-
+
uint32_t const bufs_audio = bufs.count().get (DataType::AUDIO);
uint32_t const mixbufs_audio = mixbufs.count().get (DataType::AUDIO);
-
+
/* monitor-section has same number of channels as master-bus (on creation).
*
* There is no clear answer what should happen when trying to PFL or AFL
@@ -400,4 +400,4 @@ InternalSend::cycle_start (pframes_t /*nframes*/)
for (BufferSet::audio_iterator b = mixbufs.audio_begin(); b != mixbufs.audio_end(); ++b) {
b->prepare ();
}
-}
+}
diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc
index c69006c745..a274f4995b 100644
--- a/libs/ardour/io.cc
+++ b/libs/ardour/io.cc
@@ -113,7 +113,7 @@ IO::disconnect_check (boost::shared_ptr<Port> a, boost::shared_ptr<Port> b)
* ::disconnect()
*/
if (_ports.contains (a) || _ports.contains (b)) {
- changed (IOChange (IOChange::ConnectionsChanged), this); /* EMIT SIGNAL */
+ changed (IOChange (IOChange::ConnectionsChanged), this); /* EMIT SIGNAL */
}
} else {
/* we didn't get the lock, so assume that we're inside
@@ -299,7 +299,7 @@ IO::remove_port (boost::shared_ptr<Port> port, void* src)
}
_session.set_dirty ();
-
+
return 0;
}
@@ -321,12 +321,12 @@ IO::add_port (string destination, void* src, DataType type)
ChanCount before = _ports.count ();
ChanCount after = before;
after.set (type, after.get (type) + 1);
-
+
bool const r = PortCountChanging (after); /* EMIT SIGNAL */
if (r) {
return -1;
}
-
+
IOChange change;
{
@@ -339,7 +339,7 @@ IO::add_port (string destination, void* src, DataType type)
/* Create a new port */
string portname = build_legal_port_name (type);
-
+
if (_direction == Input) {
if ((our_port = _session.engine().register_input_port (type, portname)) == 0) {
error << string_compose(_("IO: cannot register input port %1"), portname) << endmsg;
@@ -355,7 +355,7 @@ IO::add_port (string destination, void* src, DataType type)
change.before = _ports.count ();
_ports.add (our_port);
}
-
+
PortCountChanged (n_ports()); /* EMIT SIGNAL */
change.type = IOChange::ConfigurationChanged;
change.after = _ports.count ();
@@ -575,7 +575,7 @@ IO::state (bool /*full_state*/)
snprintf (buf, sizeof (buf), "%" PRId64, _user_latency);
node->add_property (X_("user-latency"), buf);
-
+
return *node;
}
@@ -983,9 +983,9 @@ IO::prepare_for_reset (XMLNode& node, const std::string& name)
for (XMLNodeIterator i = children.begin(); i != children.end(); ++i) {
if ((*i)->name() == "Port") {
-
+
prop = (*i)->property (X_("name"));
-
+
if (prop) {
string new_name;
string old = prop->value();
@@ -993,10 +993,10 @@ IO::prepare_for_reset (XMLNode& node, const std::string& name)
if (slash != string::npos) {
/* port name is of form: <IO-name>/<port-name> */
-
+
new_name = name;
new_name += old.substr (old.find ('/'));
-
+
prop->set_value (new_name);
}
}
diff --git a/libs/ardour/io_processor.cc b/libs/ardour/io_processor.cc
index d23afce612..824006206f 100644
--- a/libs/ardour/io_processor.cc
+++ b/libs/ardour/io_processor.cc
@@ -167,7 +167,7 @@ IOProcessor::set_state (const XMLNode& node, int version)
XMLNodeIterator niter;
const string instr = enum_2_string (IO::Input);
const string outstr = enum_2_string (IO::Output);
-
+
if (_own_input) {
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
const XMLProperty* prop;
@@ -182,21 +182,21 @@ IOProcessor::set_state (const XMLNode& node, int version)
}
}
}
-
+
if (io_node) {
_input->set_state(*io_node, version);
-
+
// legacy sessions: use IO name
if ((prop = node.property ("name")) == 0) {
set_name (_input->name());
}
-
+
} else {
/* no input, which is OK */
}
-
+
}
-
+
if (_own_output) {
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
if ((*niter)->name() == "IO") {
@@ -213,10 +213,10 @@ IOProcessor::set_state (const XMLNode& node, int version)
}
}
}
-
+
if (io_node) {
_output->set_state(*io_node, version);
-
+
// legacy sessions: use IO name
if ((prop = node.property ("name")) == 0) {
set_name (_output->name());
diff --git a/libs/ardour/ladspa_plugin.cc b/libs/ardour/ladspa_plugin.cc
index 61149c78a0..88f40c1f84 100644
--- a/libs/ardour/ladspa_plugin.cc
+++ b/libs/ardour/ladspa_plugin.cc
@@ -956,13 +956,13 @@ LadspaPlugin::do_save_preset (string name)
LADSPA_PortDescriptor
LadspaPlugin::port_descriptor (uint32_t i) const
{
- if (i < _descriptor->PortCount) {
+ if (i < _descriptor->PortCount) {
return _descriptor->PortDescriptors[i];
}
-
+
warning << "LADSPA plugin port index " << i << " out of range." << endmsg;
return 0;
}
-
-
+
+
diff --git a/libs/ardour/linux_vst_support.cc b/libs/ardour/linux_vst_support.cc
index 7918f34449..cd3191b1ff 100644
--- a/libs/ardour/linux_vst_support.cc
+++ b/libs/ardour/linux_vst_support.cc
@@ -83,16 +83,16 @@ VSTState *
vstfx_new ()
{
VSTState* vstfx = (VSTState *) calloc (1, sizeof (VSTState));
-
+
/*Mutexes*/
-
+
pthread_mutex_init (&vstfx->lock, 0);
pthread_cond_init (&vstfx->window_status_change, 0);
pthread_cond_init (&vstfx->plugin_dispatcher_called, 0);
pthread_cond_init (&vstfx->window_created, 0);
/*Safe values*/
-
+
vstfx->want_program = -1;
vstfx->want_chunk = 0;
vstfx->n_pending_keys = 0;
@@ -103,7 +103,7 @@ vstfx_new ()
vstfx->eventProc = 0;
vstfx->extra_data = 0;
vstfx->want_resize = 0;
-
+
return vstfx;
}
@@ -131,35 +131,35 @@ void* vstfx_load_vst_library(const char* path)
PBD::error << string_compose (_("Could not open existing LXVST plugin: %1"), dlerror()) << endmsg;
return 0;
}
-
+
/*We didn't find the library so try and get the path specified in the
env variable LXVST_PATH*/
envdup = getenv ("LXVST_PATH");
-
+
/*Path not specified - not much more we can do*/
-
+
if (envdup == 0)
return 0;
-
+
/*Copy the path into envdup*/
-
+
envdup = strdup (envdup);
-
+
if (envdup == 0)
return 0;
-
+
len2 = strlen(path);
/*Try all the possibilities in the path - deliminated by : */
char *saveptr;
lxvst_path = strtok_r (envdup, ":", &saveptr);
-
+
while (lxvst_path != 0)
{
vstfx_error ("\"%s\"", lxvst_path);
len1 = strlen(lxvst_path);
-
+
if (full_path) free(full_path);
full_path = (char*)malloc(len1 + 1 + len2 + 1);
memcpy(full_path, lxvst_path, len1);
@@ -174,7 +174,7 @@ void* vstfx_load_vst_library(const char* path)
/*Succeeded */
break;
}
-
+
/*Try again*/
lxvst_path = strtok_r (0, ":", &saveptr);
@@ -195,18 +195,18 @@ vstfx_load (const char *path)
{
char* buf = 0;
VSTHandle* fhandle;
-
+
/*Create a new handle we can use to reference the plugin*/
fhandle = vstfx_handle_new();
-
+
/*See if we have .so appended to the path - if not we need to make sure it is added*/
if (strstr (path, ".so") == 0)
{
/*Append the .so to the path - Make sure the path has enough space*/
-
+
buf = (char *)malloc(strlen(path) + 4); //The .so and a terminating zero
sprintf (buf, "%s.so", path);
@@ -215,7 +215,7 @@ vstfx_load (const char *path)
else
{
/*We already have .so appened to the filename*/
-
+
buf = strdup(path);
}
@@ -223,7 +223,7 @@ vstfx_load (const char *path)
we don't know anything about its name until we load and instantiate the plugin
which we don't want to do at this point
*/
-
+
fhandle->name = strdup (PBD::basename_nosuffix (path).c_str());
/*call load_vstfx_library to actually load the .so into memory*/
@@ -231,9 +231,9 @@ vstfx_load (const char *path)
if ((fhandle->dll = vstfx_load_vst_library (buf)) == 0)
{
vstfx_unload (fhandle);
-
+
free(buf);
-
+
return 0;
}
@@ -250,11 +250,11 @@ vstfx_load (const char *path)
if (fhandle->main_entry == 0)
{
/*If it can't be found, unload the plugin and return a 0 handle*/
-
+
vstfx_unload (fhandle);
-
+
free(buf);
-
+
return 0;
}
@@ -274,7 +274,7 @@ vstfx_unload (VSTHandle* fhandle)
{
/*Still have plugin instances - can't unload the library
- actually dlclose keeps an instance count anyway*/
-
+
return -1;
}
@@ -290,9 +290,9 @@ vstfx_unload (VSTHandle* fhandle)
{
free (fhandle->name);
}
-
+
/*Don't need the plugin handle any more*/
-
+
free (fhandle);
return 0;
}
@@ -317,29 +317,29 @@ vstfx_instantiate (VSTHandle* fhandle, audioMasterCallback amc, void* userptr)
free (vstfx);
return 0;
}
-
+
vstfx->handle = fhandle;
vstfx->plugin->user = userptr;
-
+
if (vstfx->plugin->magic != kEffectMagic)
{
vstfx_error ("** ERROR ** VSTFX : %s is not a VST plugin\n", fhandle->name);
free (vstfx);
return 0;
}
-
+
vstfx->plugin->dispatcher (vstfx->plugin, effOpen, 0, 0, 0, 0);
-
+
/*May or May not need to 'switch the plugin on' here - unlikely
since FST doesn't and most plugins start up 'On' by default - I think this is the least of our worries*/
-
+
//vstfx->plugin->dispatcher (vstfx->plugin, effMainsChanged, 0, 1, 0, 0);
-
+
vstfx->vst_version = vstfx->plugin->dispatcher (vstfx->plugin, effGetVstVersion, 0, 0, 0, 0);
-
+
vstfx->handle->plugincnt++;
vstfx->wantIdle = 0;
-
+
return vstfx;
}
@@ -348,33 +348,33 @@ vstfx_instantiate (VSTHandle* fhandle, audioMasterCallback amc, void* userptr)
void vstfx_close (VSTState* vstfx)
{
vstfx_destroy_editor(vstfx);
-
+
if(vstfx->plugin)
{
vstfx->plugin->dispatcher (vstfx->plugin, effMainsChanged, 0, 0, 0, 0);
-
+
/*Calling dispatcher with effClose will cause the plugin's destructor to
be called, which will also remove the editor if it exists*/
-
+
vstfx->plugin->dispatcher (vstfx->plugin, effClose, 0, 0, 0, 0);
}
if (vstfx->handle->plugincnt)
vstfx->handle->plugincnt--;
-
+
/*vstfx_unload will unload the dll if the instance count allows -
we need to do this because some plugins keep their own instance count
and (JUCE) manages the plugin UI in its own thread. When the plugins
internal instance count reaches zero, JUCE stops the UI thread and won't
restart it until the next time the library is loaded. If we don't unload
the lib JUCE will never restart*/
-
-
+
+
if (vstfx->handle->plugincnt)
{
return;
}
-
+
/*Valid plugin loaded - so we can unload it and 0 the pointer
to it. We can't free the handle here because we don't know what else
might need it. It should be / is freed when the plugin is deleted*/
@@ -403,11 +403,11 @@ vstfx_save_state (VSTState* vstfx, char * filename)
int success;
/* write header */
-
+
fprintf(f, "<plugin_state>\n");
success = vstfx_call_dispatcher(vstfx, effGetProductString, 0, 0, productString, 0);
-
+
if(success == 1)
{
fprintf (f, " <check field=\"productString\" value=\"%s\"/>\n", productString);
@@ -418,7 +418,7 @@ vstfx_save_state (VSTState* vstfx, char * filename)
}
success = vstfx_call_dispatcher(vstfx, effGetEffectName, 0, 0, effectName, 0);
-
+
if(success == 1)
{
fprintf (f, " <check field=\"effectName\" value=\"%s\"/>\n", effectName);
@@ -430,7 +430,7 @@ vstfx_save_state (VSTState* vstfx, char * filename)
}
success = vstfx_call_dispatcher(vstfx, effGetVendorString, 0, 0, vendorString, 0);
-
+
if( success == 1 )
{
fprintf (f, " <check field=\"vendorString\" value=\"%s\"/>\n", vendorString);
@@ -450,7 +450,7 @@ vstfx_save_state (VSTState* vstfx, char * filename)
for(i=0; i < numParams; i++)
{
float val;
-
+
pthread_mutex_lock( &vstfx->lock );
val = vstfx->plugin->getParameter(vstfx->plugin, i );
pthread_mutex_unlock( &vstfx->lock );
@@ -494,17 +494,17 @@ vstfx_save_state (VSTState* vstfx, char * filename)
int vstfx_call_dispatcher (VSTState* vstfx, int opcode, int index, int val, void *ptr, float opt)
{
pthread_mutex_lock (&vstfx->lock);
-
+
/*Set up the opcode and parameters*/
-
+
vstfx->dispatcher_opcode = opcode;
vstfx->dispatcher_index = index;
vstfx->dispatcher_val = val;
vstfx->dispatcher_ptr = ptr;
vstfx->dispatcher_opt = opt;
-
+
/*Signal that we want the call to happen*/
-
+
vstfx->dispatcher_wantcall = 1;
/*Wait for the call to happen*/
@@ -513,6 +513,6 @@ int vstfx_call_dispatcher (VSTState* vstfx, int opcode, int index, int val, void
pthread_mutex_unlock (&vstfx->lock);
/*Return the result*/
-
+
return vstfx->dispatcher_retval;
}
diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc
index 685cd6dd94..1b63ce4431 100644
--- a/libs/ardour/location.cc
+++ b/libs/ardour/location.cc
@@ -148,7 +148,7 @@ Location::operator= (const Location& other)
_bbt_end = other._bbt_end;
_flags = other._flags;
_position_lock_style = other._position_lock_style;
-
+
/* XXX need to copy scene change */
/* copy is not locked even if original was */
@@ -240,7 +240,7 @@ Location::set_start (framepos_t s, bool force, bool allow_bbt_recompute)
}
start_changed (this); /* EMIT SIGNAL */
StartChanged (); /* EMIT SIGNAL */
-
+
if (is_session_range ()) {
Session::StartTimeChanged (old); /* EMIT SIGNAL */
AudioFileSource::set_header_position_offset (s);
@@ -688,7 +688,7 @@ Location::set_state (const XMLNode& node, int version)
}
XMLNode* scene_child = find_named_node (node, SceneChange::xml_node_name);
-
+
if (scene_child) {
_scene_change = SceneChange::factory (*scene_child, version);
}
@@ -1191,7 +1191,7 @@ Locations::first_mark_before (framepos_t frame, bool include_special_ranges)
{
Glib::Threads::Mutex::Lock lm (lock);
vector<LocationPair> locs;
-
+
for (LocationList::iterator i = locations.begin(); i != locations.end(); ++i) {
locs.push_back (make_pair ((*i)->start(), (*i)));
if (!(*i)->is_mark()) {
@@ -1239,7 +1239,7 @@ Locations::mark_at (framepos_t pos, framecnt_t slop) const
} else {
delta = (*i)->start() - pos;
}
-
+
if (slop == 0 && delta == 0) {
/* special case: no slop, and direct hit for position */
return *i;
@@ -1272,7 +1272,7 @@ Locations::first_mark_after (framepos_t frame, bool include_special_ranges)
LocationStartEarlierComparison cmp;
sort (locs.begin(), locs.end(), cmp);
-
+
/* locs is sorted in reverse order */
for (vector<LocationPair>::iterator i = locs.begin(); i != locs.end(); ++i) {
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc
index 1c3db86db5..2294c467c3 100644
--- a/libs/ardour/lv2_plugin.cc
+++ b/libs/ardour/lv2_plugin.cc
@@ -2388,7 +2388,7 @@ LV2Plugin::Impl::designated_input (const char* uri, void** bufptrs[], void** buf
static bool lv2_filter (const string& str, void* /*arg*/)
{
/* Not a dotfile, has a prefix before a period, suffix is "lv2" */
-
+
return str[0] != '.' && (str.length() > 3 && str.find (".lv2") == (str.length() - 4));
}
diff --git a/libs/ardour/midi_buffer.cc b/libs/ardour/midi_buffer.cc
index b735fe74fb..dc8deb7727 100644
--- a/libs/ardour/midi_buffer.cc
+++ b/libs/ardour/midi_buffer.cc
@@ -304,9 +304,9 @@ MidiBuffer::second_simultaneous_midi_byte_is_first (uint8_t a, uint8_t b)
/* two events at identical times. we need to determine
the order in which they should occur.
-
+
the rule is:
-
+
Controller messages
Program Change
Note Off
@@ -315,22 +315,22 @@ MidiBuffer::second_simultaneous_midi_byte_is_first (uint8_t a, uint8_t b)
Channel Pressure
Pitch Bend
*/
-
+
if ((a) >= 0xf0 || (b) >= 0xf0 || ((a & 0xf) != (b & 0xf))) {
-
+
/* if either message is not a channel message, or if the channels are
* different, we don't care about the type.
*/
-
+
b_first = true;
-
+
} else {
-
+
switch (b & 0xf0) {
case MIDI_CMD_CONTROL:
b_first = true;
break;
-
+
case MIDI_CMD_PGM_CHANGE:
switch (a & 0xf0) {
case MIDI_CMD_CONTROL:
@@ -344,7 +344,7 @@ MidiBuffer::second_simultaneous_midi_byte_is_first (uint8_t a, uint8_t b)
b_first = true;
}
break;
-
+
case MIDI_CMD_NOTE_OFF:
switch (a & 0xf0) {
case MIDI_CMD_CONTROL:
@@ -358,7 +358,7 @@ MidiBuffer::second_simultaneous_midi_byte_is_first (uint8_t a, uint8_t b)
b_first = true;
}
break;
-
+
case MIDI_CMD_NOTE_ON:
switch (a & 0xf0) {
case MIDI_CMD_CONTROL:
@@ -385,7 +385,7 @@ MidiBuffer::second_simultaneous_midi_byte_is_first (uint8_t a, uint8_t b)
b_first = true;
}
break;
-
+
case MIDI_CMD_CHANNEL_PRESSURE:
switch (a & 0xf0) {
case MIDI_CMD_CONTROL:
@@ -414,10 +414,10 @@ MidiBuffer::second_simultaneous_midi_byte_is_first (uint8_t a, uint8_t b)
break;
}
}
-
+
return b_first;
}
-
+
/** Merge \a other into this buffer. Realtime safe. */
bool
MidiBuffer::merge_in_place (const MidiBuffer &other)
@@ -507,20 +507,20 @@ MidiBuffer::merge_in_place (const MidiBuffer &other)
(*us).time(), (*them).time(),
(int) *(_data + us.offset + sizeof (TimeType)),
(int) *(other._data + them.offset + sizeof (TimeType))));
-
+
uint8_t our_midi_status_byte = *(_data + us.offset + sizeof (TimeType));
uint8_t their_midi_status_byte = *(other._data + them.offset + sizeof (TimeType));
bool them_first = second_simultaneous_midi_byte_is_first (our_midi_status_byte, their_midi_status_byte);
-
+
DEBUG_TRACE (DEBUG::MidiIO, string_compose ("other message came first ? %1\n", them_first));
-
+
if (!them_first) {
/* skip past our own event */
++us;
}
-
+
bytes_to_merge = sizeof (TimeType) + (*them).size();
-
+
/* move our remaining events later in the buffer by
* enough to fit the one message we're going to merge
*/
@@ -554,11 +554,11 @@ MidiBuffer::merge_in_place (const MidiBuffer &other)
++them;
} else {
-
+
/* advance past our own events to get to the correct insertion
point for the next event(s) from "other"
*/
-
+
while (us != end() && (*us).time() <= (*them).time()) {
++us;
}
@@ -571,7 +571,7 @@ MidiBuffer::merge_in_place (const MidiBuffer &other)
if (us == end()) {
/* just append the rest of other and we're done*/
-
+
memcpy (_data + us.offset, other._data + them.offset, other._size - them.offset);
_size += other._size - them.offset;
assert(_size <= _capacity);
diff --git a/libs/ardour/midi_diskstream.cc b/libs/ardour/midi_diskstream.cc
index c2da230701..7d980e5d1e 100644
--- a/libs/ardour/midi_diskstream.cc
+++ b/libs/ardour/midi_diskstream.cc
@@ -458,7 +458,7 @@ MidiDiskstream::process (BufferSet& bufs, framepos_t transport_frame, pframes_t
that it can read it if it likes.
*/
_gui_feed_buffer.clear ();
-
+
for (MidiBuffer::iterator i = buf.begin(); i != buf.end(); ++i) {
/* This may fail if buf is larger than _gui_feed_buffer, but it's not really
the end of the world if it does.
@@ -509,7 +509,7 @@ MidiDiskstream::process (BufferSet& bufs, framepos_t transport_frame, pframes_t
if (need_disk_signal) {
/* copy the diskstream data to all output buffers */
-
+
MidiBuffer& mbuf (bufs.get_midi (0));
get_playback (mbuf, playback_distance);
@@ -583,7 +583,7 @@ MidiDiskstream::commit (framecnt_t playback_distance)
* but we do need to check so that the decision on whether or not we
* need the butler is done correctly.
*/
-
+
/* furthermore..
*
* Doing heavy GUI operations[1] can stall also the butler.
@@ -755,7 +755,7 @@ MidiDiskstream::read (framepos_t& start, framecnt_t dur, bool reversed)
id(), this_read, start) << endmsg;
return -1;
}
-
+
g_atomic_int_add (&_frames_written_to_ringbuffer, this_read);
if (reversed) {
@@ -1157,7 +1157,7 @@ MidiDiskstream::set_record_enabled (bool yn)
} else {
disengage_record_enable ();
}
-
+
RecordEnableChanged (); /* EMIT SIGNAL */
}
}
@@ -1168,18 +1168,18 @@ MidiDiskstream::set_record_safe (bool yn)
if (!recordable() || !_session.record_enabling_legal() || _io->n_ports().n_midi() == 0) { // REQUIRES REVIEW
return;
}
-
+
/* yes, i know that this not proof against race conditions, but its
good enough. i think.
*/
-
+
if (record_safe () != yn) {
if (yn) {
engage_record_safe ();
} else {
disengage_record_safe ();
}
-
+
RecordSafeChanged (); /* EMIT SIGNAL */
}
}
@@ -1194,7 +1194,7 @@ MidiDiskstream::prep_record_enable ()
bool const rolling = _session.transport_speed() != 0.0f;
boost::shared_ptr<MidiPort> sp = _source_port.lock ();
-
+
if (sp && Config->get_monitoring_model() == HardwareMonitoring) {
sp->request_input_monitoring (!(_session.config.get_auto_input() && rolling));
}
@@ -1321,14 +1321,14 @@ MidiDiskstream::steal_write_source_name ()
try {
string new_path = _session.new_midi_source_path (name());
-
+
if (_write_source->rename (new_path)) {
return string();
}
} catch (...) {
return string ();
}
-
+
return our_old_name;
}
@@ -1360,7 +1360,7 @@ void
MidiDiskstream::ensure_input_monitoring (bool yn)
{
boost::shared_ptr<MidiPort> sp = _source_port.lock ();
-
+
if (sp) {
sp->ensure_input_monitoring (yn);
}
@@ -1385,7 +1385,7 @@ float
MidiDiskstream::playback_buffer_load () const
{
/* For MIDI it's not trivial to differentiate the following two cases:
-
+
1. The playback buffer is empty because the system has run out of time to fill it.
2. The playback buffer is empty because there is no more data on the playlist.
@@ -1393,7 +1393,7 @@ MidiDiskstream::playback_buffer_load () const
cannot keep up when #2 happens, when in fact it can. Since MIDI data rates
are so low compared to audio, just give a pretend answer here.
*/
-
+
return 1;
}
@@ -1401,7 +1401,7 @@ float
MidiDiskstream::capture_buffer_load () const
{
/* We don't report playback buffer load, so don't report capture load either */
-
+
return 1;
}
@@ -1437,7 +1437,7 @@ MidiDiskstream::get_playback (MidiBuffer& dst, framecnt_t nframes)
// _playback_buf->dump (cerr);
// cerr << "----------------\n";
- size_t events_read = 0;
+ size_t events_read = 0;
if (loc) {
framepos_t effective_start;
@@ -1447,7 +1447,7 @@ MidiDiskstream::get_playback (MidiBuffer& dst, framecnt_t nframes)
} else {
effective_start = playback_sample;
}
-
+
DEBUG_TRACE (DEBUG::MidiDiskstreamIO, string_compose ("looped, effective start adjusted to %1\n", effective_start));
if (effective_start == loc->start()) {
@@ -1484,7 +1484,7 @@ MidiDiskstream::get_playback (MidiBuffer& dst, framecnt_t nframes)
loc->start(), second));
events_read += _playback_buf->read (dst, loc->start(), second);
}
-
+
} else {
DEBUG_TRACE (DEBUG::MidiDiskstreamIO, string_compose ("loop read #3, adjusted start as %1 for %2\n",
effective_start, nframes));
@@ -1535,7 +1535,7 @@ boost::shared_ptr<MidiBuffer>
MidiDiskstream::get_gui_feed_buffer () const
{
boost::shared_ptr<MidiBuffer> b (new MidiBuffer (AudioEngine::instance()->raw_buffer_size (DataType::MIDI)));
-
+
Glib::Threads::Mutex::Lock lm (_gui_feed_buffer_mutex);
b->copy (_gui_feed_buffer);
return b;
diff --git a/libs/ardour/midi_model.cc b/libs/ardour/midi_model.cc
index 27fb61b11d..fd08428a68 100644
--- a/libs/ardour/midi_model.cc
+++ b/libs/ardour/midi_model.cc
@@ -321,7 +321,7 @@ MidiModel::NoteDiffCommand::operator() ()
_removed_notes.push_back (*i);
}
}
-
+
if (!side_effect_removals.empty()) {
cerr << "SER: \n";
for (set<NotePtr>::iterator i = side_effect_removals.begin(); i != side_effect_removals.end(); ++i) {
@@ -364,7 +364,7 @@ MidiModel::NoteDiffCommand::undo ()
assert (i->note);
}
}
-
+
for (ChangeList::iterator i = _changes.begin(); i != _changes.end(); ++i) {
Property prop = i->property;
@@ -439,7 +439,7 @@ MidiModel::NoteDiffCommand::undo ()
_model->add_note_unlocked (*i);
}
}
-
+
_model->ContentsChanged(); /* EMIT SIGNAL */
}
@@ -1242,7 +1242,7 @@ MidiModel::PatchChangeDiffCommand::unmarshal_patch_change (XMLNode* n)
int channel = 0;
int program = 0;
int bank = 0;
-
+
if ((prop_id = n->property ("id")) != 0) {
istringstream s (prop_id->value());
s >> id;
@@ -2027,6 +2027,6 @@ void
MidiModel::control_list_marked_dirty ()
{
AutomatableSequence<Evoral::Beats>::control_list_marked_dirty ();
-
+
ContentsChanged (); /* EMIT SIGNAL */
}
diff --git a/libs/ardour/midi_patch_manager.cc b/libs/ardour/midi_patch_manager.cc
index 93f0b7e235..4f5cff1747 100644
--- a/libs/ardour/midi_patch_manager.cc
+++ b/libs/ardour/midi_patch_manager.cc
@@ -60,7 +60,7 @@ MidiPatchManager::add_session_patches ()
if (!_session) {
return;
}
-
+
std::string path_to_patches = _session->session_directory().midi_patch_path();
if (!Glib::file_test (path_to_patches, Glib::FILE_TEST_EXISTS)) {
@@ -135,7 +135,7 @@ MidiPatchManager::refresh()
<< endmsg;
continue;
}
-
+
_documents[device->first] = document;
_master_devices_by_model[device->first] = device->second;
diff --git a/libs/ardour/midi_port.cc b/libs/ardour/midi_port.cc
index 85d5c95a5f..d959ff9d91 100644
--- a/libs/ardour/midi_port.cc
+++ b/libs/ardour/midi_port.cc
@@ -67,14 +67,14 @@ MidiPort::cycle_start (pframes_t nframes)
MidiBuffer& mb (get_midi_buffer (nframes));
/* dump incoming MIDI to parser */
-
+
for (MidiBuffer::iterator b = mb.begin(); b != mb.end(); ++b) {
uint8_t* buf = (*b).buffer();
-
+
_self_parser.set_timestamp (now + (*b).time());
-
+
uint32_t limit = (*b).size();
-
+
for (size_t n = 0; n < limit; ++n) {
_self_parser.scanner (buf[n]);
}
@@ -107,13 +107,13 @@ MidiPort::get_midi_buffer (pframes_t nframes)
*/
for (pframes_t i = 0; i < event_count; ++i) {
-
+
pframes_t timestamp;
size_t size;
uint8_t* buf;
-
+
port_engine.midi_event_get (timestamp, size, &buf, buffer, i);
-
+
if (buf[0] == 0xfe) {
/* throw away active sensing */
continue;
@@ -122,9 +122,9 @@ MidiPort::get_midi_buffer (pframes_t nframes)
buf[0] = 0x80 | (buf[0] & 0x0F); /* note off */
buf[2] = 0x40; /* default velocity */
}
-
+
/* check that the event is in the acceptable time range */
-
+
if ((timestamp >= (_global_port_buffer_offset + _port_buffer_offset)) &&
(timestamp < (_global_port_buffer_offset + _port_buffer_offset + nframes))) {
_buffer->push_back (timestamp, size, buf);
@@ -192,14 +192,14 @@ MidiPort::flush_buffers (pframes_t nframes)
if (sends_output ()) {
void* port_buffer = 0;
-
+
if (_resolve_required) {
port_buffer = port_engine.get_buffer (_port_handle, nframes);
/* resolve all notes at the start of the buffer */
resolve_notes (port_buffer, 0);
_resolve_required = false;
}
-
+
if (_buffer->empty()) {
return;
}
@@ -216,12 +216,12 @@ MidiPort::flush_buffers (pframes_t nframes)
if (sends_output() && _trace_on) {
uint8_t const * const buf = ev.buffer();
- const framepos_t now = AudioEngine::instance()->sample_time_at_cycle_start();
+ const framepos_t now = AudioEngine::instance()->sample_time_at_cycle_start();
_self_parser.set_timestamp (now + ev.time());
-
+
uint32_t limit = ev.size();
-
+
for (size_t n = 0; n < limit; ++n) {
_self_parser.scanner (buf[n]);
}
diff --git a/libs/ardour/midi_ring_buffer.cc b/libs/ardour/midi_ring_buffer.cc
index 7c72718b69..9258b2f7dc 100644
--- a/libs/ardour/midi_ring_buffer.cc
+++ b/libs/ardour/midi_ring_buffer.cc
@@ -212,7 +212,7 @@ MidiRingBuffer<T>::flush (framepos_t /*start*/, framepos_t end)
assert (success);
ev_time = *(reinterpret_cast<T*>((uintptr_t)peekbuf));
-
+
if (ev_time >= end) {
break;
}
diff --git a/libs/ardour/midi_scene_change.cc b/libs/ardour/midi_scene_change.cc
index 91f2dd4d7c..ed0729b071 100644
--- a/libs/ardour/midi_scene_change.cc
+++ b/libs/ardour/midi_scene_change.cc
@@ -77,7 +77,7 @@ MIDISceneChange::get_bank_lsb_message (uint8_t* buf, size_t size) const
buf[0] = 0xB0 | (_channel & 0xf);
buf[1] = 0x20;
- buf[2] = _bank & 0x7f;
+ buf[2] = _bank & 0x7f;
return 3;
}
diff --git a/libs/ardour/midi_scene_changer.cc b/libs/ardour/midi_scene_changer.cc
index da6fe88331..f586206ba7 100644
--- a/libs/ardour/midi_scene_changer.cc
+++ b/libs/ardour/midi_scene_changer.cc
@@ -41,7 +41,7 @@ MIDISceneChanger::MIDISceneChanger (Session& s)
, last_program_message_time (-1)
, last_delivered_program (-1)
, last_delivered_bank (-1)
-
+
{
/* catch any add/remove/clear etc. for all Locations */
_session.locations()->changed.connect_same_thread (*this, boost::bind (&MIDISceneChanger::locations_changed, this));
@@ -86,7 +86,7 @@ MIDISceneChanger::gather (const Locations::LocationList& locations)
if (msc->bank() >= 0) {
have_seen_bank_changes = true;
}
-
+
scenes.insert (std::make_pair ((*l)->start(), msc));
}
}
@@ -164,7 +164,7 @@ MIDISceneChanger::run (framepos_t start, framepos_t end)
}
Glib::Threads::RWLock::ReaderLock lm (scene_lock, Glib::Threads::TRY_LOCK);
-
+
if (!lm.locked()) {
return;
}
@@ -179,9 +179,9 @@ MIDISceneChanger::run (framepos_t start, framepos_t end)
if (i->first >= end) {
break;
}
-
+
rt_deliver (mbuf, i->first - start, i->second);
-
+
++i;
}
}
@@ -197,9 +197,9 @@ MIDISceneChanger::locate (framepos_t pos)
if (scenes.empty()) {
return;
}
-
+
Scenes::const_iterator i = scenes.lower_bound (pos);
-
+
if (i != scenes.end()) {
if (i->first != pos) {
@@ -223,7 +223,7 @@ MIDISceneChanger::locate (framepos_t pos)
if (msc->program() != last_delivered_program || msc->bank() != last_delivered_bank) {
non_rt_deliver (msc);
}
-}
+}
void
MIDISceneChanger::set_input_port (MIDI::Port* mp)
@@ -231,9 +231,9 @@ MIDISceneChanger::set_input_port (MIDI::Port* mp)
input_port = mp;
incoming_connections.drop_connections();
-
+
if (input_port) {
-
+
/* midi port is asynchronous. MIDI parsing will be carried out
* by the MIDI UI thread which will emit the relevant signals
* and thus invoke our callbacks as necessary.
@@ -303,14 +303,14 @@ MIDISceneChanger::program_change_input (MIDI::Parser& parser, MIDI::byte program
if (!loc) {
/* create a new marker at the desired position */
-
+
std::string new_name;
if (!locations->next_available_name (new_name, _("Scene "))) {
std::cerr << "No new marker name available\n";
return;
}
-
+
loc = new Location (_session, time, time, new_name, Location::IsMark);
new_mark = true;
}
@@ -336,7 +336,7 @@ MIDISceneChanger::program_change_input (MIDI::Parser& parser, MIDI::byte program
}
loc->set_scene_change (boost::shared_ptr<MIDISceneChange> (msc));
-
+
/* this will generate a "changed" signal to be emitted by locations,
and we will call ::gather() to update our list of MIDI events.
*/
diff --git a/libs/ardour/midi_state_tracker.cc b/libs/ardour/midi_state_tracker.cc
index 3a801901cb..0403461c73 100644
--- a/libs/ardour/midi_state_tracker.cc
+++ b/libs/ardour/midi_state_tracker.cc
@@ -65,7 +65,7 @@ MidiStateTracker::add (uint8_t note, uint8_t chn)
void
MidiStateTracker::remove (uint8_t note, uint8_t chn)
-{
+{
switch (_active_notes[note + 128 * chn]) {
case 0:
break;
diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc
index e0b2f4e225..f3bc2c4f79 100644
--- a/libs/ardour/midi_track.cc
+++ b/libs/ardour/midi_track.cc
@@ -118,7 +118,7 @@ MidiTrack::set_record_safe (bool yn, void *src)
if (_step_editing) { /* REQUIRES REVIEW */
return;
}
-
+
Track::set_record_safe (yn, src);
}
@@ -130,10 +130,10 @@ MidiTrack::set_diskstream (boost::shared_ptr<Diskstream> ds)
*/
boost::shared_ptr<MidiDiskstream> mds = boost::dynamic_pointer_cast<MidiDiskstream> (ds);
mds->set_note_mode (_note_mode);
-
+
Track::set_diskstream (ds);
- mds->reset_tracker ();
+ mds->reset_tracker ();
_diskstream->set_track (this);
if (Profile->get_trx()) {
@@ -432,13 +432,13 @@ MidiTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame
}
-
+
/* append immediate messages to the first MIDI buffer (thus sending it to the first output port) */
-
+
write_out_of_band_data (bufs, start_frame, end_frame, nframes);
-
+
/* final argument: don't waste time with automation if we're not recording or rolling */
-
+
process_output_buffers (bufs, start_frame, end_frame, nframes,
declick, (!diskstream->record_enabled() && !_session.transport_stopped()));
@@ -450,7 +450,7 @@ MidiTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame
}
need_butler = diskstream->commit (playback_distance);
-
+
return 0;
}
@@ -930,20 +930,20 @@ MidiTrack::act_on_mute ()
midi_diskstream()->resolve_tracker(_immediate_events, 0);
}
}
-
+
void
MidiTrack::set_monitoring (MonitorChoice mc)
{
if (mc != _monitoring) {
Track::set_monitoring (mc);
-
+
/* monitoring state changed, so flush out any on notes at the
* port level.
*/
PortSet& ports (_output->ports());
-
+
for (PortSet::iterator p = ports.begin(); p != ports.end(); ++p) {
boost::shared_ptr<MidiPort> mp = boost::dynamic_pointer_cast<MidiPort> (*p);
if (mp) {
@@ -952,7 +952,7 @@ MidiTrack::set_monitoring (MonitorChoice mc)
}
boost::shared_ptr<MidiDiskstream> md (midi_diskstream());
-
+
if (md) {
md->reset_tracker ();
}
diff --git a/libs/ardour/midi_ui.cc b/libs/ardour/midi_ui.cc
index 0f2392108f..59c718ad2b 100644
--- a/libs/ardour/midi_ui.cc
+++ b/libs/ardour/midi_ui.cc
@@ -104,12 +104,12 @@ MidiControlUI::reset_ports ()
{
vector<AsyncMIDIPort*> ports;
AsyncMIDIPort* p;
-
+
if ((p = dynamic_cast<AsyncMIDIPort*> (_session.midi_input_port()))) {
ports.push_back (p);
}
-
-
+
+
if ((p = dynamic_cast<AsyncMIDIPort*> (_session.mmc_input_port()))) {
ports.push_back (p);
}
@@ -117,11 +117,11 @@ MidiControlUI::reset_ports ()
if ((p = dynamic_cast<AsyncMIDIPort*> (_session.scene_input_port()))) {
ports.push_back (p);
}
-
+
if (ports.empty()) {
return;
}
-
+
for (vector<AsyncMIDIPort*>::const_iterator pi = ports.begin(); pi != ports.end(); ++pi) {
(*pi)->xthread().set_receive_handler (sigc::bind (sigc::mem_fun (this, &MidiControlUI::midi_input_handler), *pi));
(*pi)->xthread().attach (_main_loop->get_context());
diff --git a/libs/ardour/midiport_manager.cc b/libs/ardour/midiport_manager.cc
index fe6a534f24..5460df3824 100644
--- a/libs/ardour/midiport_manager.cc
+++ b/libs/ardour/midiport_manager.cc
@@ -73,7 +73,7 @@ MidiPortManager::create_ports ()
if (_midi_in) {
return;
}
-
+
_midi_in = AudioEngine::instance()->register_input_port (DataType::MIDI, X_("MIDI control in"), true);
_midi_out = AudioEngine::instance()->register_output_port (DataType::MIDI, X_("MIDI control out"), true);
@@ -143,7 +143,7 @@ MidiPortManager::set_midi_port_states (const XMLNodeList&nodes)
ports.insert (make_pair (_mmc_output_port->name(), _mmc_out));
ports.insert (make_pair (_scene_output_port->name(), _scene_out));
ports.insert (make_pair (_scene_input_port->name(), _scene_in));
-
+
for (XMLNodeList::const_iterator n = nodes.begin(); n != nodes.end(); ++n) {
if ((prop = (*n)->property (X_("name"))) == 0) {
continue;
@@ -153,7 +153,7 @@ MidiPortManager::set_midi_port_states (const XMLNodeList&nodes)
if (p == ports.end()) {
continue;
}
-
+
p->second->set_state (**n, version);
}
}
diff --git a/libs/ardour/monitor_processor.cc b/libs/ardour/monitor_processor.cc
index 427e895f13..92beed547c 100644
--- a/libs/ardour/monitor_processor.cc
+++ b/libs/ardour/monitor_processor.cc
@@ -288,7 +288,7 @@ MonitorProcessor::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /
/* don't double-scale by both track dim and global dim coefficients */
gain_t dim_level = (global_dim == GAIN_COEFF_UNITY ? (_channels[chn]->dim ? dim_level_this_time : GAIN_COEFF_UNITY) : GAIN_COEFF_UNITY);
-
+
if (_channels[chn]->soloed) {
target_gain = _channels[chn]->polarity * _channels[chn]->cut * dim_level * global_cut * global_dim * solo_boost;
} else {
diff --git a/libs/ardour/pannable.cc b/libs/ardour/pannable.cc
index 92e91f53c1..247397d415 100644
--- a/libs/ardour/pannable.cc
+++ b/libs/ardour/pannable.cc
@@ -50,7 +50,7 @@ Pannable::Pannable (Session& s)
, _responding_to_control_auto_state_change (0)
{
//boost_debug_shared_ptr_mark_interesting (this, "pannable");
-
+
add_control (pan_azimuth_control);
add_control (pan_elevation_control);
add_control (pan_width_control);
diff --git a/libs/ardour/panner_shell.cc b/libs/ardour/panner_shell.cc
index d8d760ba8f..72c8fd57d1 100644
--- a/libs/ardour/panner_shell.cc
+++ b/libs/ardour/panner_shell.cc
@@ -187,7 +187,7 @@ PannerShell::set_state (const XMLNode& node, int version)
}
_panner.reset ();
-
+
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
if ((*niter)->name() == X_("Panner")) {
@@ -406,7 +406,7 @@ PannerShell::set_bypassed (bool yn)
if (yn == _bypassed) {
return;
}
-
+
_bypassed = yn;
_session.set_dirty ();
Changed (); /* EMIT SIGNAL */
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc
index 3138df3b9d..959b4884a3 100644
--- a/libs/ardour/playlist.cc
+++ b/libs/ardour/playlist.cc
@@ -557,7 +557,7 @@ Playlist::notify_region_added (boost::shared_ptr<Region> r)
pending_contents_change = false;
RegionAdded (boost::weak_ptr<Region> (r)); /* EMIT SIGNAL */
ContentsChanged (); /* EMIT SIGNAL */
-
+
}
}
@@ -603,7 +603,7 @@ Playlist::flush_notifications (bool from_undo)
remove_dependents (*s);
RegionRemoved (boost::weak_ptr<Region> (*s)); /* EMIT SIGNAL */
}
-
+
for (s = pending_adds.begin(); s != pending_adds.end(); ++s) {
crossfade_ranges.push_back ((*s)->range ());
/* don't emit RegionAdded signal until relayering is done,
@@ -620,25 +620,25 @@ Playlist::flush_notifications (bool from_undo)
pending_layering = true;
ContentsChanged (); /* EMIT SIGNAL */
}
-
+
for (s = pending_adds.begin(); s != pending_adds.end(); ++s) {
(*s)->clear_changes ();
RegionAdded (boost::weak_ptr<Region> (*s)); /* EMIT SIGNAL */
}
-
+
if ((regions_changed && !in_set_state) || pending_layering) {
relayer ();
}
-
+
coalesce_and_check_crossfades (crossfade_ranges);
-
+
if (!pending_range_moves.empty ()) {
/* We don't need to check crossfades for these as pending_bounds has
already covered it.
*/
RangesMoved (pending_range_moves, from_undo);
}
-
+
if (!pending_region_extensions.empty ()) {
RegionsExtended (pending_region_extensions);
}
@@ -1225,11 +1225,11 @@ Playlist::flush_notifications (bool from_undo)
while (itimes--) {
for (RegionList::iterator i = other->regions.begin(); i != other->regions.end(); ++i) {
boost::shared_ptr<Region> copy_of_region = RegionFactory::create (*i, true);
-
+
/* put these new regions on top of all existing ones, but preserve
the ordering they had in the original playlist.
*/
-
+
add_region_internal (copy_of_region, (*i)->position() + pos);
set_layer (copy_of_region, copy_of_region->layer() + top);
}
@@ -1523,7 +1523,7 @@ Playlist::core_ripple (framepos_t at, framecnt_t distance, RegionList *exclude)
} else if (new_pos >= limit ) {
new_pos = limit;
}
-
+
(*i)->set_position (new_pos);
}
}
@@ -1783,15 +1783,15 @@ boost::shared_ptr<RegionList>
Playlist::find_regions_at (framepos_t frame)
{
/* Caller must hold lock */
-
+
boost::shared_ptr<RegionList> rlist (new RegionList);
-
+
for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
if ((*i)->covers (frame)) {
rlist->push_back (*i);
}
}
-
+
return rlist;
}
@@ -1840,13 +1840,13 @@ boost::shared_ptr<RegionList>
Playlist::regions_touched_locked (framepos_t start, framepos_t end)
{
boost::shared_ptr<RegionList> rlist (new RegionList);
-
+
for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
if ((*i)->coverage (start, end) != Evoral::OverlapNone) {
rlist->push_back (*i);
}
}
-
+
return rlist;
}
@@ -1856,7 +1856,7 @@ Playlist::find_next_transient (framepos_t from, int dir)
RegionReadLock rlock (this);
AnalysisFeatureList points;
AnalysisFeatureList these_points;
-
+
for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
if (dir > 0) {
if ((*i)->last_frame() < from) {
@@ -1867,30 +1867,30 @@ Playlist::find_next_transient (framepos_t from, int dir)
continue;
}
}
-
+
(*i)->get_transients (these_points);
-
+
/* add first frame, just, err, because */
-
+
these_points.push_back ((*i)->first_frame());
-
+
points.insert (points.end(), these_points.begin(), these_points.end());
these_points.clear ();
}
-
+
if (points.empty()) {
return -1;
}
-
+
TransientDetector::cleanup_transients (points, _session.frame_rate(), 3.0);
bool reached = false;
-
+
if (dir > 0) {
for (AnalysisFeatureList::iterator x = points.begin(); x != points.end(); ++x) {
if ((*x) >= from) {
reached = true;
}
-
+
if (reached && (*x) > from) {
return *x;
}
@@ -1900,13 +1900,13 @@ Playlist::find_next_transient (framepos_t from, int dir)
if ((*x) <= from) {
reached = true;
}
-
+
if (reached && (*x) < from) {
return *x;
}
}
}
-
+
return -1;
}
@@ -1916,17 +1916,17 @@ Playlist::find_next_region (framepos_t frame, RegionPoint point, int dir)
RegionReadLock rlock (this);
boost::shared_ptr<Region> ret;
framepos_t closest = max_framepos;
-
+
bool end_iter = false;
-
+
for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
-
+
if(end_iter) break;
-
+
frameoffset_t distance;
boost::shared_ptr<Region> r = (*i);
framepos_t pos = 0;
-
+
switch (point) {
case Start:
pos = r->first_frame ();
@@ -1938,10 +1938,10 @@ Playlist::find_next_region (framepos_t frame, RegionPoint point, int dir)
pos = r->sync_position ();
break;
}
-
+
switch (dir) {
case 1: /* forwards */
-
+
if (pos > frame) {
if ((distance = pos - frame) < closest) {
closest = distance;
@@ -1949,11 +1949,11 @@ Playlist::find_next_region (framepos_t frame, RegionPoint point, int dir)
end_iter = true;
}
}
-
+
break;
-
+
default: /* backwards */
-
+
if (pos < frame) {
if ((distance = frame - pos) < closest) {
closest = distance;
@@ -1962,11 +1962,11 @@ Playlist::find_next_region (framepos_t frame, RegionPoint point, int dir)
} else {
end_iter = true;
}
-
+
break;
}
}
-
+
return ret;
}
@@ -2170,7 +2170,7 @@ Playlist::find_next_region (framepos_t frame, RegionPoint point, int dir)
RegionWriteLock rlock (this);
add_region_internal (region, region->position());
}
-
+
region->resume_property_changes ();
}
@@ -2179,7 +2179,7 @@ Playlist::find_next_region (framepos_t frame, RegionPoint point, int dir)
if (seen_region_nodes && regions.empty()) {
ret = -1;
}
-
+
thaw ();
notify_contents_changed ();
@@ -2358,7 +2358,7 @@ Playlist::set_layer (boost::shared_ptr<Region> region, double new_layer)
}
++i;
}
-
+
copy.insert (i, region);
setup_layering_indices (copy);
diff --git a/libs/ardour/playlist_factory.cc b/libs/ardour/playlist_factory.cc
index 5c3d93a0a0..150ae6c3ac 100644
--- a/libs/ardour/playlist_factory.cc
+++ b/libs/ardour/playlist_factory.cc
@@ -46,9 +46,9 @@ PlaylistFactory::create (Session& s, const XMLNode& node, bool hidden, bool unus
} else if (type->value() == "midi") {
pl = boost::shared_ptr<Playlist> (new MidiPlaylist (s, node, hidden));
}
-
+
pl->set_region_ownership ();
-
+
if (pl && !hidden) {
PlaylistCreated (pl, unused);
}
@@ -69,11 +69,11 @@ PlaylistFactory::create (DataType type, Session& s, string name, bool hidden)
pl = boost::shared_ptr<Playlist> (new AudioPlaylist (s, name, hidden));
else if (type == DataType::MIDI)
pl = boost::shared_ptr<Playlist> (new MidiPlaylist (s, name, hidden));
-
+
if (pl && !hidden) {
PlaylistCreated (pl, false);
}
-
+
return pl;
} catch (...) {
return boost::shared_ptr<Playlist> ();
@@ -86,7 +86,7 @@ PlaylistFactory::create (boost::shared_ptr<const Playlist> old, string name, boo
boost::shared_ptr<Playlist> pl;
boost::shared_ptr<const AudioPlaylist> apl;
boost::shared_ptr<const MidiPlaylist> mpl;
-
+
try {
if ((apl = boost::dynamic_pointer_cast<const AudioPlaylist> (old)) != 0) {
@@ -100,12 +100,12 @@ PlaylistFactory::create (boost::shared_ptr<const Playlist> old, string name, boo
if (pl && !hidden) {
PlaylistCreated (pl, false);
}
-
+
return pl;
} catch (...) {
return boost::shared_ptr<Playlist> ();
}
-
+
}
boost::shared_ptr<Playlist>
@@ -123,9 +123,9 @@ PlaylistFactory::create (boost::shared_ptr<const Playlist> old, framepos_t start
pl = boost::shared_ptr<Playlist> (new MidiPlaylist (mpl, start, cnt, name, hidden));
pl->set_region_ownership ();
}
-
+
/* this factory method does NOT notify others */
-
+
return pl;
} catch (...) {
return boost::shared_ptr<Playlist> ();
diff --git a/libs/ardour/plugin.cc b/libs/ardour/plugin.cc
index 577b12c1a6..89f6d24137 100644
--- a/libs/ardour/plugin.cc
+++ b/libs/ardour/plugin.cc
@@ -396,7 +396,7 @@ Plugin::get_state ()
root->add_property (X_("last-preset-label"), _last_preset.label);
root->add_property (X_("parameter-changed-since-last-preset"), _parameter_changed_since_last_preset ? X_("yes") : X_("no"));
-#ifndef NO_PLUGIN_STATE
+#ifndef NO_PLUGIN_STATE
add_state (root);
#else
if (!seen_get_state_message) {
diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc
index c568437234..98ff9ab4f0 100644
--- a/libs/ardour/plugin_insert.cc
+++ b/libs/ardour/plugin_insert.cc
@@ -167,7 +167,7 @@ PluginInsert::input_streams() const
}
DEBUG_TRACE (DEBUG::Processors, string_compose ("Plugin insert, input streams = %1, match using %2\n", in, _match.method));
-
+
if (_match.method == Split) {
/* we are splitting 1 processor input to multiple plugin inputs,
@@ -188,7 +188,7 @@ PluginInsert::input_streams() const
return in;
} else {
-
+
for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
in.set (*t, in.get (*t) * _plugins.size ());
}
@@ -842,7 +842,7 @@ PluginInsert::private_can_support_io_configuration (ChanCount const & inx, ChanC
We allow replication only for plugins with either zero or 1 inputs and outputs
for every valid data type.
*/
-
+
uint32_t f = 0;
bool can_replicate = true;
for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
@@ -910,7 +910,7 @@ PluginInsert::private_can_support_io_configuration (ChanCount const & inx, ChanC
bool could_hide = false;
bool cannot_hide = false;
ChanCount hide_channels;
-
+
for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
if (inputs.get(*t) > in.get(*t)) {
/* there is potential to hide, since the plugin has more inputs of type t than the insert */
@@ -1425,7 +1425,7 @@ void
PluginInsert::add_plugin (boost::shared_ptr<Plugin> plugin)
{
plugin->set_insert_id (this->id());
-
+
if (_plugins.empty()) {
/* first (and probably only) plugin instance - connect to relevant signals
*/
diff --git a/libs/ardour/port.cc b/libs/ardour/port.cc
index 3218550f99..d375550d9e 100644
--- a/libs/ardour/port.cc
+++ b/libs/ardour/port.cc
@@ -73,7 +73,7 @@ Port::Port (std::string const & n, DataType t, PortFlags f)
cerr << "Failed to register port \"" << _name << "\", reason is unknown from here\n";
throw failed_constructor ();
}
-
+
PortDrop.connect_same_thread (drop_connection, boost::bind (&Port::drop, this));
}
@@ -127,10 +127,10 @@ int
Port::disconnect_all ()
{
if (_port_handle) {
-
+
port_engine.disconnect_all (_port_handle);
_connections.clear ();
-
+
/* a cheaper, less hacky way to do boost::shared_from_this() ...
*/
boost::shared_ptr<Port> pself = port_manager->get_port_by_name (name());
@@ -365,7 +365,7 @@ Port::public_latency_range (bool /*playback*/) const
if (_port_handle) {
r = port_engine.get_latency_range (_port_handle, sends_output() ? true : false);
-
+
DEBUG_TRACE (DEBUG::Latency, string_compose (
"GET PORT %1: %4 PUBLIC latency range %2 .. %3\n",
name(), r.min, r.max,
@@ -520,7 +520,7 @@ Port::get_state () const
}
vector<string> c;
-
+
get_connections (c);
for (vector<string>::const_iterator i = c.begin(); i != c.end(); ++i) {
@@ -554,7 +554,7 @@ Port::set_state (const XMLNode& node, int)
if ((*c)->name() != X_("Connection")) {
continue;
}
-
+
if ((prop = (*c)->property (X_("other"))) == 0) {
continue;
}
diff --git a/libs/ardour/port_insert.cc b/libs/ardour/port_insert.cc
index 04796993e4..46d54cd445 100644
--- a/libs/ardour/port_insert.cc
+++ b/libs/ardour/port_insert.cc
@@ -122,7 +122,7 @@ PortInsert::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame,
Sample* out = outbuf.data();
_mtdm->process (nframes, in, out);
-
+
outbuf.set_written (true);
}
diff --git a/libs/ardour/port_manager.cc b/libs/ardour/port_manager.cc
index b43158ff0f..e4c066944f 100644
--- a/libs/ardour/port_manager.cc
+++ b/libs/ardour/port_manager.cc
@@ -207,7 +207,7 @@ PortManager::port_name_prefix_is_unique (const string& first_part_of_port_name)
boost::shared_ptr<const Ports> pr = ports.reader();
const string::size_type len = first_part_of_port_name.length();
-
+
for (Ports::const_iterator x = pr->begin(); x != pr->end(); ++x) {
string prefix = x->first.substr (0, len);
@@ -262,7 +262,7 @@ PortManager::port_renamed (const std::string& old_relative_name, const std::stri
RCUWriter<Ports> writer (ports);
boost::shared_ptr<Ports> p = writer.get_copy();
Ports::iterator x = p->find (old_relative_name);
-
+
if (x != p->end()) {
boost::shared_ptr<Port> port = x->second;
p->erase (x);
@@ -515,9 +515,9 @@ PortManager::reconnect_ports ()
if (!Profile->get_trx()) {
/* re-establish connections */
-
+
DEBUG_TRACE (DEBUG::Ports, string_compose ("reconnect %1 ports\n", p->size()));
-
+
for (Ports::iterator i = p->begin(); i != p->end(); ++i) {
i->second->reconnect ();
}
@@ -549,7 +549,7 @@ PortManager::connect_callback (const string& a, const string& b, bool conn)
port_b, b,
conn
); /* EMIT SIGNAL */
-}
+}
void
PortManager::registration_callback ()
@@ -603,7 +603,7 @@ PortManager::port_name_size() const
if (!_backend) {
return 0;
}
-
+
return _backend->port_name_size ();
}
@@ -613,7 +613,7 @@ PortManager::my_name() const
if (!_backend) {
return string();
}
-
+
return _backend->my_name();
}
@@ -709,9 +709,9 @@ void
PortManager::check_monitoring ()
{
for (Ports::iterator i = _cycle_ports->begin(); i != _cycle_ports->end(); ++i) {
-
+
bool x;
-
+
if (i->second->last_monitor() != (x = i->second->monitoring_input ())) {
i->second->set_last_monitor (x);
/* XXX I think this is dangerous, due to
@@ -726,14 +726,14 @@ void
PortManager::fade_out (gain_t base_gain, gain_t gain_step, pframes_t nframes)
{
for (Ports::iterator i = _cycle_ports->begin(); i != _cycle_ports->end(); ++i) {
-
+
if (i->second->sends_output()) {
-
+
boost::shared_ptr<AudioPort> ap = boost::dynamic_pointer_cast<AudioPort> (i->second);
if (ap) {
Sample* s = ap->engine_get_whole_audio_buffer ();
gain_t g = base_gain;
-
+
for (pframes_t n = 0; n < nframes; ++n) {
*s++ *= g;
g -= gain_step;
diff --git a/libs/ardour/port_set.cc b/libs/ardour/port_set.cc
index 3489ae4e44..93fe54ed1c 100644
--- a/libs/ardour/port_set.cc
+++ b/libs/ardour/port_set.cc
@@ -92,7 +92,7 @@ PortSet::add (boost::shared_ptr<Port> port)
sort(v.begin(), v.end(), sort_ports_by_name);
sort(_all_ports.begin(), _all_ports.end(), sort_ports_by_type_and_name);
-
+
_count.set(port->type(), _count.get(port->type()) + 1);
assert(_count.get(port->type()) == _ports[port->type()].size());
}
@@ -104,7 +104,7 @@ PortSet::remove (boost::shared_ptr<Port> port)
if (i != _all_ports.end()) {
_all_ports.erase(i);
}
-
+
for (std::vector<PortVec>::iterator l = _ports.begin(); l != _ports.end(); ++l) {
PortVec::iterator i = find(l->begin(), l->end(), port);
if (i != l->end()) {
diff --git a/libs/ardour/processor.cc b/libs/ardour/processor.cc
index aca9ccaab1..315fb6662e 100644
--- a/libs/ardour/processor.cc
+++ b/libs/ardour/processor.cc
@@ -139,15 +139,15 @@ Processor::set_state_2X (const XMLNode & node, int /*version*/)
XMLProperty const * prop;
XMLNodeList children = node.children ();
-
+
for (XMLNodeIterator i = children.begin(); i != children.end(); ++i) {
if ((*i)->name() == X_("IO")) {
-
+
if ((prop = (*i)->property ("name")) != 0) {
set_name (prop->value ());
}
-
+
set_id (**i);
//note: in A2, active state was stored in the Redirect node, not the child IO node
@@ -162,7 +162,7 @@ Processor::set_state_2X (const XMLNode & node, int /*version*/)
}
}
}*/
-
+
}
}
@@ -188,7 +188,7 @@ Processor::set_state (const XMLNode& node, int version)
*/
Processor::set_name (prop->value());
}
-
+
set_id (node);
}
diff --git a/libs/ardour/quantize.cc b/libs/ardour/quantize.cc
index cc5b3c53c2..f484a1602a 100644
--- a/libs/ardour/quantize.cc
+++ b/libs/ardour/quantize.cc
@@ -99,7 +99,7 @@ swing_position (double pos, double grid, double swing, double offset)
/* now correct for start-of-model offset */
pos += offset;
-
+
if (fabs (pos - swung_pos) > fabs (pos - swung_previous_grid_position)) {
pos = swung_previous_grid_position;
} else {
@@ -135,7 +135,7 @@ Quantize::operator () (boost::shared_ptr<MidiModel> model,
* these versions of new_start and new_end are
* guaranteed to precisely align with the quantize grid(s).
*/
-
+
double new_start = round (((*i)->time().to_double() - offset) / _start_grid) * _start_grid;
double new_end = round (((*i)->end_time().to_double() - offset) / _end_grid) * _end_grid;
@@ -143,7 +143,7 @@ Quantize::operator () (boost::shared_ptr<MidiModel> model,
new_start = swing_position (new_start, _start_grid, _swing, offset);
new_end = swing_position (new_end, _end_grid, _swing, offset);
-
+
} else {
/* now correct for start-of-model offset */
@@ -151,10 +151,10 @@ Quantize::operator () (boost::shared_ptr<MidiModel> model,
new_start += offset;
new_end += offset;
}
-
+
double delta = new_start - (*i)->time().to_double();
-
+
if (fabs (delta) >= _threshold) {
if (_snap_start) {
delta *= _strength;
diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc
index 813fb93584..bf01238fb4 100644
--- a/libs/ardour/region.cc
+++ b/libs/ardour/region.cc
@@ -599,7 +599,7 @@ Region::set_position_internal (framepos_t pos, bool allow_bbt_recompute)
e.g. Playlist::notify_region_moved doesn't use an out-of-date last_position.
*/
_last_position = _position;
-
+
if (_position != pos) {
_position = pos;
@@ -1738,4 +1738,4 @@ Region::latest_possible_frame () const
return _position + (minlen - _start) - 1;
}
-
+
diff --git a/libs/ardour/region_factory.cc b/libs/ardour/region_factory.cc
index 7c9f4fd228..33c714cd1d 100644
--- a/libs/ardour/region_factory.cc
+++ b/libs/ardour/region_factory.cc
@@ -83,7 +83,7 @@ RegionFactory::create (boost::shared_ptr<const Region> region, bool announce)
if (ret) {
ret->set_name (new_region_name(ret->name()));
ret->set_position (region->position());
-
+
if (ret->session().config.get_glue_new_regions_to_bars_and_beats ()) {
ret->set_position_lock_style (MusicTime);
}
@@ -129,7 +129,7 @@ RegionFactory::create (boost::shared_ptr<Region> region, const PropertyList& pli
if (ret->session().config.get_glue_new_regions_to_bars_and_beats ()) {
ret->set_position_lock_style (MusicTime);
}
-
+
if (announce) {
map_add (ret);
CheckNewRegion (ret);
@@ -255,7 +255,7 @@ RegionFactory::create (const SourceList& srcs, const PropertyList& plist, bool a
if (ret->session().config.get_glue_new_regions_to_bars_and_beats ()) {
ret->set_position_lock_style (MusicTime);
}
-
+
if (announce) {
map_add (ret);
CheckNewRegion (ret);
@@ -302,7 +302,7 @@ RegionFactory::create (SourceList& srcs, const XMLNode& node)
/* Don't fiddle with position_lock_style here as the region
description is coming from XML.
*/
-
+
CheckNewRegion (ret);
}
}
@@ -342,7 +342,7 @@ RegionFactory::map_remove (boost::weak_ptr<Region> w)
if (!r) {
return;
}
-
+
Glib::Threads::Mutex::Lock lm (region_map_lock);
RegionMap::iterator i = region_map.find (r->id());
@@ -449,7 +449,7 @@ RegionFactory::rename_in_region_name_maps (boost::shared_ptr<Region> region)
update_region_name_number_map (region);
Glib::Threads::Mutex::Lock lm (region_name_maps_mutex);
-
+
map<string, PBD::ID>::iterator i = region_name_map.begin();
while (i != region_name_map.end() && i->second != region->id ()) {
++i;
@@ -652,7 +652,7 @@ RegionFactory::remove_regions_using_source (boost::shared_ptr<Source> src)
RegionMap::iterator j = i;
++j;
-
+
if (i->second->uses_source (src)) {
remove_from_region_name_map (i->second->name ());
region_map.erase (i);
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 74c00409c7..2cafba5810 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -501,11 +501,11 @@ Route::process_output_buffers (BufferSet& bufs,
on a transition between monitoring states we get a de-clicking gain
change in the _main_outs delivery, if config.get_use_monitor_fades()
is true.
-
+
We override this in the case where we have an internal generator.
*/
bool silence = _have_internal_generator ? false : (monitoring_state () == MonitoringSilence);
-
+
_main_outs->no_outs_cuz_we_no_monitor (silence);
/* -------------------------------------------------------------------------------------------
@@ -1004,28 +1004,28 @@ Route::set_solo_isolated (bool yn, void *src)
}
}
-
+
if (!changed) {
return;
}
-
+
/* forward propagate solo-isolate status to everything fed by this route, but not those via sends only */
boost::shared_ptr<RouteList> routes = _session.get_routes ();
for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) {
-
+
if ((*i).get() == this || (*i)->is_master() || (*i)->is_monitor() || (*i)->is_auditioner()) {
continue;
}
-
+
bool sends_only;
bool does_feed = feeds (*i, &sends_only);
-
+
if (does_feed && !sends_only) {
(*i)->mod_solo_isolated_by_upstream (yn, src);
}
}
-
+
/* XXX should we back-propagate as well? (April 2010: myself and chris goddard think not) */
solo_isolated_changed (src);
@@ -1081,7 +1081,7 @@ Route::muted_by_others () const
//master is never muted by others
if (is_master())
return false;
-
+
//now check to see if something is soloed (and I am not)
return (_session.soloing() && !self_soloed() && !solo_isolated());
}
@@ -1108,7 +1108,7 @@ Route::before_processor_for_placement (Placement p)
Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
ProcessorList::iterator loc;
-
+
if (p == PreFader) {
/* generic pre-fader: insert immediately before the amp */
loc = find (_processors.begin(), _processors.end(), _amp);
@@ -1131,14 +1131,14 @@ Route::before_processor_for_index (int index)
}
Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
-
+
ProcessorList::iterator i = _processors.begin ();
int j = 0;
while (i != _processors.end() && j < index) {
if ((*i)->display_to_user()) {
++j;
}
-
+
++i;
}
@@ -1321,7 +1321,7 @@ Route::add_processor_from_xml_2X (const XMLNode& node, int version)
if (processor->set_state (node, version)) {
return false;
}
-
+
//A2 uses the "active" flag in the toplevel redirect node, not in the child plugin/IO
if (i != children.end()) {
if ((prop = (*i)->property (X_("active"))) != 0) {
@@ -1995,12 +1995,12 @@ Route::all_visible_processors_active (bool state)
if (_processors.empty()) {
return;
}
-
+
for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
if (!(*i)->display_to_user() || boost::dynamic_pointer_cast<Amp> (*i)) {
continue;
}
-
+
if (state) {
(*i)->activate ();
} else {
@@ -3105,9 +3105,9 @@ Route::remove_aux_or_listen (boost::shared_ptr<Route> route)
again:
for (ProcessorList::iterator x = _processors.begin(); x != _processors.end(); ++x) {
-
+
boost::shared_ptr<InternalSend> d = boost::dynamic_pointer_cast<InternalSend>(*x);
-
+
if (d && d->target_route() == route) {
rl.release ();
if (remove_processor (*x, &err, false) > 0) {
@@ -3571,9 +3571,9 @@ Route::set_meter_point_unlocked ()
/* Set up the meter for its new position */
ProcessorList::iterator loc = find (_processors.begin(), _processors.end(), _meter);
-
+
ChanCount m_in;
-
+
if (loc == _processors.begin()) {
m_in = _input->n_ports();
} else {
@@ -3976,7 +3976,7 @@ Route::set_name_in_state (XMLNode& node, string const & name)
XMLNodeList children = node.children();
for (XMLNodeIterator i = children.begin(); i != children.end(); ++i) {
-
+
if ((*i)->name() == X_("IO")) {
IO::set_name_in_state (**i, name);
@@ -3987,12 +3987,12 @@ Route::set_name_in_state (XMLNode& node, string const & name)
if (role && role->value() == X_("Main")) {
(*i)->add_property (X_("name"), name);
}
-
+
} else if ((*i)->name() == X_("Diskstream")) {
(*i)->add_property (X_("playlist"), string_compose ("%1.1", name).c_str());
(*i)->add_property (X_("name"), name);
-
+
}
}
}
@@ -4278,17 +4278,17 @@ Route::update_port_latencies (PortSet& from, PortSet& to, bool playback, framecn
} else {
all_connections.min = ~((pframes_t) 0);
all_connections.max = 0;
-
+
/* iterate over all "from" ports and determine the latency range for all of their
connections to the "outside" (outside of this Route).
*/
-
+
for (PortSet::iterator p = from.begin(); p != from.end(); ++p) {
-
+
LatencyRange range;
-
+
p->get_connected_latency_range (range, playback);
-
+
all_connections.min = min (all_connections.min, range.min);
all_connections.max = max (all_connections.max, range.max);
}
@@ -4581,7 +4581,7 @@ Route::maybe_note_meter_position ()
if (_meter_point != MeterCustom) {
return;
}
-
+
_custom_meter_position_noted = true;
/* custom meter points range from after trim to before panner/main_outs
* this is a limitation by the current processor UI
@@ -4650,7 +4650,7 @@ Route::has_external_redirects () const
/* ignore inactive processors and obviously ignore the main
* outs since everything has them and we don't care.
*/
-
+
if ((*i)->active() && (*i) != _main_outs && (*i)->does_routing()) {
return true;;
}
@@ -4696,7 +4696,7 @@ Route::non_realtime_locate (framepos_t pos)
{
//Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
-
+
for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
(*i)->transport_located (pos);
}
@@ -4709,7 +4709,7 @@ Route::fill_buffers_with_input (BufferSet& bufs, boost::shared_ptr<IO> io, pfram
{
size_t n_buffers;
size_t i;
-
+
/* MIDI
*
* We don't currently mix MIDI input together, so we don't need the
@@ -4722,7 +4722,7 @@ Route::fill_buffers_with_input (BufferSet& bufs, boost::shared_ptr<IO> io, pfram
boost::shared_ptr<MidiPort> source_port = io->midi (i);
MidiBuffer& buf (bufs.get_midi (i));
-
+
if (source_port) {
buf.copy (source_port->get_midi_buffer(nframes));
} else {
@@ -4740,19 +4740,19 @@ Route::fill_buffers_with_input (BufferSet& bufs, boost::shared_ptr<IO> io, pfram
if (n_ports > n_buffers) {
scaling = ((float) n_buffers) / n_ports;
}
-
+
for (i = 0; i < n_ports; ++i) {
-
+
/* if there are more ports than buffers, map them onto buffers
* in a round-robin fashion
*/
boost::shared_ptr<AudioPort> source_port = io->audio (i);
AudioBuffer& buf (bufs.get_audio (i%n_buffers));
-
+
if (i < n_buffers) {
-
+
/* first time through just copy a channel into
the output buffer.
*/
@@ -4762,9 +4762,9 @@ Route::fill_buffers_with_input (BufferSet& bufs, boost::shared_ptr<IO> io, pfram
if (scaling != 1.0f) {
buf.apply_gain (scaling, nframes);
}
-
+
} else {
-
+
/* on subsequent times around, merge data from
* the port with what is already there
*/
diff --git a/libs/ardour/route_graph.cc b/libs/ardour/route_graph.cc
index ee02afef24..ab88a0d839 100644
--- a/libs/ardour/route_graph.cc
+++ b/libs/ardour/route_graph.cc
@@ -70,7 +70,7 @@ GraphEdges::has (GraphVertex from, GraphVertex to, bool* via_sends_only)
if (i == _from_to_with_sends.end ()) {
return false;
}
-
+
if (via_sends_only) {
*via_sends_only = i->second.second;
}
@@ -86,7 +86,7 @@ GraphEdges::from (GraphVertex r) const
if (i == _from_to.end ()) {
return set<GraphVertex> ();
}
-
+
return i->second;
}
@@ -99,7 +99,7 @@ GraphEdges::remove (GraphVertex from, GraphVertex to)
if (i->second.empty ()) {
_from_to.erase (i);
}
-
+
EdgeMap::iterator j = _to_from.find (to);
assert (j != _to_from.end ());
j->second.erase (from);
@@ -139,7 +139,7 @@ GraphEdges::dump () const
}
cout << "\n";
}
-
+
for (EdgeMap::const_iterator i = _to_from.begin(); i != _to_from.end(); ++i) {
cout << "TO: " << i->first->name() << " ";
for (set<GraphVertex>::const_iterator j = i->second.begin(); j != i->second.end(); ++j) {
@@ -197,7 +197,7 @@ ARDOUR::topological_sort (
)
{
boost::shared_ptr<RouteList> sorted_routes (new RouteList);
-
+
/* queue of routes to process */
RouteList queue;
@@ -217,7 +217,7 @@ ARDOUR::topological_sort (
/* Do the sort: algorithm is Kahn's from Wikipedia.
`Topological sorting of large networks', Communications of the ACM 5(11):558-562.
*/
-
+
while (!queue.empty ()) {
GraphVertex r = queue.front ();
queue.pop_front ();
diff --git a/libs/ardour/route_group.cc b/libs/ardour/route_group.cc
index 42909ee497..032c85f6ce 100644
--- a/libs/ardour/route_group.cc
+++ b/libs/ardour/route_group.cc
@@ -136,7 +136,7 @@ RouteGroup::add (boost::shared_ptr<Route> r)
if (r->route_group()) {
r->route_group()->remove (r);
}
-
+
routes->push_back (r);
r->set_route_group (this);
@@ -190,7 +190,7 @@ RouteGroup::get_min_factor (gain_t factor)
factor = 0.0000003f / g - 1.0f;
}
-
+
return factor;
}
diff --git a/libs/ardour/search_paths.cc b/libs/ardour/search_paths.cc
index 1089a3cd82..50ecac613e 100644
--- a/libs/ardour/search_paths.cc
+++ b/libs/ardour/search_paths.cc
@@ -64,7 +64,7 @@ control_protocol_search_path ()
Searchpath spath(user_config_directory ());
spath += ardour_dll_directory ();
spath.add_subdirectory_to_paths (surfaces_dir_name);
-
+
spath += Searchpath(Glib::getenv(surfaces_env_variable_name));
return spath;
}
diff --git a/libs/ardour/send.cc b/libs/ardour/send.cc
index 3036c0b41e..ec86686bef 100644
--- a/libs/ardour/send.cc
+++ b/libs/ardour/send.cc
@@ -68,7 +68,7 @@ Send::name_and_id_new_send (Session& s, Role r, uint32_t& bitslot, bool ignore_b
abort(); /*NOTREACHED*/
return string();
}
-
+
}
Send::Send (Session& s, boost::shared_ptr<Pannable> p, boost::shared_ptr<MuteMaster> mm, Role r, bool ignore_bitslot)
@@ -239,7 +239,7 @@ Send::set_state (const XMLNode& node, int version)
/* don't try to reset bitslot if there is a node for it already: this can cause
issues with the session's accounting of send ID's
*/
-
+
if ((prop = node.property ("bitslot")) == 0) {
if (_role == Delivery::Aux) {
_bitslot = _session.next_aux_send_id ();
@@ -264,7 +264,7 @@ Send::set_state (const XMLNode& node, int version)
}
}
}
-
+
XMLNodeList nlist = node.children();
for (XMLNodeIterator i = nlist.begin(); i != nlist.end(); ++i) {
if ((*i)->name() == X_("Processor")) {
@@ -401,4 +401,4 @@ Send::value_as_string (boost::shared_ptr<AutomationControl> ac) const
return _amp->value_as_string (ac);
}
-
+
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index eb333f8e0d..879bd76539 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -211,7 +211,7 @@ Session::Session (AudioEngine &eng,
, loop_changing (false)
, last_loopend (0)
, _session_dir (new SessionDirectory (fullpath))
- , _current_snapshot_name (snapshot_name)
+ , _current_snapshot_name (snapshot_name)
, state_tree (0)
, state_was_pending (false)
, _state_of_the_state (StateOfTheState(CannotSave|InitialConnecting|Loading))
@@ -304,12 +304,12 @@ Session::Session (AudioEngine &eng,
pthread_cond_init (&_rt_emit_cond, 0);
pre_engine_init (fullpath);
-
+
if (_is_new) {
Stateful::loading_state_version = CURRENT_SESSION_FILE_VERSION;
-#ifdef USE_TRACKS_CODE_FEATURES
+#ifdef USE_TRACKS_CODE_FEATURES
sr = EngineStateController::instance()->get_current_sample_rate();
#endif
if (ensure_engine (sr)) {
@@ -348,7 +348,7 @@ Session::Session (AudioEngine &eng,
if (load_state (_current_snapshot_name)) {
throw SessionException (_("Failed to load state"));
}
-
+
/* try to get sample rate from XML state so that we
* can influence the SR if we set up the audio
* engine.
@@ -356,7 +356,7 @@ Session::Session (AudioEngine &eng,
if (state_tree) {
const XMLProperty* prop;
- if ((prop = state_tree->root()->property (X_("sample-rate"))) != 0) {
+ if ((prop = state_tree->root()->property (X_("sample-rate"))) != 0) {
sr = atoi (prop->value());
}
}
@@ -398,25 +398,25 @@ Session::Session (AudioEngine &eng,
_engine.reset_timebase ();
#ifdef USE_TRACKS_CODE_FEATURES
-
+
EngineStateController::instance()->set_session(this);
-
+
if (_is_new ) {
if ( ARDOUR::Profile->get_trx () ) {
/* Waves Tracks: fill session with tracks basing on the amount of inputs.
* each available input must have corresponding track when session starts.
*/
-
+
uint32_t how_many (0);
-
+
std::vector<std::string> inputs;
EngineStateController::instance()->get_physical_audio_inputs(inputs);
-
+
how_many = inputs.size();
-
+
list<boost::shared_ptr<AudioTrack> > tracks;
-
+
// Track names after driver
if (Config->get_tracks_auto_naming() == NameAfterDriver) {
string track_name = "";
@@ -424,14 +424,14 @@ Session::Session (AudioEngine &eng,
string track_name;
track_name = inputs[i];
replace_all (track_name, "system:capture", "");
-
+
list<boost::shared_ptr<AudioTrack> > single_track = new_audio_track (1, 1, Normal, 0, 1, track_name);
tracks.insert(tracks.begin(), single_track.front());
}
} else { // Default track names
tracks = new_audio_track (1, 1, Normal, 0, how_many, string());
}
-
+
if (tracks.size() != how_many) {
destroy ();
throw failed_constructor ();
@@ -439,7 +439,7 @@ Session::Session (AudioEngine &eng,
}
}
#endif
-
+
_is_new = false;
session_loaded ();
@@ -448,9 +448,9 @@ Session::Session (AudioEngine &eng,
Session::~Session ()
{
-#ifdef PT_TIMING
+#ifdef PT_TIMING
ST.dump ("ST.dump");
-#endif
+#endif
destroy ();
}
@@ -493,7 +493,7 @@ Session::immediately_post_engine ()
* know that the engine is running, but before we either create a
* session or set state for an existing one.
*/
-
+
if (how_many_dsp_threads () > 1) {
/* For now, only create the graph if we are using >1 DSP threads, as
it is a bit slower than the old code with 1 thread.
@@ -553,9 +553,9 @@ Session::destroy ()
/* shutdown control surface protocols while we still have ports
and the engine to move data to any devices.
*/
-
+
ControlProtocolManager::instance().drop_protocols ();
-
+
_engine.remove_session ();
#ifdef USE_TRACKS_CODE_FEATURES
@@ -586,7 +586,7 @@ Session::destroy ()
_butler->drop_references ();
delete _butler;
_butler = 0;
-
+
delete _all_route_group;
DEBUG_TRACE (DEBUG::Destruction, "delete route groups\n");
@@ -675,7 +675,7 @@ Session::destroy ()
delete _locations; _locations = 0;
delete _tempo_map;
-
+
DEBUG_TRACE (DEBUG::Destruction, "Session::destroy() done\n");
#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
@@ -687,10 +687,10 @@ void
Session::setup_ltc ()
{
XMLNode* child = 0;
-
+
_ltc_input.reset (new IO (*this, X_("LTC In"), IO::Input));
_ltc_output.reset (new IO (*this, X_("LTC Out"), IO::Output));
-
+
if (state_tree && (child = find_named_node (*state_tree->root(), X_("LTC In"))) != 0) {
_ltc_input->set_state (*(child->children().front()), Stateful::loading_state_version);
} else {
@@ -700,7 +700,7 @@ Session::setup_ltc ()
}
reconnect_ltc_input ();
}
-
+
if (state_tree && (child = find_named_node (*state_tree->root(), X_("LTC Out"))) != 0) {
_ltc_output->set_state (*(child->children().front()), Stateful::loading_state_version);
} else {
@@ -710,11 +710,11 @@ Session::setup_ltc ()
}
reconnect_ltc_output ();
}
-
+
/* fix up names of LTC ports because we don't want the normal
* IO style of NAME/TYPE-{in,out}N
*/
-
+
_ltc_input->nth (0)->set_name (X_("LTC-in"));
_ltc_output->nth (0)->set_name (X_("LTC-out"));
}
@@ -735,11 +735,11 @@ Session::setup_click ()
void
Session::setup_click_state (const XMLNode* node)
-{
+{
const XMLNode* child = 0;
-
+
if (node && (child = find_named_node (*node, "Click")) != 0) {
-
+
/* existing state for Click */
int c = 0;
@@ -755,7 +755,7 @@ Session::setup_click_state (const XMLNode* node)
}
}
}
-
+
if (c == 0) {
_clicking = Config->get_clicking ();
@@ -929,7 +929,7 @@ Session::auto_connect_master_bus ()
if (!_master_out || !Config->get_auto_connect_standard_busses() || _monitor_out) {
return;
}
-
+
// Waves Tracks: Do not connect master bas for Tracks if AutoConnectMaster option is not set
// In this case it means "Multi Out" output mode
if (ARDOUR::Profile->get_trx() && !(Config->get_output_auto_connect() & AutoConnectMaster) ) {
@@ -938,21 +938,21 @@ Session::auto_connect_master_bus ()
/* if requested auto-connect the outputs to the first N physical ports.
*/
-
+
uint32_t limit = _master_out->n_outputs().n_total();
vector<string> outputs[DataType::num_types];
-
+
for (uint32_t i = 0; i < DataType::num_types; ++i) {
_engine.get_physical_outputs (DataType (DataType::Symbol (i)), outputs[i]);
}
-
+
for (uint32_t n = 0; n < limit; ++n) {
boost::shared_ptr<Port> p = _master_out->output()->nth (n);
string connect_to;
if (outputs[p->type()].size() > n) {
connect_to = outputs[p->type()][n];
}
-
+
if (!connect_to.empty() && p->connected_to (connect_to) == false) {
if (_master_out->output()->connect (p, connect_to, this)) {
error << string_compose (_("cannot connect master output %1 to %2"), n, connect_to)
@@ -983,20 +983,20 @@ Session::remove_monitor_section ()
/* Hold process lock while doing this so that we don't hear bits and
* pieces of audio as we work on each route.
*/
-
+
Glib::Threads::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
-
+
/* Connect tracks to monitor section. Note that in an
existing session, the internal sends will already exist, but we want the
routes to notice that they connect to the control out specifically.
*/
-
-
+
+
boost::shared_ptr<RouteList> r = routes.reader ();
PBD::Unwinder<bool> uw (ignore_route_processor_changes, true);
-
+
for (RouteList::iterator x = r->begin(); x != r->end(); ++x) {
-
+
if ((*x)->is_monitor()) {
/* relax */
} else if ((*x)->is_master()) {
@@ -1044,17 +1044,17 @@ Session::add_monitor_section ()
rl.push_back (r);
add_routes (rl, false, false, false);
-
+
assert (_monitor_out);
/* AUDIO ONLY as of june 29th 2009, because listen semantics for anything else
are undefined, at best.
*/
-
+
uint32_t limit = _monitor_out->n_inputs().n_audio();
-
+
if (_master_out) {
-
+
/* connect the inputs to the master bus outputs. this
* represents a separate data feed from the internal sends from
* each route. as of jan 2011, it allows the monitor section to
@@ -1068,7 +1068,7 @@ Session::add_monitor_section ()
for (uint32_t n = 0; n < limit; ++n) {
boost::shared_ptr<AudioPort> p = _monitor_out->input()->ports().nth_audio_port (n);
boost::shared_ptr<AudioPort> o = _master_out->output()->ports().nth_audio_port (n);
-
+
if (o) {
string connect_to = o->name();
if (_monitor_out->input()->connect (p, connect_to, this)) {
@@ -1079,16 +1079,16 @@ Session::add_monitor_section ()
}
}
}
-
+
/* if monitor section is not connected, connect it to physical outs
*/
-
+
if (Config->get_auto_connect_standard_busses() && !_monitor_out->output()->connected ()) {
-
+
if (!Config->get_monitor_bus_preferred_bundle().empty()) {
-
+
boost::shared_ptr<Bundle> b = bundle_by_name (Config->get_monitor_bus_preferred_bundle());
-
+
if (b) {
_monitor_out->output()->connect_ports_to_bundle (b, true, this);
} else {
@@ -1096,9 +1096,9 @@ Session::add_monitor_section ()
Config->get_monitor_bus_preferred_bundle())
<< endmsg;
}
-
+
} else {
-
+
/* Monitor bus is audio only */
vector<string> outputs[DataType::num_types];
@@ -1109,17 +1109,17 @@ Session::add_monitor_section ()
uint32_t mod = outputs[DataType::AUDIO].size();
uint32_t limit = _monitor_out->n_outputs().get (DataType::AUDIO);
-
+
if (mod != 0) {
-
+
for (uint32_t n = 0; n < limit; ++n) {
-
+
boost::shared_ptr<Port> p = _monitor_out->output()->ports().port(DataType::AUDIO, n);
string connect_to;
if (outputs[DataType::AUDIO].size() > (n % mod)) {
connect_to = outputs[DataType::AUDIO][n % mod];
}
-
+
if (!connect_to.empty()) {
if (_monitor_out->output()->connect (p, connect_to, this)) {
error << string_compose (
@@ -1137,7 +1137,7 @@ Session::add_monitor_section ()
/* Hold process lock while doing this so that we don't hear bits and
* pieces of audio as we work on each route.
*/
-
+
Glib::Threads::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
/* Connect tracks to monitor section. Note that in an
@@ -1151,7 +1151,7 @@ Session::add_monitor_section ()
PBD::Unwinder<bool> uw (ignore_route_processor_changes, true);
for (RouteList::iterator x = rls->begin(); x != rls->end(); ++x) {
-
+
if ((*x)->is_monitor()) {
/* relax */
} else if ((*x)->is_master()) {
@@ -1482,7 +1482,7 @@ Session::auto_loop_changed (Location* location)
}
}
-
+
last_loopend = location->end();
set_dirty ();
}
@@ -1532,14 +1532,14 @@ Session::set_session_extents (framepos_t start, framepos_t end)
//if there is no existing session, we need to make a new session location (should never happen)
existing = new Location (*this, 0, 0, _("session"), Location::IsSessionRange);
}
-
+
if (end <= start) {
error << _("Session: you can't use that location for session start/end)") << endmsg;
return;
}
existing->set( start, end );
-
+
set_dirty();
}
@@ -1613,7 +1613,7 @@ Session::update_skips (Location* loc, bool consolidate)
if (_ignore_skips_updates) {
return;
}
-
+
Locations::LocationList skips;
if (consolidate) {
@@ -1683,9 +1683,9 @@ Session::_sync_locations_to_skips ()
Locations::LocationList const & locs (_locations->list());
for (Locations::LocationList::const_iterator i = locs.begin(); i != locs.end(); ++i) {
-
+
Location* location = *i;
-
+
if (location->is_skip() && location->is_skipping()) {
SessionEvent* ev = new SessionEvent (SessionEvent::Skip, SessionEvent::Add, location->start(), location->end(), 1.0);
queue_event (ev);
@@ -1774,14 +1774,14 @@ Session::_locations_changed (const Locations::LocationList& locations)
We might be re-adding a location here but it doesn't actually matter
for all the locations that the Session takes an interest in.
*/
-
+
{
PBD::Unwinder<bool> protect_ignore_skip_updates (_ignore_skips_updates, true);
for (Locations::LocationList::const_iterator i = locations.begin(); i != locations.end(); ++i) {
location_added (*i);
}
}
-
+
update_skips (NULL, false);
}
@@ -1799,7 +1799,7 @@ Session::enable_record ()
if (rs == Recording) {
break;
}
-
+
if (g_atomic_int_compare_and_exchange (&_record_status, rs, Recording)) {
_last_record_location = _transport_frame;
@@ -1961,7 +1961,7 @@ Session::set_frame_rate (framecnt_t frames_per_second)
clear_clicks ();
reset_write_sources (false);
-
+
// XXX we need some equivalent to this, somehow
// SndFileSource::setup_standard_crossfades (frames_per_second);
@@ -1978,7 +1978,7 @@ Session::set_block_size (pframes_t nframes)
::process(). It is therefore fine to do things that block
here.
*/
-
+
{
current_block_size = nframes;
@@ -2101,7 +2101,7 @@ Session::resort_routes_using (boost::shared_ptr<RouteList> r)
/* We are going to build a directed graph of our routes;
this is where the edges of that graph are put.
*/
-
+
GraphEdges edges;
/* Go through all routes doing two things:
@@ -2114,7 +2114,7 @@ Session::resort_routes_using (boost::shared_ptr<RouteList> r)
* routes directly or indirectly feed them. This information
* is used by the solo code.
*/
-
+
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
/* Clear out the route's list of direct or indirect feeds */
@@ -2138,7 +2138,7 @@ Session::resort_routes_using (boost::shared_ptr<RouteList> r)
/* Attempt a topological sort of the route graph */
boost::shared_ptr<RouteList> sorted_routes = topological_sort (r, edges);
-
+
if (sorted_routes) {
/* We got a satisfactory topological sort, so there is no feedback;
use this new graph.
@@ -2149,7 +2149,7 @@ Session::resort_routes_using (boost::shared_ptr<RouteList> r)
if (_process_graph) {
_process_graph->rechain (sorted_routes, edges);
}
-
+
_current_route_graph = edges;
/* Complete the building of the routes' lists of what directly
@@ -2180,7 +2180,7 @@ Session::resort_routes_using (boost::shared_ptr<RouteList> r)
so the solo code will think that everything is still connected
as it was before.
*/
-
+
FeedbackDetected (); /* EMIT SIGNAL */
}
@@ -2205,7 +2205,7 @@ Session::find_route_name (string const & base, uint32_t& id, string& name, bool
routes, but hidden objects like the click track. So check port names
before anything else.
*/
-
+
for (vector<string>::const_iterator reserved = reserved_io_names.begin(); reserved != reserved_io_names.end(); ++reserved) {
if (base == *reserved) {
definitely_add_number = true;
@@ -2215,7 +2215,7 @@ Session::find_route_name (string const & base, uint32_t& id, string& name, bool
break;
}
}
-
+
if (!definitely_add_number && route_by_name (base) == 0) {
/* juse use the base */
name = base;
@@ -2230,7 +2230,7 @@ Session::find_route_name (string const & base, uint32_t& id, string& name, bool
}
++id;
-
+
} while (id < (UINT_MAX-1));
return false;
@@ -2313,7 +2313,7 @@ Session::new_midi_track (const ChanCount& input, const ChanCount& output, boost:
{
Glib::Threads::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
if (track->input()->ensure_io (input, false, this)) {
- error << "cannot configure " << input << " out configuration for new midi track" << endmsg;
+ error << "cannot configure " << input << " out configuration for new midi track" << endmsg;
goto failed;
}
@@ -2369,7 +2369,7 @@ Session::new_midi_track (const ChanCount& input, const ChanCount& output, boost:
PluginPtr plugin = instrument->load (*this);
boost::shared_ptr<Processor> p (new PluginInsert (*this, plugin));
(*r)->add_processor (p, PreFader);
-
+
}
}
}
@@ -2751,24 +2751,24 @@ Session::reconnect_mtc_ports ()
}
mtc_in_ptr->disconnect_all ();
-
+
std::vector<EngineStateController::MidiPortState> midi_port_states;
EngineStateController::instance()->get_physical_midi_input_states (midi_port_states);
-
+
std::vector<EngineStateController::MidiPortState>::iterator state_iter = midi_port_states.begin();
-
+
for (; state_iter != midi_port_states.end(); ++state_iter) {
if (state_iter->available && state_iter->mtc_in) {
mtc_in_ptr->connect (state_iter->name);
}
}
-
+
if (!_midi_ports->mtc_input_port ()->connected () &&
config.get_external_sync () &&
(Config->get_sync_source () == MTC) ) {
config.set_external_sync (false);
}
-
+
if ( ARDOUR::Profile->get_trx () ) {
// Tracks need this signal to update timecode_source_dropdown
MtcOrLtcInputPortChanged (); //emit signal
@@ -2827,7 +2827,7 @@ Session::new_audio_track (int input_channels, int output_channels, TrackMode mod
const string name_pattern = default_track_name_pattern (DataType::AUDIO);
bool const use_number = (how_many != 1) || name_template.empty () || (name_template == name_pattern);
-
+
while (how_many) {
if (!find_route_name (name_template.empty() ? _(name_pattern.c_str()) : name_template, ++track_id, track_name, use_number)) {
@@ -2939,7 +2939,7 @@ Session::new_audio_route (int input_channels, int output_channels, RouteGroup* r
RouteList ret;
bool const use_number = (how_many != 1) || name_template.empty () || name_template == _("Bus");
-
+
while (how_many) {
if (!find_route_name (name_template.empty () ? _("Bus") : name_template, ++bus_id, bus_name, use_number)) {
error << "cannot find name for new audio bus" << endmsg;
@@ -2985,7 +2985,7 @@ Session::new_audio_route (int input_channels, int output_channels, RouteGroup* r
bus->add_internal_return ();
ret.push_back (bus);
-
+
RouteAddedOrRemoved (true); /* EMIT SIGNAL */
ARDOUR::GUIIdle ();
@@ -3064,7 +3064,7 @@ Session::new_route_from_template (uint32_t how_many, const std::string& template
} else {
string const route_name = node_copy.property(X_("name"))->value ();
-
+
/* generate a new name by adding a number to the end of the template name */
if (!find_route_name (route_name.c_str(), ++number, name, true)) {
fatal << _("Session: UINT_MAX routes? impossible!") << endmsg;
@@ -3085,7 +3085,7 @@ Session::new_route_from_template (uint32_t how_many, const std::string& template
}
}
}
-
+
boost::shared_ptr<Route> route (XMLRouteFactory (node_copy, 3000));
if (route == 0) {
@@ -3158,13 +3158,13 @@ Session::add_routes (RouteList& new_routes, bool input_auto_connect, bool output
update_latency (true);
update_latency (false);
-
+
set_dirty();
-
+
if (save) {
save_state (_current_snapshot_name);
}
-
+
reassign_track_numbers();
update_route_record_state ();
@@ -3260,8 +3260,8 @@ Session::add_routes_inner (RouteList& new_routes, bool input_auto_connect, bool
}
if (_monitor_out && IO::connecting_legal) {
- Glib::Threads::Mutex::Lock lm (_engine.process_lock());
-
+ Glib::Threads::Mutex::Lock lm (_engine.process_lock());
+
for (RouteList::iterator x = new_routes.begin(); x != new_routes.end(); ++x) {
if ((*x)->is_monitor()) {
/* relax */
@@ -3579,7 +3579,7 @@ Session::route_solo_changed (bool self_solo_change, void* /*src*/, boost::weak_p
bool leave_group_alone = (rg && rg->is_active() && rg->is_solo());
if (delta == 1 && Config->get_exclusive_solo()) {
-
+
/* new solo: disable all other solos, but not the group if its solo-enabled */
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
@@ -3609,7 +3609,7 @@ Session::route_solo_changed (bool self_solo_change, void* /*src*/, boost::weak_p
in_signal_flow = false;
DEBUG_TRACE (DEBUG::Solo, string_compose ("check feed from %1\n", (*i)->name()));
-
+
if ((*i)->feeds (route, &via_sends_only)) {
DEBUG_TRACE (DEBUG::Solo, string_compose ("\tthere is a feed from %1\n", (*i)->name()));
if (!via_sends_only) {
@@ -3623,7 +3623,7 @@ Session::route_solo_changed (bool self_solo_change, void* /*src*/, boost::weak_p
} else {
DEBUG_TRACE (DEBUG::Solo, string_compose ("\tno feed from %1\n", (*i)->name()));
}
-
+
DEBUG_TRACE (DEBUG::Solo, string_compose ("check feed to %1\n", (*i)->name()));
if (route->feeds (*i, &via_sends_only)) {
@@ -3747,7 +3747,7 @@ Session::io_name_is_legal (const std::string& name)
return false;
}
}
-
+
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
if ((*i)->name() == name) {
return false;
@@ -3782,19 +3782,19 @@ Session::set_exclusive_input_active (boost::shared_ptr<RouteList> rl, bool onoff
for (RouteList::iterator rt = rl->begin(); rt != rl->end(); ++rt) {
PortSet& ps ((*rt)->input()->ports());
-
+
for (PortSet::iterator p = ps.begin(); p != ps.end(); ++p) {
p->get_connections (connections);
}
-
+
for (vector<string>::iterator s = connections.begin(); s != connections.end(); ++s) {
routes_using_input_from (*s, rl2);
}
-
+
/* scan all relevant routes to see if others are on or off */
-
+
bool others_are_already_on = false;
-
+
for (RouteList::iterator r = rl2.begin(); r != rl2.end(); ++r) {
boost::shared_ptr<MidiTrack> mt = boost::dynamic_pointer_cast<MidiTrack> (*r);
@@ -3812,11 +3812,11 @@ Session::set_exclusive_input_active (boost::shared_ptr<RouteList> rl, bool onoff
mt->set_input_active (onoff);
}
}
-
+
if (flip_others) {
/* globally reverse other routes */
-
+
for (RouteList::iterator r = rl2.begin(); r != rl2.end(); ++r) {
if ((*r) != (*rt)) {
boost::shared_ptr<MidiTrack> mt = boost::dynamic_pointer_cast<MidiTrack> (*r);
@@ -4136,13 +4136,13 @@ Session::add_source (boost::shared_ptr<Source> source)
/* yay, new source */
boost::shared_ptr<FileSource> fs = boost::dynamic_pointer_cast<FileSource> (source);
-
+
if (fs) {
if (!fs->within_session()) {
ensure_search_path_includes (Glib::path_get_dirname (fs->path()), fs->type());
}
}
-
+
set_dirty();
boost::shared_ptr<AudioFileSource> afs;
@@ -4238,7 +4238,7 @@ Session::midi_source_by_path (const std::string& path) const
= boost::dynamic_pointer_cast<MidiSource>(s->second);
boost::shared_ptr<FileSource> fs
= boost::dynamic_pointer_cast<FileSource>(s->second);
-
+
if (ms && fs && fs->path() == path) {
return ms;
}
@@ -4286,9 +4286,9 @@ Session::construct_peak_filepath (const string& filepath, const bool in_session,
string session_path;
bool in_another_session = true;
-
+
if (filepath.find (interchange_dir_string) != string::npos) {
-
+
session_path = Glib::path_get_dirname (filepath); /* now ends in audiofiles */
session_path = Glib::path_get_dirname (session_path); /* now ends in session name */
session_path = Glib::path_get_dirname (session_path); /* now ends in interchange */
@@ -4305,7 +4305,7 @@ Session::construct_peak_filepath (const string& filepath, const bool in_session,
} else {
in_another_session = false;
}
-
+
if (in_another_session) {
SessionDirectory sd (session_path);
@@ -4326,7 +4326,7 @@ Session::construct_peak_filepath (const string& filepath, const bool in_session,
if (!in_session) {
path = Glib::path_get_dirname (filepath);
}
-
+
return peak_file_helper (_session_dir->peak_path(), path, Glib::path_get_basename (filepath), !old_peak_name);
}
@@ -4360,7 +4360,7 @@ Session::new_audio_source_path_for_embedded (const std::string& path)
SessionDirectory sdir (get_best_session_directory_for_new_audio());
string base = Glib::path_get_basename (path);
string newpath = Glib::build_filename (sdir.sound_path(), base);
-
+
if (Glib::file_test (newpath, Glib::FILE_TEST_EXISTS)) {
MD5 md5;
@@ -4368,14 +4368,14 @@ Session::new_audio_source_path_for_embedded (const std::string& path)
md5.digestString (path.c_str());
md5.writeToString ();
base = md5.digestChars;
-
+
string ext = get_suffix (path);
if (!ext.empty()) {
base += '.';
base += ext;
}
-
+
newpath = Glib::build_filename (sdir.sound_path(), base);
/* if this collides, we're screwed */
@@ -4409,7 +4409,7 @@ Session::audio_source_name_is_unique (const string& name)
uint32_t existing = 0;
for (vector<string>::const_iterator i = sdirs.begin(); i != sdirs.end(); ++i) {
-
+
/* note that we search *without* the extension so that
we don't end up both "Audio 1-1.wav" and "Audio 1-1.caf"
in the event that this new name is required for
@@ -4417,12 +4417,12 @@ Session::audio_source_name_is_unique (const string& name)
*/
const string spath = *i;
-
+
if (matching_unsuffixed_filename_exists_in (spath, name)) {
existing++;
break;
}
-
+
/* it is possible that we have the path already
* assigned to a source that has not yet been written
* (ie. the write source for a diskstream). we have to
@@ -4431,8 +4431,8 @@ Session::audio_source_name_is_unique (const string& name)
* two Sources point to the same file with different
* notions of their removability.
*/
-
-
+
+
string possible_path = Glib::build_filename (spath, name);
if (audio_source_by_path_and_channel (possible_path, 0)) {
@@ -4449,20 +4449,20 @@ Session::format_audio_source_name (const string& legalized_base, uint32_t nchan,
{
ostringstream sstr;
const string ext = native_header_format_extension (config.get_native_file_header_format(), DataType::AUDIO);
-
+
if (Profile->get_trx() && destructive) {
sstr << 'T';
sstr << setfill ('0') << setw (4) << cnt;
sstr << legalized_base;
} else {
sstr << legalized_base;
-
+
if (take_required || related_exists) {
sstr << '-';
sstr << cnt;
}
}
-
+
if (nchan == 2) {
if (chan == 0) {
sstr << "%L";
@@ -4479,7 +4479,7 @@ Session::format_audio_source_name (const string& legalized_base, uint32_t nchan,
sstr << chan+1;
}
}
-
+
sstr << ext;
return sstr.str();
@@ -4502,11 +4502,11 @@ Session::new_audio_source_path (const string& base, uint32_t nchan, uint32_t cha
for (cnt = (destructive ? ++destructive_index : 1); cnt <= limit; ++cnt) {
possible_name = format_audio_source_name (legalized, nchan, chan, destructive, take_required, cnt, some_related_source_name_exists);
-
+
if (audio_source_name_is_unique (possible_name)) {
break;
}
-
+
some_related_source_name_exists = true;
if (cnt > limit) {
@@ -4561,14 +4561,14 @@ Session::new_midi_source_path (const string& base)
vector<space_and_path>::iterator i;
uint32_t existing = 0;
-
+
for (vector<string>::const_iterator i = sdirs.begin(); i != sdirs.end(); ++i) {
snprintf (buf, sizeof(buf), "%s-%u.mid", legalized.c_str(), cnt);
possible_name = buf;
possible_path = Glib::build_filename (*i, possible_name);
-
+
if (Glib::file_test (possible_path, Glib::FILE_TEST_EXISTS)) {
existing++;
}
@@ -4618,7 +4618,7 @@ boost::shared_ptr<MidiSource>
Session::create_midi_source_for_session (string const & basic_name)
{
const string path = new_midi_source_path (basic_name);
-
+
if (!path.empty()) {
return boost::dynamic_pointer_cast<SMFSource> (
SourceFactory::createWritable (
@@ -4634,23 +4634,23 @@ Session::create_midi_source_by_stealing_name (boost::shared_ptr<Track> track)
{
/* the caller passes in the track the source will be used in,
so that we can keep the numbering sane.
-
+
Rationale: a track with the name "Foo" that has had N
captures carried out so far will ALREADY have a write source
named "Foo-N+1.mid" waiting to be used for the next capture.
-
+
If we call new_midi_source_name() we will get "Foo-N+2". But
there is no region corresponding to "Foo-N+1", so when
"Foo-N+2" appears in the track, the gap presents the user
with odd behaviour - why did it skip past Foo-N+1?
-
+
We could explain this to the user in some odd way, but
instead we rename "Foo-N+1.mid" as "Foo-N+2.mid", and then
use "Foo-N+1" here.
-
+
If that attempted rename fails, we get "Foo-N+2.mid" anyway.
*/
-
+
boost::shared_ptr<MidiTrack> mt = boost::dynamic_pointer_cast<MidiTrack> (track);
assert (mt);
std::string name = track->steal_write_source_name ();
@@ -4816,7 +4816,7 @@ Session::available_capture_duration ()
if (_total_free_4k_blocks_uncertain) {
return boost::optional<framecnt_t> ();
}
-
+
float sample_bytes_on_disk = 4.0; // keep gcc happy
switch (config.get_native_file_data_format()) {
@@ -5228,7 +5228,7 @@ Session::write_one_track (Track& track, framepos_t start, framepos_t end,
string path = ((track.data_type() == DataType::AUDIO)
? new_audio_source_path (legal_playlist_name, diskstream_channels.n_audio(), chan_n, false, true)
: new_midi_source_path (legal_playlist_name));
-
+
if (path.empty()) {
goto out;
}
@@ -5535,7 +5535,7 @@ Session::update_route_record_state ()
if (record_status() == Recording && record_arm_state_changed ) {
RecordArmStateChanged ();
}
-
+
}
void
@@ -6049,7 +6049,7 @@ Session::update_latency_compensation (bool force_whole_graph)
(some_track_latency_changed ? "yes" : "no")));
DEBUG_TRACE(DEBUG::Latency, "---------------------------- DONE update latency compensation\n\n");
-
+
if (some_track_latency_changed || force_whole_graph) {
_engine.update_latencies ();
}
@@ -6122,7 +6122,7 @@ Session::notify_remote_id_change ()
*/
reconnect_existing_routes(true, true);
#endif
-
+
}
void
@@ -6233,5 +6233,5 @@ Session::clear_object_selection ()
_object_selection = Evoral::Range<framepos_t> (-1,-1);
#ifdef USE_TRACKS_CODE_FEATURES
follow_playhead_priority ();
-#endif
+#endif
}
diff --git a/libs/ardour/session_click.cc b/libs/ardour/session_click.cc
index e6e8749aec..62e13e8fc2 100644
--- a/libs/ardour/session_click.cc
+++ b/libs/ardour/session_click.cc
@@ -119,9 +119,9 @@ Session::click (framepos_t start, framecnt_t nframes)
}
copy = min (clk->duration - clk->offset, nframes - internal_offset);
-
+
memcpy (buf + internal_offset, &clk->data[clk->offset], copy * sizeof (Sample));
-
+
clk->offset += copy;
if (clk->offset >= clk->duration) {
diff --git a/libs/ardour/session_events.cc b/libs/ardour/session_events.cc
index baea980a65..9d11cb0b91 100644
--- a/libs/ardour/session_events.cc
+++ b/libs/ardour/session_events.cc
@@ -79,7 +79,7 @@ SessionEvent::operator new (size_t)
SessionEvent* ev = static_cast<SessionEvent*> (p->alloc ());
DEBUG_TRACE (DEBUG::SessionEvents, string_compose ("%1 Allocating SessionEvent from %2 ev @ %3 pool size %4 free %5 used %6\n", pthread_name(), p->name(), ev,
p->total(), p->available(), p->used()));
-
+
ev->own_pool = p;
return ev;
}
diff --git a/libs/ardour/session_export.cc b/libs/ardour/session_export.cc
index ecfcb98b5c..ea4a07dd1f 100644
--- a/libs/ardour/session_export.cc
+++ b/libs/ardour/session_export.cc
@@ -89,7 +89,7 @@ Session::pre_export ()
_exporting = true;
export_status->running = true;
export_status->Finished.connect_same_thread (*this, boost::bind (&Session::finalize_audio_export, this));
-
+
/* disable MMC output early */
_pre_export_mmc_enabled = _mmc->send_enabled ();
@@ -111,7 +111,7 @@ Session::start_audio_export (framepos_t position)
up otherwise it could be doing do_refill in its thread while we are doing
it here.
*/
-
+
_butler->wait_until_finished ();
/* get everyone to the right position */
@@ -198,7 +198,7 @@ Session::process_export_fw (pframes_t nframes)
post_transport ();
return 0;
}
-
+
_engine.main_thread()->get_buffers ();
process_export (nframes);
_engine.main_thread()->drop_buffers ();
@@ -235,7 +235,7 @@ Session::finalize_audio_export ()
_engine.freewheel (false);
export_freewheel_connection.disconnect();
-
+
_mmc->enable_send (_pre_export_mmc_enabled);
/* maybe write CUE/TOC */
diff --git a/libs/ardour/session_metadata.cc b/libs/ardour/session_metadata.cc
index 017f8b95e5..0620f12005 100644
--- a/libs/ardour/session_metadata.cc
+++ b/libs/ardour/session_metadata.cc
@@ -86,7 +86,7 @@ SessionMetadata::SessionMetadata ()
//map.insert (Property ("album_artist_sort", ""));
//map.insert (Property ("artist_sort", ""));
//map.insert (Property ("title_sort", ""));
-
+
/*** Globals ***/
user_map.insert (Property ("user_name", ""));
user_map.insert (Property ("user_email", ""));
diff --git a/libs/ardour/session_midi.cc b/libs/ardour/session_midi.cc
index df2152192c..f1faf5e8e1 100644
--- a/libs/ardour/session_midi.cc
+++ b/libs/ardour/session_midi.cc
@@ -136,7 +136,7 @@ Session::mmc_record_strobe (MIDI::MachineControl &/*mmc*/)
treat RecordStrobe like RecordPause. This violates the MMC
specification.
*/
-
+
if (Config->get_mmc_control()) {
maybe_enable_record();
}
@@ -438,7 +438,7 @@ Session::send_full_time_code (framepos_t const t, MIDI::pframes_t nframes)
msg[8] = timecode.frames;
// Send message at offset 0, sent time is for the start of this cycle
-
+
MidiBuffer& mb (_midi_ports->mtc_output_port()->get_midi_buffer (nframes));
mb.push_back (Port::port_offset(), sizeof (msg), msg);
@@ -576,7 +576,7 @@ Session::send_immediate_mmc (MachineControlCommand c)
} else {
_mmc->send (c, 0);
}
-
+
}
bool
diff --git a/libs/ardour/session_playlists.cc b/libs/ardour/session_playlists.cc
index b586ab196e..8fdafad09d 100644
--- a/libs/ardour/session_playlists.cc
+++ b/libs/ardour/session_playlists.cc
@@ -465,7 +465,7 @@ SessionPlaylists::playlists_for_track (boost::shared_ptr<Track> tr) const
{
vector<boost::shared_ptr<Playlist> > pl;
get (pl);
-
+
vector<boost::shared_ptr<Playlist> > pl_tr;
for (vector<boost::shared_ptr<Playlist> >::iterator i = pl.begin(); i != pl.end(); ++i) {
diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc
index f372b8694b..6f4ae531bb 100644
--- a/libs/ardour/session_process.cc
+++ b/libs/ardour/session_process.cc
@@ -130,7 +130,7 @@ int
Session::no_roll (pframes_t nframes)
{
PT_TIMING_CHECK (4);
-
+
framepos_t end_frame = _transport_frame + nframes; // FIXME: varispeed + no_roll ??
int ret = 0;
int declick = (config.get_use_transport_fades() ? get_transport_declick_required() : false);
@@ -179,7 +179,7 @@ Session::process_routes (pframes_t nframes, bool& need_butler)
const framepos_t start_frame = _transport_frame;
const framepos_t end_frame = _transport_frame + floor (nframes * _transport_speed);
-
+
if (_process_graph) {
DEBUG_TRACE(DEBUG::ProcessThreads,"calling graph/process-routes\n");
if (_process_graph->process_routes (nframes, start_frame, end_frame, declick, need_butler) < 0) {
@@ -284,7 +284,7 @@ void
Session::process_with_events (pframes_t nframes)
{
PT_TIMING_CHECK (3);
-
+
SessionEvent* ev;
pframes_t this_nframes;
framepos_t end_frame;
@@ -1221,7 +1221,7 @@ Session::compute_stop_limit () const
return max_framepos;
}
-
+
bool const punching_in = (config.get_punch_in () && _locations->auto_punch_location());
bool const punching_out = (config.get_punch_out () && _locations->auto_punch_location());
diff --git a/libs/ardour/session_rtevents.cc b/libs/ardour/session_rtevents.cc
index db334932f1..745212abb4 100644
--- a/libs/ardour/session_rtevents.cc
+++ b/libs/ardour/session_rtevents.cc
@@ -248,14 +248,14 @@ Session::rt_set_record_safe (boost::shared_ptr<RouteList> rl, bool yn, bool grou
if ((*i)->is_auditioner ()) { // REQUIRES REVIEW Can audiotioner be in Record Safe mode?
continue;
}
-
+
boost::shared_ptr<Track> t;
-
+
if ((t = boost::dynamic_pointer_cast<Track>(*i)) != 0) {
t->set_record_safe (yn, (group_override ? (void*) t->route_group () : (void *) this));
}
}
-
+
set_dirty ();
}
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index 0c5e3cbff5..e2d64dd2ed 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -257,11 +257,11 @@ Session::realtime_stop (bool abort, bool clear_state)
for (RouteList::iterator i = r->begin (); i != r->end(); ++i) {
(*i)->realtime_handle_transport_stopped ();
}
-
+
DEBUG_TRACE (DEBUG::Transport, string_compose ("stop complete, auto-return scheduled for return to %1\n", _requested_return_frame));
/* the duration change is not guaranteed to have happened, but is likely */
-
+
todo = PostTransportWork (todo | PostTransportDuration);
if (abort) {
@@ -286,7 +286,7 @@ Session::realtime_stop (bool abort, bool clear_state)
if (clear_state && !Config->get_loop_is_mode()) {
unset_play_loop ();
}
-
+
reset_slave_state ();
_transport_speed = 0;
@@ -321,7 +321,7 @@ Session::butler_transport_work ()
PostTransportWork ptw;
boost::shared_ptr<RouteList> r = routes.reader ();
uint64_t before;
-
+
int on_entry = g_atomic_int_get (&_butler->should_do_transport_work);
finished = true;
ptw = post_transport_work();
@@ -334,7 +334,7 @@ Session::butler_transport_work ()
if (get_play_loop() && !Config->get_seamless_loop()) {
DEBUG_TRACE (DEBUG::Butler, "flush loop recording fragment to disk\n");
-
+
/* this locate might be happening while we are
* loop recording.
*
@@ -517,13 +517,13 @@ Session::non_realtime_locate ()
} else if (loc) {
set_track_loop (false);
}
-
+
} else {
/* no more looping .. should have been noticed elsewhere */
}
-
+
boost::shared_ptr<RouteList> rl = routes.reader();
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
(*i)->non_realtime_locate (_transport_frame);
@@ -555,7 +555,7 @@ Session::select_playhead_priority_target (framepos_t& jump_to)
// Next stop will put us where we need to be.
return false;
}
-
+
/* Note that the order of checking each AutoReturnTarget flag defines
the priority each flag.
@@ -569,7 +569,7 @@ Session::select_playhead_priority_target (framepos_t& jump_to)
Region Selection
Last Locate
*/
-
+
if (autoreturn & RangeSelectionStart) {
if (!_range_selection.empty()) {
jump_to = _range_selection.from;
@@ -583,13 +583,13 @@ Session::select_playhead_priority_target (framepos_t& jump_to)
}
}
}
-
+
if (jump_to < 0 && (autoreturn & Loop) && get_play_loop()) {
/* don't try to handle loop play when synced to JACK */
-
+
if (!synced_to_engine()) {
Location *location = _locations->auto_loop_location();
-
+
if (location) {
jump_to = location->start();
@@ -600,7 +600,7 @@ Session::select_playhead_priority_target (framepos_t& jump_to)
}
}
}
-
+
if (jump_to < 0 && (autoreturn & RegionSelectionStart)) {
if (!_object_selection.empty()) {
jump_to = _object_selection.from;
@@ -610,7 +610,7 @@ Session::select_playhead_priority_target (framepos_t& jump_to)
if (jump_to < 0 && (autoreturn & LastLocate)) {
jump_to = _last_roll_location;
}
-
+
return jump_to >= 0;
}
#else
@@ -804,14 +804,14 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
if (_engine.connected() && !_engine.freewheeling()) {
// need to queue this in the next RT cycle
_send_timecode_update = true;
-
+
if (!dynamic_cast<MTC_Slave*>(_slave)) {
send_immediate_mmc (MIDI::MachineControlCommand (MIDI::MachineControl::cmdStop));
/* This (::non_realtime_stop()) gets called by main
process thread, which will lead to confusion
when calling AsyncMIDIPort::write().
-
+
Something must be done. XXX
*/
send_mmc_locate (_transport_frame);
@@ -904,8 +904,8 @@ Session::unset_play_loop ()
clear_events (SessionEvent::AutoLoop);
clear_events (SessionEvent::AutoLoopDeclick);
set_track_loop (false);
-
-
+
+
if (Config->get_seamless_loop()) {
/* likely need to flush track buffers: this will locate us to wherever we are */
add_post_transport_work (PostTransportLocate);
@@ -957,7 +957,7 @@ Session::set_play_loop (bool yn, double speed)
play_loop = true;
have_looped = false;
-
+
if (loc) {
unset_play_range ();
@@ -1094,7 +1094,7 @@ void
Session::locate (framepos_t target_frame, bool with_roll, bool with_flush, bool for_loop_enabled, bool force, bool with_mmc)
{
bool need_butler = false;
-
+
/* Locates for seamless looping are fairly different from other
* locates. They assume that the diskstream buffers for each track
* already have the correct data in them, and thus there is no need to
@@ -1105,7 +1105,7 @@ Session::locate (framepos_t target_frame, bool with_roll, bool with_flush, bool
DEBUG_TRACE (DEBUG::Transport, string_compose ("rt-locate to %1, roll %2 flush %3 loop-enabled %4 force %5 mmc %6\n",
target_frame, with_roll, with_flush, for_loop_enabled, force, with_mmc));
-
+
if (!force && _transport_frame == target_frame && !loop_changing && !for_loop_enabled) {
/* already at the desired position. Not forced to locate,
@@ -1155,7 +1155,7 @@ Session::locate (framepos_t target_frame, bool with_roll, bool with_flush, bool
*/
bool transport_was_stopped = !transport_rolling();
-
+
if (!transport_was_stopped && (!auto_play_legal || !config.get_auto_play()) && !with_roll && !(synced_to_engine() && play_loop) &&
(!Profile->get_trx() || !(config.get_external_sync() && !synced_to_engine()))) {
realtime_stop (false, true); // XXX paul - check if the 2nd arg is really correct
@@ -1175,7 +1175,7 @@ Session::locate (framepos_t target_frame, bool with_roll, bool with_flush, bool
add_post_transport_work (todo);
need_butler = true;
-
+
} else {
/* this is functionally what clear_clicks() does but with a tentative lock */
@@ -1215,7 +1215,7 @@ Session::locate (framepos_t target_frame, bool with_roll, bool with_flush, bool
// located outside the loop: cancel looping directly, this is called from event handling context
have_looped = false;
-
+
if (!Config->get_loop_is_mode()) {
set_play_loop (false, _transport_speed);
} else {
@@ -1246,10 +1246,10 @@ Session::locate (framepos_t target_frame, bool with_roll, bool with_flush, bool
}
boost::shared_ptr<RouteList> rl = routes.reader();
-
+
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
-
+
if (tr && tr->record_enabled ()) {
// tell it we've looped, so it can deal with the record state
tr->transport_looped (_transport_frame);
@@ -1321,7 +1321,7 @@ Session::set_transport_speed (double speed, framepos_t destination_frame, bool a
if (Config->get_monitoring_model() == HardwareMonitoring) {
set_track_monitor_input_status (true);
}
-
+
if (synced_to_engine ()) {
if (clear_state) {
/* do this here because our response to the slave won't
@@ -1348,7 +1348,7 @@ Session::set_transport_speed (double speed, framepos_t destination_frame, bool a
if (Config->get_loop_is_mode() && play_loop) {
Location *location = _locations->auto_loop_location();
-
+
if (location != 0) {
if (_transport_frame != location->start()) {
@@ -1468,7 +1468,7 @@ Session::stop_transport (bool abort, bool clear_state)
}
DEBUG_TRACE (DEBUG::Transport, string_compose ("stop_transport, declick required? %1\n", get_transport_declick_required()));
-
+
if (!get_transport_declick_required()) {
/* stop has not yet been scheduled */
@@ -1484,10 +1484,10 @@ Session::stop_transport (bool abort, bool clear_state)
}
SubState new_bits;
-
+
if (actively_recording() && /* we are recording */
worst_input_latency() > current_block_size) { /* input latency exceeds block size, so simple 1 cycle delay before stop is not enough */
-
+
/* we need to capture the audio that is still somewhere in the pipeline between
wherever it was generated and the process callback. This means that even though
the user (or something else) has asked us to stop, we have to roll
@@ -1497,16 +1497,16 @@ Session::stop_transport (bool abort, bool clear_state)
we still need playback to "stop" now, however, which is why we schedule
a declick below.
*/
-
+
DEBUG_TRACE (DEBUG::Transport, string_compose ("stop transport requested @ %1, scheduled for + %2 = %3, abort = %4\n",
_transport_frame, _worst_input_latency,
_transport_frame + _worst_input_latency,
abort));
-
+
SessionEvent *ev = new SessionEvent (SessionEvent::StopOnce, SessionEvent::Replace,
_transport_frame + _worst_input_latency,
0, 0, abort);
-
+
merge_event (ev);
/* request a declick at the start of the next process cycle() so that playback ceases.
@@ -1515,15 +1515,15 @@ Session::stop_transport (bool abort, bool clear_state)
does not stop the transport too early.
*/
new_bits = SubState (PendingDeclickOut|StopPendingCapture);
-
+
} else {
-
+
/* Not recording, schedule a declick in the next process() cycle and then stop at its end */
-
+
new_bits = PendingDeclickOut;
DEBUG_TRACE (DEBUG::Transport, string_compose ("stop scheduled for next process cycle @ %1\n", _transport_frame));
}
-
+
/* we'll be called again after the declick */
transport_sub_state = SubState (transport_sub_state|new_bits);
pending_abort = abort;
@@ -1533,9 +1533,9 @@ Session::stop_transport (bool abort, bool clear_state)
} else {
DEBUG_TRACE (DEBUG::Transport, "time to actually stop\n");
-
+
/* declick was scheduled, but we've been called again, which means it is really time to stop
-
+
XXX: we should probably split this off into its own method and call it explicitly.
*/
@@ -1709,7 +1709,7 @@ Session::use_sync_source (Slave* new_slave)
}
DEBUG_TRACE (DEBUG::Slave, string_compose ("set new slave to %1\n", _slave));
-
+
// need to queue this for next process() cycle
_send_timecode_update = true;
diff --git a/libs/ardour/smf_source.cc b/libs/ardour/smf_source.cc
index fe78e1fbc7..33765c3d0a 100644
--- a/libs/ardour/smf_source.cc
+++ b/libs/ardour/smf_source.cc
@@ -370,7 +370,7 @@ SMFSource::write_unlocked (const Lock& lock,
break;
}
time -= position;
-
+
ev.set(buf, size, time);
ev.set_event_type(midi_parameter_type(ev.buffer()[0]));
ev.set_id(Evoral::next_event_id());
@@ -577,7 +577,7 @@ SMFSource::safe_midi_file_extension (const string& file)
static bool compile = true;
const int nmatches = 2;
regmatch_t matches[nmatches];
-
+
if (Glib::file_test (file, Glib::FILE_TEST_EXISTS)) {
if (!Glib::file_test (file, Glib::FILE_TEST_IS_REGULAR)) {
/* exists but is not a regular file */
@@ -590,7 +590,7 @@ SMFSource::safe_midi_file_extension (const string& file)
} else {
compile = false;
}
-
+
if (regexec (&compiled_pattern, file.c_str(), nmatches, matches, 0)) {
return false;
}
@@ -787,5 +787,5 @@ SMFSource::prevent_deletion ()
_flags = Flag (_flags & ~(Removable|RemovableIfEmpty|RemoveAtDestroy));
}
-
-
+
+
diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc
index 769ee0d1d5..8a8e117231 100644
--- a/libs/ardour/sndfilesource.cc
+++ b/libs/ardour/sndfilesource.cc
@@ -168,7 +168,7 @@ SndFileSource::SndFileSource (Session& s, const string& path, const string& orig
fmt = SF_FORMAT_RF64;
_flags = Flag (_flags & ~Broadcast);
break;
-
+
default:
fatal << string_compose (_("programming error: %1"), X_("unsupported audio header format requested")) << endmsg;
abort(); /*NOTREACHED*/
@@ -325,7 +325,7 @@ SndFileSource::open ()
}
}
#endif
-
+
if (!_broadcast_info) {
_broadcast_info = new BroadcastInfo;
}
@@ -353,7 +353,7 @@ SndFileSource::open ()
/* Set the broadcast flag if the BWF info is already there. We need
* this when recovering or using existing files.
*/
-
+
if (bwf_info_exists) {
_flags = Flag (_flags | Broadcast);
}
@@ -380,7 +380,7 @@ SndFileSource::open ()
}
}
}
-
+
return 0;
}
@@ -401,7 +401,7 @@ framecnt_t
SndFileSource::read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) const
{
assert (cnt >= 0);
-
+
framecnt_t nread;
float *ptr;
framecnt_t real_cnt;
diff --git a/libs/ardour/soundcloud_upload.cc b/libs/ardour/soundcloud_upload.cc
index c7bd4605df..8c090be03d 100644
--- a/libs/ardour/soundcloud_upload.cc
+++ b/libs/ardour/soundcloud_upload.cc
@@ -344,7 +344,7 @@ SoundcloudUploader::setcUrlOptions()
curl_easy_setopt(curl_handle, CURLOPT_ERRORBUFFER, errorBuffer);
// Allow redirection
curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, 1);
-
+
// Allow connections to time out (without using signals)
curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1);
curl_easy_setopt(curl_handle, CURLOPT_CONNECTTIMEOUT, 30);
diff --git a/libs/ardour/source.cc b/libs/ardour/source.cc
index ef0538b4d7..b9ea6ee78a 100644
--- a/libs/ardour/source.cc
+++ b/libs/ardour/source.cc
@@ -149,7 +149,7 @@ Source::set_state (const XMLNode& node, int version)
error << string_compose (_("%1: this session uses destructive tracks, which are not supported"), PROGRAM_NAME) << endmsg;
return -1;
}
-
+
if (version < 3000) {
/* a source with an XML node must necessarily already exist,
and therefore cannot be removable/writable etc. etc.; 2.X
diff --git a/libs/ardour/source_factory.cc b/libs/ardour/source_factory.cc
index 6640a2493e..76975354cb 100644
--- a/libs/ardour/source_factory.cc
+++ b/libs/ardour/source_factory.cc
@@ -164,7 +164,7 @@ SourceFactory::create (Session& s, const XMLNode& node, bool defer_peaks)
try {
boost::shared_ptr<AudioPlaylistSource> ap (new AudioPlaylistSource (s, node));
-
+
if (setup_peakfile (ap, true)) {
return boost::shared_ptr<Source>();
}
@@ -239,7 +239,7 @@ SourceFactory::createExternal (DataType type, Session& s, const string& path,
int chn, Source::Flag flags, bool announce, bool defer_peaks)
{
if (type == DataType::AUDIO) {
-
+
if (!(flags & Destructive)) {
try {
diff --git a/libs/ardour/sse_functions_avx.cc b/libs/ardour/sse_functions_avx.cc
index 218f3f5e91..19bca8041c 100644
--- a/libs/ardour/sse_functions_avx.cc
+++ b/libs/ardour/sse_functions_avx.cc
@@ -34,7 +34,7 @@ x86_sse_avx_find_peaks(const float* buf, uint32_t nframes, float *min, float *ma
// Work input until "buf" reaches 16 byte alignment
while ( ((intptr_t)buf) % 32 != 0 && nframes > 0) {
-
+
// Load the next float into the work buffer
work = _mm256_set1_ps(*buf);
diff --git a/libs/ardour/template_utils.cc b/libs/ardour/template_utils.cc
index 70fffba680..7797440f0e 100644
--- a/libs/ardour/template_utils.cc
+++ b/libs/ardour/template_utils.cc
@@ -57,7 +57,7 @@ template_filter (const string &str, void* /*arg*/)
if (!Glib::file_test (str, Glib::FILE_TEST_IS_DIR)) {
return false;
}
-
+
return true;
}
@@ -67,7 +67,7 @@ route_template_filter (const string &str, void* /*arg*/)
if (str.find (template_suffix) == str.length() - strlen (template_suffix)) {
return true;
}
-
+
return false;
}
diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc
index df7c1ac2e3..b3207e15a5 100644
--- a/libs/ardour/tempo.cc
+++ b/libs/ardour/tempo.cc
@@ -173,14 +173,14 @@ TempoSection::update_bbt_time_from_bar_offset (const Meter& meter)
}
new_start.bars = start().bars;
-
+
double ticks = BBT_Time::ticks_per_beat * meter.divisions_per_bar() * _bar_offset;
new_start.beats = (uint32_t) floor (ticks/BBT_Time::ticks_per_beat);
new_start.ticks = 0; /* (uint32_t) fmod (ticks, BBT_Time::ticks_per_beat); */
/* remember the 1-based counting properties of beats */
new_start.beats += 1;
-
+
DEBUG_TRACE (DEBUG::TempoMath, string_compose ("from bar offset %1 and dpb %2, ticks = %3->%4 beats = %5\n",
_bar_offset, meter.divisions_per_bar(), ticks, new_start.ticks, new_start.beats));
@@ -336,8 +336,8 @@ TempoMap::remove_tempo_locked (const TempoSection& tempo)
}
return false;
-}
-
+}
+
void
TempoMap::remove_meter (const MeterSection& tempo, bool complete_operation)
{
@@ -361,7 +361,7 @@ bool
TempoMap::remove_meter_locked (const MeterSection& tempo)
{
Metrics::iterator i;
-
+
for (i = metrics.begin(); i != metrics.end(); ++i) {
if (dynamic_cast<MeterSection*> (*i) != 0) {
if (tempo.frame() == (*i)->frame()) {
@@ -392,21 +392,21 @@ TempoMap::do_insert (MetricSection* section)
/* we need to (potentially) update the BBT times of tempo
sections based on this new meter.
*/
-
+
if ((section->start().beats != 1) || (section->start().ticks != 0)) {
-
+
BBT_Time corrected = section->start();
corrected.beats = 1;
corrected.ticks = 0;
-
+
warning << string_compose (_("Meter changes can only be positioned on the first beat of a bar. Moving from %1 to %2"),
section->start(), corrected) << endmsg;
-
+
section->set_start (corrected);
}
}
-
+
/* Look for any existing MetricSection that is of the same type and
in the same bar as the new one, and remove it before adding
@@ -428,12 +428,12 @@ TempoMap::do_insert (MetricSection* section)
(*i)->start().beats == section->start().beats) {
if (!(*i)->movable()) {
-
+
/* can't (re)move this section, so overwrite
* its data content (but not its properties as
* a section).
*/
-
+
*(dynamic_cast<Tempo*>(*i)) = *(dynamic_cast<Tempo*>(section));
need_add = false;
} else {
@@ -449,17 +449,17 @@ TempoMap::do_insert (MetricSection* section)
if ((*i)->start().bars == section->start().bars) {
if (!(*i)->movable()) {
-
+
/* can't (re)move this section, so overwrite
* its data content (but not its properties as
* a section
*/
-
+
*(dynamic_cast<Meter*>(*i)) = *(dynamic_cast<Meter*>(section));
need_add = false;
} else {
metrics.erase (i);
-
+
}
break;
@@ -482,7 +482,7 @@ TempoMap::do_insert (MetricSection* section)
break;
}
}
-
+
metrics.insert (i, section);
}
}
@@ -493,7 +493,7 @@ TempoMap::replace_tempo (const TempoSection& ts, const Tempo& tempo, const BBT_T
{
Glib::Threads::RWLock::WriterLock lm (lock);
TempoSection& first (first_tempo());
-
+
if (ts.start() != first.start()) {
remove_tempo_locked (ts);
add_tempo_locked (tempo, where, true);
@@ -526,45 +526,45 @@ TempoMap::add_tempo_locked (const Tempo& tempo, BBT_Time where, bool recompute)
{
/* new tempos always start on a beat */
where.ticks = 0;
-
+
TempoSection* ts = new TempoSection (where, tempo.beats_per_minute(), tempo.note_type());
-
+
/* find the meter to use to set the bar offset of this
* tempo section.
*/
-
+
const Meter* meter = &first_meter();
-
+
/* as we start, we are *guaranteed* to have m.meter and m.tempo pointing
at something, because we insert the default tempo and meter during
TempoMap construction.
-
+
now see if we can find better candidates.
*/
-
+
for (Metrics::const_iterator i = metrics.begin(); i != metrics.end(); ++i) {
-
+
const MeterSection* m;
-
+
if (where < (*i)->start()) {
break;
}
-
+
if ((m = dynamic_cast<const MeterSection*>(*i)) != 0) {
meter = m;
}
}
-
+
ts->update_bar_offset_from_bbt (*meter);
-
+
/* and insert it */
-
+
do_insert (ts);
if (recompute) {
recompute_map (false);
}
-}
+}
void
TempoMap::replace_meter (const MeterSection& ms, const Meter& meter, const BBT_Time& where)
@@ -572,7 +572,7 @@ TempoMap::replace_meter (const MeterSection& ms, const Meter& meter, const BBT_T
{
Glib::Threads::RWLock::WriterLock lm (lock);
MeterSection& first (first_meter());
-
+
if (ms.start() != first.start()) {
remove_meter_locked (ms);
add_meter_locked (meter, where, true);
@@ -594,7 +594,7 @@ TempoMap::add_meter (const Meter& meter, BBT_Time where)
add_meter_locked (meter, where, true);
}
-
+
#ifndef NDEBUG
if (DEBUG_ENABLED(DEBUG::TempoMap)) {
dump (std::cerr);
@@ -611,23 +611,23 @@ TempoMap::add_meter_locked (const Meter& meter, BBT_Time where, bool recompute)
round the start time appropriately. remember that
`where' is based on the existing tempo map, not
the result after we insert the new meter.
-
+
*/
-
+
if (where.beats != 1) {
where.beats = 1;
where.bars++;
}
-
+
/* new meters *always* start on a beat. */
where.ticks = 0;
-
+
do_insert (new MeterSection (where, meter.divisions_per_bar(), meter.note_divisor()));
if (recompute) {
recompute_map (true);
}
-
+
}
void
@@ -738,7 +738,7 @@ TempoMap::first_tempo () const
const TempoSection *t = 0;
/* CALLER MUST HOLD LOCK */
-
+
for (Metrics::const_iterator i = metrics.begin(); i != metrics.end(); ++i) {
if ((t = dynamic_cast<const TempoSection *> (*i)) != 0) {
return *t;
@@ -787,7 +787,7 @@ TempoMap::require_map_to (const BBT_Time& bbt)
*/
int additional_minutes = 1;
-
+
while (1) {
if (!_map.empty() && _map.back().bar >= (bbt.bars + 1)) {
break;
@@ -867,7 +867,7 @@ TempoMap::recompute_map (bool reassign_tempo_bbt, framepos_t end)
TempoSection* ts;
MeterSection* ms;
-
+
if ((ts = dynamic_cast<TempoSection*>(*i)) != 0) {
/* reassign the BBT time of this tempo section
@@ -915,7 +915,7 @@ TempoMap::extend_map (framepos_t end)
return;
}
- BBTPointList::const_iterator i = _map.end();
+ BBTPointList::const_iterator i = _map.end();
Metrics::iterator next_metric;
--i;
@@ -1011,12 +1011,12 @@ TempoMap::_extend_map (TempoSection* tempo, MeterSection* meter,
*/
if (tempo->start().ticks != 0) {
-
- double next_beat_frames = tempo->frames_per_beat (_frame_rate);
-
+
+ double next_beat_frames = tempo->frames_per_beat (_frame_rate);
+
DEBUG_TRACE (DEBUG::TempoMath, string_compose ("bumped into non-beat-aligned tempo metric at %1 = %2, adjust next beat using %3\n",
tempo->start(), current_frame, tempo->bar_offset()));
-
+
/* back up to previous beat */
current_frame_exact -= beat_frames;
current_frame = llrint(current_frame_exact);
@@ -1027,7 +1027,7 @@ TempoMap::_extend_map (TempoSection* tempo, MeterSection* meter,
*/
tempo->set_frame (bar_start_frame +
llrint ((ts->bar_offset() * meter->divisions_per_bar() * beat_frames)));
-
+
/* advance to the location of
* the new (adjusted) beat. do
* this by figuring out the
@@ -1048,35 +1048,35 @@ TempoMap::_extend_map (TempoSection* tempo, MeterSection* meter,
* merit a reloop ...
*/
DEBUG_TRACE (DEBUG::TempoMath, string_compose ("Adjusted last beat to %1\n", current_frame));
-
+
} else {
-
+
DEBUG_TRACE (DEBUG::TempoMath, string_compose ("bumped into beat-aligned tempo metric at %1 = %2\n",
tempo->start(), current_frame));
tempo->set_frame (current_frame);
}
} else if ((ms = dynamic_cast<MeterSection*>(*next_metric)) != 0) {
-
+
meter = ms;
/* new meter section: always defines the
* start of a bar.
*/
-
+
DEBUG_TRACE (DEBUG::TempoMath, string_compose ("bumped into meter section at %1 vs %2 (%3)\n",
meter->start(), current, current_frame));
-
+
assert (current.beats == 1);
meter->set_frame (current_frame);
}
-
+
beat_frames = meter->frames_per_grid (*tempo, _frame_rate);
-
+
DEBUG_TRACE (DEBUG::TempoMath, string_compose ("New metric with beat frames = %1 dpb %2 meter %3 tempo %4\n",
beat_frames, meter->divisions_per_bar(), *((Meter*)meter), *((Tempo*)tempo)));
-
+
++next_metric;
if (next_metric != metrics.end() && ((*next_metric)->start() == current)) {
@@ -1133,7 +1133,7 @@ TempoMap::metric_at (framepos_t frame, Metrics::const_iterator* last) const
*last = i;
}
}
-
+
return m;
}
@@ -1190,7 +1190,7 @@ TempoMap::bbt_time_rt (framepos_t frame, BBT_Time& bbt)
if (!lm.locked()) {
throw std::logic_error ("TempoMap::bbt_time_rt() could not lock tempo map");
}
-
+
if (_map.empty() || _map.back().frame < frame) {
throw std::logic_error (string_compose ("map not long enough to reach %1", frame));
}
@@ -1221,7 +1221,7 @@ TempoMap::frame_time (const BBT_Time& bbt)
warning << string_compose (_("tempo map asked for frame time at bar < 1 (%1)\n"), bbt) << endmsg;
return 0;
}
-
+
if (bbt.beats < 1) {
throw std::logic_error ("beats are counted from one");
}
@@ -1246,7 +1246,7 @@ TempoMap::bbt_duration_at (framepos_t pos, const BBT_Time& bbt, int dir)
{
BBT_Time when;
bbt_time (pos, when);
-
+
Glib::Threads::RWLock::ReaderLock lm (lock);
return bbt_duration_at_unlocked (when, bbt, dir);
}
@@ -1376,9 +1376,9 @@ TempoMap::round_to_beat_subdivision (framepos_t fr, int sub_num, RoundMode dir)
double rem;
/* compute the distance to the previous and next subdivision */
-
+
if ((rem = fmod ((double) the_beat.ticks, (double) ticks_one_subdivisions_worth)) > ticks_one_subdivisions_worth/2.0) {
-
+
/* closer to the next subdivision, so shift forward */
the_beat.ticks = lrint (the_beat.ticks + (ticks_one_subdivisions_worth - rem));
@@ -1394,7 +1394,7 @@ TempoMap::round_to_beat_subdivision (framepos_t fr, int sub_num, RoundMode dir)
}
} else if (rem > 0) {
-
+
/* closer to previous subdivision, so shift backward */
if (rem > the_beat.ticks) {
@@ -1437,7 +1437,7 @@ TempoMap::round_to_type (framepos_t frame, RoundMode dir, BBTPointType type)
DEBUG_TRACE (DEBUG::SnapBBT, string_compose ("round from %1 (%3|%4 @ %5) to %6 in direction %2\n", frame, dir, (*fi).bar, (*fi).beat, (*fi).frame,
(type == Bar ? "bar" : "beat")));
-
+
switch (type) {
case Bar:
if (dir < 0) {
@@ -1488,7 +1488,7 @@ TempoMap::round_to_type (framepos_t frame, RoundMode dir, BBTPointType type)
return (*fi).frame;
} else {
-
+
/* true rounding: find nearest bar */
BBTPointList::const_iterator prev = fi;
@@ -1514,7 +1514,7 @@ TempoMap::round_to_type (framepos_t frame, RoundMode dir, BBTPointType type)
} else {
return (*next).frame;
}
-
+
}
break;
@@ -1555,7 +1555,7 @@ TempoMap::round_to_type (framepos_t frame, RoundMode dir, BBTPointType type)
the beat before frame.
*/
++next;
-
+
if ((next == _map.end()) || (frame - (*prev).frame) < ((*next).frame - frame)) {
return (*prev).frame;
} else {
@@ -1684,7 +1684,7 @@ TempoMap::set_state (const XMLNode& node, int /*version*/)
metrics.clear();
nlist = node.children();
-
+
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
XMLNode* child = *niter;
@@ -1830,23 +1830,23 @@ TempoMap::insert_time (framepos_t where, framecnt_t amount)
const TempoSection* tempo;
MeterSection *m;
TempoSection *t;
-
+
meter = &first_meter ();
tempo = &first_tempo ();
-
+
BBT_Time start;
BBT_Time end;
-
+
// cerr << "\n###################### TIMESTAMP via AUDIO ##############\n" << endl;
-
+
bool first = true;
MetricSection* prev = 0;
-
+
for (i = metrics.begin(); i != metrics.end(); ++i) {
-
+
BBT_Time bbt;
TempoMetric metric (*meter, *tempo);
-
+
if (prev) {
metric.set_start (prev->start());
metric.set_frame (prev->frame());
@@ -1854,34 +1854,34 @@ TempoMap::insert_time (framepos_t where, framecnt_t amount)
// metric will be at frames=0 bbt=1|1|0 by default
// which is correct for our purpose
}
-
+
BBTPointList::const_iterator bi = bbt_before_or_at ((*i)->frame());
bbt_time ((*i)->frame(), bbt, bi);
-
+
// cerr << "timestamp @ " << (*i)->frame() << " with " << bbt.bars << "|" << bbt.beats << "|" << bbt.ticks << " => ";
-
+
if (first) {
first = false;
} else {
-
+
if (bbt.ticks > BBT_Time::ticks_per_beat/2) {
/* round up to next beat */
bbt.beats += 1;
}
-
+
bbt.ticks = 0;
-
+
if (bbt.beats != 1) {
/* round up to next bar */
bbt.bars += 1;
bbt.beats = 1;
}
}
-
+
// cerr << bbt << endl;
-
+
(*i)->set_start (bbt);
-
+
if ((t = dynamic_cast<TempoSection*>(*i)) != 0) {
tempo = t;
// cerr << "NEW TEMPO, frame = " << (*i)->frame() << " start = " << (*i)->start() <<endl;
@@ -1892,10 +1892,10 @@ TempoMap::insert_time (framepos_t where, framecnt_t amount)
fatal << _("programming error: unhandled MetricSection type") << endmsg;
abort(); /*NOTREACHED*/
}
-
+
prev = (*i);
}
-
+
recompute_map (true);
}
@@ -1908,7 +1908,7 @@ TempoMap::remove_time (framepos_t where, framecnt_t amount)
bool moved = false;
std::list<MetricSection*> metric_kill_list;
-
+
TempoSection* last_tempo = NULL;
MeterSection* last_meter = NULL;
bool tempo_after = false; // is there a tempo marker at the first sample after the removed range?
@@ -1958,7 +1958,7 @@ TempoMap::remove_time (framepos_t where, framecnt_t amount)
if (moved) {
recompute_map (true);
}
- }
+ }
PropertyChanged (PropertyChange ());
return moved;
}
@@ -1991,11 +1991,11 @@ TempoMap::framepos_plus_beats (framepos_t pos, Evoral::Beats beats) const
if (pos < 0 && f == 0) {
f = pos;
}
-
+
if (f > pos) {
break;
}
-
+
tempo = t;
}
}
@@ -2046,7 +2046,7 @@ TempoMap::framepos_plus_beats (framepos_t pos, Evoral::Beats beats) const
while (next_tempo != metrics.end ()) {
++next_tempo;
-
+
if (next_tempo != metrics.end() && dynamic_cast<const TempoSection*>(*next_tempo)) {
break;
}
@@ -2091,7 +2091,7 @@ TempoMap::framepos_minus_beats (framepos_t pos, Evoral::Beats beats) const
keep going to get the previous tempo (or
metrics.rend())
*/
-
+
if (f <= pos) {
if (tempo == 0) {
/* first tempo with position at or
@@ -2121,7 +2121,7 @@ TempoMap::framepos_minus_beats (framepos_t pos, Evoral::Beats beats) const
*/
while (!!beats) {
-
+
/* Distance to the start of this section in frames */
framecnt_t distance_frames = (pos - tempo->frame());
@@ -2236,7 +2236,7 @@ TempoMap::framepos_plus_bbt (framepos_t pos, BBT_Time op) const
* traversed before we change the
* frames_per_beat value.
*/
-
+
pos += llrint (frames_per_beat * (bars * meter->divisions_per_bar()));
bars = 0;
@@ -2343,7 +2343,7 @@ TempoMap::framewalk_to_beats (framepos_t pos, framecnt_t distance) const
DEBUG_TRACE (DEBUG::TempoMath,
string_compose ("frame %1 walk by %2 frames, start with tempo = %3 @ %4\n",
pos, distance, *((const Tempo*)tempo), tempo->frame()));
-
+
Evoral::Beats beats = Evoral::Beats();
while (distance) {
@@ -2391,7 +2391,7 @@ TempoMap::framewalk_to_beats (framepos_t pos, framecnt_t distance) const
while (next_tempo != metrics.end ()) {
++next_tempo;
-
+
if (next_tempo != metrics.end() && dynamic_cast<const TempoSection*>(*next_tempo)) {
break;
}
diff --git a/libs/ardour/test/audio_region_read_test.cc b/libs/ardour/test/audio_region_read_test.cc
index 6a8e3600f1..c7ae50afd5 100644
--- a/libs/ardour/test/audio_region_read_test.cc
+++ b/libs/ardour/test/audio_region_read_test.cc
@@ -31,7 +31,7 @@ void
AudioRegionReadTest::readTest ()
{
int const N = 1024;
-
+
Sample buf[N];
Sample mbuf[N];
float gbuf[N];
@@ -70,7 +70,7 @@ AudioRegionReadTest::readTest ()
for (int i = 64; i < P; ++i) {
CPPUNIT_ASSERT_EQUAL (i, int (buf[i]));
}
-
+
/* Offset read: 256 frames from 128 frames into the region, with fades
(though the fade should not affect it, as it is finished before the read starts)
*/
@@ -78,7 +78,7 @@ AudioRegionReadTest::readTest ()
for (int i = 0; i < N; ++i) {
buf[i] = 0;
}
-
+
_ar[0]->read_at (buf, mbuf, gbuf, P + 128, 256, 0);
check_staircase (buf, 128, 256);
}
diff --git a/libs/ardour/test/audio_region_test.cc b/libs/ardour/test/audio_region_test.cc
index deb0d2e46a..aae25e2f5d 100644
--- a/libs/ardour/test/audio_region_test.cc
+++ b/libs/ardour/test/audio_region_test.cc
@@ -49,14 +49,14 @@ AudioRegionTest::setUp ()
assert (s);
int const signal_length = 4096;
-
+
Sample staircase[signal_length];
for (int i = 0; i < signal_length; ++i) {
staircase[i] = i;
}
s->write (staircase, signal_length);
-
+
PropertyList plist;
plist.add (Properties::start, 0);
plist.add (Properties::length, 100);
@@ -81,4 +81,4 @@ AudioRegionTest::tearDown ()
TestNeedingSession::tearDown ();
}
-
+
diff --git a/libs/ardour/test/automation_list_property_test.cc b/libs/ardour/test/automation_list_property_test.cc
index 7206ee8220..e17ad4f151 100644
--- a/libs/ardour/test/automation_list_property_test.cc
+++ b/libs/ardour/test/automation_list_property_test.cc
@@ -58,7 +58,7 @@ AutomationListPropertyTest::basicTest ()
/* No change since we just cleared them */
CPPUNIT_ASSERT_EQUAL (false, property.changed());
-
+
property->add (1, 2, false, false);
property->add (3, 4, false, false);
diff --git a/libs/ardour/test/bbt_test.cc b/libs/ardour/test/bbt_test.cc
index 86dd389409..416d02ba14 100644
--- a/libs/ardour/test/bbt_test.cc
+++ b/libs/ardour/test/bbt_test.cc
@@ -17,7 +17,7 @@ BBTTest::addTest ()
Meter meter(4.0, 4.0);
map.add_meter (meter, BBT_Time(1, 1, 0));
-
+
/* add some good stuff here */
}
diff --git a/libs/ardour/test/combine_regions_test.cc b/libs/ardour/test/combine_regions_test.cc
index 0202fe8873..5eee1d47d0 100644
--- a/libs/ardour/test/combine_regions_test.cc
+++ b/libs/ardour/test/combine_regions_test.cc
@@ -55,12 +55,12 @@ CombineRegionsTest::check_crossfade1 ()
_ar[1]->fade_in()->curve().get_vector (0, 128, fade_in, 128);
_ar[1]->inverse_fade_in()->curve().get_vector (0, 128, fade_out, 128);
-
+
/* Crossfading _r[0] to _r[1] using _r[1]'s fade in and inverse fade in.
_r[0] also has a standard region fade out to add to the fun.
*/
for (int i = 128; i < 256; ++i) {
-
+
float region_fade_out = 1;
if (i >= 192) {
/* Ardour fades out from 1 to VERY_SMALL_SIGNAL, which is 0.0000001,
@@ -74,7 +74,7 @@ CombineRegionsTest::check_crossfade1 ()
*/
float r0 = i * region_fade_out;
r0 *= fade_out[i - 128];
-
+
float const r1 = (i - 128) * fade_in[i - 128];
CPPUNIT_ASSERT_DOUBLES_EQUAL (r0 + r1, buf[i], 1e-16);
}
@@ -102,7 +102,7 @@ CombineRegionsTest::crossfadeTest1 ()
_ar[0]->set_default_fade_in ();
_ar[0]->set_default_fade_out ();
_ar[1]->set_default_fade_out ();
-
+
_playlist->add_region (_r[0], 0);
_r[0]->set_length (256);
@@ -165,7 +165,7 @@ CombineRegionsTest::check_crossfade2 ()
_ar[0]->inverse_fade_out()->curve().get_vector (0, 128, fade_in, 128);
_ar[0]->fade_out()->curve().get_vector (0, 128, fade_out, 128);
-
+
/* Crossfading _r[0] to _r[1] using _r[0]'s fade out and inverse fade out.
_r[1] also has a standard region fade in to add to the fun.
*/
@@ -179,7 +179,7 @@ CombineRegionsTest::check_crossfade2 ()
float r0 = i * fade_out[i - 128];
float r1 = (i - 128) * region_fade_in;
r1 *= fade_in[i - 128];
-
+
CPPUNIT_ASSERT_DOUBLES_EQUAL (r0 + r1, buf[i], 1e-16);
}
@@ -206,7 +206,7 @@ CombineRegionsTest::crossfadeTest2 ()
_ar[0]->set_default_fade_in ();
_ar[0]->set_default_fade_out ();
_ar[1]->set_default_fade_out ();
-
+
_playlist->add_region (_r[0], 0);
_r[0]->set_length (256);
diff --git a/libs/ardour/test/control_surfaces_test.cc b/libs/ardour/test/control_surfaces_test.cc
index 63c5e33c6f..82b9653455 100644
--- a/libs/ardour/test/control_surfaces_test.cc
+++ b/libs/ardour/test/control_surfaces_test.cc
@@ -32,7 +32,7 @@ void
ControlSurfacesTest::instantiateAndTeardownTest ()
{
_session->new_audio_track (1, 2, Normal, 0, 1, "Test");
-
+
ControlProtocolManager& m = ControlProtocolManager::instance ();
for (list<ControlProtocolInfo*>::iterator i = m.control_protocol_info.begin(); i != m.control_protocol_info.end(); ++i) {
m.activate (**i);
diff --git a/libs/ardour/test/framepos_minus_beats_test.cc b/libs/ardour/test/framepos_minus_beats_test.cc
index a96fec6531..12f020e2d7 100644
--- a/libs/ardour/test/framepos_minus_beats_test.cc
+++ b/libs/ardour/test/framepos_minus_beats_test.cc
@@ -17,7 +17,7 @@ FrameposMinusBeatsTest::singleTempoTest ()
int const bpm = 120;
double const frames_per_beat = (60 / double (bpm)) * double (sampling_rate);
-
+
TempoMap map (sampling_rate);
Tempo tempo (bpm);
Meter meter (4, 4);
@@ -46,14 +46,14 @@ FrameposMinusBeatsTest::doubleTempoTest ()
/*
120bpm at bar 1, 240bpm at bar 4
-
+
120bpm = 24e3 samples per beat
240bpm = 12e3 samples per beat
*/
-
+
/*
-
+
120bpm 240bpm
0 beats 12 beats
0 frames 288e3 frames
@@ -98,14 +98,14 @@ FrameposMinusBeatsTest::doubleTempoWithMeterTest ()
/*
120bpm at bar 1, 240bpm at bar 4
-
+
120bpm = 24e3 samples per beat
240bpm = 12e3 samples per beat
*/
-
+
/*
-
+
120bpm 240bpm
0 beats 12 beats
0 frames 288e3 frames
diff --git a/libs/ardour/test/framepos_plus_beats_test.cc b/libs/ardour/test/framepos_plus_beats_test.cc
index 7069c54115..69fd9a597d 100644
--- a/libs/ardour/test/framepos_plus_beats_test.cc
+++ b/libs/ardour/test/framepos_plus_beats_test.cc
@@ -16,7 +16,7 @@ FrameposPlusBeatsTest::singleTempoTest ()
int const bpm = 120;
double const frames_per_beat = (60 / double (bpm)) * double (sampling_rate);
-
+
TempoMap map (sampling_rate);
Tempo tempo (bpm);
Meter meter (4, 4);
@@ -45,14 +45,14 @@ FrameposPlusBeatsTest::doubleTempoTest ()
/*
120bpm at bar 1, 240bpm at bar 4
-
+
120bpm = 24e3 samples per beat
240bpm = 12e3 samples per beat
*/
-
+
/*
-
+
120bpm 240bpm
0 beats 12 beats
0 frames 288e3 frames
@@ -97,14 +97,14 @@ FrameposPlusBeatsTest::doubleTempoWithMeterTest ()
/*
120bpm at bar 1, 240bpm at bar 4
-
+
120bpm = 24e3 samples per beat
240bpm = 12e3 samples per beat
*/
-
+
/*
-
+
120bpm 240bpm
0 beats 12 beats
0 frames 288e3 frames
diff --git a/libs/ardour/test/framewalk_to_beats_test.cc b/libs/ardour/test/framewalk_to_beats_test.cc
index 501eca894e..8b7748cfa4 100644
--- a/libs/ardour/test/framewalk_to_beats_test.cc
+++ b/libs/ardour/test/framewalk_to_beats_test.cc
@@ -15,7 +15,7 @@ FramewalkToBeatsTest::singleTempoTest ()
int const bpm = 120;
double const frames_per_beat = (60 / double (bpm)) * double (sampling_rate);
-
+
TempoMap map (sampling_rate);
Tempo tempo (bpm);
Meter meter (4, 4);
@@ -51,14 +51,14 @@ FramewalkToBeatsTest::doubleTempoTest ()
/*
120bpm at bar 1, 240bpm at bar 4
-
+
120bpm = 24e3 samples per beat
240bpm = 12e3 samples per beat
*/
-
+
/*
-
+
120bpm 240bpm
0 beats 12 beats
0 frames 288e3 frames
@@ -107,15 +107,15 @@ FramewalkToBeatsTest::tripleTempoTest ()
/*
120bpm at bar 1, 240bpm at bar 2, 160bpm at bar 3
-
+
120bpm = 24e3 samples per beat
160bpm = 18e3 samples per beat
240bpm = 12e3 samples per beat
*/
-
+
/*
-
+
120bpm 240bpm 160bpm
0 beats 4 beats 8 beats
0 frames 96e3 frames 144e3 frames
diff --git a/libs/ardour/test/jack_utils_test.cc b/libs/ardour/test/jack_utils_test.cc
index 7645df6ff3..d8a21ceb49 100644
--- a/libs/ardour/test/jack_utils_test.cc
+++ b/libs/ardour/test/jack_utils_test.cc
@@ -273,7 +273,7 @@ JackUtilsTest::test_config ()
std::string command_line;
CPPUNIT_ASSERT (get_default_jack_command_line (command_line));
-
+
CPPUNIT_ASSERT (write_jack_config_file (config_path, command_line));
}
diff --git a/libs/ardour/test/load_session.cc b/libs/ardour/test/load_session.cc
index f2a2a6922e..41dc48ef2f 100644
--- a/libs/ardour/test/load_session.cc
+++ b/libs/ardour/test/load_session.cc
@@ -21,7 +21,7 @@ int main (int argc, char* argv[])
ARDOUR::init (false, true, localedir);
Session* s = 0;
-
+
try {
s = load_session (argv[1], argv[2]);
} catch (failed_constructor& e) {
diff --git a/libs/ardour/test/midi_clock_slave_test.h b/libs/ardour/test/midi_clock_slave_test.h
index dd046fb8a8..0899eed6ce 100644
--- a/libs/ardour/test/midi_clock_slave_test.h
+++ b/libs/ardour/test/midi_clock_slave_test.h
@@ -83,7 +83,7 @@ class MIDIClock_SlaveTest : public CppUnit::TestFixture, ARDOUR::MIDIClock_Slave
public:
MIDIClock_SlaveTest () : MIDIClock_Slave (new TestSlaveSessionProxy) {}
-
+
void setUp() {
}
diff --git a/libs/ardour/test/mtdm_test.cc b/libs/ardour/test/mtdm_test.cc
index 43a6538242..f3265b2ccd 100644
--- a/libs/ardour/test/mtdm_test.cc
+++ b/libs/ardour/test/mtdm_test.cc
@@ -22,7 +22,7 @@ MTDMTest::basicTest ()
mtdm->process (256, in, out);
memcpy (in, out, 256 * sizeof (float));
}
-
+
for (int i = 0; i < 64; ++i) {
mtdm->process (256, in, out);
memcpy (in, out, 256 * sizeof (float));
diff --git a/libs/ardour/test/playlist_equivalent_regions_test.cc b/libs/ardour/test/playlist_equivalent_regions_test.cc
index 12853d39dd..eb34eaf5bc 100644
--- a/libs/ardour/test/playlist_equivalent_regions_test.cc
+++ b/libs/ardour/test/playlist_equivalent_regions_test.cc
@@ -30,7 +30,7 @@ void
PlaylistEquivalentRegionsTest::setUp ()
{
AudioRegionTest::setUp ();
-
+
_playlist_b = PlaylistFactory::create (DataType::AUDIO, *_session, "testB");
}
diff --git a/libs/ardour/test/playlist_read_test.cc b/libs/ardour/test/playlist_read_test.cc
index 78b2e4eadd..e87179fac6 100644
--- a/libs/ardour/test/playlist_read_test.cc
+++ b/libs/ardour/test/playlist_read_test.cc
@@ -67,14 +67,14 @@ PlaylistReadTest::singleReadTest ()
CPPUNIT_ASSERT_EQUAL (double (64), _ar[0]->_fade_out->back()->when);
_ar[0]->set_length (1024);
_audio_playlist->read (_buf, _mbuf, _gbuf, 0, 256, 0);
-
+
for (int i = 0; i < 64; ++i) {
/* Note: this specific float casting is necessary so that the rounding
is done here the same as it is done in AudioPlaylist.
*/
CPPUNIT_ASSERT_DOUBLES_EQUAL (float (i * float (i / 63.0)), _buf[i], 1e-16);
}
-
+
for (int i = 64; i < 256; ++i) {
CPPUNIT_ASSERT_EQUAL (i, int (_buf[i]));
}
@@ -101,7 +101,7 @@ PlaylistReadTest::overlappingReadTest ()
CPPUNIT_ASSERT_EQUAL (false, _ar[0]->fade_in_is_xfade());
CPPUNIT_ASSERT_EQUAL (false, _ar[0]->fade_out_is_xfade());
#endif
-
+
_audio_playlist->add_region (_ar[1], 128);
_ar[1]->set_default_fade_in ();
_ar[1]->set_default_fade_out ();
@@ -111,10 +111,10 @@ PlaylistReadTest::overlappingReadTest ()
CPPUNIT_ASSERT_EQUAL (false, _ar[1]->fade_in_is_xfade());
CPPUNIT_ASSERT_EQUAL (false, _ar[1]->fade_out_is_xfade());
#endif
-
+
CPPUNIT_ASSERT_EQUAL (double (64), _ar[1]->_fade_in->back()->when);
CPPUNIT_ASSERT_EQUAL (double (64), _ar[1]->_fade_out->back()->when);
-
+
_ar[1]->set_length (1024);
_audio_playlist->read (_buf, _mbuf, _gbuf, 0, 256, 0);
@@ -151,7 +151,7 @@ PlaylistReadTest::transparentReadTest ()
CPPUNIT_ASSERT_EQUAL (double (64), _ar[0]->_fade_in->back()->when);
CPPUNIT_ASSERT_EQUAL (double (64), _ar[0]->_fade_out->back()->when);
_ar[0]->set_length (1024);
-
+
_audio_playlist->add_region (_ar[1], 0);
_ar[1]->set_default_fade_in ();
_ar[1]->set_default_fade_out ();
@@ -237,7 +237,7 @@ PlaylistReadTest::enclosedTransparentReadTest ()
_ar[0]->set_fade_in_length (0);
_ar[0]->set_fade_out_length (0);
_ar[0]->set_length (256);
-
+
_audio_playlist->add_region (_ar[1], 0);
/* These calls will result in a 64-sample fade */
_ar[1]->set_fade_in_length (0);
@@ -266,7 +266,7 @@ PlaylistReadTest::enclosedTransparentReadTest ()
for (int i = (256 + 64); i < (256 + 64 + 128); ++i) {
CPPUNIT_ASSERT_DOUBLES_EQUAL (i + i - (256 + 64) + 64, _buf[i], 1e-16);
}
-
+
/* Then _ar[1] + _ar[0] (faded out) for 64 samples */
for (int i = (256 + 64 + 128); i < 512; ++i) {
float const ar0_without_fade = i - 256;
diff --git a/libs/ardour/test/playlist_read_test.h b/libs/ardour/test/playlist_read_test.h
index 97a1eb9eab..5161863409 100644
--- a/libs/ardour/test/playlist_read_test.h
+++ b/libs/ardour/test/playlist_read_test.h
@@ -32,7 +32,7 @@ class PlaylistReadTest : public AudioRegionTest
public:
void setUp ();
void tearDown ();
-
+
void singleReadTest ();
void overlappingReadTest ();
void transparentReadTest ();
@@ -44,6 +44,6 @@ private:
ARDOUR::Sample* _buf;
ARDOUR::Sample* _mbuf;
float* _gbuf;
-
+
void check_staircase (ARDOUR::Sample *, int, int);
};
diff --git a/libs/ardour/test/profiling/load_session.cc b/libs/ardour/test/profiling/load_session.cc
index f2a2a6922e..41dc48ef2f 100644
--- a/libs/ardour/test/profiling/load_session.cc
+++ b/libs/ardour/test/profiling/load_session.cc
@@ -21,7 +21,7 @@ int main (int argc, char* argv[])
ARDOUR::init (false, true, localedir);
Session* s = 0;
-
+
try {
s = load_session (argv[1], argv[2]);
} catch (failed_constructor& e) {
diff --git a/libs/ardour/test/tempo_test.cc b/libs/ardour/test/tempo_test.cc
index 2cac1fa872..4905259351 100644
--- a/libs/ardour/test/tempo_test.cc
+++ b/libs/ardour/test/tempo_test.cc
@@ -18,14 +18,14 @@ TempoTest::recomputeMapTest ()
/*
120bpm at bar 1, 240bpm at bar 4
-
+
120bpm = 24e3 samples per beat
240bpm = 12e3 samples per beat
*/
-
+
/*
-
+
120bpm 240bpm
0 beats 12 beats
0 frames 288e3 frames
diff --git a/libs/ardour/test/test_util.cc b/libs/ardour/test/test_util.cc
index 7be501d100..5220203465 100644
--- a/libs/ardour/test/test_util.cc
+++ b/libs/ardour/test/test_util.cc
@@ -68,7 +68,7 @@ check_nodes (XMLNode const * p, XMLNode const * q, list<string> const & ignore_p
CPPUNIT_ASSERT_EQUAL (qc.size(), pc.size());
XMLNodeList::const_iterator k = pc.begin ();
XMLNodeList::const_iterator l = qc.begin ();
-
+
while (k != pc.end ()) {
check_nodes (*k, *l, ignore_properties);
++k;
diff --git a/libs/ardour/test/testrunner.cc b/libs/ardour/test/testrunner.cc
index 2d9a8fc39e..ddb320e02b 100644
--- a/libs/ardour/test/testrunner.cc
+++ b/libs/ardour/test/testrunner.cc
@@ -54,23 +54,23 @@ main(int argc, char* argv[])
TestUI* test_ui = new TestUI();
CppUnit::TestResult testresult;
-
+
CppUnit::TestResultCollector collectedresults;
testresult.addListener (&collectedresults);
-
+
CppUnit::BriefTestProgressListener progress;
testresult.addListener (&progress);
-
+
CppUnit::TestRunner testrunner;
testrunner.addTest (CppUnit::TestFactoryRegistry::getRegistry ().makeTest ());
testrunner.run (testresult);
-
+
CppUnit::CompilerOutputter compileroutputter (&collectedresults, std::cerr);
compileroutputter.write ();
delete test_ui;
ARDOUR::cleanup ();
-
+
return collectedresults.wasSuccessful () ? 0 : 1;
}
diff --git a/libs/ardour/ticker.cc b/libs/ardour/ticker.cc
index 3fe6e66b81..e02143e401 100644
--- a/libs/ardour/ticker.cc
+++ b/libs/ardour/ticker.cc
@@ -49,10 +49,10 @@ public:
bool sync (Session* s) {
bool changed = false;
-
+
double sp = s->transport_speed();
framecnt_t fr = s->transport_frame();
-
+
if (speed != sp) {
speed = sp;
changed = true;
@@ -120,7 +120,7 @@ void
MidiClockTicker::set_session (Session* s)
{
SessionHandlePtr::set_session (s);
-
+
if (_session) {
_session->TransportStateChange.connect_same_thread (_session_connections, boost::bind (&MidiClockTicker::transport_state_changed, this));
_session->TransportLooped.connect_same_thread (_session_connections, boost::bind (&MidiClockTicker::transport_looped, this));
@@ -230,7 +230,7 @@ MidiClockTicker::tick (const framepos_t& /* transport_frame */, pframes_t nframe
send_position_event (llrint (_pos->midi_beats), 0, nframes);
} else if (_pos->speed == 1.0f) {
send_stop_event (0, nframes);
-
+
if (_pos->frame == 0) {
send_start_event (0, nframes);
} else {
@@ -249,21 +249,21 @@ MidiClockTicker::tick (const framepos_t& /* transport_frame */, pframes_t nframe
if (_pos->speed == 1.0f) {
if (_session->get_play_loop()) {
assert(_session->locations()->auto_loop_location());
-
+
if (_pos->frame == _session->locations()->auto_loop_location()->start()) {
send_start_event (0, nframes);
} else {
send_continue_event (0, nframes);
}
-
+
} else if (_pos->frame == 0) {
send_start_event (0, nframes);
} else {
send_continue_event (0, nframes);
}
-
+
// send_midi_clock_event (0);
-
+
} else if (_pos->speed == 0.0f) {
send_stop_event (0, nframes);
send_position_event (llrint (_pos->midi_beats), 0, nframes);
diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc
index 2c9e71ca46..e99d07f047 100644
--- a/libs/ardour/track.cc
+++ b/libs/ardour/track.cc
@@ -100,9 +100,9 @@ Track::state (bool full)
root.add_property (X_("saved-meter-point"), enum_2_string (_saved_meter_point));
root.add_child_nocopy (_rec_enable_control->get_state());
root.add_child_nocopy (_diskstream->get_state ());
-
+
return root;
-}
+}
int
Track::set_state (const XMLNode& node, int version)
@@ -140,7 +140,7 @@ Track::set_state (const XMLNode& node, int version)
}
}
}
-
+
const XMLProperty* prop;
if ((prop = node.property (X_("monitoring"))) != 0) {
@@ -196,7 +196,7 @@ Track::RecEnableControl::set_value (double val)
if (!t) {
return;
}
-
+
t->set_record_enabled (val >= 0.5 ? true : false, this);
}
@@ -207,7 +207,7 @@ Track::RecEnableControl::get_value () const
if (!t) {
return 0;
}
-
+
return (t->record_enabled() ? 1.0 : 0.0);
}
@@ -235,7 +235,7 @@ Track::prep_record_enabled (bool yn, void *src)
if (yn && record_safe ()) {
return;
}
-
+
if (!_session.writable()) {
return;
}
@@ -255,7 +255,7 @@ Track::prep_record_enabled (bool yn, void *src)
}
bool will_follow;
-
+
if (yn) {
will_follow = _diskstream->prep_record_enable ();
} else {
@@ -279,7 +279,7 @@ Track::set_record_enabled (bool yn, void *src)
if (_diskstream->record_safe ()) {
return;
}
-
+
if (!_session.writable()) {
return;
}
@@ -310,16 +310,16 @@ Track::set_record_safe (bool yn, void *src)
if (!_session.writable()) { /* REQUIRES REVIEW */
return;
}
-
+
if (_freeze_record.state == Frozen) { /* REQUIRES REVIEW */
return;
}
-
+
if (_route_group && src != _route_group && _route_group->is_active() && _route_group->is_recenable()) {
_route_group->apply (&Track::set_record_safe, yn, _route_group);
return;
}
-
+
_diskstream->set_record_safe (yn);
}
@@ -474,12 +474,12 @@ Track::no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
be_silent = false;
break;
}
-
+
//if we have an internal generator, let it play regardless of monitoring state
if (_have_internal_generator) {
be_silent = false;
}
-
+
_amp->apply_gain_automation (false);
/* if have_internal_generator, or .. */
@@ -528,7 +528,7 @@ Track::no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
} else {
BufferSet& bufs = _session.get_route_buffers (n_process_buffers());
-
+
fill_buffers_with_input (bufs, _input, nframes);
if (_meter_point == MeterInput) {
@@ -942,11 +942,11 @@ MonitorState
Track::monitoring_state () const
{
/* Explicit requests */
-
+
if (_monitoring & MonitorInput) {
return MonitoringInput;
}
-
+
if (_monitoring & MonitorDisk) {
return MonitoringDisk;
}
@@ -954,16 +954,16 @@ Track::monitoring_state () const
/* This is an implementation of the truth table in doc/monitor_modes.pdf;
I don't think it's ever going to be too pretty too look at.
*/
-
+
// GZ: NOT USED IN TRACKS
//bool const auto_input = _session.config.get_auto_input ();
//bool const software_monitor = Config->get_monitoring_model() == SoftwareMonitoring;
//bool const tape_machine_mode = Config->get_tape_machine_mode ();
-
+
bool const roll = _session.transport_rolling ();
bool const track_rec = _diskstream->record_enabled ();
bool session_rec = _session.actively_recording ();
-
+
if (track_rec) {
if (!session_rec && roll) {
@@ -993,11 +993,11 @@ MonitorState
Track::monitoring_state () const
{
/* Explicit requests */
-
+
if (_monitoring & MonitorInput) {
return MonitoringInput;
}
-
+
if (_monitoring & MonitorDisk) {
return MonitoringDisk;
}
@@ -1046,7 +1046,7 @@ Track::monitoring_state () const
} else {
return MonitoringDisk;
}
-
+
}
}
diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc
index eb4db99d87..211b9c29f2 100644
--- a/libs/ardour/utils.cc
+++ b/libs/ardour/utils.cc
@@ -139,7 +139,7 @@ ARDOUR::legalize_for_path_2X (const string& str)
string::size_type pos;
string legal_chars = "abcdefghijklmnopqrtsuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_+=: ";
Glib::ustring legal;
-
+
/* this is the one place in Ardour where we need to iterate across
* potential multibyte characters, and thus we need Glib::ustring
*/
diff --git a/libs/ardour/windows_vst_plugin.cc b/libs/ardour/windows_vst_plugin.cc
index 823b96cffe..abca61155e 100644
--- a/libs/ardour/windows_vst_plugin.cc
+++ b/libs/ardour/windows_vst_plugin.cc
@@ -50,7 +50,7 @@ WindowsVSTPlugin::WindowsVSTPlugin (const WindowsVSTPlugin &other)
throw failed_constructor();
}
Session::vst_current_loading_id = 0;
-
+
_plugin = _state->plugin;
}