Fix broken whitespace. I'd apologize for the compile times if it was my fault :D
authorDavid Robillard <d@drobilla.net>
Wed, 1 Jun 2011 16:50:12 +0000 (16:50 +0000)
committerDavid Robillard <d@drobilla.net>
Wed, 1 Jun 2011 16:50:12 +0000 (16:50 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@9654 d708f5d6-7413-0410-9779-e7cbd77b26cf

235 files changed:
gtk2_ardour/stereo_panner.cc
libs/ardour/amp.cc
libs/ardour/ardour/amp.h
libs/ardour/ardour/ardour.h
libs/ardour/ardour/audio_buffer.h
libs/ardour/ardour/audio_diskstream.h
libs/ardour/ardour/audio_playlist_source.h
libs/ardour/ardour/audio_track.h
libs/ardour/ardour/audio_unit.h
libs/ardour/ardour/audioengine.h
libs/ardour/ardour/audiofilesource.h
libs/ardour/ardour/audioplaylist.h
libs/ardour/ardour/audioregion.h
libs/ardour/ardour/audiosource.h
libs/ardour/ardour/auditioner.h
libs/ardour/ardour/automatable.h
libs/ardour/ardour/automation_control.h
libs/ardour/ardour/automation_list.h
libs/ardour/ardour/buffer_manager.h
libs/ardour/ardour/buffer_set.h
libs/ardour/ardour/butler.h
libs/ardour/ardour/click.h
libs/ardour/ardour/configuration_variable.h
libs/ardour/ardour/coreaudiosource.h
libs/ardour/ardour/crossfade.h
libs/ardour/ardour/cycles.h
libs/ardour/ardour/debug.h
libs/ardour/ardour/delivery.h
libs/ardour/ardour/diskstream.h
libs/ardour/ardour/export_channel.h
libs/ardour/ardour/export_channel_configuration.h
libs/ardour/ardour/export_format_base.h
libs/ardour/ardour/export_format_compatibility.h
libs/ardour/ardour/export_formats.h
libs/ardour/ardour/export_graph_builder.h
libs/ardour/ardour/export_handler.h
libs/ardour/ardour/export_profile_manager.h
libs/ardour/ardour/file_source.h
libs/ardour/ardour/graph.h
libs/ardour/ardour/graphnode.h
libs/ardour/ardour/internal_return.h
libs/ardour/ardour/internal_send.h
libs/ardour/ardour/interpolation.h
libs/ardour/ardour/io.h
libs/ardour/ardour/io_processor.h
libs/ardour/ardour/ladspa_plugin.h
libs/ardour/ardour/location.h
libs/ardour/ardour/lv2_plugin.h
libs/ardour/ardour/meter.h
libs/ardour/ardour/midi_automation_list_binder.h
libs/ardour/ardour/midi_buffer.h
libs/ardour/ardour/midi_diskstream.h
libs/ardour/ardour/midi_playlist_source.h
libs/ardour/ardour/midi_region.h
libs/ardour/ardour/midi_source.h
libs/ardour/ardour/midi_state_tracker.h
libs/ardour/ardour/midi_track.h
libs/ardour/ardour/midi_ui.h
libs/ardour/ardour/mix.h
libs/ardour/ardour/monitor_processor.h
libs/ardour/ardour/movable.h
libs/ardour/ardour/mute_master.h
libs/ardour/ardour/named_selection.h
libs/ardour/ardour/onset_detector.h
libs/ardour/ardour/operations.h
libs/ardour/ardour/pan_controllable.h
libs/ardour/ardour/pannable.h
libs/ardour/ardour/panner.h
libs/ardour/ardour/panner_manager.h
libs/ardour/ardour/panner_shell.h
libs/ardour/ardour/pi_controller.h
libs/ardour/ardour/playlist.h
libs/ardour/ardour/playlist_source.h
libs/ardour/ardour/plugin.h
libs/ardour/ardour/plugin_insert.h
libs/ardour/ardour/port.h
libs/ardour/ardour/port_insert.h
libs/ardour/ardour/process_thread.h
libs/ardour/ardour/processor.h
libs/ardour/ardour/progress.h
libs/ardour/ardour/proxy_controllable.h
libs/ardour/ardour/public_diskstream.h
libs/ardour/ardour/rc_configuration.h
libs/ardour/ardour/region.h
libs/ardour/ardour/region_factory.h
libs/ardour/ardour/region_sorters.h
libs/ardour/ardour/resampled_source.h
libs/ardour/ardour/route.h
libs/ardour/ardour/route_group.h
libs/ardour/ardour/route_group_member.h
libs/ardour/ardour/session.h
libs/ardour/ardour/session_configuration.h
libs/ardour/ardour/session_event.h
libs/ardour/ardour/session_object.h
libs/ardour/ardour/session_playlists.h
libs/ardour/ardour/silentfilesource.h
libs/ardour/ardour/slave.h
libs/ardour/ardour/smf_source.h
libs/ardour/ardour/sndfileimportable.h
libs/ardour/ardour/sndfilesource.h
libs/ardour/ardour/source.h
libs/ardour/ardour/source_factory.h
libs/ardour/ardour/speaker.h
libs/ardour/ardour/speakers.h
libs/ardour/ardour/spline.h
libs/ardour/ardour/strip_silence.h
libs/ardour/ardour/tempo.h
libs/ardour/ardour/thread_buffers.h
libs/ardour/ardour/timecode.h
libs/ardour/ardour/track.h
libs/ardour/ardour/transient_detector.h
libs/ardour/ardour/trimmable.h
libs/ardour/ardour/types.h
libs/ardour/ardour/unknown_processor.h
libs/ardour/ardour/vst_plugin.h
libs/ardour/audio_diskstream.cc
libs/ardour/audio_playlist.cc
libs/ardour/audio_playlist_source.cc
libs/ardour/audio_port.cc
libs/ardour/audio_track.cc
libs/ardour/audio_unit.cc
libs/ardour/audioengine.cc
libs/ardour/audiofilesource.cc
libs/ardour/audioregion.cc
libs/ardour/audiosource.cc
libs/ardour/auditioner.cc
libs/ardour/automatable.cc
libs/ardour/automation_control.cc
libs/ardour/automation_list.cc
libs/ardour/beats_frames_converter.cc
libs/ardour/broadcast_info.cc
libs/ardour/buffer_manager.cc
libs/ardour/buffer_set.cc
libs/ardour/bundle.cc
libs/ardour/butler.cc
libs/ardour/callback.cc
libs/ardour/capturing_processor.cc
libs/ardour/control_protocol_manager.cc
libs/ardour/crossfade.cc
libs/ardour/delivery.cc
libs/ardour/diskstream.cc
libs/ardour/enums.cc
libs/ardour/export_channel.cc
libs/ardour/export_channel_configuration.cc
libs/ardour/export_format_base.cc
libs/ardour/export_format_manager.cc
libs/ardour/export_format_specification.cc
libs/ardour/export_graph_builder.cc
libs/ardour/export_handler.cc
libs/ardour/export_profile_manager.cc
libs/ardour/export_timespan.cc
libs/ardour/file_source.cc
libs/ardour/filesystem_paths.cc
libs/ardour/filter.cc
libs/ardour/globals.cc
libs/ardour/graph.cc
libs/ardour/graphnode.cc
libs/ardour/internal_return.cc
libs/ardour/internal_send.cc
libs/ardour/interpolation.cc
libs/ardour/io.cc
libs/ardour/io_processor.cc
libs/ardour/ladspa_plugin.cc
libs/ardour/location.cc
libs/ardour/lv2_plugin.cc
libs/ardour/lv2_plugin_lilv.cc
libs/ardour/midi_automation_list_binder.cc
libs/ardour/midi_clock_slave.cc
libs/ardour/midi_diskstream.cc
libs/ardour/midi_model.cc
libs/ardour/midi_playlist_source.cc
libs/ardour/midi_port.cc
libs/ardour/midi_region.cc
libs/ardour/midi_ring_buffer.cc
libs/ardour/midi_source.cc
libs/ardour/midi_track.cc
libs/ardour/midi_ui.cc
libs/ardour/monitor_processor.cc
libs/ardour/mtc_slave.cc
libs/ardour/mute_master.cc
libs/ardour/pannable.cc
libs/ardour/panner.cc
libs/ardour/panner_manager.cc
libs/ardour/panner_shell.cc
libs/ardour/pi_controller.cc
libs/ardour/playlist.cc
libs/ardour/playlist_source.cc
libs/ardour/plugin.cc
libs/ardour/plugin_insert.cc
libs/ardour/plugin_manager.cc
libs/ardour/port.cc
libs/ardour/port_insert.cc
libs/ardour/port_set.cc
libs/ardour/process_thread.cc
libs/ardour/processor.cc
libs/ardour/rb_effect.cc
libs/ardour/rc_configuration.cc
libs/ardour/region.cc
libs/ardour/region_factory.cc
libs/ardour/resampled_source.cc
libs/ardour/return.cc
libs/ardour/route.cc
libs/ardour/route_group.cc
libs/ardour/send.cc
libs/ardour/session.cc
libs/ardour/session_click.cc
libs/ardour/session_command.cc
libs/ardour/session_events.cc
libs/ardour/session_export.cc
libs/ardour/session_handle.cc
libs/ardour/session_midi.cc
libs/ardour/session_object.cc
libs/ardour/session_playlists.cc
libs/ardour/session_process.cc
libs/ardour/session_rtevents.cc
libs/ardour/session_state.cc
libs/ardour/session_transport.cc
libs/ardour/smf_source.cc
libs/ardour/sndfile_helpers.cc
libs/ardour/sndfilesource.cc
libs/ardour/source.cc
libs/ardour/source_factory.cc
libs/ardour/speakers.cc
libs/ardour/strip_silence.cc
libs/ardour/tempo.cc
libs/ardour/test/mantis_3356.cc
libs/ardour/test/resampled_source.cc
libs/ardour/ticker.cc
libs/ardour/track.cc
libs/ardour/transient_detector.cc
libs/ardour/uri_map.cc
libs/ardour/utils.cc
libs/ardour/vst_plugin.cc
libs/gtkmm2ext/cairocell.cc
libs/gtkmm2ext/gtkmm2ext/cairocell.h

index a0c5849066a8f366449a7202a70b4f3d3bfd5613..7fe204fbfda52e3772d61135971bdd7a3704d60c 100644 (file)
@@ -1,20 +1,19 @@
 /*
-    Copyright (C) 2000-2007 Paul Davis
+  Copyright (C) 2000-2007 Paul Davis
 
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
 
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
 
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
 #include <iostream>
@@ -58,75 +57,75 @@ bool StereoPanner::have_colors = false;
 using namespace ARDOUR;
 
 StereoPanner::StereoPanner (boost::shared_ptr<Panner> panner)
-        : _panner (panner)
-        , position_control (_panner->pannable()->pan_azimuth_control)
-        , width_control (_panner->pannable()->pan_width_control)
-        , dragging (false)
-        , dragging_position (false)
-        , dragging_left (false)
-        , dragging_right (false)
-        , drag_start_x (0)
-        , last_drag_x (0)
-        , accumulated_delta (0)
-        , detented (false)
-        , drag_data_window (0)
-        , drag_data_label (0)
-        , position_binder (position_control)
-        , width_binder (width_control)
+       : _panner (panner)
+       , position_control (_panner->pannable()->pan_azimuth_control)
+       , width_control (_panner->pannable()->pan_width_control)
+       , dragging (false)
+       , dragging_position (false)
+       , dragging_left (false)
+       , dragging_right (false)
+       , drag_start_x (0)
+       , last_drag_x (0)
+       , accumulated_delta (0)
+       , detented (false)
+       , drag_data_window (0)
+       , drag_data_label (0)
+       , position_binder (position_control)
+       , width_binder (width_control)
 {
-        if (!have_colors) {
-                set_colors ();
-                have_colors = true;
-        }
+       if (!have_colors) {
+               set_colors ();
+               have_colors = true;
+       }
 
-        position_control->Changed.connect (connections, invalidator(*this), boost::bind (&StereoPanner::value_change, this), gui_context());
-        width_control->Changed.connect (connections, invalidator(*this), boost::bind (&StereoPanner::value_change, this), gui_context());
+       position_control->Changed.connect (connections, invalidator(*this), boost::bind (&StereoPanner::value_change, this), gui_context());
+       width_control->Changed.connect (connections, invalidator(*this), boost::bind (&StereoPanner::value_change, this), gui_context());
 
-        set_flags (Gtk::CAN_FOCUS);
+       set_flags (Gtk::CAN_FOCUS);
 
-        add_events (Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK|
-                    Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK|
-                    Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|
-                    Gdk::SCROLL_MASK|
-                    Gdk::POINTER_MOTION_MASK);
+       add_events (Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK|
+                   Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK|
+                   Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|
+                   Gdk::SCROLL_MASK|
+                   Gdk::POINTER_MOTION_MASK);
 
-        ColorsChanged.connect (sigc::mem_fun (*this, &StereoPanner::color_handler));
+       ColorsChanged.connect (sigc::mem_fun (*this, &StereoPanner::color_handler));
 }
 
 StereoPanner::~StereoPanner ()
 {
-        delete drag_data_window;
+       delete drag_data_window;
 }
 
 void
 StereoPanner::set_drag_data ()
 {
-        if (!drag_data_label) {
-                return;
-        }
-
-        double pos = position_control->get_value(); // 0..1
-        
-        /* We show the position of the center of the image relative to the left & right.
-           This is expressed as a pair of percentage values that ranges from (100,0) 
-           (hard left) through (50,50) (hard center) to (0,100) (hard right).
-
-           This is pretty wierd, but its the way audio engineers expect it. Just remember that
-           the center of the USA isn't Kansas, its (50LA, 50NY) and it will all make sense.
-        */
-
-        char buf[64];
-        snprintf (buf, sizeof (buf), "L:%3d R:%3d Width:%d%%", (int) rint (100.0 * (1.0 - pos)),
-                  (int) rint (100.0 * pos),
-                  (int) floor (100.0 * width_control->get_value()));
-        drag_data_label->set_markup (buf);
+       if (!drag_data_label) {
+               return;
+       }
+
+       double pos = position_control->get_value(); // 0..1
+
+       /* We show the position of the center of the image relative to the left & right.
+          This is expressed as a pair of percentage values that ranges from (100,0)
+          (hard left) through (50,50) (hard center) to (0,100) (hard right).
+
+          This is pretty wierd, but its the way audio engineers expect it. Just remember that
+          the center of the USA isn't Kansas, its (50LA, 50NY) and it will all make sense.
+       */
+
+       char buf[64];
+       snprintf (buf, sizeof (buf), "L:%3d R:%3d Width:%d%%", (int) rint (100.0 * (1.0 - pos)),
+                 (int) rint (100.0 * pos),
+                 (int) floor (100.0 * width_control->get_value()));
+       drag_data_label->set_markup (buf);
 }
 
 void
 StereoPanner::value_change ()
 {
-        set_drag_data ();
-        queue_draw ();
+       set_drag_data ();
+       queue_draw ();
 }
 
 bool
@@ -134,146 +133,146 @@ StereoPanner::on_expose_event (GdkEventExpose* ev)
 {
        Glib::RefPtr<Gdk::Window> win (get_window());
        Glib::RefPtr<Gdk::GC> gc (get_style()->get_base_gc (get_state()));
-        Cairo::RefPtr<Cairo::Context> context = get_window()->create_cairo_context();
-       
-        int width, height;
-        double pos = position_control->get_value (); /* 0..1 */
-        double swidth = width_control->get_value (); /* -1..+1 */
-        double fswidth = fabs (swidth);
-        uint32_t o, f, t, b, r;
-       State state;
-        const double corner_radius = 5.0;
-
-        width = get_width();
-        height = get_height ();
-
-        if (swidth == 0.0) {
-                state = Mono;
-        } else if (swidth < 0.0) {
-                state = Inverted;
-        } else { 
-                state = Normal;
-        }
-
-        o = colors[state].outline;
-        f = colors[state].fill;
-        t = colors[state].text;
-        b = colors[state].background;
-        r = colors[state].rule;
-
-        /* background */
-
-        context->set_source_rgba (UINT_RGBA_R_FLT(b), UINT_RGBA_G_FLT(b), UINT_RGBA_B_FLT(b), UINT_RGBA_A_FLT(b));
-        rounded_rectangle (context, 0, 0, width, height, corner_radius);
-        context->fill ();
-
-        /* the usable width is reduced from the real width, because we need space for 
-           the two halves of LR boxes that will extend past the actual left/right
-           positions (indicated by the vertical line segment above them).
-        */
-
-        double usable_width = width - lr_box_size;
-
-        /* compute the centers of the L/R boxes based on the current stereo width */
-
-        if (fmod (usable_width,2.0) == 0) {
-                /* even width, but we need odd, so that there is an exact center.
-                   So, offset cairo by 1, and reduce effective width by 1 
-                */
-                usable_width -= 1.0;
-                context->translate (1.0, 0.0);
-        }
-
-        double center = (lr_box_size/2.0) + (usable_width * pos);
-        const double pan_spread = (fswidth * usable_width)/2.0;
-        const double half_lr_box = lr_box_size/2.0;
-        int left;
-        int right;
-
-        left = center - pan_spread;  // center of left box
-        right = center + pan_spread; // center of right box
-
-        /* center line */
-
-        context->set_line_width (1.0);
-        context->move_to ((usable_width + lr_box_size)/2.0, 0);
-        context->rel_line_to (0, height);
-        context->set_source_rgba (UINT_RGBA_R_FLT(r), UINT_RGBA_G_FLT(r), UINT_RGBA_B_FLT(r), UINT_RGBA_A_FLT(r));
-        context->stroke ();
-
-        /* compute & draw the line through the box */
-        
-        context->set_line_width (2);
-        context->set_source_rgba (UINT_RGBA_R_FLT(o), UINT_RGBA_G_FLT(o), UINT_RGBA_B_FLT(o), UINT_RGBA_A_FLT(o));
-        context->move_to (left, top_step+(pos_box_size/2.0)+step_down);
-        context->line_to (left, top_step+(pos_box_size/2.0));
-        context->line_to (right, top_step+(pos_box_size/2.0));
-        context->line_to (right, top_step+(pos_box_size/2.0) + step_down);
-        context->stroke ();
-
-        /* left box */
-
-        rounded_rectangle (context, left - half_lr_box,
-                           half_lr_box+step_down, 
-                           lr_box_size, lr_box_size, corner_radius);
-        context->set_source_rgba (UINT_RGBA_R_FLT(o), UINT_RGBA_G_FLT(o), UINT_RGBA_B_FLT(o), UINT_RGBA_A_FLT(o));
-        context->stroke_preserve ();
-        context->set_source_rgba (UINT_RGBA_R_FLT(f), UINT_RGBA_G_FLT(f), UINT_RGBA_B_FLT(f), UINT_RGBA_A_FLT(f));
+       Cairo::RefPtr<Cairo::Context> context = get_window()->create_cairo_context();
+
+       int width, height;
+       double pos = position_control->get_value (); /* 0..1 */
+       double swidth = width_control->get_value (); /* -1..+1 */
+       double fswidth = fabs (swidth);
+       uint32_t o, f, t, b, r;
+       State state;
+       const double corner_radius = 5.0;
+
+       width = get_width();
+       height = get_height ();
+
+       if (swidth == 0.0) {
+               state = Mono;
+       } else if (swidth < 0.0) {
+               state = Inverted;
+       } else {
+               state = Normal;
+       }
+
+       o = colors[state].outline;
+       f = colors[state].fill;
+       t = colors[state].text;
+       b = colors[state].background;
+       r = colors[state].rule;
+
+       /* background */
+
+       context->set_source_rgba (UINT_RGBA_R_FLT(b), UINT_RGBA_G_FLT(b), UINT_RGBA_B_FLT(b), UINT_RGBA_A_FLT(b));
+       rounded_rectangle (context, 0, 0, width, height, corner_radius);
        context->fill ();
-        
-        /* add text */
-
-        context->move_to (left - half_lr_box + 3,
-                          (lr_box_size/2) + step_down + 13);
-        context->select_font_face ("sans-serif", Cairo::FONT_SLANT_NORMAL, Cairo::FONT_WEIGHT_BOLD);
-
-        if (state != Mono) {
-                context->set_source_rgba (UINT_RGBA_R_FLT(t), UINT_RGBA_G_FLT(t), UINT_RGBA_B_FLT(t), UINT_RGBA_A_FLT(t));
-                if (swidth < 0.0) {
-                        context->show_text (_("R"));
-                } else {
-                        context->show_text (_("L"));
-                }
-        }
-
-        /* right box */
-
-        rounded_rectangle (context, right - half_lr_box,
-                           half_lr_box+step_down, 
-                           lr_box_size, lr_box_size, corner_radius);
-        context->set_source_rgba (UINT_RGBA_R_FLT(o), UINT_RGBA_G_FLT(o), UINT_RGBA_B_FLT(o), UINT_RGBA_A_FLT(o));
-        context->stroke_preserve ();
-        context->set_source_rgba (UINT_RGBA_R_FLT(f), UINT_RGBA_G_FLT(f), UINT_RGBA_B_FLT(f), UINT_RGBA_A_FLT(f));
+
+       /* the usable width is reduced from the real width, because we need space for
+          the two halves of LR boxes that will extend past the actual left/right
+          positions (indicated by the vertical line segment above them).
+       */
+
+       double usable_width = width - lr_box_size;
+
+       /* compute the centers of the L/R boxes based on the current stereo width */
+
+       if (fmod (usable_width,2.0) == 0) {
+               /* even width, but we need odd, so that there is an exact center.
+                  So, offset cairo by 1, and reduce effective width by 1
+               */
+               usable_width -= 1.0;
+               context->translate (1.0, 0.0);
+       }
+
+       double center = (lr_box_size/2.0) + (usable_width * pos);
+       const double pan_spread = (fswidth * usable_width)/2.0;
+       const double half_lr_box = lr_box_size/2.0;
+       int left;
+       int right;
+
+       left = center - pan_spread;  // center of left box
+       right = center + pan_spread; // center of right box
+
+       /* center line */
+
+       context->set_line_width (1.0);
+       context->move_to ((usable_width + lr_box_size)/2.0, 0);
+       context->rel_line_to (0, height);
+       context->set_source_rgba (UINT_RGBA_R_FLT(r), UINT_RGBA_G_FLT(r), UINT_RGBA_B_FLT(r), UINT_RGBA_A_FLT(r));
+       context->stroke ();
+
+       /* compute & draw the line through the box */
+
+       context->set_line_width (2);
+       context->set_source_rgba (UINT_RGBA_R_FLT(o), UINT_RGBA_G_FLT(o), UINT_RGBA_B_FLT(o), UINT_RGBA_A_FLT(o));
+       context->move_to (left, top_step+(pos_box_size/2.0)+step_down);
+       context->line_to (left, top_step+(pos_box_size/2.0));
+       context->line_to (right, top_step+(pos_box_size/2.0));
+       context->line_to (right, top_step+(pos_box_size/2.0) + step_down);
+       context->stroke ();
+
+       /* left box */
+
+       rounded_rectangle (context, left - half_lr_box,
+                          half_lr_box+step_down,
+                          lr_box_size, lr_box_size, corner_radius);
+       context->set_source_rgba (UINT_RGBA_R_FLT(o), UINT_RGBA_G_FLT(o), UINT_RGBA_B_FLT(o), UINT_RGBA_A_FLT(o));
+       context->stroke_preserve ();
+       context->set_source_rgba (UINT_RGBA_R_FLT(f), UINT_RGBA_G_FLT(f), UINT_RGBA_B_FLT(f), UINT_RGBA_A_FLT(f));
        context->fill ();
 
-        /* add text */
-
-        context->move_to (right - half_lr_box + 3, (lr_box_size/2)+step_down + 13);
-        context->set_source_rgba (UINT_RGBA_R_FLT(t), UINT_RGBA_G_FLT(t), UINT_RGBA_B_FLT(t), UINT_RGBA_A_FLT(t));
-        
-        if (state == Mono) {
-                context->show_text (_("M"));
-        } else {
-                if (swidth < 0.0) {
-                        context->show_text (_("L"));
-                } else {
-                        context->show_text (_("R"));
-                }
-        }
-        
-        /* draw the central box */
-
-        context->set_line_width (2.0);
+       /* add text */
+
+       context->move_to (left - half_lr_box + 3,
+                         (lr_box_size/2) + step_down + 13);
+       context->select_font_face ("sans-serif", Cairo::FONT_SLANT_NORMAL, Cairo::FONT_WEIGHT_BOLD);
+
+       if (state != Mono) {
+               context->set_source_rgba (UINT_RGBA_R_FLT(t), UINT_RGBA_G_FLT(t), UINT_RGBA_B_FLT(t), UINT_RGBA_A_FLT(t));
+               if (swidth < 0.0) {
+                       context->show_text (_("R"));
+               } else {
+                       context->show_text (_("L"));
+               }
+       }
+
+       /* right box */
+
+       rounded_rectangle (context, right - half_lr_box,
+                          half_lr_box+step_down,
+                          lr_box_size, lr_box_size, corner_radius);
+       context->set_source_rgba (UINT_RGBA_R_FLT(o), UINT_RGBA_G_FLT(o), UINT_RGBA_B_FLT(o), UINT_RGBA_A_FLT(o));
+       context->stroke_preserve ();
+       context->set_source_rgba (UINT_RGBA_R_FLT(f), UINT_RGBA_G_FLT(f), UINT_RGBA_B_FLT(f), UINT_RGBA_A_FLT(f));
+       context->fill ();
+
+       /* add text */
+
+       context->move_to (right - half_lr_box + 3, (lr_box_size/2)+step_down + 13);
+       context->set_source_rgba (UINT_RGBA_R_FLT(t), UINT_RGBA_G_FLT(t), UINT_RGBA_B_FLT(t), UINT_RGBA_A_FLT(t));
+
+       if (state == Mono) {
+               context->show_text (_("M"));
+       } else {
+               if (swidth < 0.0) {
+                       context->show_text (_("L"));
+               } else {
+                       context->show_text (_("R"));
+               }
+       }
+
+       /* draw the central box */
+
+       context->set_line_width (2.0);
        context->move_to (center + (pos_box_size/2.0), top_step); /* top right */
-        context->rel_line_to (0.0, pos_box_size); /* lower right */
-        context->rel_line_to (-pos_box_size/2.0, 4.0); /* bottom point */
-        context->rel_line_to (-pos_box_size/2.0, -4.0); /* lower left */
-        context->rel_line_to (0.0, -pos_box_size); /* upper left */
-        context->close_path ();
-
-        context->set_source_rgba (UINT_RGBA_R_FLT(o), UINT_RGBA_G_FLT(o), UINT_RGBA_B_FLT(o), UINT_RGBA_A_FLT(o));
-        context->stroke_preserve ();
-        context->set_source_rgba (UINT_RGBA_R_FLT(f), UINT_RGBA_G_FLT(f), UINT_RGBA_B_FLT(f), UINT_RGBA_A_FLT(f));
+       context->rel_line_to (0.0, pos_box_size); /* lower right */
+       context->rel_line_to (-pos_box_size/2.0, 4.0); /* bottom point */
+       context->rel_line_to (-pos_box_size/2.0, -4.0); /* lower left */
+       context->rel_line_to (0.0, -pos_box_size); /* upper left */
+       context->close_path ();
+
+       context->set_source_rgba (UINT_RGBA_R_FLT(o), UINT_RGBA_G_FLT(o), UINT_RGBA_B_FLT(o), UINT_RGBA_A_FLT(o));
+       context->stroke_preserve ();
+       context->set_source_rgba (UINT_RGBA_R_FLT(f), UINT_RGBA_G_FLT(f), UINT_RGBA_B_FLT(f), UINT_RGBA_A_FLT(f));
        context->fill ();
 
        return true;
@@ -282,347 +281,347 @@ StereoPanner::on_expose_event (GdkEventExpose* ev)
 bool
 StereoPanner::on_button_press_event (GdkEventButton* ev)
 {
-        drag_start_x = ev->x;
-        last_drag_x = ev->x;
-        
-        dragging_position = false;
-        dragging_left = false;
-        dragging_right = false;
-        dragging = false;
-        accumulated_delta = 0;
-        detented = false;
-
-        /* Let the binding proxies get first crack at the press event
-         */
-
-        if (ev->y < 20) {
-                if (position_binder.button_press_handler (ev)) {
-                        return true;
-                }
-        } else {
-                if (width_binder.button_press_handler (ev)) {
-                        return true;
-                }
-        }
-        
-        if (ev->button != 1) {
-                return false;
-        }
-
-        if (ev->type == GDK_2BUTTON_PRESS) {
-                int width = get_width();
-
-                if (Keyboard::modifier_state_contains (ev->state, Keyboard::TertiaryModifier)) {
-                        /* handled by button release */
-                        return true;
-                }
-
-                if (ev->y < 20) {
-                        
-                        /* upper section: adjusts position, constrained by width */
-
-                        const double w = fabs (width_control->get_value ());
-                        const double max_pos = 1.0 - (w/2.0);
-                        const double min_pos = w/2.0;
-
-                        if (ev->x <= width/3) {
-                                /* left side dbl click */
-                                if (Keyboard::modifier_state_contains (ev->state, Keyboard::SecondaryModifier)) {
-                                        /* 2ndary-double click on left, collapse to hard left */
-                                        width_control->set_value (0);
-                                        position_control->set_value (0);
-                                } else {
-                                        position_control->set_value (min_pos);
-                                }
-                        } else if (ev->x > 2*width/3) {
-                                if (Keyboard::modifier_state_contains (ev->state, Keyboard::SecondaryModifier)) {
-                                        /* 2ndary-double click on right, collapse to hard right */
-                                        width_control->set_value (0);
-                                        position_control->set_value (1.0);
-                                } else {
-                                        position_control->set_value (max_pos);
-                                }
-                        } else {
-                                position_control->set_value (0.5);
-                        }
-
-                } else {
-
-                        /* lower section: adjusts width, constrained by position */
-
-                        const double p = position_control->get_value ();
-                        const double max_width = 2.0 * min ((1.0 - p), p);
-
-                        if (ev->x <= width/3) {
-                                /* left side dbl click */
-                                width_control->set_value (max_width); // reset width to 100%
-                        } else if (ev->x > 2*width/3) {
-                                /* right side dbl click */
-                                width_control->set_value (-max_width); // reset width to inverted 100%
-                        } else {
-                                /* center dbl click */
-                                width_control->set_value (0); // collapse width to 0%
-                        }
-                }
-
-                dragging = false;
-
-        } else if (ev->type == GDK_BUTTON_PRESS) {
-
-                if (Keyboard::modifier_state_contains (ev->state, Keyboard::TertiaryModifier)) {
-                        /* handled by button release */
-                        return true;
-                }
-
-                if (ev->y < 20) {
-                        /* top section of widget is for position drags */
-                        dragging_position = true;
-                        StartPositionGesture ();
-                } else {
-                        /* lower section is for dragging width */
-                        
-                        double pos = position_control->get_value (); /* 0..1 */
-                        double swidth = width_control->get_value (); /* -1..+1 */
-                        double fswidth = fabs (swidth);
-                        int usable_width = get_width() - lr_box_size;
-                        double center = (lr_box_size/2.0) + (usable_width * pos);
-                        int left = lrint (center - (fswidth * usable_width / 2.0)); // center of leftmost box
-                        int right = lrint (center +  (fswidth * usable_width / 2.0)); // center of rightmost box
-                        const int half_box = lr_box_size/2;
-                        
-                        if (ev->x >= (left - half_box) && ev->x < (left + half_box)) {
-                                if (swidth < 0.0) {
-                                        dragging_right = true;
-                                } else {
-                                        dragging_left = true;
-                                }
-                        } else if (ev->x >= (right - half_box) && ev->x < (right + half_box)) {
-                                if (swidth < 0.0) {
-                                        dragging_left = true;
-                                } else {
-                                        dragging_right = true;
-                                }
-                        }
-                        StartWidthGesture ();
-                }
-
-                dragging = true;
-        }
-
-        return true;
+       drag_start_x = ev->x;
+       last_drag_x = ev->x;
+
+       dragging_position = false;
+       dragging_left = false;
+       dragging_right = false;
+       dragging = false;
+       accumulated_delta = 0;
+       detented = false;
+
+       /* Let the binding proxies get first crack at the press event
+        */
+
+       if (ev->y < 20) {
+               if (position_binder.button_press_handler (ev)) {
+                       return true;
+               }
+       } else {
+               if (width_binder.button_press_handler (ev)) {
+                       return true;
+               }
+       }
+
+       if (ev->button != 1) {
+               return false;
+       }
+
+       if (ev->type == GDK_2BUTTON_PRESS) {
+               int width = get_width();
+
+               if (Keyboard::modifier_state_contains (ev->state, Keyboard::TertiaryModifier)) {
+                       /* handled by button release */
+                       return true;
+               }
+
+               if (ev->y < 20) {
+
+                       /* upper section: adjusts position, constrained by width */
+
+                       const double w = fabs (width_control->get_value ());
+                       const double max_pos = 1.0 - (w/2.0);
+                       const double min_pos = w/2.0;
+
+                       if (ev->x <= width/3) {
+                               /* left side dbl click */
+                               if (Keyboard::modifier_state_contains (ev->state, Keyboard::SecondaryModifier)) {
+                                       /* 2ndary-double click on left, collapse to hard left */
+                                       width_control->set_value (0);
+                                       position_control->set_value (0);
+                               } else {
+                                       position_control->set_value (min_pos);
+                               }
+                       } else if (ev->x > 2*width/3) {
+                               if (Keyboard::modifier_state_contains (ev->state, Keyboard::SecondaryModifier)) {
+                                       /* 2ndary-double click on right, collapse to hard right */
+                                       width_control->set_value (0);
+                                       position_control->set_value (1.0);
+                               } else {
+                                       position_control->set_value (max_pos);
+                               }
+                       } else {
+                               position_control->set_value (0.5);
+                       }
+
+               } else {
+
+                       /* lower section: adjusts width, constrained by position */
+
+                       const double p = position_control->get_value ();
+                       const double max_width = 2.0 * min ((1.0 - p), p);
+
+                       if (ev->x <= width/3) {
+                               /* left side dbl click */
+                               width_control->set_value (max_width); // reset width to 100%
+                       } else if (ev->x > 2*width/3) {
+                               /* right side dbl click */
+                               width_control->set_value (-max_width); // reset width to inverted 100%
+                       } else {
+                               /* center dbl click */
+                               width_control->set_value (0); // collapse width to 0%
+                       }
+               }
+
+               dragging = false;
+
+       } else if (ev->type == GDK_BUTTON_PRESS) {
+
+               if (Keyboard::modifier_state_contains (ev->state, Keyboard::TertiaryModifier)) {
+                       /* handled by button release */
+                       return true;
+               }
+
+               if (ev->y < 20) {
+                       /* top section of widget is for position drags */
+                       dragging_position = true;
+                       StartPositionGesture ();
+               } else {
+                       /* lower section is for dragging width */
+
+                       double pos = position_control->get_value (); /* 0..1 */
+                       double swidth = width_control->get_value (); /* -1..+1 */
+                       double fswidth = fabs (swidth);
+                       int usable_width = get_width() - lr_box_size;
+                       double center = (lr_box_size/2.0) + (usable_width * pos);
+                       int left = lrint (center - (fswidth * usable_width / 2.0)); // center of leftmost box
+                       int right = lrint (center +  (fswidth * usable_width / 2.0)); // center of rightmost box
+                       const int half_box = lr_box_size/2;
+
+                       if (ev->x >= (left - half_box) && ev->x < (left + half_box)) {
+                               if (swidth < 0.0) {
+                                       dragging_right = true;
+                               } else {
+                                       dragging_left = true;
+                               }
+                       } else if (ev->x >= (right - half_box) && ev->x < (right + half_box)) {
+                               if (swidth < 0.0) {
+                                       dragging_left = true;
+                               } else {
+                                       dragging_right = true;
+                               }
+                       }
+                       StartWidthGesture ();
+               }
+
+               dragging = true;
+       }
+
+       return true;
 }
 
 bool
 StereoPanner::on_button_release_event (GdkEventButton* ev)
 {
-        if (ev->button != 1) {
-                return false;
-        }
-
-        bool dp = dragging_position;
-
-        dragging = false;
-        dragging_position = false;
-        dragging_left = false;
-        dragging_right = false;
-        accumulated_delta = 0;
-        detented = false;
-
-        if (drag_data_window) {
-                drag_data_window->hide ();
-        }
-        
-        if (Keyboard::modifier_state_contains (ev->state, Keyboard::TertiaryModifier)) {
-                /* reset to default */
-                position_control->set_value (0.5);
-                width_control->set_value (1.0);
-        } else {
-                if (dp) {
-                        StopPositionGesture ();
-                } else {
-                        StopWidthGesture ();
-                }
-        }
-
-        return true;
+       if (ev->button != 1) {
+               return false;
+       }
+
+       bool dp = dragging_position;
+
+       dragging = false;
+       dragging_position = false;
+       dragging_left = false;
+       dragging_right = false;
+       accumulated_delta = 0;
+       detented = false;
+
+       if (drag_data_window) {
+               drag_data_window->hide ();
+       }
+
+       if (Keyboard::modifier_state_contains (ev->state, Keyboard::TertiaryModifier)) {
+               /* reset to default */
+               position_control->set_value (0.5);
+               width_control->set_value (1.0);
+       } else {
+               if (dp) {
+                       StopPositionGesture ();
+               } else {
+                       StopWidthGesture ();
+               }
+       }
+
+       return true;
 }
 
 bool
 StereoPanner::on_scroll_event (GdkEventScroll* ev)
 {
-        double one_degree = 1.0/180.0; // one degree as a number from 0..1, since 180 degrees is the full L/R axis
-        double pv = position_control->get_value(); // 0..1.0 ; 0 = left
-        double wv = width_control->get_value(); // 0..1.0 ; 0 = left
-        double step;
-        
-        if (Keyboard::modifier_state_contains (ev->state, Keyboard::PrimaryModifier)) {
-                step = one_degree;
-        } else {
-                step = one_degree * 5.0;
-        }
-
-        switch (ev->direction) {
-        case GDK_SCROLL_LEFT:
-                wv += step;
-                width_control->set_value (wv);
-                break;
-        case GDK_SCROLL_UP:
-                pv -= step;
-                position_control->set_value (pv);
-                break;
-        case GDK_SCROLL_RIGHT:
-                wv -= step;
-                width_control->set_value (wv);
-                break;
-        case GDK_SCROLL_DOWN:
-                pv += step;
-                position_control->set_value (pv);
-                break;
-        }
-
-        return true;
+       double one_degree = 1.0/180.0; // one degree as a number from 0..1, since 180 degrees is the full L/R axis
+       double pv = position_control->get_value(); // 0..1.0 ; 0 = left
+       double wv = width_control->get_value(); // 0..1.0 ; 0 = left
+       double step;
+
+       if (Keyboard::modifier_state_contains (ev->state, Keyboard::PrimaryModifier)) {
+               step = one_degree;
+       } else {
+               step = one_degree * 5.0;
+       }
+
+       switch (ev->direction) {
+       case GDK_SCROLL_LEFT:
+               wv += step;
+               width_control->set_value (wv);
+               break;
+       case GDK_SCROLL_UP:
+               pv -= step;
+               position_control->set_value (pv);
+               break;
+       case GDK_SCROLL_RIGHT:
+               wv -= step;
+               width_control->set_value (wv);
+               break;
+       case GDK_SCROLL_DOWN:
+               pv += step;
+               position_control->set_value (pv);
+               break;
+       }
+
+       return true;
 }
 
 bool
 StereoPanner::on_motion_notify_event (GdkEventMotion* ev)
 {
-        if (!dragging) {
-                return false;
-        }
-
-        if (!drag_data_window) {
-                drag_data_window = new Window (WINDOW_POPUP);
-                drag_data_window->set_name (X_("ContrastingPopup"));
-                drag_data_window->set_position (WIN_POS_MOUSE);
-                drag_data_window->set_decorated (false);
-                
-                drag_data_label = manage (new Label);
-                drag_data_label->set_use_markup (true);
-
-                drag_data_window->set_border_width (6);
-                drag_data_window->add (*drag_data_label);
-                drag_data_label->show ();
-                
-                Window* toplevel = dynamic_cast<Window*> (get_toplevel());
-                if (toplevel) {
-                        drag_data_window->set_transient_for (*toplevel);
-                }
-        }
-
-        if (!drag_data_window->is_visible ()) {
-                /* move the popup window vertically down from the panner display */
-                int rx, ry;
-                get_window()->get_origin (rx, ry);
-                drag_data_window->move (rx, ry+get_height());
-                drag_data_window->present ();
-        }
-
-        int w = get_width();
-        double delta = (ev->x - last_drag_x) / (double) w;
-        double current_width = width_control->get_value ();
-        
-        if (dragging_left) {
-                delta = -delta;
-        }
-
-        if (dragging_left || dragging_right) {
-
-                /* maintain position as invariant as we change the width */
-
-
-                /* create a detent close to the center */
-
-                if (!detented && fabs (current_width) < 0.02) {
-                        detented = true;
-                        /* snap to zero */
-                        width_control->set_value (0);
-                }
-                
-                if (detented) {
-
-                        accumulated_delta += delta;
-
-                        /* have we pulled far enough to escape ? */
-
-                        if (fabs (accumulated_delta) >= 0.025) {
-                                width_control->set_value (current_width + accumulated_delta);
-                                detented = false;
-                                accumulated_delta = false;
-                        }
-                                
-                } else {
-                        width_control->set_value (current_width + delta);
-                }
-
-        } else if (dragging_position) {
-
-                double pv = position_control->get_value(); // 0..1.0 ; 0 = left
-                position_control->set_value (pv + delta);
-        }
-
-        last_drag_x = ev->x;
-        return true;
+       if (!dragging) {
+               return false;
+       }
+
+       if (!drag_data_window) {
+               drag_data_window = new Window (WINDOW_POPUP);
+               drag_data_window->set_name (X_("ContrastingPopup"));
+               drag_data_window->set_position (WIN_POS_MOUSE);
+               drag_data_window->set_decorated (false);
+
+               drag_data_label = manage (new Label);
+               drag_data_label->set_use_markup (true);
+
+               drag_data_window->set_border_width (6);
+               drag_data_window->add (*drag_data_label);
+               drag_data_label->show ();
+
+               Window* toplevel = dynamic_cast<Window*> (get_toplevel());
+               if (toplevel) {
+                       drag_data_window->set_transient_for (*toplevel);
+               }
+       }
+
+       if (!drag_data_window->is_visible ()) {
+               /* move the popup window vertically down from the panner display */
+               int rx, ry;
+               get_window()->get_origin (rx, ry);
+               drag_data_window->move (rx, ry+get_height());
+               drag_data_window->present ();
+       }
+
+       int w = get_width();
+       double delta = (ev->x - last_drag_x) / (double) w;
+       double current_width = width_control->get_value ();
+
+       if (dragging_left) {
+               delta = -delta;
+       }
+
+       if (dragging_left || dragging_right) {
+
+               /* maintain position as invariant as we change the width */
+
+
+               /* create a detent close to the center */
+
+               if (!detented && fabs (current_width) < 0.02) {
+                       detented = true;
+                       /* snap to zero */
+                       width_control->set_value (0);
+               }
+
+               if (detented) {
+
+                       accumulated_delta += delta;
+
+                       /* have we pulled far enough to escape ? */
+
+                       if (fabs (accumulated_delta) >= 0.025) {
+                               width_control->set_value (current_width + accumulated_delta);
+                               detented = false;
+                               accumulated_delta = false;
+                       }
+
+               } else {
+                       width_control->set_value (current_width + delta);
+               }
+
+       } else if (dragging_position) {
+
+               double pv = position_control->get_value(); // 0..1.0 ; 0 = left
+               position_control->set_value (pv + delta);
+       }
+
+       last_drag_x = ev->x;
+       return true;
 }
 
 bool
 StereoPanner::on_key_press_event (GdkEventKey* ev)
 {
-        double one_degree = 1.0/180.0;
-        double pv = position_control->get_value(); // 0..1.0 ; 0 = left
-        double wv = width_control->get_value(); // 0..1.0 ; 0 = left
-        double step;
-
-        if (Keyboard::modifier_state_contains (ev->state, Keyboard::PrimaryModifier)) {
-                step = one_degree;
-        } else {
-                step = one_degree * 5.0;
-        }
-
-        /* up/down control width because we consider pan position more "important"
-           (and thus having higher "sense" priority) than width.
-        */
-
-        switch (ev->keyval) {
-        case GDK_Up:
-                if (Keyboard::modifier_state_equals (ev->state, Keyboard::SecondaryModifier)) {
-                        width_control->set_value (1.0);
-                } else {
-                        width_control->set_value (wv + step);
-                }
-                break;
-        case GDK_Down:
-                if (Keyboard::modifier_state_equals (ev->state, Keyboard::SecondaryModifier)) {
-                        width_control->set_value (-1.0);
-                } else {
-                        width_control->set_value (wv - step);
-                }
-
-        case GDK_Left:
-                pv -= step;
-                position_control->set_value (pv);
-                break;
-        case GDK_Right:
-                pv += step;
-                position_control->set_value (pv);
-                break;
-
-                break;
-        case GDK_0:
-        case GDK_KP_0:
-                width_control->set_value (0.0);
-                break;
-
-        default: 
-                return false;
-        }
-                
-        return true;
+       double one_degree = 1.0/180.0;
+       double pv = position_control->get_value(); // 0..1.0 ; 0 = left
+       double wv = width_control->get_value(); // 0..1.0 ; 0 = left
+       double step;
+
+       if (Keyboard::modifier_state_contains (ev->state, Keyboard::PrimaryModifier)) {
+               step = one_degree;
+       } else {
+               step = one_degree * 5.0;
+       }
+
+       /* up/down control width because we consider pan position more "important"
+          (and thus having higher "sense" priority) than width.
+       */
+
+       switch (ev->keyval) {
+       case GDK_Up:
+               if (Keyboard::modifier_state_equals (ev->state, Keyboard::SecondaryModifier)) {
+                       width_control->set_value (1.0);
+               } else {
+                       width_control->set_value (wv + step);
+               }
+               break;
+       case GDK_Down:
+               if (Keyboard::modifier_state_equals (ev->state, Keyboard::SecondaryModifier)) {
+                       width_control->set_value (-1.0);
+               } else {
+                       width_control->set_value (wv - step);
+               }
+
+       case GDK_Left:
+               pv -= step;
+               position_control->set_value (pv);
+               break;
+       case GDK_Right:
+               pv += step;
+               position_control->set_value (pv);
+               break;
+
+               break;
+       case GDK_0:
+       case GDK_KP_0:
+               width_control->set_value (0.0);
+               break;
+
+       default:
+               return false;
+       }
+
+       return true;
 }
 
 bool
 StereoPanner::on_key_release_event (GdkEventKey* ev)
 {
-        return false;
+       return false;
 }
 
 bool
@@ -643,28 +642,28 @@ StereoPanner::on_leave_notify_event (GdkEventCrossing*)
 void
 StereoPanner::set_colors ()
 {
-        colors[Normal].fill = ARDOUR_UI::config()->canvasvar_StereoPannerFill.get();
-        colors[Normal].outline = ARDOUR_UI::config()->canvasvar_StereoPannerOutline.get();
-        colors[Normal].text = ARDOUR_UI::config()->canvasvar_StereoPannerText.get();
-        colors[Normal].background = ARDOUR_UI::config()->canvasvar_StereoPannerBackground.get();
-        colors[Normal].rule = ARDOUR_UI::config()->canvasvar_StereoPannerRule.get();
-
-        colors[Mono].fill = ARDOUR_UI::config()->canvasvar_StereoPannerMonoFill.get();
-        colors[Mono].outline = ARDOUR_UI::config()->canvasvar_StereoPannerMonoOutline.get();
-        colors[Mono].text = ARDOUR_UI::config()->canvasvar_StereoPannerMonoText.get();
-        colors[Mono].background = ARDOUR_UI::config()->canvasvar_StereoPannerMonoBackground.get();
-        colors[Mono].rule = ARDOUR_UI::config()->canvasvar_StereoPannerRule.get();
-
-        colors[Inverted].fill = ARDOUR_UI::config()->canvasvar_StereoPannerInvertedFill.get();
-        colors[Inverted].outline = ARDOUR_UI::config()->canvasvar_StereoPannerInvertedOutline.get();
-        colors[Inverted].text = ARDOUR_UI::config()->canvasvar_StereoPannerInvertedText.get();
-        colors[Inverted].background = ARDOUR_UI::config()->canvasvar_StereoPannerInvertedBackground.get();
-        colors[Inverted].rule = ARDOUR_UI::config()->canvasvar_StereoPannerRule.get();
+       colors[Normal].fill = ARDOUR_UI::config()->canvasvar_StereoPannerFill.get();
+       colors[Normal].outline = ARDOUR_UI::config()->canvasvar_StereoPannerOutline.get();
+       colors[Normal].text = ARDOUR_UI::config()->canvasvar_StereoPannerText.get();
+       colors[Normal].background = ARDOUR_UI::config()->canvasvar_StereoPannerBackground.get();
+       colors[Normal].rule = ARDOUR_UI::config()->canvasvar_StereoPannerRule.get();
+
+       colors[Mono].fill = ARDOUR_UI::config()->canvasvar_StereoPannerMonoFill.get();
+       colors[Mono].outline = ARDOUR_UI::config()->canvasvar_StereoPannerMonoOutline.get();
+       colors[Mono].text = ARDOUR_UI::config()->canvasvar_StereoPannerMonoText.get();
+       colors[Mono].background = ARDOUR_UI::config()->canvasvar_StereoPannerMonoBackground.get();
+       colors[Mono].rule = ARDOUR_UI::config()->canvasvar_StereoPannerRule.get();
+
+       colors[Inverted].fill = ARDOUR_UI::config()->canvasvar_StereoPannerInvertedFill.get();
+       colors[Inverted].outline = ARDOUR_UI::config()->canvasvar_StereoPannerInvertedOutline.get();
+       colors[Inverted].text = ARDOUR_UI::config()->canvasvar_StereoPannerInvertedText.get();
+       colors[Inverted].background = ARDOUR_UI::config()->canvasvar_StereoPannerInvertedBackground.get();
+       colors[Inverted].rule = ARDOUR_UI::config()->canvasvar_StereoPannerRule.get();
 }
 
 void
 StereoPanner::color_handler ()
 {
-        set_colors ();
-        queue_draw ();
+       set_colors ();
+       queue_draw ();
 }
index 40a1de2047ef7eaa345ec6e7feaad27478c6f058..200a29861ec7fb10a286948e1827e1f51b0ccde4 100644 (file)
@@ -89,7 +89,7 @@ Amp::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_frame*/,
                                        sp[nx] *= gab[nx];
                                }
                        }
-                       
+
                        _current_gain = gab[nframes-1];
 
                } else { /* manual (scalar) gain */
@@ -282,18 +282,18 @@ Amp::apply_gain (AudioBuffer& buf, framecnt_t nframes, gain_t initial, gain_t ta
 
 
         Sample* const buffer = buf.data();
-        
+
         fractional_pos = 1.0;
-        
+
         for (pframes_t nx = 0; nx < declick; ++nx) {
                 buffer[nx] *= (initial + (delta * (0.5 + 0.5 * cos (M_PI * fractional_pos))));
                 fractional_pos += fractional_shift;
         }
-        
+
         /* now ensure the rest of the buffer has the target value applied, if necessary. */
-        
+
         if (declick != nframes) {
-                
+
                 if (target == 0.0) {
                         memset (&buffer[declick], 0, sizeof (Sample) * (nframes - declick));
                 } else if (target != 1.0) {
@@ -404,7 +404,7 @@ Amp::set_state (const XMLNode& node, int version)
         if ((gain_node = node.child (Controllable::xml_node_name.c_str())) != 0) {
                 _gain_control->set_state (*gain_node, version);
         }
-        
+
        return 0;
 }
 
index 14bf52a0a2ec5ddc6be97bb70dba74e07fc792e4..7d8d1afd67db01ae0d51a7b7c18bbd1b59fd6e97 100644 (file)
@@ -58,8 +58,8 @@ public:
 
        static void apply_gain (BufferSet& bufs, framecnt_t nframes, gain_t initial, gain_t target);
        static void apply_simple_gain(BufferSet& bufs, framecnt_t nframes, gain_t target);
-        
-        static void apply_gain (AudioBuffer& buf, framecnt_t nframes, gain_t initial, gain_t target);
+
+       static void apply_gain (AudioBuffer& buf, framecnt_t nframes, gain_t initial, gain_t target);
        static void apply_simple_gain(AudioBuffer& buf, framecnt_t nframes, gain_t target);
 
        static void declick (BufferSet& bufs, framecnt_t nframes, int dir);
index 2c92bbc92ac3cceb32ccd6a49d14f3bb1911f9a6..51101a50ad66af423a71cebdf125cd0f52d3bb01 100644 (file)
@@ -35,7 +35,7 @@
 
 #include "ardour/types.h"
 
-#include <jack/jack.h> 
+#include <jack/jack.h>
 
 namespace MIDI {
        class MachineControl;
@@ -53,15 +53,15 @@ namespace ARDOUR {
        int cleanup ();
        bool no_auto_connect ();
        void make_property_quarks ();
-        
+
        extern PBD::PropertyChange bounds_change;
 
        extern const char* const ardour_config_info;
 
        void find_bindings_files (std::map<std::string,std::string>&);
 
-        std::string translation_kill_path ();
-        bool translations_are_disabled ();
+       std::string translation_kill_path ();
+       bool translations_are_disabled ();
 
        const layer_t max_layer = UCHAR_MAX;
 
index a0f854b0eb2bd9b3b2f77bef5ff42f250e460b6e..51fb80a9ce2b43b7fcbe8e864ff34040447b5454 100644 (file)
@@ -122,12 +122,12 @@ public:
                assert(len <= _capacity);
 
                Sample* dst = _data + dst_offset;
-                gain_t  gain_delta = (target - initial)/len;
+               gain_t  gain_delta = (target - initial)/len;
 
-                for (framecnt_t n = 0; n < len; ++n) {
-                        *dst++ += (*src++ * initial);
-                        initial += gain_delta;
-                }
+               for (framecnt_t n = 0; n < len; ++n) {
+                       *dst++ += (*src++ * initial);
+                       initial += gain_delta;
+               }
 
                _silent = (_silent && initial == 0 && target == 0);
                _written = true;
index 405f8cc551ece370edc7d46d7d9cdfc97f43e485..e37963a07a0addffcef43586ea158c183852a918 100644 (file)
@@ -159,7 +159,7 @@ class AudioDiskstream : public Diskstream
        void set_block_size (pframes_t);
        int  internal_playback_seek (framecnt_t distance);
        int  can_internal_playback_seek (framecnt_t distance);
-        std::list<boost::shared_ptr<Source> > steal_write_sources();
+       std::list<boost::shared_ptr<Source> > steal_write_sources();
        void reset_write_sources (bool, bool force = false);
        void non_realtime_input_change ();
        void non_realtime_locate (framepos_t location);
@@ -175,19 +175,19 @@ class AudioDiskstream : public Diskstream
        bool commit  (framecnt_t nframes);
 
   private:
-        struct ChannelSource { 
-            std::string name;
+       struct ChannelSource {
+               std::string name;
 
-            bool is_physical () const;
-            void ensure_monitor_input (bool) const;
-        };
+               bool is_physical () const;
+               void ensure_monitor_input (bool) const;
+       };
 
        struct ChannelInfo : public boost::noncopyable {
 
-               ChannelInfo (framecnt_t playback_buffer_size, 
-                             framecnt_t capture_buffer_size,
-                             framecnt_t speed_buffer_size, 
-                             framecnt_t wrap_buffer_size);
+               ChannelInfo (framecnt_t playback_buffer_size,
+                            framecnt_t capture_buffer_size,
+                            framecnt_t speed_buffer_size,
+                            framecnt_t wrap_buffer_size);
                ~ChannelInfo ();
 
                Sample     *playback_wrap_buffer;
@@ -199,8 +199,8 @@ class AudioDiskstream : public Diskstream
                boost::shared_ptr<AudioFileSource> write_source;
 
                /// information the Port that our audio data comes from
-               
-                ChannelSource source;
+
+               ChannelSource source;
 
                Sample       *current_capture_buffer;
                Sample       *current_playback_buffer;
@@ -219,8 +219,8 @@ class AudioDiskstream : public Diskstream
                // the following are used in the butler thread only
                framecnt_t                     curr_capture_cnt;
 
-                void resize_playback (framecnt_t);
-                void resize_capture (framecnt_t);
+               void resize_playback (framecnt_t);
+               void resize_capture (framecnt_t);
        };
 
        typedef std::vector<ChannelInfo*> ChannelList;
@@ -234,8 +234,8 @@ class AudioDiskstream : public Diskstream
        int do_refill_with_alloc ();
 
        int read (Sample* buf, Sample* mixdown_buffer, float* gain_buffer,
-                  framepos_t& start, framecnt_t cnt,
-                  ChannelInfo* channel_info, int channel, bool reversed);
+                 framepos_t& start, framecnt_t cnt,
+                 ChannelInfo* channel_info, int channel, bool reversed);
 
        void finish_capture (bool rec_monitors_input, boost::shared_ptr<ChannelList>);
        void transport_stopped_wallclock (struct tm&, time_t, bool abort);
@@ -260,8 +260,8 @@ class AudioDiskstream : public Diskstream
        void setup_destructive_playlist ();
        void use_destructive_playlist ();
 
-        void adjust_playback_buffering ();
-        void adjust_capture_buffering ();
+       void adjust_playback_buffering ();
+       void adjust_capture_buffering ();
 
        void engage_record_enable ();
        void disengage_record_enable ();
index 42359414e92acbf034ad97806deaa7952ba6d7c2..c2e1e87f7583ce00febc203718c591271fb5e83f 100644 (file)
@@ -33,42 +33,41 @@ namespace ARDOUR {
 class AudioPlaylist;
 
 class AudioPlaylistSource : public PlaylistSource, public AudioSource  {
-  public:
-    virtual ~AudioPlaylistSource ();
-
-    bool empty() const;
-    std::string peak_path (std::string audio_path);
-    uint32_t   n_channels() const;
-    bool clamped_at_unity () const { return false; }
-
-    framecnt_t read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) const;
-    framecnt_t write_unlocked (Sample *src, framecnt_t cnt);
-    
-    float sample_rate () const;
-    int setup_peakfile ();
-    
-    XMLNode& get_state ();
-    int set_state (const XMLNode&, int version);
-    
-    bool can_truncate_peaks() const { return false; }
-    bool can_be_analysed() const    { return _length > 0; }
-    
-  protected:
-    friend class SourceFactory;
-
-    AudioPlaylistSource (Session&, const PBD::ID& orig, const std::string& name, boost::shared_ptr<AudioPlaylist>, uint32_t chn,
-                         frameoffset_t begin, framecnt_t len, Source::Flag flags);
-    AudioPlaylistSource (Session&, const XMLNode&);
-
-    
-  private:
-    uint32_t                         _playlist_channel;
-    std::string                      _peak_path;
-
-    int set_state (const XMLNode&, int version, bool with_descendants);
+public:
+       virtual ~AudioPlaylistSource ();
 
+       bool empty() const;
+       std::string peak_path (std::string audio_path);
+       uint32_t   n_channels() const;
+       bool clamped_at_unity () const { return false; }
+
+       framecnt_t read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) const;
+       framecnt_t write_unlocked (Sample *src, framecnt_t cnt);
+
+       float sample_rate () const;
+       int setup_peakfile ();
+
+       XMLNode& get_state ();
+       int set_state (const XMLNode&, int version);
+
+       bool can_truncate_peaks() const { return false; }
+       bool can_be_analysed() const    { return _length > 0; }
+
+protected:
+       friend class SourceFactory;
+
+       AudioPlaylistSource (Session&, const PBD::ID& orig, const std::string& name, boost::shared_ptr<AudioPlaylist>, uint32_t chn,
+                            frameoffset_t begin, framecnt_t len, Source::Flag flags);
+       AudioPlaylistSource (Session&, const XMLNode&);
+
+
+private:
+       uint32_t    _playlist_channel;
+       std::string _peak_path;
+
+       int set_state (const XMLNode&, int version, bool with_descendants);
 };
-        
+
 } /* namespace */
 
 #endif /* __ardour_audio_playlist_source_h__ */
index 80124300fd7a5c624e1e7ee4dad5a6152fb5495b..7a2c50099f544d1c3715e8a1896dd59aad5c67f1 100644 (file)
@@ -28,7 +28,7 @@ class Session;
 class AudioDiskstream;
 class AudioPlaylist;
 class RouteGroup;
-class AudioFileSource; 
+class AudioFileSource;
 
 class AudioTrack : public Track
 {
@@ -40,10 +40,10 @@ class AudioTrack : public Track
        bool can_use_mode (TrackMode m, bool& bounce_required);
 
        int roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
-                  int declick, bool can_record, bool rec_monitors_input, bool& need_butler);
+                 int declick, bool can_record, bool rec_monitors_input, bool& need_butler);
 
        void use_new_diskstream ();
-        void set_diskstream (boost::shared_ptr<Diskstream>);
+       void set_diskstream (boost::shared_ptr<Diskstream>);
 
        DataType data_type () const {
                return DataType::AUDIO;
@@ -62,11 +62,11 @@ class AudioTrack : public Track
        boost::shared_ptr<AudioFileSource> write_source (uint32_t n = 0);
 
        bool bounceable () const;
-       
+
   protected:
        boost::shared_ptr<AudioDiskstream> audio_diskstream () const;
        XMLNode& state (bool full);
-       
+
        int _set_state (const XMLNode&, int, bool call_base);
 
   private:
index 74edd4a3c22c0ab90d244c0274ce1ad1872f79b8..f36e89073bb53cd82e38c5f450cb2c67d9d2cb1e 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2006 Paul Davis 
+    Copyright (C) 2006 Paul Davis
     Written by Taybin Rutkin
 
     This program is free software; you can redistribute it and/or modify
@@ -64,8 +64,8 @@ class AUPlugin : public ARDOUR::Plugin
        AUPlugin (AudioEngine& engine, Session& session, boost::shared_ptr<CAComponent> comp);
        AUPlugin (const AUPlugin& other);
        virtual ~AUPlugin ();
-       
-        std::string unique_id () const;
+
+       std::string unique_id () const;
        const char * label () const;
        const char * name () const { return _info->name.c_str(); }
        const char * maker () const { return _info->creator.c_str(); }
@@ -74,14 +74,14 @@ class AUPlugin : public ARDOUR::Plugin
        framecnt_t signal_latency() const;
        void set_parameter (uint32_t which, float val);
        float get_parameter (uint32_t which) const;
-    
+
        int get_parameter_descriptor (uint32_t which, ParameterDescriptor&) const;
        uint32_t nth_parameter (uint32_t which, bool& ok) const;
        void activate ();
        void deactivate ();
        void flush ();
        int set_block_size (pframes_t nframes);
-    
+
        int connect_and_run (BufferSet& bufs,
                             ChanMapping in, ChanMapping out,
                             pframes_t nframes, framecnt_t offset);
@@ -89,41 +89,41 @@ class AUPlugin : public ARDOUR::Plugin
        std::string describe_parameter (Evoral::Parameter);
        std::string state_node_name () const { return "audiounit"; }
        void print_parameter (uint32_t, char*, uint32_t len) const;
-    
+
        bool parameter_is_audio (uint32_t) const;
        bool parameter_is_control (uint32_t) const;
        bool parameter_is_input (uint32_t) const;
        bool parameter_is_output (uint32_t) const;
-    
+
        int set_state(const XMLNode& node, int);
-       
+
        PresetRecord save_preset (std::string name);
        bool load_preset (PresetRecord);
        std::string current_preset() const;
 
        bool has_editor () const;
-       
+
        bool reconfigurable_io() const { return true; }
        bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
        bool configure_io (ChanCount in, ChanCount out);
        bool requires_fixed_size_buffers() const;
 
-       void set_fixed_size_buffers (bool yn) { 
+       void set_fixed_size_buffers (bool yn) {
                _requires_fixed_size_buffers = yn;
        }
 
        boost::shared_ptr<CAAudioUnit> get_au () { return unit; }
        boost::shared_ptr<CAComponent> get_comp () const { return comp; }
-    
-        OSStatus render_callback(AudioUnitRenderActionFlags *ioActionFlags,
-                                const AudioTimeStamp    *inTimeStamp,
-                                UInt32       inBusNumber,
-                                UInt32       inNumberFrames,
-                                AudioBufferList*       ioData);
+
+       OSStatus render_callback(AudioUnitRenderActionFlags *ioActionFlags,
+                                const AudioTimeStamp       *inTimeStamp,
+                                UInt32                      inBusNumber,
+                                UInt32                      inNumberFrames,
+                                AudioBufferList*            ioData);
 
        /* "host" callbacks */
 
-       OSStatus get_beat_and_tempo_callback (Float64* outCurrentBeat, 
+       OSStatus get_beat_and_tempo_callback (Float64* outCurrentBeat,
                                              Float64* outCurrentTempo);
 
        OSStatus get_musical_time_location_callback (UInt32*  outDeltaSampleOffsetToNextBeat,
@@ -142,11 +142,11 @@ class AUPlugin : public ARDOUR::Plugin
 
   private:
        void find_presets ();
-       
-        boost::shared_ptr<CAComponent> comp;
-        boost::shared_ptr<CAAudioUnit> unit;
-       
-        bool initialized;
+
+       boost::shared_ptr<CAComponent> comp;
+       boost::shared_ptr<CAAudioUnit> unit;
+
+       bool initialized;
        int32_t input_channels;
        int32_t output_channels;
        std::vector<std::pair<int,int> > io_configs;
@@ -173,7 +173,7 @@ class AUPlugin : public ARDOUR::Plugin
        UInt32 global_elements;
        UInt32 output_elements;
        UInt32 input_elements;
-       
+
        int set_output_format (AudioStreamBasicDescription&);
        int set_input_format (AudioStreamBasicDescription&);
        int set_stream_format (int scope, uint32_t cnt, AudioStreamBasicDescription&);
@@ -182,11 +182,11 @@ class AUPlugin : public ARDOUR::Plugin
 
        std::vector<std::pair<uint32_t, uint32_t> > parameter_map;
        uint32_t current_maxbuf;
-        framecnt_t current_offset;
-        framecnt_t cb_offset;
-        BufferSet* current_buffers;
-        framecnt_t frames_processed;
-       
+       framecnt_t current_offset;
+       framecnt_t cb_offset;
+       BufferSet* current_buffers;
+       framecnt_t frames_processed;
+
        std::vector<AUParameterDescriptor> descriptors;
        void init ();
 
@@ -195,15 +195,15 @@ class AUPlugin : public ARDOUR::Plugin
        bool      last_transport_rolling;
        float     last_transport_speed;
 };
-       
+
 typedef boost::shared_ptr<AUPlugin> AUPluginPtr;
 
-struct AUPluginCachedInfo { 
+struct AUPluginCachedInfo {
        std::vector<std::pair<int,int> > io_configs;
 };
 
 class AUPluginInfo : public PluginInfo {
-  public:      
+  public:
         AUPluginInfo (boost::shared_ptr<CAComponentDescription>);
        ~AUPluginInfo ();
 
@@ -219,14 +219,14 @@ class AUPluginInfo : public PluginInfo {
 
        static PluginInfoList* discover ();
        static void get_names (CAComponentDescription&, std::string& name, std::string& maker);
-        static std::string stringify_descriptor (const CAComponentDescription&);
+       static std::string stringify_descriptor (const CAComponentDescription&);
 
        static int load_cached_info ();
 
   private:
        boost::shared_ptr<CAComponentDescription> descriptor;
        UInt32 version;
-       
+
        static void discover_music (PluginInfoList&);
        static void discover_fx (PluginInfoList&);
        static void discover_generators (PluginInfoList&);
@@ -236,10 +236,10 @@ class AUPluginInfo : public PluginInfo {
 
        typedef std::map<std::string,AUPluginCachedInfo> CachedInfoMap;
        static CachedInfoMap cached_info;
-       
+
        static bool cached_io_configuration (const std::string&, UInt32, CAComponent&, AUPluginCachedInfo&, const std::string& name);
        static void add_cached_info (const std::string&, AUPluginCachedInfo&);
-       static void save_cached_info ();        
+       static void save_cached_info ();
 };
 
 typedef boost::shared_ptr<AUPluginInfo> AUPluginInfoPtr;
index 312d6d50875a9b2c01137734c69c5790ba50eefd..68daadd674a1425bf400251bf8ced9712fb49949 100644 (file)
@@ -59,13 +59,13 @@ class ProcessThread;
 
 class AudioEngine : public SessionHandlePtr
 {
-   public:
+public:
        typedef std::set<Port*> Ports;
 
-        class disconnected_exception : public std::exception {
-          public:
-                virtual const char *what() const throw() { return "AudioEngine is disconnected"; }
-        };
+       class disconnected_exception : public std::exception {
+       public:
+               virtual const char *what() const throw() { return "AudioEngine is disconnected"; }
+       };
 
        AudioEngine (std::string client_name, std::string session_uuid);
        virtual ~AudioEngine ();
@@ -75,7 +75,7 @@ class AudioEngine : public SessionHandlePtr
 
        bool is_realtime () const;
 
-        ProcessThread* main_thread() const { return _main_thread; }
+       ProcessThread* main_thread() const { return _main_thread; }
 
        std::string client_name() const { return jack_client_name; }
 
@@ -107,7 +107,7 @@ class AudioEngine : public SessionHandlePtr
                }
                return jack_frames_since_cycle_start (_priv_jack);
        }
-       
+
        pframes_t frame_time () {
                jack_client_t* _priv_jack = _jack;
                if (!_running || !_priv_jack) {
@@ -170,8 +170,8 @@ class AudioEngine : public SessionHandlePtr
        Port *register_output_port (DataType, const std::string& portname);
        int   unregister_port (Port &);
 
-        bool port_is_physical (const std::string&) const;
-        void ensure_monitor_input (const std::string&, bool) const;
+       bool port_is_physical (const std::string&) const;
+       void ensure_monitor_input (const std::string&, bool) const;
 
        void split_cycle (pframes_t offset);
 
@@ -255,14 +255,14 @@ _    the regular process() call to session->process() is not made.
 
        std::string make_port_name_relative (std::string) const;
        std::string make_port_name_non_relative (std::string) const;
-        bool port_is_mine (const std::string&) const;
+       bool port_is_mine (const std::string&) const;
 
        static AudioEngine* instance() { return _instance; }
        void died ();
 
-        int create_process_thread (boost::function<void()>, pthread_t*, size_t stacksize);
+       int create_process_thread (boost::function<void()>, pthread_t*, size_t stacksize);
 
-  private:
+private:
        static AudioEngine*       _instance;
 
        jack_client_t* volatile   _jack; /* could be reset to null by SIGPIPE or another thread */
@@ -321,10 +321,10 @@ _    the regular process() call to session->process() is not made.
        int  jack_bufsize_callback (pframes_t);
        int  jack_sample_rate_callback (pframes_t);
 
-        void set_jack_callbacks ();
+       void set_jack_callbacks ();
 
-        static void _latency_callback (jack_latency_callback_mode_t, void*);
-        void jack_latency_callback (jack_latency_callback_mode_t);
+       static void _latency_callback (jack_latency_callback_mode_t, void*);
+       void jack_latency_callback (jack_latency_callback_mode_t);
 
        int connect_to_jack (std::string client_name, std::string session_uuid);
 
@@ -337,19 +337,19 @@ _    the regular process() call to session->process() is not made.
 
        Glib::Thread*    m_meter_thread;
        static gint      m_meter_exit;
-       
-        ProcessThread* _main_thread;
-
-        struct ThreadData {
-            AudioEngine* engine;
-            boost::function<void()> f;
-            size_t stacksize;
-            
-            ThreadData (AudioEngine* ae, boost::function<void()> fp, size_t stacksz) 
-            : engine (ae) , f (fp) , stacksize (stacksz) {}
-        };
-        
-        static void* _start_process_thread (void*);
+
+       ProcessThread* _main_thread;
+
+       struct ThreadData {
+               AudioEngine* engine;
+               boost::function<void()> f;
+               size_t stacksize;
+
+               ThreadData (AudioEngine* ae, boost::function<void()> fp, size_t stacksz)
+               : engine (ae) , f (fp) , stacksize (stacksz) {}
+       };
+
+       static void* _start_process_thread (void*);
 };
 
 } // namespace ARDOUR
index 3bd4bbd34c0b92abb6633e8d34c189f4a033b9af..cc26371a78d719b148513173fdca2a6f36b8002d 100644 (file)
@@ -43,9 +43,9 @@ public:
                return (set_source_name(newname, destructive()) == 0);
        }
 
-        std::string peak_path (std::string audio_path);
-        std::string find_broken_peakfile (std::string missing_peak_path,
-                       std::string audio_path);
+       std::string peak_path (std::string audio_path);
+       std::string find_broken_peakfile (std::string missing_peak_path,
+                                         std::string audio_path);
 
        static void set_peak_dir (std::string dir) { peak_dir = dir; }
 
index 910fcee0d717d0fb39254a2f7ddb43d6d7595741..5b1af2dc1ff2e86e08b4e073fea6d74f8e937a08 100644 (file)
@@ -34,13 +34,13 @@ class AudioRegion;
 class Source;
 
 namespace Properties {
-        /* fake the type, since crossfades are handled by SequenceProperty which doesn't
-           care about such things.
-        */
-        extern PBD::PropertyDescriptor<bool> crossfades;
+       /* fake the type, since crossfades are handled by SequenceProperty which doesn't
+          care about such things.
+       */
+       extern PBD::PropertyDescriptor<bool> crossfades;
 }
 
-class AudioPlaylist;   
+class AudioPlaylist;
 
 class CrossfadeListProperty : public PBD::SequenceProperty<std::list<boost::shared_ptr<Crossfade> > >
 {
@@ -57,12 +57,12 @@ private:
        /* copy construction only by ourselves */
        CrossfadeListProperty (CrossfadeListProperty const & p);
 
-        friend class AudioPlaylist;
-        /* we live and die with our playlist, no lifetime management needed */
-        AudioPlaylist& _playlist;
+       friend class AudioPlaylist;
+       /* we live and die with our playlist, no lifetime management needed */
+       AudioPlaylist& _playlist;
 };
 
-       
+
 class AudioPlaylist : public ARDOUR::Playlist
 {
 public:
@@ -78,12 +78,12 @@ public:
 
        void clear (bool with_signals=true);
 
-        framecnt_t read (Sample *dst, Sample *mixdown, float *gain_buffer, framepos_t start, framecnt_t cnt, uint32_t chan_n=0);
+       framecnt_t read (Sample *dst, Sample *mixdown, float *gain_buffer, framepos_t start, framecnt_t cnt, uint32_t chan_n=0);
 
        int set_state (const XMLNode&, int version);
 
        PBD::Signal1<void,boost::shared_ptr<Crossfade> >  NewCrossfade;
-       
+
        void foreach_crossfade (boost::function<void (boost::shared_ptr<Crossfade>)>);
        void crossfades_at (framepos_t frame, Crossfades&);
 
@@ -92,8 +92,8 @@ public:
        void update (const CrossfadeListProperty::ChangeRecord &);
 
        boost::shared_ptr<Crossfade> find_crossfade (const PBD::ID &) const;
-       
-    protected:
+
+protected:
 
        /* playlist "callbacks" */
        void notify_crossfade_added (boost::shared_ptr<Crossfade>);
@@ -101,28 +101,28 @@ public:
 
        void finalize_split_region (boost::shared_ptr<Region> orig, boost::shared_ptr<Region> left, boost::shared_ptr<Region> right);
 
-        void refresh_dependents (boost::shared_ptr<Region> region);
-        void check_dependents (boost::shared_ptr<Region> region, bool norefresh);
-        void remove_dependents (boost::shared_ptr<Region> region);
+       void refresh_dependents (boost::shared_ptr<Region> region);
+       void check_dependents (boost::shared_ptr<Region> region, bool norefresh);
+       void remove_dependents (boost::shared_ptr<Region> region);
        void copy_dependents (const std::vector<TwoRegions>&, Playlist*) const;
 
        void pre_combine (std::vector<boost::shared_ptr<Region> >&);
        void post_combine (std::vector<boost::shared_ptr<Region> >&, boost::shared_ptr<Region>);
        void pre_uncombine (std::vector<boost::shared_ptr<Region> >&, boost::shared_ptr<Region>);
 
-    private:
-       CrossfadeListProperty _crossfades;
-       Crossfades      _pending_xfade_adds;
+private:
+       CrossfadeListProperty _crossfades;
+       Crossfades            _pending_xfade_adds;
 
-       void crossfade_invalidated (boost::shared_ptr<Region>);
-       XMLNode& state (bool full_state);
-       void dump () const;
+       void crossfade_invalidated (boost::shared_ptr<Region>);
+       XMLNode& state (bool full_state);
+       void dump () const;
 
-       bool region_changed (const PBD::PropertyChange&, boost::shared_ptr<Region>);
-       void crossfade_changed (const PBD::PropertyChange&);
-       void add_crossfade (boost::shared_ptr<Crossfade>);
+       bool region_changed (const PBD::PropertyChange&, boost::shared_ptr<Region>);
+       void crossfade_changed (const PBD::PropertyChange&);
+       void add_crossfade (boost::shared_ptr<Crossfade>);
 
-       void source_offset_changed (boost::shared_ptr<AudioRegion> region);
+       void source_offset_changed (boost::shared_ptr<AudioRegion> region);
 };
 
 } /* namespace ARDOUR */
index 8d929827c5b00a3c40ed57af0888c3df8d367f97..0b9efd76a7713b73c6ef3369dc76e7799df998be 100644 (file)
@@ -115,10 +115,10 @@ class AudioRegion : public Region
                                     uint32_t  chan_n      = 0,
                                     framecnt_t read_frames = 0,
                                     framecnt_t skip_frames = 0) const;
-       
+
        virtual framecnt_t master_read_at (Sample *buf, Sample *mixdown_buf, float *gain_buf,
                                           framepos_t position, framecnt_t cnt, uint32_t chan_n=0) const;
-       
+
        virtual framecnt_t read_raw_internal (Sample*, framepos_t, framecnt_t, int channel) const;
 
        XMLNode& state ();
@@ -196,7 +196,7 @@ class AudioRegion : public Region
        PBD::Property<bool>     _fade_out_active;
        /** linear gain to apply to the whole region */
        PBD::Property<gain_t>   _scale_amplitude;
-       
+
        void register_properties ();
        void post_set (const PBD::PropertyChange&);
 
index ded3e5e8624c96e02c31f12c3cc5134a7c677f15..67d5ddce3ad3b965bbc1e34f1402c012c5a740f6 100644 (file)
@@ -49,7 +49,7 @@ class AudioSource : virtual public Source,
        framecnt_t readable_length() const { return _length; }
        virtual uint32_t n_channels()      const { return 1; }
 
-        virtual bool       empty() const;
+       virtual bool       empty() const;
        framecnt_t length (framepos_t pos) const;
        void       update_length (framepos_t pos, framecnt_t cnt);
 
@@ -107,17 +107,17 @@ class AudioSource : virtual public Source,
        virtual bool clamped_at_unity () const = 0;
 
        static void allocate_working_buffers (framecnt_t framerate);
-    
+
   protected:
        static bool _build_missing_peakfiles;
        static bool _build_peakfiles;
 
        static size_t _working_buffers_size;
-       
+
        /* these collections of working buffers for supporting
           playlist's reading from potentially nested/recursive
           sources assume SINGLE THREADED reads by the butler
-          thread, or a lock around calls that use them. 
+          thread, or a lock around calls that use them.
        */
 
        static std::vector<boost::shared_ptr<Sample> > _mixdown_buffers;
@@ -146,14 +146,14 @@ class AudioSource : virtual public Source,
        virtual framecnt_t write_unlocked (Sample *dst, framecnt_t cnt) = 0;
        virtual std::string peak_path(std::string audio_path) = 0;
        virtual std::string find_broken_peakfile (std::string missing_peak_path,
-                                                  std::string audio_path) { return peak_path (audio_path); }
+                                                 std::string audio_path) { return peak_path (audio_path); }
 
        virtual int read_peaks_with_fpp (PeakData *peaks,
                                         framecnt_t npeaks, framepos_t start, framecnt_t cnt,
                                         double samples_per_visual_peak, framecnt_t fpp) const;
-       
+
        int compute_and_write_peaks (Sample* buf, framecnt_t first_frame, framecnt_t cnt,
-                                    bool force, bool intermediate_peaks_ready_signal, 
+                                    bool force, bool intermediate_peaks_ready_signal,
                                     framecnt_t frames_per_peak);
 
   private:
@@ -165,7 +165,7 @@ class AudioSource : virtual public Source,
         *  during the handling of the signal.
         */
        mutable Glib::Mutex _peaks_ready_lock;
-       
+
        PBD::FdFileDescriptor* _peakfile_descriptor;
        int        _peakfile_fd;
        framecnt_t peak_leftover_cnt;
index a0047e225fbccde28a7dcda5264fdf7a57f729b9..97ed164494cf0cc29dd0e747a26933ef62857466 100644 (file)
@@ -39,7 +39,7 @@ class Auditioner : public AudioTrack
        Auditioner (Session&);
        ~Auditioner ();
 
-        int init ();
+       int init ();
 
        void audition_region (boost::shared_ptr<Region>);
 
@@ -53,9 +53,9 @@ class Auditioner : public AudioTrack
        }
 
        bool auditioning() const { return g_atomic_int_get (&_auditioning); }
-        bool needs_monitor() const { return via_monitor; }
+       bool needs_monitor() const { return via_monitor; }
 
-        virtual ChanCount input_streams () const;
+       virtual ChanCount input_streams () const;
 
   private:
        boost::shared_ptr<AudioRegion> the_region;
@@ -63,7 +63,7 @@ class Auditioner : public AudioTrack
        mutable gint _auditioning;
        Glib::Mutex lock;
        framecnt_t length;
-        bool via_monitor;
+       bool via_monitor;
 
        void drop_ports ();
        static void *_drop_ports (void *);
index 1abfb4faf164acbb55da6921e9c0236d17c8ea1f..69ef7d3ecb2e5b0b93dc3a0618cf60a754779ecc 100644 (file)
@@ -43,7 +43,7 @@ class Automatable : virtual public Evoral::ControlSet
 {
 public:
        Automatable(Session&);
-        Automatable (const Automatable& other);
+       Automatable (const Automatable& other);
 
        virtual ~Automatable() {}
 
@@ -63,7 +63,7 @@ public:
        virtual void transport_stopped (framepos_t now);
 
        virtual std::string describe_parameter(Evoral::Parameter param);
-        virtual std::string value_as_string (boost::shared_ptr<AutomationControl>) const;
+       virtual std::string value_as_string (boost::shared_ptr<AutomationControl>) const;
 
        AutoState get_parameter_automation_state (Evoral::Parameter param);
        virtual void set_parameter_automation_state (Evoral::Parameter param, AutoState);
@@ -93,11 +93,11 @@ public:
 
        typedef Evoral::ControlSet::Controls Controls;
 
-        static const std::string xml_node_name;
+       static const std::string xml_node_name;
 
        int set_automation_xml_state (const XMLNode&, Evoral::Parameter default_param);
        XMLNode& get_automation_xml_state();
-       
+
   protected:
        Session& _a_session;
 
index 44104b020ccc8be72fbd93496d4c62a0b9cc048b..e9801111d1f0d0a40dcca46926e488c86409dd67 100644 (file)
@@ -77,10 +77,10 @@ public:
        void set_value (double);
        double get_value () const;
 
-        double lower() const { return parameter().min(); }
-        double upper() const { return parameter().max(); }
+       double lower() const { return parameter().min(); }
+       double upper() const { return parameter().max(); }
 
-        const ARDOUR::Session& session() const { return _session; }
+       const ARDOUR::Session& session() const { return _session; }
 
        /** Convert user values to UI values.  See pbd/controllable.h */
        virtual double user_to_ui (double val) const {
@@ -91,9 +91,9 @@ public:
        virtual double ui_to_user (double val) const {
                return val;
        }
-       
+
 protected:
-       
+
        ARDOUR::Session& _session;
 };
 
index 9a5420e74bf8f43548a00b2bbdcfab50654a52b5..58d1fe4acf92352634e6d36e76d284e66125b7a9 100644 (file)
@@ -64,8 +64,8 @@ class AutomationList : public PBD::StatefulDestructible, public Evoral::ControlL
                return (_state & Play) || ((_state & Touch) && !touching());
        }
        bool automation_write () const {
-                return ((_state & Write) || ((_state & Touch) && touching()));
-        }
+               return ((_state & Write) || ((_state & Touch) && touching()));
+       }
 
        PBD::Signal0<void> StateChanged;
 
@@ -75,9 +75,9 @@ class AutomationList : public PBD::StatefulDestructible, public Evoral::ControlL
        void stop_touch (bool mark, double when);
        bool touching() const { return g_atomic_int_get (&_touching); }
        bool writing() const { return _state == Write; }
-        bool touch_enabled() const { return _state == Touch; }
+       bool touch_enabled() const { return _state == Touch; }
 
-       XMLNode& get_state (); 
+       XMLNode& get_state ();
        int set_state (const XMLNode &, int version);
        XMLNode& state (bool full);
        XMLNode& serialize_events ();
index 362e716958bdb3606ea86b4537479226d1538ae0..e3ac981e63b6cce4ff2683c542355b79e2f57f11 100644 (file)
@@ -1,4 +1,4 @@
-#ifndef __libardour_buffer_manager__ 
+#ifndef __libardour_buffer_manager__
 #define __libardour_buffer_manager__
 
 #include <stdint.h>
@@ -15,21 +15,21 @@ class ThreadBuffers;
 
 class BufferManager
 {
-  public:
-        static void init (uint32_t);
-        
-        static ThreadBuffers* get_thread_buffers ();
-        static void           put_thread_buffers (ThreadBuffers*);
+public:
+       static void init (uint32_t);
 
-        static void ensure_buffers (ChanCount howmany = ChanCount::ZERO);
+       static ThreadBuffers* get_thread_buffers ();
+       static void           put_thread_buffers (ThreadBuffers*);
 
-  private:
+       static void ensure_buffers (ChanCount howmany = ChanCount::ZERO);
+
+private:
        static Glib::StaticMutex rb_mutex;
-       
-        typedef PBD::RingBufferNPT<ThreadBuffers*> ThreadBufferFIFO;
+
+       typedef PBD::RingBufferNPT<ThreadBuffers*> ThreadBufferFIFO;
        typedef std::list<ThreadBuffers*> ThreadBufferList;
 
-        static ThreadBufferFIFO* thread_buffers;
+       static ThreadBufferFIFO* thread_buffers;
        static ThreadBufferList* thread_buffers_list;
 };
 
index 05e0e42d1f142a8a7eb65dd8a7419f79ad1068e2..724eef6a24e0fcfe470b1f2b08e548381f89e47d 100644 (file)
@@ -33,7 +33,7 @@
 #include "evoral/MIDIEvent.hpp"
 struct VstEvents;
 struct VstMidiEvent;
-#endif 
+#endif
 
 namespace ARDOUR {
 
@@ -120,7 +120,7 @@ public:
 
 #ifdef VST_SUPPORT
        VstEvents* get_vst_midi (size_t);
-#endif 
+#endif
 
        void read_from(const BufferSet& in, framecnt_t nframes);
        void merge_from(const BufferSet& in, framecnt_t nframes);
@@ -191,15 +191,15 @@ private:
        private:
                /* prevent copy construction */
                VSTBuffer (VSTBuffer const &);
-               
+
                VstEvents* _events; /// the parent VSTEvents struct
                VstMidiEvent* _midi_events; ///< storage area for VSTMidiEvents
                size_t _capacity;
        };
-       
+
        typedef std::vector<VSTBuffer*> VSTBuffers;
        VSTBuffers _vst_buffers;
-#endif 
+#endif
 
        /// Use counts (there may be more actual buffers than this)
        ChanCount _count;
index 6751f3dccaab2817c800f7da7f42e0ff1f44784d..9740099360b37b100ef8b78216db2c1fa16a41c6 100644 (file)
@@ -41,7 +41,7 @@ class Butler : public SessionHandleRef
   public:
        Butler (Session& session);
        ~Butler();
-       
+
        int  start_thread();
        void terminate_thread();
        void schedule_transport_work();
@@ -83,7 +83,7 @@ class Butler : public SessionHandleRef
 
 private:
        void empty_pool_trash ();
-        void config_changed (std::string);
+       void config_changed (std::string);
 };
 
 } // namespace ARDOUR
index 783588c8ab636de8983f0f26a7028912b4e43627..b4c2f7d9cc4b60c07b17b86f7d26f19aa72054f5 100644 (file)
@@ -33,17 +33,17 @@ struct Click {
        framecnt_t duration;
        framecnt_t offset;
        const Sample *data;
-       
+
        Click (framepos_t s, framecnt_t d, const Sample *b) : start (s), duration (d), offset (0), data (b) {}
-    
+
        void *operator new (size_t) {
                return pool.alloc ();
     };
-       
+
        void operator delete(void *ptr, size_t /*size*/) {
                pool.release (ptr);
        }
-       
+
 private:
        static Pool pool;
 };
@@ -55,7 +55,7 @@ class ClickIO : public IO
 public:
        ClickIO (Session& s, const std::string& name) : IO (s, name, IO::Output) {}
        ~ClickIO() {}
-       
+
 protected:
        uint32_t pans_required () const { return 1; }
 };
index fa53b6a1c4f16ed609df8bfdb75851232a0d69bf..e05952417d4ccbbd15962f997e0f08d9c20aa3bb 100644 (file)
@@ -117,7 +117,7 @@ class ConfigVariable<bool> : public ConfigVariableBase
        }
 
        void set_from_string (std::string const & s) {
-                value = string_is_affirmative (s);
+               value = string_is_affirmative (s);
        }
 
   protected:
@@ -141,11 +141,11 @@ class ConfigVariableWithMutation : public ConfigVariable<T>
        }
 
        void set_from_string (std::string const & s) {
-                T v;
-                std::stringstream ss;
-                ss << s;
+               T v;
+               std::stringstream ss;
+               ss << s;
                ss >> v;
-                set (v);
+               set (v);
        }
 
   protected:
index be28662cb01d6bcf6ccdcb9939db9d2170b46c5f..2f283dfd368bbe266d13c3daf8e9d9c2948987ec 100644 (file)
@@ -34,7 +34,7 @@ class CoreAudioSource : public AudioFileSource {
        CoreAudioSource (ARDOUR::Session&, const string& path, int chn, Flag);
        ~CoreAudioSource ();
 
-        void set_path (const std::string& p);
+       void set_path (const std::string& p);
 
        float sample_rate() const;
        int update_header (framepos_t when, struct tm&, time_t);
@@ -48,7 +48,7 @@ class CoreAudioSource : public AudioFileSource {
   protected:
        framecnt_t read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) const;
        framecnt_t write_unlocked (Sample *, framecnt_t) { return 0; }
-       
+
   private:
        mutable CAAudioFile af;
        uint16_t n_channels;
index 98c92e20f4dc06617a747b5ccb33f2fbdcb74f12..130508c21a3e45e357c940dc8d0fc39295d1d5ab 100644 (file)
@@ -44,7 +44,7 @@ enum AnchorPoint {
        EndOfIn,
        EndOfOut
 };
-       
+
 class Playlist;
 
 class Crossfade : public ARDOUR::AudioRegion
@@ -175,7 +175,7 @@ class Crossfade : public ARDOUR::AudioRegion
        bool update ();
 
        bool operator== (const ARDOUR::Crossfade&);
-       
+
   protected:
        framecnt_t read_raw_internal (Sample*, framepos_t, framecnt_t, int) const;
 };
index 9f6d9b4b5c3ed1837414588a34c7e2a151c2e3b9..bfa42a157ed394d00fd36a0b1f1343215a255585 100644 (file)
@@ -122,27 +122,27 @@ static inline cycles_t get_cycles (void)
 typedef uint32_t long cycles_t;
 static inline cycles_t get_cycles(void)
 {
-        cycles_t cycles;
-        __asm__("stck 0(%0)" : : "a" (&(cycles)) : "memory", "cc");
-        return cycles >> 2;
+       cycles_t cycles;
+       __asm__("stck 0(%0)" : : "a" (&(cycles)) : "memory", "cc");
+       return cycles >> 2;
 }
 
 #elif defined(__hppa__)
 /* hppa/parisc */
 
 #define mfctl(reg)      ({              \
-        uint32_t cr;               \
-        __asm__ __volatile__(           \
-                "mfctl " #reg ",%0" :   \
-                 "=r" (cr)              \
-        );                              \
-        cr;                             \
+       uint32_t cr;               \
+       __asm__ __volatile__(           \
+               "mfctl " #reg ",%0" :   \
+                "=r" (cr)              \
+       );                              \
+       cr;                             \
 })
 
 typedef uint32_t cycles_t;
 static inline cycles_t get_cycles (void)
 {
-        return mfctl(16);
+       return mfctl(16);
 }
 
 #elif defined(__mips__)
@@ -159,19 +159,19 @@ static inline cycles_t get_cycles (void)
  * We know that all SMP capable CPUs have cycle counters.
  */
 
-#define __read_32bit_c0_register(source, sel)                           \
-({ int __res;                                                           \
-        if (sel == 0)                                                   \
-                __asm__ __volatile__(                                   \
-                        "mfc0\t%0, " #source "\n\t"                     \
-                        : "=r" (__res));                                \
-        else                                                            \
-                __asm__ __volatile__(                                   \
-                        ".set\tmips32\n\t"                              \
-                        "mfc0\t%0, " #source ", " #sel "\n\t"           \
-                        ".set\tmips0\n\t"                               \
-                        : "=r" (__res));                                \
-        __res;                                                          \
+#define __read_32bit_c0_register(source, sel)               \
+({ int __res;                                               \
+       if (sel == 0)                                           \
+               __asm__ __volatile__(                               \
+                       "mfc0\t%0, " #source "\n\t"                     \
+                       : "=r" (__res));                                \
+       else                                                    \
+               __asm__ __volatile__(                               \
+                       ".set\tmips32\n\t"                              \
+                       "mfc0\t%0, " #source ", " #sel "\n\t"           \
+                       ".set\tmips0\n\t"                               \
+                       : "=r" (__res));                                \
+       __res;                                                  \
 })
 
 /* #define CP0_COUNT $9 */
@@ -180,7 +180,7 @@ static inline cycles_t get_cycles (void)
 typedef uint32_t cycles_t;
 static inline cycles_t get_cycles (void)
 {
-        return read_c0_count();
+       return read_c0_count();
 }
 
 /* begin mach */
@@ -191,8 +191,8 @@ static inline cycles_t get_cycles (void)
 typedef UInt64 cycles_t;
 static inline cycles_t get_cycles (void)
 {
-       UInt64 time = AudioGetCurrentHostTime();
-       return AudioConvertHostTimeToNanos(time);
+       UInt64 time = AudioGetCurrentHostTime();
+       return AudioConvertHostTimeToNanos(time);
 }
 /* end mach  */
 
@@ -210,10 +210,10 @@ extern cycles_t cacheflush_time;
 
 static inline cycles_t get_cycles(void)
 {
-       struct timeval tv;
-       gettimeofday (&tv, NULL);
+       struct timeval tv;
+       gettimeofday (&tv, NULL);
 
-       return tv.tv_usec;
+       return tv.tv_usec;
 }
 
 #endif
index 182a3f601754002c0c2b05c4231b189d5beca8f2..77846fafb30d212e899566b29923885f5cb5e726 100644 (file)
 
 namespace PBD {
        namespace DEBUG {
-                extern uint64_t MidiSourceIO;
-                extern uint64_t MidiPlaylistIO;
-                extern uint64_t MidiDiskstreamIO;
-                extern uint64_t SnapBBT;
-                extern uint64_t Configuration;
-                extern uint64_t Latency;
-                extern uint64_t Processors;
-                extern uint64_t ProcessThreads;
-                extern uint64_t Graph;
-                extern uint64_t Destruction;
-                extern uint64_t MTC;
-                extern uint64_t Transport;
-                extern uint64_t Slave;
-                extern uint64_t SessionEvents;
-                extern uint64_t MidiIO;
-                extern uint64_t MackieControl;
-                extern uint64_t MidiClock;
-                extern uint64_t Monitor;
-                extern uint64_t Solo;
-                extern uint64_t AudioPlayback;
-                extern uint64_t Panning;
-                extern uint64_t LV2;
-                extern uint64_t CaptureAlignment;
+               extern uint64_t MidiSourceIO;
+               extern uint64_t MidiPlaylistIO;
+               extern uint64_t MidiDiskstreamIO;
+               extern uint64_t SnapBBT;
+               extern uint64_t Configuration;
+               extern uint64_t Latency;
+               extern uint64_t Processors;
+               extern uint64_t ProcessThreads;
+               extern uint64_t Graph;
+               extern uint64_t Destruction;
+               extern uint64_t MTC;
+               extern uint64_t Transport;
+               extern uint64_t Slave;
+               extern uint64_t SessionEvents;
+               extern uint64_t MidiIO;
+               extern uint64_t MackieControl;
+               extern uint64_t MidiClock;
+               extern uint64_t Monitor;
+               extern uint64_t Solo;
+               extern uint64_t AudioPlayback;
+               extern uint64_t Panning;
+               extern uint64_t LV2;
+               extern uint64_t CaptureAlignment;
        }
 }
 
index 70016ade0517070a28b96e9d5f3028ec21d89547..0e55356928fc259f640b93d7859e8c58b082fea0 100644 (file)
@@ -109,7 +109,7 @@ public:
        boost::shared_ptr<MuteMaster> _mute_master;
        bool         no_panner_reset;
        boost::shared_ptr<PannerShell> _panshell;
-        framecnt_t   scnt;
+       framecnt_t   scnt;
 
        static bool panners_legal;
        static PBD::Signal0<int>            PannersLegal;
index deb81d48376d172320bfa631bcfcd3a007f18e26..808ad3862506f029815760c02922ed635a972e10 100644 (file)
@@ -48,7 +48,7 @@ class Processor;
 class Source;
 class Session;
 class Track;
-class Location;        
+class Location;
 
 class Diskstream : public SessionObject, public PublicDiskstream
 {
@@ -214,8 +214,8 @@ class Diskstream : public SessionObject, public PublicDiskstream
        virtual void transport_looped (framepos_t transport_frame) = 0;
 
        struct CaptureInfo {
-            framepos_t start;
-            framecnt_t frames;
+               framepos_t start;
+               framecnt_t frames;
        };
 
        virtual int use_new_write_source (uint32_t n=0) = 0;
@@ -235,7 +235,7 @@ class Diskstream : public SessionObject, public PublicDiskstream
        virtual void set_align_style_from_io() {}
        virtual void setup_destructive_playlist () {}
        virtual void use_destructive_playlist () {}
-        virtual void prepare_to_stop (framepos_t pos);
+       virtual void prepare_to_stop (framepos_t pos);
 
        void calculate_record_range(OverlapType ot, framepos_t transport_frame, framecnt_t nframes,
                        framecnt_t& rec_nframes, framecnt_t& rec_offset);
index 5e42956cdb7b4306b0ce4c6c1967477c5102e01e..cbb894c66abca2319694cde7c9fe179934839c3c 100644 (file)
@@ -100,7 +100,7 @@ class PortExportChannel : public ExportChannel
 };
 
 /// Handles RegionExportChannels and does actual reading from region
-class RegionExportChannelFactory 
+class RegionExportChannelFactory
 {
   public:
        enum Type {
index 5701be576b2fc7155035752d2d91f48c71ed6ad0..d84638ca8529011209076622684f29d6871cfec4 100644 (file)
@@ -55,7 +55,7 @@ class ExportChannelConfiguration : public boost::enable_shared_from_this<ExportC
   public:
        bool operator== (ExportChannelConfiguration const & other) const { return channels == other.channels; }
        bool operator!= (ExportChannelConfiguration const & other) const { return channels != other.channels; }
-       
+
        XMLNode & get_state ();
        int set_state (const XMLNode &);
 
@@ -76,7 +76,7 @@ class ExportChannelConfiguration : public boost::enable_shared_from_this<ExportC
                std::copy (new_channels.begin(), new_channels.end(), std::back_inserter(channels));
        }
        void clear_channels () { channels.clear (); }
-       
+
        /** Returns a list of channel configurations that match the files created.
          * I.e. many configurations if splitting is enabled, one if not. */
        void configurations_for_files (std::list<boost::shared_ptr<ExportChannelConfiguration> > & configs);
index 00da1c75c88e1b158e429ad3f7cc36dd866ae7ed..c5880aea6bba24d832db10d74015ac8828842921 100644 (file)
@@ -163,7 +163,7 @@ class ExportFormatBase {
 
        void set_extension (std::string const & extension) { _extension = extension; }
        std::string const & extension () const { return _extension; }
-       
+
        static SampleRate nearest_sample_rate (framecnt_t sample_rate);
 
   protected:
index e0a984db6ce54f0c5092e6bf0774eef09e3e3ff2..a220e4e4a234481a8271d71def57faa943d8787c 100644 (file)
@@ -32,7 +32,7 @@ class ExportFormatCompatibility : public ExportFormatBase, public ExportFormatBa
   private:
 
   public:
-        ExportFormatCompatibility (std::string name)
+       ExportFormatCompatibility (std::string name)
        {
                set_name (name);
                sample_formats.insert (SF_None);
index 233ae56bc7c6280f7fa7757c2736cfeac608870f..0e9a93ff9656c5a5b5009645fbace3ef3f3c7511 100644 (file)
@@ -91,8 +91,11 @@ class HasSampleFormat : public PBD::ScopedConnectionList {
 
        class SampleFormatState : public ExportFormatBase::SelectableCompatible {
          public:
-                SampleFormatState (ExportFormatBase::SampleFormat format, std::string name) :
-                 format (format) { set_name (name); }
+               SampleFormatState (ExportFormatBase::SampleFormat format, std::string name)
+                       : format (format)
+               {
+                       set_name (name);
+               }
 
                ExportFormatBase::SampleFormat  format;
        };
index 67f1a3488e4f8fbada0aeb95562b84dc366ebd4f..444f1ae65963d07524c36c0c2a0001d516de7231 100644 (file)
@@ -58,47 +58,47 @@ class ExportGraphBuilder
        typedef std::map<ExportChannelPtr,  IdentityVertexPtr> ChannelMap;
 
   public:
-       
+
        ExportGraphBuilder (Session const & session);
        ~ExportGraphBuilder ();
-       
+
        int process (framecnt_t frames, bool last_cycle);
        bool process_normalize (); // returns true when finished
-       
+
        void reset ();
        void set_current_timespan (boost::shared_ptr<ExportTimespan> span);
        void add_config (FileSpec const & config);
-       
+
   private:
-       
+
        void add_split_config (FileSpec const & config);
-       
+
        class Encoder {
          public:
                template <typename T> boost::shared_ptr<AudioGrapher::Sink<T> > init (FileSpec const & new_config);
                void add_child (FileSpec const & new_config);
                bool operator== (FileSpec const & other_config) const;
-       
+
                static int get_real_format (FileSpec const & config);
-       
+
          private:
                typedef boost::shared_ptr<AudioGrapher::SndfileWriter<Sample> > FloatWriterPtr;
                typedef boost::shared_ptr<AudioGrapher::SndfileWriter<int> >    IntWriterPtr;
                typedef boost::shared_ptr<AudioGrapher::SndfileWriter<short> >  ShortWriterPtr;
-                 
+
                template<typename T> void init_writer (boost::shared_ptr<AudioGrapher::SndfileWriter<T> > & writer);
                void copy_files (std::string orig_path);
-               
+
                FileSpec               config;
                std::list<FilenamePtr> filenames;
                PBD::ScopedConnection  copy_files_connection;
-               
+
                // Only one of these should be available at a time
                FloatWriterPtr float_writer;
                IntWriterPtr   int_writer;
                ShortWriterPtr short_writer;
        };
-       
+
        // sample format converter
        class SFC {
          public:
@@ -107,56 +107,56 @@ class ExportGraphBuilder
                FloatSinkPtr sink ();
                void add_child (FileSpec const & new_config);
                bool operator== (FileSpec const & other_config) const;
-               
+
          private:
                typedef boost::shared_ptr<AudioGrapher::SampleFormatConverter<Sample> > FloatConverterPtr;
                typedef boost::shared_ptr<AudioGrapher::SampleFormatConverter<int> >   IntConverterPtr;
                typedef boost::shared_ptr<AudioGrapher::SampleFormatConverter<short> > ShortConverterPtr;
-               
+
                FileSpec           config;
                boost::ptr_list<Encoder> children;
                int                data_width;
-               
+
                // Only one of these should be available at a time
                FloatConverterPtr float_converter;
                IntConverterPtr int_converter;
                ShortConverterPtr short_converter;
        };
-       
+
        class Normalizer {
          public:
                Normalizer (ExportGraphBuilder & parent, FileSpec const & new_config, framecnt_t max_frames);
                FloatSinkPtr sink ();
                void add_child (FileSpec const & new_config);
                bool operator== (FileSpec const & other_config) const;
-               
+
                /// Returns true when finished
                bool process ();
-               
+
          private:
                typedef boost::shared_ptr<AudioGrapher::PeakReader> PeakReaderPtr;
                typedef boost::shared_ptr<AudioGrapher::Normalizer> NormalizerPtr;
                typedef boost::shared_ptr<AudioGrapher::TmpFile<Sample> > TmpFilePtr;
                typedef boost::shared_ptr<AudioGrapher::Threader<Sample> > ThreaderPtr;
                typedef boost::shared_ptr<AudioGrapher::AllocatingProcessContext<Sample> > BufferPtr;
-               
+
                void start_post_processing();
-               
+
                ExportGraphBuilder & parent;
-               
+
                FileSpec        config;
                framecnt_t      max_frames_out;
-               
+
                BufferPtr       buffer;
                PeakReaderPtr   peak_reader;
                TmpFilePtr      tmp_file;
                NormalizerPtr   normalizer;
                ThreaderPtr     threader;
                boost::ptr_list<SFC> children;
-               
+
                PBD::ScopedConnection post_processing_connection;
        };
-       
+
        // sample rate converter
        class SRC {
          public:
@@ -164,13 +164,13 @@ class ExportGraphBuilder
                FloatSinkPtr sink ();
                void add_child (FileSpec const & new_config);
                bool operator== (FileSpec const & other_config) const;
-               
+
          private:
                typedef boost::shared_ptr<AudioGrapher::SampleRateConverter> SRConverterPtr;
-               
+
                template<typename T>
                void add_child_to_list (FileSpec const & new_config, boost::ptr_list<T> & list);
-  
+
                ExportGraphBuilder &  parent;
                FileSpec              config;
                boost::ptr_list<SFC>  children;
@@ -178,7 +178,7 @@ class ExportGraphBuilder
                SRConverterPtr        converter;
                framecnt_t            max_frames_out;
        };
-       
+
        // Silence trimmer + adder
        class SilenceHandler {
          public:
@@ -186,27 +186,27 @@ class ExportGraphBuilder
                FloatSinkPtr sink ();
                void add_child (FileSpec const & new_config);
                bool operator== (FileSpec const & other_config) const;
-               
+
          private:
                typedef boost::shared_ptr<AudioGrapher::SilenceTrimmer<Sample> > SilenceTrimmerPtr;
-               
+
                ExportGraphBuilder & parent;
                FileSpec             config;
                boost::ptr_list<SRC> children;
                SilenceTrimmerPtr    silence_trimmer;
                framecnt_t           max_frames_in;
        };
-       
+
        // channel configuration
        class ChannelConfig {
          public:
                ChannelConfig (ExportGraphBuilder & parent, FileSpec const & new_config, ChannelMap & channel_map);
                void add_child (FileSpec const & new_config);
                bool operator== (FileSpec const & other_config) const;
-               
+
          private:
                typedef boost::shared_ptr<AudioGrapher::Interleaver<Sample> > InterleaverPtr;
-               
+
                ExportGraphBuilder &      parent;
                FileSpec                  config;
                boost::ptr_list<SilenceHandler> children;
@@ -216,18 +216,18 @@ class ExportGraphBuilder
 
        Session const & session;
        boost::shared_ptr<ExportTimespan> timespan;
-       
+
        // Roots for export processor trees
        typedef boost::ptr_list<ChannelConfig> ChannelConfigList;
        ChannelConfigList channel_configs;
-       
+
        // The sources of all data, each channel is read only once
        ChannelMap channels;
-       
+
        framecnt_t process_buffer_frames;
-       
+
        std::list<Normalizer *> normalizers;
-       
+
        Glib::ThreadPool thread_pool;
 };
 
index dbc8213eed3c134dbf8f988939b8e6c24e26b5d4..ab78899a175bb706591052074f95ecce7e1a447d 100644 (file)
@@ -90,7 +90,7 @@ class ExportHandler : public ExportElementFactory
                FilenamePtr      filename;
                boost::shared_ptr<AudioGrapher::BroadcastInfo> broadcast_info;
        };
-       
+
   private:
 
        /* Stuff for export configs
@@ -120,7 +120,7 @@ class ExportHandler : public ExportElementFactory
   private:
 
        int process (framecnt_t frames);
-       
+
        Session &          session;
        GraphBuilderPtr    graph_builder;
        StatusPtr          export_status;
@@ -139,7 +139,7 @@ class ExportHandler : public ExportElementFactory
        typedef std::pair<ConfigMap::iterator, ConfigMap::iterator> TimespanBounds;
        TimespanPtr           current_timespan;
        TimespanBounds        timespan_bounds;
-       
+
        PBD::ScopedConnection process_connection;
        framepos_t             process_position;
 
index 8e57b9e9d251657c0bd27da387de9fb80b836917..b7a3b950387f4cd42124083f148d76dceeda811f 100644 (file)
@@ -268,7 +268,7 @@ class ExportProfileManager
                           ChannelConfigStatePtr channel_config_state,
                           FormatStatePtr format_state,
                           FilenameStatePtr filename_state);
-       
+
        bool check_format (FormatPtr format, uint32_t channels);
        bool check_sndfile_format (FormatPtr format, unsigned int channels);
 
index ff2f4cb008c739bf1bb9998a6ed7166dd2f71bea..c757b2877c1219da7b20104da1f7d084c455c5c7 100644 (file)
 
 namespace ARDOUR {
 
-class MissingSource : public std::exception 
+class MissingSource : public std::exception
 {
   public:
-        MissingSource (const std::string& p, DataType t) throw ()
-                : path (p), type (t) {}
-        ~MissingSource() throw() {}
+       MissingSource (const std::string& p, DataType t) throw ()
+               : path (p), type (t) {}
+       ~MissingSource() throw() {}
 
        virtual const char *what() const throw() { return "source file does not exist"; }
 
-        std::string path;
-        DataType type;
+       std::string path;
+       DataType type;
 };
 
 /** A source associated with a file on disk somewhere */
 class FileSource : virtual public Source {
 public:
        virtual ~FileSource () {}
-       
+
        virtual const std::string& path() const { return _path; }
 
        virtual bool safe_file_extension (const std::string& path) const = 0;
@@ -64,31 +64,31 @@ public:
        int set_source_name (const std::string& newname, bool destructive);
 
        static bool find (Session&, DataType type, const std::string& path,
-                          bool must_exist, bool& is_new, uint16_t& chan,
-                          std::string& found_path);
+                         bool must_exist, bool& is_new, uint16_t& chan,
+                         std::string& found_path);
 
        static bool find_2X (Session&, DataType type, const std::string& path,
-                             bool must_exist, bool& is_new, uint16_t& chan,
-                             std::string& found_path);
+                            bool must_exist, bool& is_new, uint16_t& chan,
+                            std::string& found_path);
 
-        void inc_use_count ();
+       void inc_use_count ();
        bool removable () const;
 
-        const std::string& origin() const { return _origin; }
+       const std::string& origin() const { return _origin; }
 
        static PBD::Signal3<int,std::string,std::string,std::vector<std::string> > AmbiguousFileName;
 
 protected:
        FileSource (Session& session, DataType type,
-                    const std::string& path, 
-                    const std::string& origin,
-                    Source::Flag flags = Source::Flag(0));
+                   const std::string& path,
+                   const std::string& origin,
+                   Source::Flag flags = Source::Flag(0));
 
        FileSource (Session& session, const XMLNode& node, bool must_exist);
 
        virtual int init (const std::string& idstr, bool must_exist);
 
-        virtual void set_path (const std::string&);
+       virtual void set_path (const std::string&);
        virtual int move_dependents_to_trash() { return 0; }
        void set_within_session_from_path (const std::string&);
 
@@ -97,10 +97,10 @@ protected:
        bool        _file_is_new;
        uint16_t    _channel;
        bool        _within_session;
-        std::string _origin;
-        bool        _open;
-        
-        void prevent_deletion ();
+       std::string _origin;
+       bool        _open;
+
+       void prevent_deletion ();
 };
 
 } // namespace ARDOUR
index a3f1523b1511e287663312daab926ed82608754e..e3363a03537c1423da614147ac52b96d9bf627d8 100644 (file)
@@ -1,6 +1,6 @@
 /*
     Copyright (C) 2010 Paul Davis
-    Author: Torben Hohn 
+    Author: Torben Hohn
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -55,10 +55,10 @@ typedef std::set< node_ptr_t > node_set_t;
 
 class Graph : public SessionHandleRef
 {
-    public:
+public:
        Graph (Session & session);
 
-        uint32_t threads_in_use () const { return _thread_list.size(); }
+       uint32_t threads_in_use () const { return _thread_list.size(); }
 
        void prep();
        void trigger (GraphNode * n);
@@ -74,38 +74,38 @@ class Graph : public SessionHandleRef
        void main_thread();
 
        int silent_process_routes (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
-                                  bool can_record, bool rec_monitors_input, bool& need_butler);
+                                  bool can_record, bool rec_monitors_input, bool& need_butler);
 
        int process_routes (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick,
-                           bool can_record, bool rec_monitors_input, bool& need_butler);
+                           bool can_record, bool rec_monitors_input, bool& need_butler);
 
-        int routes_no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, 
-                           bool non_rt_pending, bool can_record, int declick);
+       int routes_no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
+                           bool non_rt_pending, bool can_record, int declick);
 
        void process_one_route (Route * route);
 
-        void clear_other_chain ();
+       void clear_other_chain ();
 
        bool in_process_thread () const;
 
-    protected:
-        virtual void session_going_away ();
+protected:
+       virtual void session_going_away ();
 
-    private:
-        std::list<pthread_t> _thread_list;
-        volatile bool        _quit_threads;
-        PBD::ScopedConnection processor_usage_connection;
+private:
+       std::list<pthread_t> _thread_list;
+       volatile bool        _quit_threads;
+       PBD::ScopedConnection processor_usage_connection;
 
-        void parameter_changed (std::string);
-        void reset_thread_list ();
-        void drop_threads ();
+       void parameter_changed (std::string);
+       void reset_thread_list ();
+       void drop_threads ();
 
        node_list_t _nodes_rt[2];
 
        node_list_t _init_trigger_list[2];
 
        std::vector<GraphNode *> _trigger_queue;
-       pthread_mutex_t _trigger_mutex;
+       pthread_mutex_t          _trigger_mutex;
 
        PBD::ProcessSemaphore _execution_sem;
 
@@ -117,30 +117,30 @@ class Graph : public SessionHandleRef
        volatile gint _finished_refcount;
        volatile gint _init_finished_refcount[2];
 
-        bool _graph_empty;
+       bool _graph_empty;
 
        // chain swapping
-        Glib::Mutex  _swap_mutex;
-        Glib::Cond   _cleanup_cond;
+       Glib::Mutex  _swap_mutex;
+       Glib::Cond   _cleanup_cond;
        volatile int _current_chain;
        volatile int _pending_chain;
        volatile int _setup_chain;
 
        // parameter caches.
-       pframes_t       _process_nframes;
-       framepos_t      _process_start_frame;
-       framepos_t      _process_end_frame;
-       bool            _process_can_record;
-       bool            _process_rec_monitors_input;
-       bool            _process_non_rt_pending;
-       int             _process_declick;
-
-       bool            _process_silent;
-       bool            _process_noroll;
-       int             _process_retval;
-       bool            _process_need_butler;
+       pframes_t  _process_nframes;
+       framepos_t _process_start_frame;
+       framepos_t _process_end_frame;
+       bool       _process_can_record;
+       bool       _process_rec_monitors_input;
+       bool       _process_non_rt_pending;
+       int        _process_declick;
+
+       bool _process_silent;
+       bool _process_noroll;
+       int      _process_retval;
+       bool _process_need_butler;
 };
 
-} // namespace 
+} // namespace
 
 #endif /* __ardour_graph_h__ */
index 5c7097e91fe19cea24d4d569d87b9485be767922..0c99a31a6cc361ace8323b84002ca038dcdf94f6 100644 (file)
@@ -54,7 +54,7 @@ class GraphNode
 
        node_set_t  _activation_set[2];
 
-        boost::shared_ptr<Graph> _graph;
+       boost::shared_ptr<Graph> _graph;
 
        gint _refcount;
        gint _init_refcount[2];
index 17688b892f319b397370f42378b255ed49bfe843..b6a3e2625309766bcf62df8bef635bc074a400a4 100644 (file)
@@ -27,7 +27,7 @@
 
 namespace ARDOUR {
 
-class InternalSend;    
+class InternalSend;
 
 class InternalReturn : public Return
 {
@@ -45,14 +45,14 @@ class InternalReturn : public Return
 
        void add_send (InternalSend *);
        void remove_send (InternalSend *);
-       
+
        static PBD::Signal1<void, pframes_t> CycleStart;
 
   private:
        BufferSet buffers;
        /** sends that we are receiving data from */
        std::list<InternalSend*> _sends;
-       
+
        void allocate_buffers (pframes_t);
        void cycle_start (pframes_t);
 };
index 95fec708ed611d2d06d761dabe6c2e98490a9bcd..c7969e9f1978d2f5ddfc0ca7758f6f2e1ef00a23 100644 (file)
@@ -38,7 +38,7 @@ class InternalSend : public Send
        XMLNode& state(bool full);
        XMLNode& get_state(void);
        int set_state(const XMLNode& node, int version);
-       
+
        void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool);
        bool feeds (boost::shared_ptr<Route> other) const;
        bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
@@ -57,13 +57,13 @@ class InternalSend : public Send
        boost::shared_ptr<Route> _send_to;
        PBD::ID _send_to_id;
        PBD::ScopedConnection connect_c;
-        PBD::ScopedConnectionList target_connections;
+       PBD::ScopedConnectionList target_connections;
 
        void send_to_going_away ();
        void send_to_property_changed (const PBD::PropertyChange&);
        int  connect_when_legal ();
        int  set_our_state (XMLNode const &, int);
-        int  use_target (boost::shared_ptr<Route>);
+       int  use_target (boost::shared_ptr<Route>);
 };
 
 } // namespace ARDOUR
index 5bcb7925cb7741238a948444549df813bceea89c..a4a332c8a2781c541dc4485dc05ceb4e5e8facb0 100644 (file)
@@ -43,13 +43,13 @@ public:
 
        void set_speed (double new_speed)          { _speed = new_speed; _target_speed = new_speed; }
        void set_target_speed (double new_speed)   { _target_speed = new_speed; }
-       
+
        double target_speed()          const { return _target_speed; }
        double speed()                 const { return _speed; }
-       
+
        void add_channel_to (int /*input_buffer_size*/, int /*output_buffer_size*/) { phase.push_back (0.0); }
        void remove_channel_from () { phase.pop_back (); }
-       
+
        void reset () {
                for (size_t i = 0; i < phase.size(); i++) {
                        phase[i] = 0.0;
index 90544450efa0c7d1f16eb618fadcb80031c92e59..865971b3777adb39fbe29a85a2b2b9f2ff2fe0a2 100644 (file)
@@ -90,7 +90,7 @@ class IO : public SessionObject, public Latent
        bool set_name (const std::string& str);
 
        virtual void silence (framecnt_t);
-        void increment_port_buffer_offset (pframes_t offset);
+       void increment_port_buffer_offset (pframes_t offset);
 
        int ensure_io (ChanCount cnt, bool clear, void *src);
 
@@ -107,9 +107,9 @@ class IO : public SessionObject, public Latent
        int disconnect (Port *our_port, std::string other_port, void *src);
        int disconnect (void *src);
        bool connected_to (boost::shared_ptr<const IO>) const;
-        bool connected () const;
-        bool physically_connected () const;
-        
+       bool connected () const;
+       bool physically_connected () const;
+
        framecnt_t signal_latency () const { return _own_latency; }
        framecnt_t latency () const;
 
@@ -168,7 +168,7 @@ class IO : public SessionObject, public Latent
         *  the change from happening.
         */
        PBD::Signal1<bool, ChanCount, BoolCombiner> PortCountChanging;
-       
+
        static int  disable_connecting (void);
        static int  enable_connecting (void);
        static int  disable_ports (void);
@@ -219,7 +219,7 @@ class IO : public SessionObject, public Latent
            boost::shared_ptr<UserBundle> bundle;
            PBD::ScopedConnection changed;
        };
-       
+
        std::vector<UserBundleInfo*> _bundles_connected; ///< user bundles connected to our ports
 
        static int parse_io_string (const std::string&, std::vector<std::string>& chns);
index 40a974156c62f935e456a62e8f4605478ce15c9c..4f7d1467c88dbc54f1ae1b25cf391534b02a6317 100644 (file)
@@ -65,7 +65,7 @@ class IOProcessor : public Processor
        void silence (framecnt_t nframes);
        void disconnect ();
 
-        void increment_port_buffer_offset (pframes_t);
+       void increment_port_buffer_offset (pframes_t);
 
        virtual bool feeds (boost::shared_ptr<Route> other) const;
 
@@ -74,7 +74,7 @@ class IOProcessor : public Processor
 
        XMLNode& state (bool full_state);
        int set_state (const XMLNode&, int version);
-       
+
   protected:
        boost::shared_ptr<IO> _input;
        boost::shared_ptr<IO> _output;
@@ -84,7 +84,7 @@ class IOProcessor : public Processor
        IOProcessor (const IOProcessor&);
 
        virtual int set_state_2X (const XMLNode &, int);
-       
+
        bool _own_input;
        bool _own_output;
 
index c49e9d3a213c181d259d8e974a822adfb10a688c..0dd7f9efacfe0d4dcd4ca22573be07c6141d812b 100644 (file)
@@ -133,7 +133,7 @@ class LadspaPlugin : public ARDOUR::Plugin
        bool                     _was_activated;
 
        void find_presets ();
-       
+
        void init (void *mod, uint32_t index, framecnt_t rate);
        void run_in_place (pframes_t nsamples);
        void latency_compute_run ();
index 9639d9a34d0ceb9a149559dc093d47a842f8a179..71f4c1aa6ac1110c88239f69360b04ebf1e9f072 100644 (file)
@@ -147,7 +147,7 @@ class Locations : public SessionHandleRef, public PBD::StatefulDestructible
 
        XMLNode& get_state (void);
        int set_state (const XMLNode&, int version);
-        Location *get_location_by_id(PBD::ID);
+       Location *get_location_by_id(PBD::ID);
 
        Location* auto_loop_location () const;
        Location* auto_punch_location () const;
index fc345add43220c3099eb65936c842ca244efb879..3f49a8c9f4bf9174b50e4c30ecedf5187ce4ce1f 100644 (file)
@@ -105,7 +105,7 @@ class LV2Plugin : public ARDOUR::Plugin
 
        boost::shared_ptr<Plugin::ScalePoints>
        get_scale_points(uint32_t port_index) const;
-               
+
        static uint32_t midi_event_type () { return _midi_event_type; }
 
        void set_insert_info(const PluginInsert* insert);
index e7317f854f221da212146849c212e52267e5e28a..4a9f8305ad3bb454fe096702bb22f93dd89c2ad4 100644 (file)
@@ -53,7 +53,7 @@ public:
 
        bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
        bool configure_io (ChanCount in, ChanCount out);
-       
+
        /* special method for meter, to ensure that it can always handle the maximum
           number of streams in the route, no matter where we put it.
        */
@@ -90,7 +90,7 @@ public:
        }
 
        XMLNode& state (bool full);
-       
+
 private:
        friend class IO;
 
@@ -99,7 +99,7 @@ private:
         *  as it can be altered outside a ::configure_io by ::reflect_inputs.
         */
        ChanCount current_meters;
-       
+
        std::vector<float> _peak_power;
        std::vector<float> _visible_peak_power;
        std::vector<float> _max_peak_power;
index dc92b75aa0cbe7bbf9760e0287b12b55b1173743..95576b47deec6262809bc390c113381939a276e0 100644 (file)
@@ -42,4 +42,4 @@ private:
 };
 
 }
-               
+
index 55c14126bfc0265cfc3d7d40491023874fa4685d..5db64a50fbc0a0715b43aeb51adfd989c0871b9d 100644 (file)
@@ -95,9 +95,9 @@ public:
 
        const_iterator begin() const { return const_iterator(*this, 0); }
        const_iterator end()   const { return const_iterator(*this, _size); }
-        
-        uint8_t* data() const { return _data; }
-        
+
+       uint8_t* data() const { return _data; }
+
 private:
        friend class iterator_base< MidiBuffer, Evoral::MIDIEvent<TimeType> >;
        friend class iterator_base< const MidiBuffer, const Evoral::MIDIEvent<TimeType> >;
index 8c927c5fc6614b4294c9856ca281fc21bd54bf58..59f849afd7a944aa2652dc2ff2d25bd4e1d1c48d 100644 (file)
@@ -129,7 +129,7 @@ class MidiDiskstream : public Diskstream
        void set_block_size (pframes_t);
        int  internal_playback_seek (framecnt_t distance);
        int  can_internal_playback_seek (framecnt_t distance);
-        std::list<boost::shared_ptr<Source> > steal_write_sources();
+       std::list<boost::shared_ptr<Source> > steal_write_sources();
        void reset_write_sources (bool, bool force = false);
        void non_realtime_input_change ();
        void non_realtime_locate (framepos_t location);
@@ -173,11 +173,11 @@ class MidiDiskstream : public Diskstream
        void get_input_sources ();
        void set_align_style_from_io();
 
-        /* fixed size buffers per instance of ardour for now (non-dynamic)
-         */
+       /* fixed size buffers per instance of ardour for now (non-dynamic)
+        */
 
-        void adjust_playback_buffering () {}
-        void adjust_capture_buffering () {}
+       void adjust_playback_buffering () {}
+       void adjust_capture_buffering () {}
 
        void engage_record_enable ();
        void disengage_record_enable ();
index 1042b61369506e3e70082c30e5fe87e142361918..c64b6e53f98868dae72dbaeec39de99acd1f8251 100644 (file)
@@ -33,47 +33,47 @@ namespace ARDOUR {
 class MidiPlaylist;
 
 class MidiPlaylistSource : public MidiSource, public PlaylistSource {
-  public:
-    virtual ~MidiPlaylistSource ();
-
-    bool empty() const;
-    framecnt_t length (framepos_t) const;
-
-    framecnt_t read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) const;
-    framecnt_t write_unlocked (Sample *src, framecnt_t cnt);
-    
-    XMLNode& get_state ();
-    int set_state (const XMLNode&, int version);
-
-    void append_event_unlocked_beats(const Evoral::Event<Evoral::MusicalTime>& ev);
-    void append_event_unlocked_frames(const Evoral::Event<framepos_t>& ev, framepos_t source_start);
-    void load_model(bool lock=true, bool force_reload=false);
-    void destroy_model();
-
-  protected:
-    friend class SourceFactory;
-
-    MidiPlaylistSource (Session&, const PBD::ID& orig, const std::string& name, boost::shared_ptr<MidiPlaylist>, uint32_t chn,
-                       frameoffset_t begin, framecnt_t len, Source::Flag flags);
-    MidiPlaylistSource (Session&, const XMLNode&);
-    
-    
-    void flush_midi();
-
-    framepos_t read_unlocked (Evoral::EventSink<framepos_t>& dst,
-                                     framepos_t position,
-                                     framepos_t start, framecnt_t cnt,
-                                     MidiStateTracker* tracker) const;
-    
-    framepos_t write_unlocked (MidiRingBuffer<framepos_t>& dst,
-                                          framepos_t position,
-                                          framecnt_t cnt);
-
-  private:
-    int set_state (const XMLNode&, int version, bool with_descendants);
-    framecnt_t _length;
+public:
+       virtual ~MidiPlaylistSource ();
+
+       bool empty() const;
+       framecnt_t length (framepos_t) const;
+
+       framecnt_t read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) const;
+       framecnt_t write_unlocked (Sample *src, framecnt_t cnt);
+
+       XMLNode& get_state ();
+       int set_state (const XMLNode&, int version);
+
+       void append_event_unlocked_beats(const Evoral::Event<Evoral::MusicalTime>& ev);
+       void append_event_unlocked_frames(const Evoral::Event<framepos_t>& ev, framepos_t source_start);
+       void load_model(bool lock=true, bool force_reload=false);
+       void destroy_model();
+
+protected:
+       friend class SourceFactory;
+
+       MidiPlaylistSource (Session&, const PBD::ID& orig, const std::string& name, boost::shared_ptr<MidiPlaylist>, uint32_t chn,
+                           frameoffset_t begin, framecnt_t len, Source::Flag flags);
+       MidiPlaylistSource (Session&, const XMLNode&);
+
+
+       void flush_midi();
+
+       framepos_t read_unlocked (Evoral::EventSink<framepos_t>& dst,
+                                 framepos_t position,
+                                 framepos_t start, framecnt_t cnt,
+                                 MidiStateTracker* tracker) const;
+
+       framepos_t write_unlocked (MidiRingBuffer<framepos_t>& dst,
+                                  framepos_t position,
+                                  framecnt_t cnt);
+
+private:
+       int set_state (const XMLNode&, int version, bool with_descendants);
+       framecnt_t _length;
 };
-        
+
 } /* namespace */
 
 #endif /* __ardour_midi_playlist_source_h__ */
index bb9f011ec8037c3b94bd6ea989a5b4816f119d84..dc3f199b5bd03b0d6eb23aafcf827b29f1a5a3d8 100644 (file)
@@ -39,7 +39,7 @@ namespace ARDOUR {
        namespace Properties {
                /* this is pseudo-property: nothing has this as an actual
                   property, but it allows us to signal changes to the
-                  MidiModel used by the MidiRegion 
+                  MidiModel used by the MidiRegion
                */
                extern PBD::PropertyDescriptor<void*> midi_data;
                extern PBD::PropertyDescriptor<Evoral::MusicalTime> length_beats;
@@ -64,7 +64,7 @@ class MidiRegion : public Region
        ~MidiRegion();
 
        boost::shared_ptr<MidiRegion> clone ();
-        
+
        boost::shared_ptr<MidiSource> midi_source (uint32_t n=0) const;
 
        /* Stub Readable interface */
@@ -77,7 +77,7 @@ class MidiRegion : public Region
                            uint32_t  chan_n = 0,
                            NoteMode  mode = Sustained,
                            MidiStateTracker* tracker = 0) const;
-       
+
        framepos_t master_read_at (MidiRingBuffer<framepos_t>& dst,
                                   framepos_t position,
                                   framecnt_t dur,
@@ -86,11 +86,11 @@ class MidiRegion : public Region
 
        XMLNode& state ();
        int      set_state (const XMLNode&, int version);
-       
+
        int separate_by_channel (ARDOUR::Session&, std::vector< boost::shared_ptr<Region> >&) const;
 
        /* automation */
-       
+
        boost::shared_ptr<Evoral::Control>
        control(const Evoral::Parameter& id, bool create=false) {
                return model()->control(id, create);
@@ -112,7 +112,7 @@ class MidiRegion : public Region
        void transpose (int);
 
   protected:
-       
+
        virtual bool can_trim_start_before_source_start () const {
                return true;
        }
@@ -129,7 +129,7 @@ class MidiRegion : public Region
                             framepos_t position,
                             framecnt_t dur,
                             uint32_t chan_n = 0,
-                            NoteMode mode = Sustained, 
+                            NoteMode mode = Sustained,
                             MidiStateTracker* tracker = 0) const;
 
        void register_properties ();
index 8859d42532a9ea99c880658b8cbe3162d7d86f46..a7b47efe21fe01b0ecf390a98a220a828e48a6bb 100644 (file)
@@ -48,8 +48,8 @@ class MidiSource : virtual public Source, public boost::enable_shared_from_this<
        MidiSource (Session& session, const XMLNode&);
        virtual ~MidiSource ();
 
-        boost::shared_ptr<MidiSource> clone (Evoral::MusicalTime begin = Evoral::MinMusicalTime, 
-                                             Evoral::MusicalTime end = Evoral::MaxMusicalTime);
+       boost::shared_ptr<MidiSource> clone (Evoral::MusicalTime begin = Evoral::MinMusicalTime,
+                                            Evoral::MusicalTime end = Evoral::MaxMusicalTime);
 
        /** Read the data in a given time range from the MIDI source.
         * All time stamps in parameters are in audio frames (even if the source has tempo time).
index 9848d55da994c8c97d4eab01ad79ee4b42c85456..64e4aace2d2f66f4d5e82721964582aec52b79ef 100644 (file)
@@ -47,9 +47,9 @@ public:
        void reset ();
        bool empty() const { return _on == 0; }
        uint16_t on() const { return _on; }
-        bool active (uint8_t note, uint8_t channel) { 
-                return _active_notes[(channel*128)+note] > 0;
-        }
+       bool active (uint8_t note, uint8_t channel) {
+               return _active_notes[(channel*128)+note] > 0;
+       }
 
 private:
        void track_note_onoffs(const Evoral::MIDIEvent<MidiBuffer::TimeType>& event);
index af0258552939b3f507bae8c1dbfbf12f9dcd985f..6bb959a9a555a37a0b5fb79e2f9a14c8c8598edb 100644 (file)
@@ -31,7 +31,7 @@ class Session;
 class MidiDiskstream;
 class MidiPlaylist;
 class RouteGroup;
-class SMFSource;       
+class SMFSource;
 
 class MidiTrack : public Track
 {
@@ -40,13 +40,13 @@ public:
        ~MidiTrack ();
 
        int roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
-                  int declick, bool can_record, bool rec_monitors_input, bool& need_butler);
+                 int declick, bool can_record, bool rec_monitors_input, bool& need_butler);
 
        void realtime_handle_transport_stopped ();
        void realtime_locate ();
 
        void use_new_diskstream ();
-        void set_diskstream (boost::shared_ptr<Diskstream>);
+       void set_diskstream (boost::shared_ptr<Diskstream>);
        void set_record_enabled (bool yn, void *src);
 
        DataType data_type () const {
@@ -57,7 +57,7 @@ public:
 
        void freeze_me (InterThreadInfo&);
        void unfreeze ();
-        
+
        boost::shared_ptr<Region> bounce (InterThreadInfo&);
        boost::shared_ptr<Region> bounce_range (
                        framepos_t start, framepos_t end, InterThreadInfo&, bool enable_processing
@@ -88,7 +88,7 @@ public:
        void set_step_editing (bool yn);
        MidiRingBuffer<framepos_t>& step_edit_ring_buffer() { return _step_edit_ring_buffer; }
 
-        PBD::Signal1<void,bool> StepEditStatusChange;
+       PBD::Signal1<void,bool> StepEditStatusChange;
 
        bool midi_thru() const { return _midi_thru; }
        void set_midi_thru (bool yn);
@@ -102,15 +102,15 @@ public:
        bool bounceable () const {
                return false;
        }
-       
+
        PBD::Signal2<void, boost::shared_ptr<MidiBuffer>, boost::weak_ptr<MidiSource> > DataRecorded;
 
 protected:
        XMLNode& state (bool full);
-       
+
        int _set_state (const XMLNode&, int, bool call_base);
-        bool should_monitor () const;
-        bool send_silence () const;
+       bool should_monitor () const;
+       bool send_silence () const;
 
   private:
        boost::shared_ptr<MidiDiskstream> midi_diskstream () const;
index 819b70df434117aff3235a2dd742b2e4febe31b3..95e97c64ea1a6520c1e87dc616233f271bd96c8c 100644 (file)
@@ -6,7 +6,7 @@
 #include "pbd/abstract_ui.h"
 #include "pbd/signals.h"
 
-namespace MIDI { 
+namespace MIDI {
        class Port;
 }
 
@@ -32,15 +32,15 @@ class MidiControlUI : public AbstractUI<MidiUIRequest>
        ~MidiControlUI ();
 
        static MidiControlUI* instance() { return _instance; }
-       
+
        static BaseUI::RequestType PortChange;
-       
+
        void change_midi_ports ();
-       
+
   protected:
        void thread_init ();
        void do_request (MidiUIRequest*);
-       
+
   private:
        typedef std::list<GSource*> PortSources;
        PortSources port_sources;
index 2118b819b51ea797d5b1f3a647d67319b36930c2..1c3fb6e5c44a6309bd857d87eb7ea792cc0729d7 100644 (file)
 
 extern "C" {
 /* SSE functions */
-    float x86_sse_compute_peak         (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float current);
-    void  x86_sse_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain);
-    void  x86_sse_mix_buffers_with_gain(ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes, float gain);
-    void  x86_sse_mix_buffers_no_gain  (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes);
+float x86_sse_compute_peak         (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float current);
+void  x86_sse_apply_gain_to_buffer (ARDOUR::Sample * buf, ARDOUR::pframes_t nframes, float gain);
+void  x86_sse_mix_buffers_with_gain(ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes, float gain);
+void  x86_sse_mix_buffers_no_gain  (ARDOUR::Sample * dst, const ARDOUR::Sample * src, ARDOUR::pframes_t nframes);
 }
 
 void  x86_sse_find_peaks               (const ARDOUR::Sample * buf, ARDOUR::pframes_t nsamples, float *min, float *max);
index d394ab0b819929e7d3c8585d8ab2bd566f5bec82..023dacb619a57d373c4eba6c60b6eb2877d84102 100644 (file)
@@ -36,177 +36,178 @@ namespace ARDOUR {
 
 class Session;
 
-template<typename T> class MPControl : public PBD::Controllable {
-  public:
-        MPControl (T initial, const std::string& name, PBD::Controllable::Flag flag,
-                   float lower = 0.0f, float upper = 1.0f)
-                : PBD::Controllable (name, flag)
-                , _value (initial) 
-                , _lower (lower)
-                , _upper (upper) 
-        {}
-        
-        /* Controllable API */
-        
-        void set_value (double v) {
-                T newval = (T) v;
-                if (newval != _value) {
-                        _value = newval;
-                        Changed(); /* EMIT SIGNAL */
-                }
-        }
-        
-        double get_value () const { 
-                return (float) _value;
-        }
-        
-        double lower () const { return _lower; }
-        double upper () const { return _upper; }
-
-        /* "access as T" API */
-        
-        MPControl& operator=(const T& v) { 
-                if (v != _value) {
-                        _value = v;
-                        Changed (); /* EMIT SIGNAL */
-                }
-                return *this;
-        }
-        
-        bool operator==(const T& v) const {
-                return _value == v;
-        }
-        
-        bool operator<(const T& v) const {
-                return _value < v;
-        }
-        
-        bool operator<=(const T& v) const {
-                return _value <= v;
-        }
-        
-        bool operator>(const T& v) const {
-                return _value > v;
-        }
-        
-        bool operator>=(const T& v) const {
-                return _value >= v;
-        }
-        
-        operator T() const { return _value; }
-        T val() const { return _value; }
-        
-  protected:
-        T _value;
-        T _lower;
-        T _upper;
+template<typename T>
+class MPControl : public PBD::Controllable {
+public:
+       MPControl (T initial, const std::string& name, PBD::Controllable::Flag flag,
+                  float lower = 0.0f, float upper = 1.0f)
+               : PBD::Controllable (name, flag)
+               , _value (initial)
+               , _lower (lower)
+               , _upper (upper)
+       {}
+
+       /* Controllable API */
+
+       void set_value (double v) {
+               T newval = (T) v;
+               if (newval != _value) {
+                       _value = newval;
+                       Changed(); /* EMIT SIGNAL */
+               }
+       }
+
+       double get_value () const {
+               return (float) _value;
+       }
+
+       double lower () const { return _lower; }
+       double upper () const { return _upper; }
+
+       /* "access as T" API */
+
+       MPControl& operator=(const T& v) {
+               if (v != _value) {
+                       _value = v;
+                       Changed (); /* EMIT SIGNAL */
+               }
+               return *this;
+       }
+
+       bool operator==(const T& v) const {
+               return _value == v;
+       }
+
+       bool operator<(const T& v) const {
+               return _value < v;
+       }
+
+       bool operator<=(const T& v) const {
+               return _value <= v;
+       }
+
+       bool operator>(const T& v) const {
+               return _value > v;
+       }
+
+       bool operator>=(const T& v) const {
+               return _value >= v;
+       }
+
+       operator T() const { return _value; }
+       T val() const { return _value; }
+
+protected:
+       T _value;
+       T _lower;
+       T _upper;
 };
 
 class MonitorProcessor : public Processor
 {
-  public:
-        MonitorProcessor (Session&);
-        ~MonitorProcessor ();
+public:
+       MonitorProcessor (Session&);
+       ~MonitorProcessor ();
 
-        bool display_to_user() const;
+       bool display_to_user() const;
 
        void run (BufferSet& /*bufs*/, framepos_t /*start_frame*/, framepos_t /*end_frame*/, pframes_t /*nframes*/, bool /*result_required*/);
 
-        XMLNode& state (bool full);
-        int set_state (const XMLNode&, int /* version */);
+       XMLNode& state (bool full);
+       int set_state (const XMLNode&, int /* version */);
 
-        bool configure_io (ChanCount in, ChanCount out);
+       bool configure_io (ChanCount in, ChanCount out);
        bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
 
-        void set_cut_all (bool);
-        void set_dim_all (bool);
-        void set_polarity (uint32_t, bool invert);
-        void set_cut (uint32_t, bool cut);
-        void set_dim (uint32_t, bool dim);
-        void set_solo (uint32_t, bool);
-        void set_mono (bool);
-
-        gain_t dim_level() const { return _dim_level; }
-        gain_t solo_boost_level() const { return _solo_boost_level; }
-
-        bool dimmed (uint32_t chn) const;
-        bool soloed (uint32_t chn) const;
-        bool inverted (uint32_t chn) const;
-        bool cut (uint32_t chn) const;
-        bool cut_all () const;
-        bool dim_all () const;
-        bool mono () const;
-
-        PBD::Signal0<void> Changed;
-
-        boost::shared_ptr<PBD::Controllable> channel_cut_control (uint32_t) const;
-        boost::shared_ptr<PBD::Controllable> channel_dim_control (uint32_t) const;
-        boost::shared_ptr<PBD::Controllable> channel_polarity_control (uint32_t) const;
-        boost::shared_ptr<PBD::Controllable> channel_solo_control (uint32_t) const;
-        
-        boost::shared_ptr<PBD::Controllable> dim_control () const { return _dim_all_control; }
-        boost::shared_ptr<PBD::Controllable> cut_control () const { return _cut_all_control; }
-        boost::shared_ptr<PBD::Controllable> mono_control () const { return _mono_control; }
-        boost::shared_ptr<PBD::Controllable> dim_level_control () const { return _dim_level_control; }
-        boost::shared_ptr<PBD::Controllable> solo_boost_control () const { return _solo_boost_level_control; }
-
-  private:
-        struct ChannelRecord { 
-            gain_t current_gain;
-
-            /* pointers - created first, but managed by boost::shared_ptr<> */
-
-            MPControl<gain_t>* cut_ptr;
-            MPControl<bool>*   dim_ptr;
-            MPControl<gain_t>* polarity_ptr;
-            MPControl<bool>*   soloed_ptr;
-
-            /* shared ptr access and lifetime management, for external users */
-
-            boost::shared_ptr<PBD::Controllable> cut_control;
-            boost::shared_ptr<PBD::Controllable> dim_control;
-            boost::shared_ptr<PBD::Controllable> polarity_control;
-            boost::shared_ptr<PBD::Controllable> soloed_control;
-
-            /* typed controllables for internal use */
-
-            MPControl<gain_t>& cut;
-            MPControl<bool>&   dim;
-            MPControl<gain_t>& polarity;
-            MPControl<bool>&   soloed;
-            
-           ChannelRecord (uint32_t);
-        };
-        
-        std::vector<ChannelRecord*> _channels;
-
-        uint32_t             solo_cnt;
-
-        /* pointers - created first, but managed by boost::shared_ptr<> */
-
-        MPControl<bool>*            _dim_all_ptr;
-        MPControl<bool>*            _cut_all_ptr;
-        MPControl<bool>*            _mono_ptr;
-        MPControl<volatile gain_t>* _dim_level_ptr;
-        MPControl<volatile gain_t>* _solo_boost_level_ptr;
-
-        /* shared ptr access and lifetime management, for external users */
-
-        boost::shared_ptr<PBD::Controllable> _dim_all_control;
-        boost::shared_ptr<PBD::Controllable> _cut_all_control;
-        boost::shared_ptr<PBD::Controllable> _mono_control;
-        boost::shared_ptr<PBD::Controllable> _dim_level_control;
-        boost::shared_ptr<PBD::Controllable> _solo_boost_level_control;
-
-        /* typed controllables for internal use */
-
-        MPControl<bool>&            _dim_all;
-        MPControl<bool>&            _cut_all;
-        MPControl<bool>&            _mono;
-        MPControl<volatile gain_t>& _dim_level;
-        MPControl<volatile gain_t>& _solo_boost_level;
-
-        void allocate_channels (uint32_t);
+       void set_cut_all (bool);
+       void set_dim_all (bool);
+       void set_polarity (uint32_t, bool invert);
+       void set_cut (uint32_t, bool cut);
+       void set_dim (uint32_t, bool dim);
+       void set_solo (uint32_t, bool);
+       void set_mono (bool);
+
+       gain_t dim_level() const { return _dim_level; }
+       gain_t solo_boost_level() const { return _solo_boost_level; }
+
+       bool dimmed (uint32_t chn) const;
+       bool soloed (uint32_t chn) const;
+       bool inverted (uint32_t chn) const;
+       bool cut (uint32_t chn) const;
+       bool cut_all () const;
+       bool dim_all () const;
+       bool mono () const;
+
+       PBD::Signal0<void> Changed;
+
+       boost::shared_ptr<PBD::Controllable> channel_cut_control (uint32_t) const;
+       boost::shared_ptr<PBD::Controllable> channel_dim_control (uint32_t) const;
+       boost::shared_ptr<PBD::Controllable> channel_polarity_control (uint32_t) const;
+       boost::shared_ptr<PBD::Controllable> channel_solo_control (uint32_t) const;
+
+       boost::shared_ptr<PBD::Controllable> dim_control () const { return _dim_all_control; }
+       boost::shared_ptr<PBD::Controllable> cut_control () const { return _cut_all_control; }
+       boost::shared_ptr<PBD::Controllable> mono_control () const { return _mono_control; }
+       boost::shared_ptr<PBD::Controllable> dim_level_control () const { return _dim_level_control; }
+       boost::shared_ptr<PBD::Controllable> solo_boost_control () const { return _solo_boost_level_control; }
+
+private:
+       struct ChannelRecord {
+               gain_t current_gain;
+
+               /* pointers - created first, but managed by boost::shared_ptr<> */
+
+               MPControl<gain_t>* cut_ptr;
+               MPControl<bool>*   dim_ptr;
+               MPControl<gain_t>* polarity_ptr;
+               MPControl<bool>*   soloed_ptr;
+
+               /* shared ptr access and lifetime management, for external users */
+
+               boost::shared_ptr<PBD::Controllable> cut_control;
+               boost::shared_ptr<PBD::Controllable> dim_control;
+               boost::shared_ptr<PBD::Controllable> polarity_control;
+               boost::shared_ptr<PBD::Controllable> soloed_control;
+
+               /* typed controllables for internal use */
+
+               MPControl<gain_t>& cut;
+               MPControl<bool>&   dim;
+               MPControl<gain_t>& polarity;
+               MPControl<bool>&   soloed;
+
+               ChannelRecord (uint32_t);
+       };
+
+       std::vector<ChannelRecord*> _channels;
+
+       uint32_t             solo_cnt;
+
+       /* pointers - created first, but managed by boost::shared_ptr<> */
+
+       MPControl<bool>*            _dim_all_ptr;
+       MPControl<bool>*            _cut_all_ptr;
+       MPControl<bool>*            _mono_ptr;
+       MPControl<volatile gain_t>* _dim_level_ptr;
+       MPControl<volatile gain_t>* _solo_boost_level_ptr;
+
+       /* shared ptr access and lifetime management, for external users */
+
+       boost::shared_ptr<PBD::Controllable> _dim_all_control;
+       boost::shared_ptr<PBD::Controllable> _cut_all_control;
+       boost::shared_ptr<PBD::Controllable> _mono_control;
+       boost::shared_ptr<PBD::Controllable> _dim_level_control;
+       boost::shared_ptr<PBD::Controllable> _solo_boost_level_control;
+
+       /* typed controllables for internal use */
+
+       MPControl<bool>&            _dim_all;
+       MPControl<bool>&            _cut_all;
+       MPControl<bool>&            _mono;
+       MPControl<volatile gain_t>& _dim_level;
+       MPControl<volatile gain_t>& _solo_boost_level;
+
+       void allocate_channels (uint32_t);
 };
 
 } /* namespace */
index 26b6125888466273323fa4f2983a1e9b680bc05f..0a9bf8d074580ed064551dadf42e94ee57f6c743 100644 (file)
@@ -5,9 +5,9 @@ namespace ARDOUR {
 
 class Movable {
   public:
-        Movable() {}
+       Movable() {}
 
-        bool locked () const { return false; }
+       bool locked () const { return false; }
 };
 
 }
index 228126b5820dd6f50bc229be8223584af71e19a3..460c7bf48ba6e65ac688b6fafdd0aff4d3c4ed3b 100644 (file)
@@ -48,22 +48,22 @@ class MuteMaster : public SessionHandleRef, public PBD::Stateful
        ~MuteMaster() {}
 
        bool muted_by_self () const { return _muted_by_self && (_mute_point != MutePoint (0)); }
-        bool muted_by_self_at (MutePoint mp) const { return _muted_by_self && (_mute_point & mp); }
+       bool muted_by_self_at (MutePoint mp) const { return _muted_by_self && (_mute_point & mp); }
        bool muted_by_others_at (MutePoint mp) const;
 
        gain_t mute_gain_at (MutePoint) const;
 
-        void set_muted_by_self (bool yn) { _muted_by_self = yn; }
+       void set_muted_by_self (bool yn) { _muted_by_self = yn; }
 
        void mute_at (MutePoint);
        void unmute_at (MutePoint);
 
        void set_mute_points (const std::string& mute_point);
-        void set_mute_points (MutePoint);
-        MutePoint mute_points() const { return _mute_point; }
+       void set_mute_points (MutePoint);
+       MutePoint mute_points() const { return _mute_point; }
 
-        void set_soloed (bool);
-        void set_solo_ignore (bool yn) { _solo_ignore = yn; }
+       void set_soloed (bool);
+       void set_solo_ignore (bool yn) { _solo_ignore = yn; }
 
        PBD::Signal0<void> MutePointChanged;
 
@@ -72,9 +72,9 @@ class MuteMaster : public SessionHandleRef, public PBD::Stateful
 
   private:
        volatile MutePoint _mute_point;
-        volatile bool      _muted_by_self;
-        volatile bool      _soloed;
-        volatile bool      _solo_ignore;
+       volatile bool      _muted_by_self;
+       volatile bool      _soloed;
+       volatile bool      _solo_ignore;
 };
 
 } // namespace ARDOUR
index c17ef3bf4dff1ed00e1da217460b4832cbc6286e..f03db205749699d6c5a442db70f804f1d77f4e7a 100644 (file)
@@ -30,23 +30,24 @@ class XMLNode;
 
 namespace ARDOUR
 {
+
 class Session;
 class Playlist;
 
 struct NamedSelection : public PBD::Stateful
 {
-    NamedSelection (std::string, std::list<boost::shared_ptr<Playlist> >&);
-    NamedSelection (Session&, const XMLNode&);
-    virtual ~NamedSelection ();
+       NamedSelection (std::string, std::list<boost::shared_ptr<Playlist> >&);
+       NamedSelection (Session&, const XMLNode&);
+       virtual ~NamedSelection ();
 
-    std::string name;
-    std::list<boost::shared_ptr<Playlist> > playlists;
+       std::string name;
+       std::list<boost::shared_ptr<Playlist> > playlists;
 
-    XMLNode& get_state (void);
+       XMLNode& get_state (void);
 
-    int set_state (const XMLNode&, int version);
+       int set_state (const XMLNode&, int version);
 
-    static PBD::Signal1<void,NamedSelection*> NamedSelectionCreated;
+       static PBD::Signal1<void,NamedSelection*> NamedSelectionCreated;
 };
 
 }/* namespace ARDOUR */
index dea4efe1abb3d48a0e300d901ae1a2c9311b574b..6604a3a3623d5a3147059a522fbf9fcf4a1647ea 100644 (file)
@@ -29,26 +29,25 @@ class Session;
 
 class OnsetDetector : public AudioAnalyser
 {
+public:
+       OnsetDetector (float sample_rate);
+       ~OnsetDetector();
 
-  public:
-    OnsetDetector (float sample_rate);
-    ~OnsetDetector();
+       static std::string operational_identifier();
 
-    static std::string operational_identifier();
+       void set_silence_threshold (float);
+       void set_peak_threshold (float);
+       void set_function (int);
 
-    void set_silence_threshold (float);
-    void set_peak_threshold (float);
-    void set_function (int);
+       int run (const std::string& path, Readable*, uint32_t channel, AnalysisFeatureList& results);
 
-    int run (const std::string& path, Readable*, uint32_t channel, AnalysisFeatureList& results);
+       static void cleanup_onsets (AnalysisFeatureList&, float sr, float gap_msecs);
 
-    static void cleanup_onsets (AnalysisFeatureList&, float sr, float gap_msecs);
+protected:
+       AnalysisFeatureList* current_results;
+       int use_features (Vamp::Plugin::FeatureSet&, std::ostream*);
 
-  protected:
-    AnalysisFeatureList* current_results;
-    int use_features (Vamp::Plugin::FeatureSet&, std::ostream*);
-
-    static std::string _op_id;
+       static std::string _op_id;
 };
 
 } /* namespace */
index 95639171f9d83ca566c624e567221b05cb96f15a..dd6329d7b993c56e4d8df37be62f747c5fb7d65e 100644 (file)
@@ -42,4 +42,4 @@ namespace Operations {
        extern GQuark fixed_time_region_copy;
 
 };
-       
+
index 19315e3e1e464e0302c4cd3fe131bb1e778b59d0..be0c9260c07f642f58cb7a4bc74edcd3021e0a49 100644 (file)
@@ -34,22 +34,21 @@ namespace ARDOUR {
 class Session;
 class Pannable;
 
-class PanControllable : public AutomationControl 
+class PanControllable : public AutomationControl
 {
-  public:
-        PanControllable (Session& s, std::string name, Pannable* o, Evoral::Parameter param)
-                : AutomationControl (s, param, boost::shared_ptr<AutomationList>(new AutomationList(param)), name)
-                , owner (o)
-        {}
-        
-        double lower () const;
-        void set_value (double);
-
-  private:
-        
-        Pannable* owner;
+public:
+       PanControllable (Session& s, std::string name, Pannable* o, Evoral::Parameter param)
+               : AutomationControl (s, param, boost::shared_ptr<AutomationList>(new AutomationList(param)), name)
+               , owner (o)
+       {}
+
+       double lower () const;
+       void set_value (double);
+
+private:
+       Pannable* owner;
 };
 
-} // namespace 
+} // namespace
 
 #endif /* __libardour_pan_controllable_h__ */
index 2a7675cf750af54fe1b76c7bcf6da77d5ec2bffd..c9b5389f5875c651519ee31406881e2086573b29 100644 (file)
@@ -36,22 +36,22 @@ class Session;
 class AutomationControl;
 class Panner;
 
-class Pannable : public PBD::Stateful, public Automatable, public SessionHandleRef 
+class Pannable : public PBD::Stateful, public Automatable, public SessionHandleRef
 {
   public:
-        Pannable (Session& s);
-        ~Pannable ();
+       Pannable (Session& s);
+       ~Pannable ();
 
-        boost::shared_ptr<AutomationControl> pan_azimuth_control;
-        boost::shared_ptr<AutomationControl> pan_elevation_control;
-        boost::shared_ptr<AutomationControl> pan_width_control;
-        boost::shared_ptr<AutomationControl> pan_frontback_control;
-        boost::shared_ptr<AutomationControl> pan_lfe_control;
-        
-        boost::shared_ptr<Panner> panner() const { return _panner.lock(); }
-        void set_panner(boost::shared_ptr<Panner>);
+       boost::shared_ptr<AutomationControl> pan_azimuth_control;
+       boost::shared_ptr<AutomationControl> pan_elevation_control;
+       boost::shared_ptr<AutomationControl> pan_width_control;
+       boost::shared_ptr<AutomationControl> pan_frontback_control;
+       boost::shared_ptr<AutomationControl> pan_lfe_control;
 
-        Session& session() { return _session; }
+       boost::shared_ptr<Panner> panner() const { return _panner.lock(); }
+       void set_panner(boost::shared_ptr<Panner>);
+
+       Session& session() { return _session; }
 
        void set_automation_state (AutoState);
        AutoState automation_state() const { return _auto_state; }
@@ -65,37 +65,37 @@ class Pannable : public PBD::Stateful, public Automatable, public SessionHandleR
                return (_auto_state & Play) || ((_auto_state & Touch) && !touching());
        }
        bool automation_write () const {
-                return ((_auto_state & Write) || ((_auto_state & Touch) && touching()));
-        }
+               return ((_auto_state & Write) || ((_auto_state & Touch) && touching()));
+       }
 
-        std::string value_as_string (boost::shared_ptr<AutomationControl>) const;
+       std::string value_as_string (boost::shared_ptr<AutomationControl>) const;
 
        void start_touch (double when);
        void stop_touch (bool mark, double when);
        bool touching() const { return g_atomic_int_get (&_touching); }
        bool writing() const { return _auto_state == Write; }
-        bool touch_enabled() const { return _auto_state == Touch; }
+       bool touch_enabled() const { return _auto_state == Touch; }
 
-        XMLNode& get_state ();
-        XMLNode& state (bool full_state);
-        int set_state (const XMLNode&, int version);
+       XMLNode& get_state ();
+       XMLNode& state (bool full_state);
+       int set_state (const XMLNode&, int version);
 
-        bool has_state() const { return _has_state; }
+       bool has_state() const { return _has_state; }
 
   protected:
-        boost::weak_ptr<Panner> _panner;
-        AutoState _auto_state;
-        AutoStyle _auto_style;
-        gint      _touching;
-        bool      _has_state;
-        uint32_t  _responding_to_control_auto_state_change;
+       boost::weak_ptr<Panner> _panner;
+       AutoState _auto_state;
+       AutoStyle _auto_style;
+       gint      _touching;
+       bool      _has_state;
+       uint32_t  _responding_to_control_auto_state_change;
 
-        void control_auto_state_changed (AutoState);
+       void control_auto_state_changed (AutoState);
 
   private:
        void value_changed ();
 };
 
-} // namespace 
+} // namespace
 
 #endif /* __libardour_pannable_h__ */
index f7e533cd6a18a0bd8c20b09dc31628ce880b3428..ebb90ac50a0026220fef7828af484fbcd4edfe93 100644 (file)
@@ -44,46 +44,45 @@ class Speakers;
 
 class Panner : public PBD::Stateful, public PBD::ScopedConnectionList
 {
-  public:
+public:
        Panner (boost::shared_ptr<Pannable>);
        ~Panner ();
 
-        virtual boost::shared_ptr<Speakers> get_speakers() const { return boost::shared_ptr<Speakers>(); }
+       virtual boost::shared_ptr<Speakers> get_speakers() const { return boost::shared_ptr<Speakers>(); }
 
-        virtual ChanCount in() const = 0;
-        virtual ChanCount out() const = 0;
+       virtual ChanCount in() const = 0;
+       virtual ChanCount out() const = 0;
 
-        virtual void configure_io (ARDOUR::ChanCount /*in*/, ARDOUR::ChanCount /*out*/) {}
-        
-        /* derived implementations of these methods must indicate
-           whether it is legal for a Controllable to use the
-           value of the argument (post-call) in a call to 
-           Controllable::set_value().
-           
-           they have a choice of:
+       virtual void configure_io (ARDOUR::ChanCount /*in*/, ARDOUR::ChanCount /*out*/) {}
 
-           * return true, leave argument unchanged
-           * return true, modify argument
-           * return false
+       /* derived implementations of these methods must indicate
+          whether it is legal for a Controllable to use the
+          value of the argument (post-call) in a call to
+          Controllable::set_value().
 
-        */
+          they have a choice of:
 
-        virtual bool clamp_position (double&) { return true; }
-        virtual bool clamp_width (double&) { return true; }
-        virtual bool clamp_elevation (double&) { return true; }
+          * return true, leave argument unchanged
+          * return true, modify argument
+          * return false
+       */
 
-        virtual void set_position (double) { }
-        virtual void set_width (double) { }
-        virtual void set_elevation (double) { }
-        
-        virtual double position () const { return 0.0; }
-        virtual double width () const { return 0.0; }
-        virtual double elevation () const { return 0.0; }
+       virtual bool clamp_position (double&) { return true; }
+       virtual bool clamp_width (double&) { return true; }
+       virtual bool clamp_elevation (double&) { return true; }
 
-        virtual PBD::AngularVector signal_position (uint32_t) const { return PBD::AngularVector(); }
+       virtual void set_position (double) { }
+       virtual void set_width (double) { }
+       virtual void set_elevation (double) { }
+
+       virtual double position () const { return 0.0; }
+       virtual double width () const { return 0.0; }
+       virtual double elevation () const { return 0.0; }
+
+       virtual PBD::AngularVector signal_position (uint32_t) const { return PBD::AngularVector(); }
+
+       virtual void reset() {}
 
-        virtual void reset() {}
-        
        virtual bool bypassed() const { return _bypassed; }
        virtual void set_bypassed (bool yn);
 
@@ -93,33 +92,33 @@ class Panner : public PBD::Stateful, public PBD::ScopedConnectionList
        AutoStyle automation_style() const;
 
        virtual std::set<Evoral::Parameter> what_can_be_automated() const;
-        virtual std::string describe_parameter (Evoral::Parameter);
-        virtual std::string value_as_string (boost::shared_ptr<AutomationControl>) const;
+       virtual std::string describe_parameter (Evoral::Parameter);
+       virtual std::string value_as_string (boost::shared_ptr<AutomationControl>) const;
 
        bool touching() const;
 
-       static double azimuth_to_lr_fract (double azi) { 
+       static double azimuth_to_lr_fract (double azi) {
                /* 180.0 degrees=> left => 0.0 */
                /* 0.0 degrees => right => 1.0 */
 
-                /* humans can only distinguish 1 degree of arc between two positions,
-                   so force azi back to an integral value before computing
-                */
+               /* humans can only distinguish 1 degree of arc between two positions,
+                  so force azi back to an integral value before computing
+               */
 
                return 1.0 - (rint(azi)/180.0);
        }
 
-       static double lr_fract_to_azimuth (double fract) { 
+       static double lr_fract_to_azimuth (double fract) {
                /* fract = 0.0 => degrees = 180.0 => left */
                /* fract = 1.0 => degrees = 0.0 => right */
 
-                /* humans can only distinguish 1 degree of arc between two positions,
-                   so force azi back to an integral value after computing
-                */
+               /* humans can only distinguish 1 degree of arc between two positions,
+                  so force azi back to an integral value after computing
+               */
 
                return rint (180.0 - (fract * 180.0));
        }
-       
+
        /**
         *  Pan some input buffers to a number of output buffers.
         *
@@ -127,59 +126,60 @@ class Panner : public PBD::Stateful, public PBD::ScopedConnectionList
         *  @param obufs Output buffers (one per panner output).
         *  @param gain_coeff fixed, additional gain coefficient to apply to output samples.
         *  @param nframes Number of frames in the input.
-         *
-         *  Derived panners can choose to implement these if they need to gain more control over the panning algorithm.
-         *  the default is to call distribute_one() or distribute_one_automated() on each input buffer to deliver it to each output 
-         *  buffer.
-         * 
-         *  If a panner does not need to override this default behaviour, it can just implement
-         *  distribute_one() and distribute_one_automated() (below).
+        *
+        *  Derived panners can choose to implement these if they need to gain more
+        *  control over the panning algorithm.  The default is to call
+        *  distribute_one() or distribute_one_automated() on each input buffer to
+        *  deliver it to each output buffer.
+        *
+        *  If a panner does not need to override this default behaviour, it can
+        *  just implement distribute_one() and distribute_one_automated() (below).
         */
        virtual void distribute (BufferSet& ibufs, BufferSet& obufs, gain_t gain_coeff, pframes_t nframes);
        virtual void distribute_automated (BufferSet& ibufs, BufferSet& obufs,
-                                           framepos_t start, framepos_t end, pframes_t nframes,
-                                           pan_t** buffers);
+                                          framepos_t start, framepos_t end, pframes_t nframes,
+                                          pan_t** buffers);
 
        PBD::Signal0<void> StateChanged;
 
        int set_state (const XMLNode&, int version);
        virtual XMLNode& state (bool full_state) = 0;
 
-        boost::shared_ptr<Pannable> pannable() const { return _pannable; }
+       boost::shared_ptr<Pannable> pannable() const { return _pannable; }
 
-        //virtual std::string describe_parameter (Evoral::Parameter);
-        //virtual std::string value_as_string (Evoral::Parameter, double val);
+       //virtual std::string describe_parameter (Evoral::Parameter);
+       //virtual std::string value_as_string (Evoral::Parameter, double val);
 
        static bool equivalent (pan_t a, pan_t b) {
                return fabsf (a - b) < 0.002; // about 1 degree of arc for a stereo panner
        }
 
        static bool equivalent (const PBD::AngularVector& a, const PBD::AngularVector& b) {
-                /* XXX azimuth only, at present */
+               /* XXX azimuth only, at present */
                return fabs (a.azi - b.azi) < 1.0;
        }
 
-  protected:
-        boost::shared_ptr<Pannable> _pannable;
-        bool        _bypassed;
+protected:
+       boost::shared_ptr<Pannable> _pannable;
+       bool        _bypassed;
 
        XMLNode& get_state ();
 
        virtual void distribute_one (AudioBuffer&, BufferSet& obufs, gain_t gain_coeff, pframes_t nframes, uint32_t which) = 0;
        virtual void distribute_one_automated (AudioBuffer&, BufferSet& obufs,
-                                               framepos_t start, framepos_t end, pframes_t nframes,
-                                               pan_t** buffers, uint32_t which) = 0;
+                                              framepos_t start, framepos_t end, pframes_t nframes,
+                                              pan_t** buffers, uint32_t which) = 0;
 };
 
 } // namespace
 
 extern "C" {
-        struct PanPluginDescriptor {
-            std::string name;
-            int32_t in;
-            int32_t out;
-            ARDOUR::Panner* (*factory)(boost::shared_ptr<ARDOUR::Pannable>, boost::shared_ptr<ARDOUR::Speakers>);
-        };
+struct PanPluginDescriptor {
+       std::string name;
+       int32_t in;
+       int32_t out;
+       ARDOUR::Panner* (*factory)(boost::shared_ptr<ARDOUR::Pannable>, boost::shared_ptr<ARDOUR::Speakers>);
+};
 }
 
 #endif /* __ardour_panner_h__ */
index d5b183c859237daa73376f2cfea7c8a7bd1186ae..483691c944df808429c06eed3b985e7c8da72be4 100644 (file)
@@ -8,36 +8,36 @@
 namespace ARDOUR {
 
 struct PannerInfo {
-    PanPluginDescriptor descriptor;
-    void* module;
-    
-    PannerInfo (PanPluginDescriptor& d, void* handle) 
-            : descriptor (d)
-            , module (handle)
-    {}
-    
-    ~PannerInfo () { 
-            dlclose (module);
-    }
+       PanPluginDescriptor descriptor;
+       void* module;
+
+       PannerInfo (PanPluginDescriptor& d, void* handle)
+       : descriptor (d)
+       , module (handle)
+       {}
+
+       ~PannerInfo () {
+               dlclose (module);
+       }
 };
-        
+
 class PannerManager : public ARDOUR::SessionHandlePtr
 {
-  public:
-    ~PannerManager ();
-    static PannerManager& instance ();
-    
-    void discover_panners ();
-    std::list<PannerInfo*> panner_info;
-
-    PannerInfo* select_panner (ChanCount in, ChanCount out);
-    
-  private:
-    PannerManager();
-    static PannerManager* _instance;
-
-    PannerInfo* get_descriptor (std::string path);
-    int panner_discover (std::string path);
+public:
+       ~PannerManager ();
+       static PannerManager& instance ();
+
+       void discover_panners ();
+       std::list<PannerInfo*> panner_info;
+
+       PannerInfo* select_panner (ChanCount in, ChanCount out);
+
+private:
+       PannerManager();
+       static PannerManager* _instance;
+
+       PannerInfo* get_descriptor (std::string path);
+       int panner_discover (std::string path);
 };
 
 } // namespace
index 883171055567459f722ec074c8badbfb88ada4f0..4749cd4dcefe6f603ef647ec22db42c461de74e3 100644 (file)
@@ -67,14 +67,14 @@ public:
 
        PBD::Signal0<void> Changed; /* panner and/or outputs count changed */
 
-        boost::shared_ptr<Panner> panner() const { return _panner; }
-        boost::shared_ptr<Pannable> pannable() const { return _pannable; }
+       boost::shared_ptr<Panner> panner() const { return _panner; }
+       boost::shared_ptr<Pannable> pannable() const { return _pannable; }
 
   private:
        void distribute_no_automation (BufferSet& src, BufferSet& dest, pframes_t nframes, gain_t gain_coeff);
-        boost::shared_ptr<Panner> _panner;
-        boost::shared_ptr<Pannable> _pannable;
-     
+       boost::shared_ptr<Panner> _panner;
+       boost::shared_ptr<Pannable> _pannable;
+
        static float current_automation_version_number;
 };
 
index a118fd739f2d722382d4dc945908b036b6d358e8..bcbc81701a75e0bf8e5bcd7125e09bc3a595cc1a 100644 (file)
@@ -1,11 +1,11 @@
 /*
   Copyright (C) 2008 Torben Hohn
-  
+
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.
-  
+
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 #include "ardour/types.h"
 
 class PIController {
+public:
+       PIController (double resample_factor, int fir_size);
+       ~PIController();
+
+       void reset (double resample_factor) {
+               resample_mean = resample_factor;
+               static_resample_factor = resample_factor;
+               out_of_bounds ();
+       }
 
-  public:
-    PIController (double resample_factor, int fir_size);
-    ~PIController();
-        
-    void reset (double resample_factor) {
-            resample_mean = resample_factor;
-            static_resample_factor = resample_factor;
-           out_of_bounds ();
-    }
-        
-    double get_ratio (int fill_level, int period_size);
-    void out_of_bounds();
-
-  public:
-    double  resample_mean;
-    double  static_resample_factor;
-    double* offset_array;
-    double* window_array;
-    int     offset_differential_index;
-    double  offset_integral;
-    double  catch_factor;
-    double  catch_factor2;
-    double  pclamp;
-    double  controlquant;
-    int     smooth_size;
-    double  smooth_offset;
-    double  current_resample_factor;
-    bool    fir_empty;
+       double get_ratio (int fill_level, int period_size);
+       void out_of_bounds();
+
+public:
+       double  resample_mean;
+       double  static_resample_factor;
+       double* offset_array;
+       double* window_array;
+       int     offset_differential_index;
+       double  offset_integral;
+       double  catch_factor;
+       double  catch_factor2;
+       double  pclamp;
+       double  controlquant;
+       int     smooth_size;
+       double  smooth_offset;
+       double  current_resample_factor;
+       bool    fir_empty;
 };
 
 #define ESTIMATOR_SIZE 16
 
 class PIChaser {
-  public:
-    PIChaser();
-    ~PIChaser();
+public:
+       PIChaser();
+       ~PIChaser();
 
-    double get_ratio( framepos_t chasetime_measured, framepos_t chasetime, framepos_t slavetime_measured, framepos_t slavetime, bool in_control, int period_size );
-    void reset();
-    framepos_t want_locate() { return want_locate_val; }
+       double get_ratio( framepos_t chasetime_measured, framepos_t chasetime, framepos_t slavetime_measured, framepos_t slavetime, bool in_control, int period_size );
+       void reset();
+       framepos_t want_locate() { return want_locate_val; }
 
-  private:
-    PIController *pic;
-    framepos_t realtime_stamps[ESTIMATOR_SIZE];
-    framepos_t chasetime_stamps[ESTIMATOR_SIZE];
-    int array_index;
-    framepos_t want_locate_val;
+private:
+       PIController *pic;
+       framepos_t realtime_stamps[ESTIMATOR_SIZE];
+       framepos_t chasetime_stamps[ESTIMATOR_SIZE];
+       int array_index;
+       framepos_t want_locate_val;
 
-    void feed_estimator( framepos_t realtime, framepos_t chasetime );
-    double get_estimate();
+       void feed_estimator( framepos_t realtime, framepos_t chasetime );
+       double get_estimate();
 
-    double speed;
+       double speed;
 
-    double speed_threshold;
-    framepos_t pos_threshold;
+       double speed_threshold;
+       framepos_t pos_threshold;
 };
 
-
 #endif /* __libardour_pi_controller__ */
index 800984ac021d36a103ec67b632a60000035f2670..934695633e33c57f351b3bb5b9cdaae9d45c5851 100644 (file)
@@ -49,19 +49,19 @@ namespace ARDOUR  {
 class Session;
 class Region;
 class Playlist;
-class Crossfade;       
+class Crossfade;
 
 namespace Properties {
-        /* fake the type, since regions are handled by SequenceProperty which doesn't
-           care about such things.
-        */
-        extern PBD::PropertyDescriptor<bool> regions;
+       /* fake the type, since regions are handled by SequenceProperty which doesn't
+          care about such things.
+       */
+       extern PBD::PropertyDescriptor<bool> regions;
 }
 
 class RegionListProperty : public PBD::SequenceProperty<std::list<boost::shared_ptr<Region> > >
 {
   public:
-        RegionListProperty (Playlist&);
+       RegionListProperty (Playlist&);
 
        RegionListProperty* clone () const;
        void get_content_as_xml (boost::shared_ptr<Region>, XMLNode &) const;
@@ -73,16 +73,16 @@ class RegionListProperty : public PBD::SequenceProperty<std::list<boost::shared_
        /* copy construction only by ourselves */
        RegionListProperty (RegionListProperty const & p);
 
-        friend class Playlist;
-        /* we live and die with our playlist, no lifetime management needed */
-        Playlist& _playlist;
+       friend class Playlist;
+       /* we live and die with our playlist, no lifetime management needed */
+       Playlist& _playlist;
 };
 
 class Playlist : public SessionObject , public boost::enable_shared_from_this<Playlist>
 {
 public:
        typedef std::list<boost::shared_ptr<Region> > RegionList;
-        static void make_property_quarks ();
+       static void make_property_quarks ();
 
        Playlist (Session&, const XMLNode&, DataType type, bool hidden = false);
        Playlist (Session&, std::string name, DataType type, bool hidden = false);
@@ -91,9 +91,9 @@ public:
 
        virtual ~Playlist ();
 
-        void update (const RegionListProperty::ChangeRecord&);
-        void clear_owned_changes ();
-        void rdiff (std::vector<Command*>&) const;
+       void update (const RegionListProperty::ChangeRecord&);
+       void clear_owned_changes ();
+       void rdiff (std::vector<Command*>&) const;
 
        boost::shared_ptr<Region> region_by_id (const PBD::ID&) const;
 
@@ -109,7 +109,7 @@ public:
        bool used () const { return _refcnt != 0; }
 
        bool set_name (const std::string& str);
-        int sort_id() { return _sort_id; }
+       int sort_id() { return _sort_id; }
 
        const DataType& data_type() const { return _type; }
 
@@ -152,7 +152,7 @@ public:
        const RegionListProperty& region_list () const { return regions; }
 
        RegionList*                regions_at (framepos_t frame);
-        uint32_t                   count_regions_at (framepos_t) const;
+       uint32_t                   count_regions_at (framepos_t) const;
        uint32_t                   count_joined_regions () const;
        RegionList*                regions_touched (framepos_t start, framepos_t end);
        RegionList*                regions_to_read (framepos_t start, framepos_t end);
@@ -165,7 +165,7 @@ public:
        bool                       region_is_shuffle_constrained (boost::shared_ptr<Region>);
        bool                       has_region_at (framepos_t const) const;
 
-        bool uses_source (boost::shared_ptr<const Source> src) const;
+       bool uses_source (boost::shared_ptr<const Source> src) const;
 
        framepos_t find_next_transient (framepos_t position, int dir);
 
@@ -211,7 +211,7 @@ public:
 
        virtual bool destroy_region (boost::shared_ptr<Region>) = 0;
 
-        void sync_all_regions_with_regions ();
+       void sync_all_regions_with_regions ();
 
        /* special case function used by UI selection objects, which have playlists that actually own the regions
           within them.
@@ -229,7 +229,7 @@ public:
                return boost::shared_ptr<Crossfade> ();
        }
 
-       framepos_t find_next_top_layer_position (framepos_t) const;     
+       framepos_t find_next_top_layer_position (framepos_t) const;
        uint32_t combine_ops() const { return _combine_ops; }
 
   protected:
@@ -255,11 +255,11 @@ public:
 
        friend class RegionLock;
 
-        RegionListProperty   regions;  /* the current list of regions in the playlist */
+       RegionListProperty   regions;  /* the current list of regions in the playlist */
        std::set<boost::shared_ptr<Region> > all_regions; /* all regions ever added to this playlist */
        PBD::ScopedConnectionList region_state_changed_connections;
        DataType        _type;
-        int             _sort_id;
+       int             _sort_id;
        mutable gint    block_notifications;
        mutable gint    ignore_state_changes;
        mutable Glib::RecMutex region_lock;
@@ -317,7 +317,7 @@ public:
        virtual void flush_notifications (bool from_undo = false);
        void clear_pending ();
 
-        void _set_sort_id ();
+       void _set_sort_id ();
 
        void notify_region_removed (boost::shared_ptr<Region>);
        void notify_region_added (boost::shared_ptr<Region>);
index b4ff2fa4131622a2604996805089478cb618ddb5..71802fddb64f9362255ed5d8f0f32eb93ed9d3af 100644 (file)
@@ -32,26 +32,26 @@ namespace ARDOUR {
 class Playlist;
 
 class PlaylistSource : virtual public Source {
-  public:
-    virtual ~PlaylistSource ();
-    
-    int set_state (const XMLNode&, int version);
-    boost::shared_ptr<const Playlist> playlist() const { return _playlist; }
-    const PBD::ID& original() const { return _original; }
-
-  protected:
-    boost::shared_ptr<Playlist> _playlist;
-    PBD::ID                     _original;
-    frameoffset_t               _playlist_offset;
-    framecnt_t                  _playlist_length;
-
-    PlaylistSource (Session&, const PBD::ID&, const std::string& name, boost::shared_ptr<Playlist>, DataType,
-                   frameoffset_t begin, framecnt_t len, Source::Flag flags);
-    PlaylistSource (Session&, const XMLNode&);
-    
-    void add_state (XMLNode&);
+public:
+       virtual ~PlaylistSource ();
+
+       int set_state (const XMLNode&, int version);
+       boost::shared_ptr<const Playlist> playlist() const { return _playlist; }
+       const PBD::ID& original() const { return _original; }
+
+protected:
+       boost::shared_ptr<Playlist> _playlist;
+       PBD::ID                     _original;
+       frameoffset_t               _playlist_offset;
+       framecnt_t                  _playlist_length;
+
+       PlaylistSource (Session&, const PBD::ID&, const std::string& name, boost::shared_ptr<Playlist>, DataType,
+                       frameoffset_t begin, framecnt_t len, Source::Flag flags);
+       PlaylistSource (Session&, const XMLNode&);
+
+       void add_state (XMLNode&);
 };
-        
+
 } /* namespace */
 
 #endif /* __ardour_playlist_source_h__ */
index bc796712af6bf12de8ad784d2bae827a258e49e7..2c819e96f2287f30f593b9328aaa2e54c69ed515 100644 (file)
@@ -116,7 +116,7 @@ class Plugin : public PBD::StatefulDestructible, public Latent
        virtual uint32_t nth_parameter (uint32_t which, bool& ok) const = 0;
        virtual void activate () = 0;
        virtual void deactivate () = 0;
-        virtual void flush () { deactivate(); activate(); }
+       virtual void flush () { deactivate(); activate(); }
 
        virtual int set_block_size (pframes_t nframes) = 0;
 
@@ -150,7 +150,7 @@ class Plugin : public PBD::StatefulDestructible, public Latent
                bool operator!= (PresetRecord const & a) const {
                        return uri != a.uri || label != a.label;
                }
-               
+
                std::string uri;
                std::string label;
                bool user;
@@ -160,7 +160,7 @@ class Plugin : public PBD::StatefulDestructible, public Latent
        void remove_preset (std::string);
 
        virtual bool load_preset (PresetRecord);
-       
+
        const PresetRecord * preset_by_label (const std::string &);
        const PresetRecord * preset_by_uri (const std::string &);
 
@@ -172,15 +172,15 @@ class Plugin : public PBD::StatefulDestructible, public Latent
        PresetRecord last_preset () const {
                return _last_preset;
        }
-       
+
        bool parameter_changed_since_last_preset () const {
                return _parameter_changed_since_last_preset;
        }
-       
+
        virtual int first_user_preset_index () const {
                return 0;
        }
-       
+
        /** Emitted when a preset is added or removed, respectively */
        PBD::Signal0<void> PresetAdded;
        PBD::Signal0<void> PresetRemoved;
@@ -225,7 +225,7 @@ class Plugin : public PBD::StatefulDestructible, public Latent
        cycles_t cycles() const { return _cycles; }
 
 protected:
-       
+
        friend class PluginInsert;
        friend struct PluginInsert::PluginControl;
 
index feab43bac74f69c6ed5436b130cd5507d34a1ea1..6e33ad9b61bd5dd714836c51c65f8c52029f79dc 100644 (file)
@@ -92,7 +92,7 @@ class PluginInsert : public Processor
 
        private:
                double user_to_plugin (double) const;
-               
+
                PluginInsert* _plugin;
                bool _logarithmic;
                bool _sr_dependent;
index 5eceac5ebcc0555baaabdf1bb934811ad00dcb4c..96c18442b7d77be42c4697b90ec5c4509e31ef8f 100644 (file)
@@ -47,10 +47,10 @@ public:
 
        virtual ~Port ();
 
-       static void set_connecting_blocked( bool yn ) { 
+       static void set_connecting_blocked( bool yn ) {
                _connecting_blocked = yn;
        }
-       static bool connecting_blocked() { 
+       static bool connecting_blocked() {
                return _connecting_blocked;
        }
 
@@ -95,19 +95,19 @@ public:
        int reestablish ();
        int reconnect ();
        void request_monitor_input (bool);
-        
-        bool last_monitor() const { return _last_monitor; }
-        void set_last_monitor (bool yn) { _last_monitor = yn; }
 
-        jack_port_t* jack_port() const { return _jack_port; }
-        
-        void get_connected_latency_range (jack_latency_range_t& range, bool playback) const;
+       bool last_monitor() const { return _last_monitor; }
+       void set_last_monitor (bool yn) { _last_monitor = yn; }
 
-        void set_private_latency_range (jack_latency_range_t& range, bool playback);
-        const jack_latency_range_t&  private_latency_range (bool playback) const;
+       jack_port_t* jack_port() const { return _jack_port; }
 
-        void set_public_latency_range (jack_latency_range_t& range, bool playback) const;
-        jack_latency_range_t public_latency_range (bool playback) const;
+       void get_connected_latency_range (jack_latency_range_t& range, bool playback) const;
+
+       void set_private_latency_range (jack_latency_range_t& range, bool playback);
+       const jack_latency_range_t&  private_latency_range (bool playback) const;
+
+       void set_public_latency_range (jack_latency_range_t& range, bool playback) const;
+       jack_latency_range_t public_latency_range (bool playback) const;
 
        virtual void reset ();
 
@@ -120,16 +120,16 @@ public:
        virtual void transport_stopped () {}
        virtual void realtime_locate () {}
 
-        bool physically_connected () const;
+       bool physically_connected () const;
 
        static void set_engine (AudioEngine *);
 
        PBD::Signal1<void,bool> MonitorInputChanged;
 
 
-        static void set_cycle_framecnt (pframes_t n) {
-                _cycle_nframes = n;
-        }
+       static void set_cycle_framecnt (pframes_t n) {
+               _cycle_nframes = n;
+       }
        static framecnt_t port_offset() { return _global_port_buffer_offset; }
        static void set_global_port_buffer_offset (pframes_t off) {
                _global_port_buffer_offset = off;
@@ -138,7 +138,7 @@ public:
                _global_port_buffer_offset += n;
        }
 
-        virtual void increment_port_buffer_offset (pframes_t n);
+       virtual void increment_port_buffer_offset (pframes_t n);
 
 protected:
 
@@ -148,13 +148,13 @@ protected:
 
        static bool       _connecting_blocked;
        static pframes_t  _global_port_buffer_offset;   /* access only from process() tree */
-        static pframes_t  _cycle_nframes; /* access only from process() tree */
+       static pframes_t  _cycle_nframes; /* access only from process() tree */
+
+       framecnt_t _port_buffer_offset; /* access only from process() tree */
 
-        framecnt_t _port_buffer_offset; /* access only from process() tree */
+       jack_latency_range_t _private_playback_latency;
+       jack_latency_range_t _private_capture_latency;
 
-        jack_latency_range_t _private_playback_latency;
-        jack_latency_range_t _private_capture_latency;
-        
        static AudioEngine* _engine; ///< the AudioEngine
 
 private:
@@ -163,8 +163,8 @@ private:
        bool        _last_monitor;
 
        /** ports that we are connected to, kept so that we can
-           reconnect to JACK when required 
-        */
+           reconnect to JACK when required
+       */
        std::set<std::string> _connections;
 
 };
index 959e46b4a58e52ec875b4c964c29d938234809d4..2ff9031afad77b1526dde39021a055d6e89ae371 100644 (file)
@@ -65,12 +65,12 @@ class PortInsert : public IOProcessor
 
        uint32_t bit_slot() const { return bitslot; }
 
-        void start_latency_detection ();
-        void stop_latency_detection ();
+       void start_latency_detection ();
+       void stop_latency_detection ();
 
-        MTDM* mtdm () const { return _mtdm; }
-        void set_measured_latency (framecnt_t);
-        framecnt_t latency () const;
+       MTDM* mtdm () const { return _mtdm; }
+       void set_measured_latency (framecnt_t);
+       framecnt_t latency () const;
 
   private:
        /* disallow copy construction */
@@ -79,10 +79,10 @@ class PortInsert : public IOProcessor
        boost::shared_ptr<Delivery> _out;
 
        uint32_t    bitslot;
-        MTDM*      _mtdm;
-        bool       _latency_detect;
-        framecnt_t _latency_flush_frames;
-        framecnt_t _measured_latency;
+       MTDM*      _mtdm;
+       bool       _latency_detect;
+       framecnt_t _latency_flush_frames;
+       framecnt_t _measured_latency;
 };
 
 } // namespace ARDOUR
index d6bbbfc6fc76a6b8bb46f824d8e3718c1b6aecde..beccd98d0a0b29164341651ecd611b2ebb55de28 100644 (file)
@@ -12,31 +12,31 @@ class ThreadBuffers;
 
 class ProcessThread
 {
-  public:
-    ProcessThread ();
-    ~ProcessThread ();
+public:
+       ProcessThread ();
+       ~ProcessThread ();
 
-    static void init();
+       static void init();
 
-    void get_buffers ();
-    void drop_buffers ();
+       void get_buffers ();
+       void drop_buffers ();
 
-    /* these MUST be called by a process thread's thread, nothing else
-     */
+       /* these MUST be called by a process thread's thread, nothing else
+        */
 
-    static BufferSet& get_silent_buffers (ChanCount count = ChanCount::ZERO);
-    static BufferSet& get_scratch_buffers (ChanCount count = ChanCount::ZERO);
-    static BufferSet& get_mix_buffers (ChanCount count = ChanCount::ZERO);
-    static gain_t* gain_automation_buffer ();
-    static pan_t** pan_automation_buffer ();
+       static BufferSet& get_silent_buffers (ChanCount count = ChanCount::ZERO);
+       static BufferSet& get_scratch_buffers (ChanCount count = ChanCount::ZERO);
+       static BufferSet& get_mix_buffers (ChanCount count = ChanCount::ZERO);
+       static gain_t* gain_automation_buffer ();
+       static pan_t** pan_automation_buffer ();
 
-  protected:
-    void session_going_away ();
+protected:
+       void session_going_away ();
 
-  private:
-    Glib::Thread* _thread;
+private:
+       Glib::Thread* _thread;
 
-    static Glib::Private<ThreadBuffers>* _private_thread_buffers;
+       static Glib::Private<ThreadBuffers>* _private_thread_buffers;
 };
 
 } // namespace
index d6d023d8d1b67d2ba03e56da694193a4b54c7db6..08fd3ecd8dae3cfb5bea32ea9286c5af2a8b5c53 100644 (file)
@@ -47,7 +47,7 @@ class Processor : public SessionObject, public Automatable, public Latent
        static const std::string state_node_name;
 
        Processor(Session&, const std::string& name);
-        Processor (const Processor& other);
+       Processor (const Processor& other);
 
        virtual ~Processor() { }
 
@@ -64,17 +64,17 @@ class Processor : public SessionObject, public Automatable, public Latent
        virtual framecnt_t signal_latency() const { return 0; }
 
        virtual int set_block_size (pframes_t /*nframes*/) { return 0; }
-        virtual bool requires_fixed_sized_buffers() const { return false; }
+       virtual bool requires_fixed_sized_buffers() const { return false; }
 
        /** @param result_required true if, on return from this method, @a bufs is required to contain valid data;
         *  if false, the method need not bother writing to @a bufs if it doesn't want to.
-        */  
+        */
        virtual void run (BufferSet& /*bufs*/, framepos_t /*start_frame*/, framepos_t /*end_frame*/, pframes_t /*nframes*/, bool /*result_required*/) {}
        virtual void silence (framecnt_t /*nframes*/) {}
 
        virtual void activate ()   { _pending_active = true; ActiveChanged(); }
        virtual void deactivate () { _pending_active = false; ActiveChanged(); }
-        virtual void flush() {}
+       virtual void flush() {}
 
        virtual bool configure_io (ChanCount in, ChanCount out);
 
@@ -95,18 +95,18 @@ class Processor : public SessionObject, public Automatable, public Latent
        virtual XMLNode& state (bool full);
        XMLNode& get_state (void);
        int set_state (const XMLNode&, int version);
-       
+
        void set_pre_fader (bool);
 
        PBD::Signal0<void>                     ActiveChanged;
        PBD::Signal2<void,ChanCount,ChanCount> ConfigurationChanged;
-        
-        void  set_ui (void*);
-        void* get_ui () const { return _ui_pointer; }
+
+       void  set_ui (void*);
+       void* get_ui () const { return _ui_pointer; }
 
 protected:
        virtual int set_state_2X (const XMLNode&, int version);
-       
+
        int       _pending_active;
        bool      _active;
        bool      _next_ab_is_active;
@@ -115,7 +115,7 @@ protected:
        ChanCount _configured_output;
        bool      _display_to_user;
        bool      _pre_fader; ///< true if this processor is currently placed before the Amp, otherwise false
-        void*     _ui_pointer;
+       void*     _ui_pointer;
 };
 
 } // namespace ARDOUR
index 6cd66bdcbe4606ff5c257d147bb8305178b4e38c..10b7d759600e1624aa9eb37e9bc01fd4bfbac8bf 100644 (file)
@@ -24,7 +24,7 @@
 
 namespace ARDOUR {
 
-/** A class to handle reporting of progress of something */    
+/** A class to handle reporting of progress of something */
 class Progress
 {
 public:
@@ -36,7 +36,7 @@ public:
        void descend (float);
 
        bool cancelled () const;
-       
+
 protected:
        void cancel ();
 
@@ -48,7 +48,7 @@ private:
 
        struct Level {
                Level (float a) : allocation (a), normalised (0) {}
-               
+
                float allocation;
                float normalised;
        };
index 0914f9909879cd09f1d5b6ce9413439469240c3e..cbbdcbd6caaeccf511f56d8a31b6229fedfa653f 100644 (file)
@@ -39,15 +39,15 @@ public:
                , _setter (setter)
                , _getter (getter)
        {}
-       
+
        void set_value (double v) { _setter (v); }
        double get_value () const { return _getter (); }
-       
+
 private:
        boost::function1<void,double> _setter;
        boost::function0<double> _getter;
 };
-       
+
 } // namespace
 
 #endif /* __libardour_proxy_controllable_h__ */
index 4fc9a4a55e204431fd534cfd5d76dfaaa97e9271..8dc720963a39dffc23f6831e348bfd71097917b8 100755 (executable)
@@ -26,7 +26,7 @@ class Playlist;
 class Source;
 class Location;
 
-/** Public interface to a Diskstream */        
+/** Public interface to a Diskstream */
 class PublicDiskstream
 {
 public:
@@ -61,7 +61,7 @@ public:
        virtual void transport_stopped_wallclock (struct tm &, time_t, bool) = 0;
        virtual bool pending_overwrite () const = 0;
        virtual double speed () const = 0;
-        virtual void prepare_to_stop (framepos_t) = 0;
+       virtual void prepare_to_stop (framepos_t) = 0;
        virtual void set_slaved (bool) = 0;
        virtual ChanCount n_channels () = 0;
        virtual framepos_t get_capture_start_frame (uint32_t n = 0) const = 0;
@@ -74,9 +74,8 @@ public:
        virtual void set_align_choice (AlignChoice, bool force=false) = 0;
        virtual int use_copy_playlist () = 0;
        virtual int use_new_playlist () = 0;
-        virtual void adjust_playback_buffering () = 0;
-        virtual void adjust_capture_buffering () = 0;
-       
+       virtual void adjust_playback_buffering () = 0;
+       virtual void adjust_capture_buffering () = 0;
 };
 
 }
index d54fd1b4e8aa6ca78943788bf31b05beee880a74..ff1c5f035c7582033e153fff6969760ce7f0194f 100644 (file)
@@ -59,11 +59,11 @@ class RCConfiguration : public Configuration
 #undef  CONFIG_VARIABLE
 #undef  CONFIG_VARIABLE_SPECIAL
 #define CONFIG_VARIABLE(Type,var,name,value) \
-        Type get_##var () const { return var.get(); } \
-        bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret;  }
+       Type get_##var () const { return var.get(); } \
+       bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret;  }
 #define CONFIG_VARIABLE_SPECIAL(Type,var,name,value,mutator) \
-        Type get_##var () const { return var.get(); } \
-        bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret; }
+       Type get_##var () const { return var.get(); } \
+       bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret; }
 #include "ardour/rc_configuration_vars.h"
 #undef  CONFIG_VARIABLE
 #undef  CONFIG_VARIABLE_SPECIAL
index c23d7f8bad7b70158e4e2d2e16815f7a9472c268..4b3e4623af049750ae8aa5223c5316de875769e9 100644 (file)
@@ -70,7 +70,7 @@ namespace Properties {
 class Playlist;
 class Filter;
 class ExportSpecification;
-class Progress;        
+class Progress;
 
 enum RegionEditState {
        EditChangesNothing = 0,
@@ -90,20 +90,20 @@ class Region
        typedef std::vector<boost::shared_ptr<Source> > SourceList;
 
        static void make_property_quarks ();
-       
+
        static PBD::Signal2<void,boost::shared_ptr<ARDOUR::Region>, const PBD::PropertyChange&> RegionPropertyChanged;
 
        virtual ~Region();
-       
+
        /** Note: changing the name of a Region does not constitute an edit */
        bool set_name (const std::string& str);
 
        const DataType& data_type () const { return _type; }
-       
+
        AnalysisFeatureList transients () { return _transients; };
 
        /** How the region parameters play together:
-        *   
+        *
         * POSITION: first frame of the region along the timeline
         * START:    first frame of the region within its source(s)
         * LENGTH:   number of frames the region represents
@@ -123,7 +123,7 @@ class Region
 
        framepos_t ancestral_start ()  const { return _ancestral_start; }
        framecnt_t ancestral_length () const { return _ancestral_length; }
-       
+
        float stretch () const { return _stretch; }
        float shift ()   const { return _shift; }
 
@@ -132,7 +132,7 @@ class Region
        frameoffset_t sync_offset (int& dir) const;
        framepos_t sync_position () const;
        framepos_t sync_point () const;
-       
+
        framepos_t adjust_to_sync (framepos_t) const;
 
        /* first_frame() is an alias; last_frame() just hides some math */
@@ -153,11 +153,11 @@ class Region
        bool sync_marked ()      const { return _sync_marked; }
        bool external ()         const { return _external; }
        bool import ()           const { return _import; }
-        
-        Trimmable::CanTrim can_trim () const;
+
+       Trimmable::CanTrim can_trim () const;
 
        PositionLockStyle position_lock_style () const { return _position_lock_style; }
-       
+
        void set_position_lock_style (PositionLockStyle ps);
        void recompute_position_from_lock_style ();
 
@@ -178,7 +178,7 @@ class Region
        bool source_equivalent (boost::shared_ptr<const Region>) const;
        bool uses_source (boost::shared_ptr<const Source>) const;
        bool uses_source_path (const std::string&) const;
-       
+
        std::string source_string () const;
 
 
@@ -320,7 +320,7 @@ class Region
 
        /** Construct a region from another region, at an offset within that region */
        Region (boost::shared_ptr<const Region>, frameoffset_t start_offset);
-       
+
        /** Construct a region as a copy of another region, but with different sources */
        Region (boost::shared_ptr<const Region>, const SourceList&);
 
@@ -351,7 +351,7 @@ class Region
 
        virtual void recompute_at_start () = 0;
        virtual void recompute_at_end () = 0;
-       
+
        DataType _type;
 
        PBD::Property<bool>        _muted;
@@ -384,7 +384,7 @@ class Region
        mutable RegionEditState _first_edit;
        Timecode::BBT_Time      _bbt_time;
        AnalysisFeatureList     _transients;
-       
+
        mutable uint64_t        _read_data_count;  ///< modified in read()
        uint64_t                _last_layer_op;  ///< timestamp
        SourceList              _sources;
index 90716f8718acf0b0d00e5cd0d49283a7535fc691..dfbcd480dd675ff5e2a9576d06b4648c524461b1 100644 (file)
@@ -59,22 +59,22 @@ public:
        static boost::shared_ptr<Region> create (boost::shared_ptr<const Region> other, bool announce = false);
 
        /** create a region from a single Source */
-       static boost::shared_ptr<Region> create (boost::shared_ptr<Source>, 
+       static boost::shared_ptr<Region> create (boost::shared_ptr<Source>,
                                                 const PBD::PropertyList&, bool announce = true);
-       
+
        /** create a region from a multiple sources */
-       static boost::shared_ptr<Region> create (const SourceList &, 
+       static boost::shared_ptr<Region> create (const SourceList &,
                                                 const PBD::PropertyList&, bool announce = true);
        /** create a copy of @other starting at zero within @param other's sources */
-       static boost::shared_ptr<Region> create (boost::shared_ptr<Region> other, 
+       static boost::shared_ptr<Region> create (boost::shared_ptr<Region> other,
                                                 const PBD::PropertyList&, bool announce = true);
        /** create a copy of @param other starting at @param offset within @param other */
-       static boost::shared_ptr<Region> create (boost::shared_ptr<Region> other, frameoffset_t offset, 
+       static boost::shared_ptr<Region> create (boost::shared_ptr<Region> other, frameoffset_t offset,
                                                 const PBD::PropertyList&, bool announce = true);
        /** create a "copy" of @param other but using a different set of sources @param srcs */
-       static boost::shared_ptr<Region> create (boost::shared_ptr<Region> other, const SourceList& srcs, 
+       static boost::shared_ptr<Region> create (boost::shared_ptr<Region> other, const SourceList& srcs,
                                                 const PBD::PropertyList&, bool announce = true);
-       
+
        /** create a region with no sources, using XML state */
        static boost::shared_ptr<Region> create (Session&, XMLNode&, bool);
        /** create a region with specified sources @param srcs and XML state */
@@ -92,10 +92,10 @@ public:
        static int region_name (std::string &, std::string, bool new_level = false);
        static std::string new_region_name (std::string);
        static std::string compound_region_name (const std::string& playlist, uint32_t compound_ops, uint32_t depth, bool whole_source);
-  
+
        /* when we make a compound region, for every region involved there
         * are two "instances" - the original, which is removed from this
-        * playlist, and a copy, which is added to the playlist used as 
+        * playlist, and a copy, which is added to the playlist used as
         * the source for the compound.
         *
         * when we uncombine, we want to put the originals back into this
@@ -110,13 +110,13 @@ public:
        static CompoundAssociations& compound_associations() { return _compound_associations; }
 
        static void add_compound_association (boost::shared_ptr<Region>, boost::shared_ptr<Region>);
-       
+
   private:
 
        static void region_changed (PBD::PropertyChange const &, boost::weak_ptr<Region>);
-       
+
        static Glib::StaticMutex region_map_lock;
-       
+
        static RegionMap region_map;
        static void map_add (boost::shared_ptr<Region>);
 
index ca09f194b1abe0b261da669dc86b535a4a08dce4..ee34dcaafecefd62d6d8e2fdb4bba3a19adfb452 100644 (file)
 namespace ARDOUR {
 
 struct RegionSortByPosition {
-    bool operator() (boost::shared_ptr<Region> a, boost::shared_ptr<Region> b) {
-           return a->position() < b->position();
-    }
+       bool operator() (boost::shared_ptr<Region> a, boost::shared_ptr<Region> b) {
+               return a->position() < b->position();
+       }
 };
 
 struct RegionSortByLastLayerOp {
-    bool operator() (boost::shared_ptr<Region> a, boost::shared_ptr<Region> b) {
-           return a->last_layer_op() < b->last_layer_op();
-    }
+       bool operator() (boost::shared_ptr<Region> a, boost::shared_ptr<Region> b) {
+               return a->last_layer_op() < b->last_layer_op();
+       }
 };
 
 struct RegionSortByLayer {
-    bool operator() (boost::shared_ptr<Region> a, boost::shared_ptr<Region> b) {
-           return a->layer() < b->layer();
-    }
+       bool operator() (boost::shared_ptr<Region> a, boost::shared_ptr<Region> b) {
+               return a->layer() < b->layer();
+       }
 };
 
 struct RegionSortByLayerWithPending {
@@ -59,6 +59,6 @@ struct RegionSortByLayerWithPending {
        }
 };
 
-} // namespace 
+} // namespace
 
 #endif /* __libardour_region_sorters_h__ */
index b315430b46ae06d58c60eb1e55d2006bb8f059cf..74f1a76e5b0cd644c1abe74891910ed89cdb50c7 100644 (file)
@@ -51,7 +51,7 @@ class ResampledImportableSource : public ImportableSource
 
    private:
        boost::shared_ptr<ImportableSource> source;
-        float* input;
+       float* input;
        int _src_type;
        SRC_STATE*      src_state;
        SRC_DATA        src_data;
index 5dc9c9358b83ceeaf1554f8605d87f412732d6c7..3b12e4f6004d72c1e21f36cd8d872e16d91c9251 100644 (file)
@@ -109,13 +109,13 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
        /* 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,
-                          int declick, bool can_record, bool rec_monitors_input, bool& need_butler);
+                         int declick, bool can_record, bool rec_monitors_input, bool& need_butler);
 
        virtual int no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
-                       bool state_changing, bool can_record, bool rec_monitors_input);
+                            bool state_changing, bool can_record, bool rec_monitors_input);
 
        virtual int silent_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
-                                 bool can_record, bool rec_monitors_input, bool& need_butler);
+                                bool can_record, bool rec_monitors_input, bool& need_butler);
 
        virtual void toggle_monitor_input ();
        virtual bool can_record() { return false; }
@@ -146,11 +146,11 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
        void set_solo (bool yn, void *src);
        bool soloed () const { return self_soloed () || soloed_by_others (); }
 
-        bool soloed_by_others () const { return _soloed_by_others_upstream||_soloed_by_others_downstream; }
+       bool soloed_by_others () const { return _soloed_by_others_upstream||_soloed_by_others_downstream; }
        bool soloed_by_others_upstream () const { return _soloed_by_others_upstream; }
        bool soloed_by_others_downstream () const { return _soloed_by_others_downstream; }
        bool self_soloed () const { return _self_solo; }
-       
+
        void set_solo_isolated (bool yn, void *src);
        bool solo_isolated() const;
 
@@ -208,11 +208,11 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
 
        bool processor_is_prefader (boost::shared_ptr<Processor> p);
 
-        bool has_io_processor_named (const std::string&);
+       bool has_io_processor_named (const std::string&);
        ChanCount max_processor_streams () const { return processor_max_streams; }
 
        std::list<std::string> unknown_processors () const;
-       
+
        /* special processors */
 
        boost::shared_ptr<Delivery>         monitor_send() const { return _monitor_send; }
@@ -251,15 +251,15 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
        void all_processors_flip();
        void all_processors_active (Placement, bool state);
 
-        framecnt_t set_private_port_latencies (bool playback) const;
-        void       set_public_port_latencies (framecnt_t, bool playback) const;
+       framecnt_t set_private_port_latencies (bool playback) const;
+       void       set_public_port_latencies (framecnt_t, bool playback) const;
 
        framecnt_t   update_signal_latency();
        virtual void set_latency_compensation (framecnt_t);
 
        void set_user_latency (framecnt_t);
        framecnt_t initial_delay() const { return _initial_delay; }
-        framecnt_t signal_latency() const { return _signal_latency; }
+       framecnt_t signal_latency() const { return _signal_latency; }
 
        PBD::Signal0<void>       active_changed;
        PBD::Signal0<void>       phase_invert_changed;
@@ -276,7 +276,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
        PBD::Signal1<void,RouteProcessorChange> processors_changed;
        PBD::Signal1<void,void*> record_enable_changed;
        /** the metering point has changed */
-       PBD::Signal0<void>       meter_change; 
+       PBD::Signal0<void>       meter_change;
        PBD::Signal0<void>       signal_latency_changed;
        PBD::Signal0<void>       initial_delay_changed;
        PBD::Signal0<void>       order_key_changed;
@@ -305,39 +305,39 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
        int listen_via (boost::shared_ptr<Route>, Placement p);
        void drop_listen (boost::shared_ptr<Route>);
 
-       /** 
-        * return true if this route feeds the first argument via at least one
-        * (arbitrarily long) signal pathway.
-        */
-        bool feeds (boost::shared_ptr<Route>, bool* via_send_only = 0);
+       /**
+        * return true if this route feeds the first argument via at least one
+        * (arbitrarily long) signal pathway.
+        */
+       bool feeds (boost::shared_ptr<Route>, bool* via_send_only = 0);
 
-       /** 
-        * return true if this route feeds the first argument directly, via
-        * either its main outs or a send.
-        */
+       /**
+        * return true if this route feeds the first argument directly, via
+        * either its main outs or a send.
+        */
        bool direct_feeds (boost::shared_ptr<Route>, bool* via_send_only = 0);
 
-        struct FeedRecord {
-            boost::weak_ptr<Route> r;
-            bool sends_only;
+       struct FeedRecord {
+               boost::weak_ptr<Route> r;
+               bool sends_only;
 
-            FeedRecord (boost::shared_ptr<Route> rp, bool sendsonly)
-                    : r (rp)
-                    , sends_only (sendsonly) {}
-        };
+               FeedRecord (boost::shared_ptr<Route> rp, bool sendsonly)
+               : r (rp)
+               , sends_only (sendsonly) {}
+       };
 
-        struct FeedRecordCompare {
-            bool operator() (const FeedRecord& a, const FeedRecord& b) const {
-                    return a.r < b.r;
-            }
-        };
+       struct FeedRecordCompare {
+               bool operator() (const FeedRecord& a, const FeedRecord& b) const {
+                       return a.r < b.r;
+               }
+       };
 
-        typedef std::set<FeedRecord,FeedRecordCompare> FedBy;
+       typedef std::set<FeedRecord,FeedRecordCompare> FedBy;
 
-        const FedBy& fed_by() const { return _fed_by; }
-        void clear_fed_by ();
-        bool add_fed_by (boost::shared_ptr<Route>, bool sends_only);
-        bool not_fed() const { return _fed_by.empty(); }
+       const FedBy& fed_by() const { return _fed_by; }
+       void clear_fed_by ();
+       bool add_fed_by (boost::shared_ptr<Route>, bool sends_only);
+       bool not_fed() const { return _fed_by.empty(); }
 
        /* Controls (not all directly owned by the Route */
 
@@ -359,7 +359,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
                void set_value (double);
                double get_value () const;
 
-       private:                
+       private:
                boost::weak_ptr<Route> _route;
        };
 
@@ -383,7 +383,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
        boost::shared_ptr<Panner> panner() const;  /* may return null */
        boost::shared_ptr<PannerShell> panner_shell() const;
        boost::shared_ptr<AutomationControl> gain_control() const;
-        boost::shared_ptr<Pannable> pannable() const;
+       boost::shared_ptr<Pannable> pannable() const;
 
        void automation_snapshot (framepos_t now, bool force=false);
        void protect_automation ();
@@ -423,15 +423,15 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
                        framecnt_t /* nframes */) {}
 
        virtual void process_output_buffers (BufferSet& bufs,
-                                             framepos_t start_frame, framepos_t end_frame,
-                                             pframes_t nframes, bool with_processors, int declick, 
-                                             bool gain_automation_ok);
+                                            framepos_t start_frame, framepos_t end_frame,
+                                            pframes_t nframes, bool with_processors, int declick,
+                                            bool gain_automation_ok);
 
        boost::shared_ptr<IO> _input;
        boost::shared_ptr<IO> _output;
 
        bool           _active;
-        framecnt_t     _signal_latency;
+       framecnt_t     _signal_latency;
        framecnt_t     _initial_delay;
        framecnt_t     _roll_delay;
 
@@ -441,7 +441,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
        boost::shared_ptr<Delivery> _monitor_send;
        boost::shared_ptr<InternalReturn> _intreturn;
        boost::shared_ptr<MonitorProcessor> _monitor_control;
-        boost::shared_ptr<Pannable> _pannable;
+       boost::shared_ptr<Pannable> _pannable;
 
        Flag           _flags;
        int            _pending_declick;
@@ -461,14 +461,14 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
        boost::shared_ptr<SoloControllable> _solo_control;
        boost::shared_ptr<MuteControllable> _mute_control;
        boost::shared_ptr<MuteMaster> _mute_master;
-    
+
        std::string    _comment;
        bool           _have_internal_generator;
        bool           _solo_safe;
        DataType       _default_type;
-        FedBy          _fed_by;
+       FedBy          _fed_by;
 
-        virtual ChanCount input_streams () const;
+       virtual ChanCount input_streams () const;
 
   protected:
        virtual XMLNode& state(bool);
@@ -487,8 +487,8 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
        uint32_t pans_required() const;
        ChanCount n_process_buffers ();
 
-        virtual bool should_monitor () const;
-        virtual void maybe_declick (BufferSet&, framecnt_t, int);
+       virtual bool should_monitor () const;
+       virtual void maybe_declick (BufferSet&, framecnt_t, int);
 
        virtual int  _set_state (const XMLNode&, int, bool call_base);
 
@@ -523,7 +523,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
        void set_mute_master_solo ();
 
        void set_processor_positions ();
-        framecnt_t update_port_latencies (PortSet& ports, PortSet& feeders, bool playback, framecnt_t) const;
+       framecnt_t update_port_latencies (PortSet& ports, PortSet& feeders, bool playback, framecnt_t) const;
 
        void setup_invisible_processors ();
 
index 44e191ab3ff40714566f5b851dc61abe9dbd42ce..5ab78cdf768927863acd9cc89728c8d7aceac373 100644 (file)
@@ -53,11 +53,11 @@ class Track;
 class AudioTrack;
 class Session;
 
-class RouteGroup : public SessionObject 
+class RouteGroup : public SessionObject
 {
   public:
        static void make_property_quarks();
-       
+
        RouteGroup (Session& s, const std::string &n);
        ~RouteGroup ();
 
@@ -124,9 +124,9 @@ class RouteGroup : public SessionObject
        PBD::Signal0<void> MembershipChanged;
 
        XMLNode& get_state ();
-       
+
        int set_state (const XMLNode&, int version);
-       
+
 private:
        boost::shared_ptr<RouteList> routes;
        boost::shared_ptr<Route> subgroup_bus;
index e8ff3762922c96c355981340bdc75272db055af1..ff99d27c13900a36146b2c03997843a653e136b0 100644 (file)
@@ -25,7 +25,7 @@ namespace ARDOUR  {
 
 class RouteGroup;
 
-class RouteGroupMember 
+class RouteGroupMember
 {
   public:
        RouteGroupMember () : _route_group (0) {}
index 3bda654a8ebd959147a892b410e8bc92494fdb92..e1e693510ad64b5896b7417f2f9880bcdf72c0f4 100644 (file)
@@ -206,7 +206,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        void refresh_disk_space ();
 
        int load_diskstreams_2X (XMLNode const &, int);
-       
+
        int load_routes (const XMLNode&, int);
        boost::shared_ptr<RouteList> get_routes() const {
                return routes.reader ();
@@ -279,7 +279,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
         *  - engine halted
        */
        PBD::Signal0<void> TransportStateChange;
-       
+
        PBD::Signal1<void,framepos_t> PositionChanged; /* sent after any non-sequential motion */
        PBD::Signal1<void,framepos_t> Xrun;
        PBD::Signal0<void> TransportLooped;
@@ -360,7 +360,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        framecnt_t worst_track_latency ()  const { return _worst_track_latency; }
        framecnt_t worst_playback_latency () const { return _worst_output_latency + _worst_track_latency; }
 
-#ifdef HAVE_JACK_SESSION 
+#ifdef HAVE_JACK_SESSION
        void jack_session_event (jack_session_event_t* event);
 #endif
        int save_state (std::string snapshot_name, bool pending = false, bool switch_to_snapshot = false);
@@ -481,7 +481,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        void timecode_duration_string (char *, framecnt_t) const;
 
        framecnt_t convert_to_frames (AnyTime const & position);
-        framecnt_t any_duration_to_frames (framepos_t position, AnyTime const & duration);
+       framecnt_t any_duration_to_frames (framepos_t position, AnyTime const & duration);
 
        static PBD::Signal1<void, framepos_t> StartTimeChanged;
        static PBD::Signal1<void, framepos_t> EndTimeChanged;
@@ -554,7 +554,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
 
        boost::shared_ptr<AudioFileSource> create_audio_source_for_session (
                size_t, std::string const &, uint32_t, bool destructive);
-       
+
        boost::shared_ptr<MidiSource> create_midi_source_for_session (
                Track*, std::string const &);
 
@@ -612,7 +612,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        PBD::Signal1<void,bool> SoloActive;
        PBD::Signal0<void> SoloChanged;
        PBD::Signal0<void> IsolatedChanged;
-       
+
        /* control/master out */
 
        boost::shared_ptr<Route> monitor_out() const { return _monitor_out; }
@@ -733,7 +733,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
 
        /* Speakers */
 
-        boost::shared_ptr<Speakers> get_speakers ();
+       boost::shared_ptr<Speakers> get_speakers ();
 
        /* Controllables */
 
@@ -743,7 +743,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        void add_controllable (boost::shared_ptr<PBD::Controllable>);
        void remove_controllable (PBD::Controllable*);
 
-        boost::shared_ptr<PBD::Controllable> solo_cut_control() const;
+       boost::shared_ptr<PBD::Controllable> solo_cut_control() const;
 
        SessionMetadata & metadata () { return *_metadata; }
 
@@ -784,7 +784,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
                Waiting,
                Running
        };
-       
+
        SlaveState slave_state() const { return _slave_state; }
 
        boost::shared_ptr<SessionPlaylists> playlists;
@@ -862,7 +862,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        bool                    _silent;
 
        void maybe_update_session_range (framepos_t, framepos_t);
-       
+
        // varispeed playback
        double                  _transport_speed;
        double                  _last_transport_speed;
@@ -892,8 +892,8 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        void set_worst_io_latencies_x (IOChange, void *) {
                set_worst_io_latencies ();
        }
-        void post_capture_latency ();
-        void post_playback_latency ();
+       void post_capture_latency ();
+       void post_playback_latency ();
 
        void update_latency_compensation_proxy (void* ignored);
 
@@ -1232,9 +1232,9 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        bool find_route_name (std::string const &, uint32_t& id, char* name, size_t name_len, bool);
        void count_existing_track_channels (ChanCount& in, ChanCount& out);
        void auto_connect_route (boost::shared_ptr<Route> route, ChanCount& existing_inputs, ChanCount& existing_outputs,
-                                 bool with_lock, bool connect_inputs = true, 
-                                 ChanCount input_start = ChanCount (), ChanCount output_start = ChanCount ());
-        void midi_output_change_handler (IOChange change, void* /*src*/, boost::weak_ptr<Route> midi_track);
+                                bool with_lock, bool connect_inputs = true,
+                                ChanCount input_start = ChanCount (), ChanCount output_start = ChanCount ());
+       void midi_output_change_handler (IOChange change, void* /*src*/, boost::weak_ptr<Route> midi_track);
 
        /* mixer stuff */
 
@@ -1262,10 +1262,10 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
 
        mutable Glib::Mutex source_lock;
 
-  public:      
+  public:
        typedef std::map<PBD::ID,boost::shared_ptr<Source> > SourceMap;
 
-  private:     
+  private:
        SourceMap sources;
 
   public:
@@ -1376,7 +1376,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        void reset_jack_connection (jack_client_t* jack);
        void process_rtop (SessionEvent*);
 
-        void  update_latency (bool playback);
+       void  update_latency (bool playback);
 
        XMLNode& state(bool);
 
@@ -1440,7 +1440,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        Glib::Mutex controllables_lock;
        Controllables controllables;
 
-        boost::shared_ptr<PBD::Controllable> _solo_cut_control;
+       boost::shared_ptr<PBD::Controllable> _solo_cut_control;
 
        void reset_native_file_format();
        bool first_file_data_format_reset;
@@ -1467,7 +1467,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        /* realtime "apply to set of routes" operations */
        SessionEvent* get_rt_event (
                boost::shared_ptr<RouteList> rl, bool yn,
-               SessionEvent::RTeventCallback after, bool group_override, 
+               SessionEvent::RTeventCallback after, bool group_override,
                void (Session::*method) (boost::shared_ptr<RouteList>, bool, bool));
 
        void rt_set_solo (boost::shared_ptr<RouteList>, bool yn, bool group_override);
@@ -1497,10 +1497,10 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        void start_time_changed (framepos_t);
        void end_time_changed (framepos_t);
 
-        void set_track_monitor_input_status (bool);
+       void set_track_monitor_input_status (bool);
        framepos_t compute_stop_limit () const;
 
-        boost::shared_ptr<Speakers> _speakers; 
+       boost::shared_ptr<Speakers> _speakers;
        void load_nested_sources (const XMLNode& node);
 };
 
index d19c28f0cb4f235bf4d5a416388fded9d9c5da0f..46d6defa7d1fa5d2ba2fab30d113c0a6725217be 100644 (file)
@@ -40,11 +40,11 @@ public:
 #undef  CONFIG_VARIABLE
 #undef  CONFIG_VARIABLE_SPECIAL
 #define CONFIG_VARIABLE(Type,var,name,value) \
-        Type get_##var () const { return var.get(); } \
-        bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret;  }
+       Type get_##var () const { return var.get(); } \
+       bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret;  }
 #define CONFIG_VARIABLE_SPECIAL(Type,var,name,value,mutator) \
-        Type get_##var () const { return var.get(); } \
-        bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret; }
+       Type get_##var () const { return var.get(); } \
+       bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret; }
 #include "ardour/session_configuration_vars.h"
 #undef  CONFIG_VARIABLE
 #undef  CONFIG_VARIABLE_SPECIAL
index 738de46a86af100794e1353072c87db02ed39925..27f778b8acef0c8dd855f7295fb0840e9b8f5efa 100644 (file)
@@ -17,117 +17,117 @@ class Slave;
 class Region;
 
 struct SessionEvent {
-    enum Type {
-           SetTransportSpeed,
-           SetTrackSpeed,
-           Locate,
-           LocateRoll,
-           LocateRollLocate,
-           SetLoop,
-           PunchIn,
-           PunchOut,
-           RangeStop,
-           RangeLocate,
-           Overwrite,
-           SetSyncSource,
-           Audition,
-           InputConfigurationChange,
-           SetPlayAudioRange,
-           RealTimeOperation,
-            AdjustPlaybackBuffering,
-            AdjustCaptureBuffering,
-           SetTimecodeTransmission,
-
-           /* only one of each of these events can be queued at any one time */
-           
-           StopOnce,
-           AutoLoop
-    };
-    
-    enum Action {
-           Add,
-           Remove,
-           Replace,
-           Clear
-    };
-    
-    Type             type;
-    Action           action;
-    framepos_t      action_frame;
-    framepos_t      target_frame;
-    double           speed;
-    
-    union {
-       void*        ptr;
-       bool         yes_or_no;
-       framepos_t  target2_frame;
-       Slave*       slave;
-       Route*       route;
-    };
-    
-    union {
-       bool second_yes_or_no;
-    };
-
-    /* 4 members to handle a multi-group event handled in RT context */
-
-    typedef boost::function<void (SessionEvent*)> RTeventCallback;
-
-    boost::shared_ptr<RouteList> routes;    /* apply to */
-    boost::function<void (void)> rt_slot;   /* what to call in RT context */
-    RTeventCallback              rt_return; /* called after rt_slot, with this event as an argument */
-    PBD::EventLoop*              event_loop;
-
-    std::list<AudioRange> audio_range;
-    std::list<MusicRange> music_range;
-    
-    boost::shared_ptr<Region> region;
-
-    SessionEvent (Type t, Action a, framepos_t when, framepos_t where, double spd, bool yn = false, bool yn2 = false)
-           : type (t)
-           , action (a)
-           , action_frame (when)
-           , target_frame (where)
-           , speed (spd)
-           , yes_or_no (yn)
-           , second_yes_or_no (yn2)
-           , event_loop (0) {}
-
-    void set_ptr (void* p) {
-           ptr = p;
-    }
-    
-    bool before (const SessionEvent& other) const {
-           return action_frame < other.action_frame;
-    }
-    
-    bool after (const SessionEvent& other) const {
-           return action_frame > other.action_frame;
-    }
-    
-    static bool compare (const SessionEvent *e1, const SessionEvent *e2) {
-           return e1->before (*e2);
-    }
-    
-    void* operator new (size_t);
-    void  operator delete (void *ptr, size_t /*size*/);
-    
-    static const framepos_t Immediate = 0;
-    
-    static void create_per_thread_pool (const std::string& n, uint32_t nitems);
-    static void init_event_pool ();
+       enum Type {
+               SetTransportSpeed,
+               SetTrackSpeed,
+               Locate,
+               LocateRoll,
+               LocateRollLocate,
+               SetLoop,
+               PunchIn,
+               PunchOut,
+               RangeStop,
+               RangeLocate,
+               Overwrite,
+               SetSyncSource,
+               Audition,
+               InputConfigurationChange,
+               SetPlayAudioRange,
+               RealTimeOperation,
+               AdjustPlaybackBuffering,
+               AdjustCaptureBuffering,
+               SetTimecodeTransmission,
+
+               /* only one of each of these events can be queued at any one time */
+
+               StopOnce,
+               AutoLoop
+       };
+
+       enum Action {
+               Add,
+               Remove,
+               Replace,
+               Clear
+       };
+
+       Type       type;
+       Action     action;
+       framepos_t action_frame;
+       framepos_t target_frame;
+       double     speed;
+
+       union {
+               void*        ptr;
+               bool         yes_or_no;
+               framepos_t  target2_frame;
+               Slave*       slave;
+               Route*       route;
+       };
+
+       union {
+               bool second_yes_or_no;
+       };
+
+       /* 4 members to handle a multi-group event handled in RT context */
+
+       typedef boost::function<void (SessionEvent*)> RTeventCallback;
+
+       boost::shared_ptr<RouteList> routes;    /* apply to */
+       boost::function<void (void)> rt_slot;   /* what to call in RT context */
+       RTeventCallback              rt_return; /* called after rt_slot, with this event as an argument */
+       PBD::EventLoop*              event_loop;
+
+       std::list<AudioRange> audio_range;
+       std::list<MusicRange> music_range;
+
+       boost::shared_ptr<Region> region;
+
+       SessionEvent (Type t, Action a, framepos_t when, framepos_t where, double spd, bool yn = false, bool yn2 = false)
+               : type (t)
+               , action (a)
+               , action_frame (when)
+               , target_frame (where)
+               , speed (spd)
+               , yes_or_no (yn)
+               , second_yes_or_no (yn2)
+               , event_loop (0) {}
+
+       void set_ptr (void* p) {
+               ptr = p;
+       }
+
+       bool before (const SessionEvent& other) const {
+               return action_frame < other.action_frame;
+       }
+
+       bool after (const SessionEvent& other) const {
+               return action_frame > other.action_frame;
+       }
+
+       static bool compare (const SessionEvent *e1, const SessionEvent *e2) {
+               return e1->before (*e2);
+       }
+
+       void* operator new (size_t);
+       void  operator delete (void *ptr, size_t /*size*/);
+
+       static const framepos_t Immediate = 0;
+
+       static void create_per_thread_pool (const std::string& n, uint32_t nitems);
+       static void init_event_pool ();
 
 private:
-    static PerThreadPool* pool;
-    CrossThreadPool* own_pool;
+       static PerThreadPool* pool;
+       CrossThreadPool* own_pool;
 
-    friend class Butler;
+       friend class Butler;
 };
 
 class SessionEventManager {
 public:
        SessionEventManager () : pending_events (2048),
-               auto_loop_event(0), punch_out_event(0), punch_in_event(0) {}
+                                auto_loop_event(0), punch_out_event(0), punch_in_event(0) {}
        virtual ~SessionEventManager() {}
 
        virtual void queue_event (SessionEvent *ev) = 0;
index 08d5e242f8c45c6f75d6b8cb1a18e92b4e5323c0..eacb0c49e92e2433d0f77caa5ef006346b859ff7 100644 (file)
@@ -51,7 +51,7 @@ class SessionObject : public SessionHandleRef, public PBD::StatefulDestructible
        {
                add_property (_name);
        }
-       
+
        Session&    session() const { return _session; }
        std::string name()    const { return _name; }
 
index c6741ef319d761ca832b2da0a211b8cb98b0ac6b..96321f2f9c8398ab2108645f58a272976ccd96cd 100644 (file)
@@ -32,7 +32,7 @@
 class XMLNode;
 
 namespace PBD {
-        class ID;
+       class ID;
 }
 
 namespace ARDOUR {
@@ -41,32 +41,32 @@ class Playlist;
 class Region;
 class Source;
 class Session;
-class Crossfade;       
-       
+class Crossfade;
+
 class SessionPlaylists : public PBD::ScopedConnectionList
 {
 public:
        ~SessionPlaylists ();
-       
+
        boost::shared_ptr<Playlist> by_name (std::string name);
        boost::shared_ptr<Playlist> by_id (const PBD::ID&);
        uint32_t source_use_count (boost::shared_ptr<const Source> src) const;
-        uint32_t region_use_count (boost::shared_ptr<Region> region) const;
+       uint32_t region_use_count (boost::shared_ptr<Region> region) const;
        template<class T> void foreach (T *obj, void (T::*func)(boost::shared_ptr<Playlist>));
        void get (std::vector<boost::shared_ptr<Playlist> >&);
        void unassigned (std::list<boost::shared_ptr<Playlist> > & list);
-        void destroy_region (boost::shared_ptr<Region>);
+       void destroy_region (boost::shared_ptr<Region>);
        boost::shared_ptr<Crossfade> find_crossfade (const PBD::ID &);
-        void sync_all_regions_with_regions ();
+       void sync_all_regions_with_regions ();
 
 private:
        friend class Session;
-       
+
        bool add (boost::shared_ptr<Playlist>);
        void remove (boost::shared_ptr<Playlist>);
        void remove_weak (boost::weak_ptr<Playlist>);
        void track (bool, boost::weak_ptr<Playlist>);
-       
+
        uint32_t n_playlists() const;
        void find_equivalent_playlist_regions (boost::shared_ptr<Region>, std::vector<boost::shared_ptr<Region> >& result);
        void update_after_tempo_map_change ();
@@ -75,7 +75,7 @@ private:
        int load (Session &, const XMLNode&);
        int load_unused (Session &, const XMLNode&);
        boost::shared_ptr<Playlist> XMLPlaylistFactory (Session &, const XMLNode&);
-        
+
        mutable Glib::Mutex lock;
        typedef std::set<boost::shared_ptr<Playlist> > List;
        List playlists;
index 46ddda3985cea801daea41f35cd09cea66580035..5cdade3751da049a803136976f81e6b81676e488 100644 (file)
@@ -55,7 +55,7 @@ protected:
        }
 
        framecnt_t write_unlocked (Sample */*dst*/, framecnt_t /*cnt*/) { return 0; }
-       
+
        void set_header_timeline_position () {}
 
        int read_peaks_with_fpp (PeakData *peaks, framecnt_t npeaks, framepos_t /*start*/, framecnt_t /*cnt*/,
index 45ab00a44f6088698e7df58e0a207c2ac9bba459..84004729219f53d6f6b82a2dbb2b50ced9c73ac8 100644 (file)
@@ -207,19 +207,19 @@ class SlaveSessionProxy : public ISlaveSessionProxy {
 };
 
 struct SafeTime {
-    volatile int guard1;
-    framepos_t  position;
-    framepos_t  timestamp;
-    double       speed;
-    volatile int guard2;
-    
-    SafeTime() {
-           guard1 = 0;
-           position = 0;
-           timestamp = 0;
-           speed = 0;
-           guard2 = 0;
-    }
+       volatile int guard1;
+       framepos_t   position;
+       framepos_t   timestamp;
+       double       speed;
+       volatile int guard2;
+
+       SafeTime() {
+               guard1 = 0;
+               position = 0;
+               timestamp = 0;
+               speed = 0;
+               guard2 = 0;
+       }
 };
 
 class MTC_Slave : public Slave {
index 5e54c1580a54257991eef86edfd523e87f5a56db..cf97efe41463a5eec3056b021ac2c73b4aaa16cd 100644 (file)
@@ -37,7 +37,7 @@ template<typename T> class MidiRingBuffer;
 class SMFSource : public MidiSource, public FileSource, public Evoral::SMF {
 public:
        /** Constructor for existing external-to-session files */
-       SMFSource (Session& session, const std::string& path, 
+       SMFSource (Session& session, const std::string& path,
                        Source::Flag flags = Source::Flag(0));
 
        /** Constructor for existing in-session files */
@@ -71,10 +71,10 @@ public:
        static bool safe_midi_file_extension (const std::string& path);
 
   protected:
-        void set_path (const std::string& newpath);
-        
+       void set_path (const std::string& newpath);
+
   private:
-        int open_for_write ();
+       int open_for_write ();
 
        framecnt_t read_unlocked (Evoral::EventSink<framepos_t>& dst,
                                  framepos_t position,
index 2b5535e29f134a84b97218476014e903db0ce33c..f085334a2136069da442d2702c47e7a88ac8b2da 100644 (file)
@@ -44,10 +44,10 @@ class SndFileImportableSource : public ImportableSource {
    protected:
        SF_INFO sf_info;
        boost::shared_ptr<SNDFILE> in;
-        
-        /* these are int64_t so as to be independent of whatever
-           types Ardour may use for framepos_t, framecnt_t etc.
-        */
+
+       /* these are int64_t so as to be independent of whatever
+          types Ardour may use for framepos_t, framecnt_t etc.
+       */
 
        int64_t timecode;
        int64_t get_timecode_info (SNDFILE*, SF_BROADCAST_INFO*, bool&);
index f08b0be4c0b272364b1e2d4ce06d834c703bbcf9..3f63f1c59898b5f4c568a824938db1eef01f057d 100644 (file)
@@ -31,12 +31,12 @@ namespace ARDOUR {
 class SndFileSource : public AudioFileSource {
   public:
        /** Constructor to be called for existing external-to-session files */
-        SndFileSource (Session&, const std::string& path, int chn, Flag flags);
+       SndFileSource (Session&, const std::string& path, int chn, Flag flags);
 
        /* Constructor to be called for new in-session files */
        SndFileSource (Session&, const std::string& path, const std::string& origin,
-                       SampleFormat samp_format, HeaderFormat hdr_format, framecnt_t rate,
-                       Flag flags = SndFileSource::default_writable_flags);
+                      SampleFormat samp_format, HeaderFormat hdr_format, framecnt_t rate,
+                      Flag flags = SndFileSource::default_writable_flags);
 
        /** Constructor to be called for existing in-session files */
        SndFileSource (Session&, const XMLNode&);
@@ -66,7 +66,7 @@ class SndFileSource : public AudioFileSource {
        static int get_soundfile_info (const std::string& path, SoundFileInfo& _info, std::string& error_msg);
 
   protected:
-        void set_path (const std::string& p);
+       void set_path (const std::string& p);
        void set_header_timeline_position ();
 
        framecnt_t read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) const;
@@ -96,7 +96,7 @@ class SndFileSource : public AudioFileSource {
        framecnt_t     xfade_out_count;
        framecnt_t     xfade_in_count;
        Sample*        xfade_buf;
-       
+
        framecnt_t crossfade (Sample* data, framecnt_t cnt, int dir);
        void set_timeline_position (framepos_t);
        framecnt_t destructive_write_unlocked (Sample *dst, framecnt_t cnt);
index 8977348a1ee2a83051ba4968dd63fe8093f4ed3b..1dde32d7ef91c2bd65f6753f2b89085246436cdb 100644 (file)
@@ -102,10 +102,10 @@ class Source : public SessionObject
        Glib::Mutex& mutex()       { return _lock; }
        Flag         flags() const { return _flags; }
 
-        virtual void inc_use_count ();
-        virtual void dec_use_count ();
-        int  use_count() const { return g_atomic_int_get (&_use_count); }
-        bool used() const { return use_count() > 0; }
+       virtual void inc_use_count ();
+       virtual void dec_use_count ();
+       int  use_count() const { return g_atomic_int_get (&_use_count); }
+       bool used() const { return use_count() > 0; }
        uint32_t level() const { return _level; }
 
   protected:
@@ -116,7 +116,7 @@ class Source : public SessionObject
        bool                _analysed;
        mutable Glib::Mutex _lock;
        mutable Glib::Mutex _analysis_lock;
-        gint                _use_count; /* atomic */
+       gint                _use_count; /* atomic */
        uint32_t            _level; /* how deeply nested is this source w.r.t a disk file */
 
   private:
index df15653c1d3364de5ef18a2eab45b56caa975daf..5ddf1f8735bf556b925269c0e00b3217500de9a8 100644 (file)
@@ -42,20 +42,20 @@ class SourceFactory {
 
        static boost::shared_ptr<Source> create (Session&, const XMLNode& node, bool async = false);
        static boost::shared_ptr<Source> createSilent (Session&, const XMLNode& node,
-                                                       framecnt_t nframes, float sample_rate);
+                                                      framecnt_t nframes, float sample_rate);
 
-       static boost::shared_ptr<Source> createReadable 
+       static boost::shared_ptr<Source> createReadable
                (DataType type, Session&,
-                const std::string& path, 
+                const std::string& path,
                 int chn, Source::Flag flags, bool announce = true, bool async = false);
 
-       static boost::shared_ptr<Source> createWritable 
+       static boost::shared_ptr<Source> createWritable
                (DataType type, Session&,
                 const std::string& path, const std::string& origin,
                 bool destructive, framecnt_t rate, bool announce = true, bool async = false);
 
 
-       static boost::shared_ptr<Source> createFromPlaylist 
+       static boost::shared_ptr<Source> createFromPlaylist
                (DataType type, Session& s, boost::shared_ptr<Playlist> p, const PBD::ID& orig, const std::string& name,
                 uint32_t chn, frameoffset_t start, framecnt_t len, bool copy, bool defer_peaks);
 
index 7387a03c388c9873e77c2985e85ea36b6c0955b9..3deeb8b0d937bf7a063212302ab15c4f139cca5c 100644 (file)
 #include "pbd/cartesian.h"
 #include "pbd/signals.h"
 
-namespace ARDOUR { 
+namespace ARDOUR {
 
 class Speaker {
 public:
        Speaker (int, const PBD::AngularVector& position);
        Speaker (const Speaker &);
        Speaker& operator= (const Speaker &);
-        
+
        void move (const PBD::AngularVector& new_position);
 
        const PBD::CartesianVector& coords() const { return _coords; }
index 2bbfdadfa7b3c8aca7092fab728abcd4f4dbc0fe..dbe4ef180ee58712633b131eb0bd94078f1a3f1c 100644 (file)
@@ -34,32 +34,32 @@ namespace ARDOUR  {
 class Speakers : public PBD::Stateful {
 public:
        Speakers ();
-        Speakers (const Speakers&);
+       Speakers (const Speakers&);
        virtual ~Speakers ();
 
-        Speakers& operator= (const Speakers&);
+       Speakers& operator= (const Speakers&);
 
        virtual int  add_speaker (const PBD::AngularVector&);
        virtual void remove_speaker (int id);
        virtual void move_speaker (int id, const PBD::AngularVector& new_position);
        virtual void clear_speakers ();
-        uint32_t size() const { return _speakers.size(); } 
+       uint32_t size() const { return _speakers.size(); }
 
-        void setup_default_speakers (uint32_t nspeakers);
+       void setup_default_speakers (uint32_t nspeakers);
 
        std::vector<Speaker>& speakers() { return _speakers; }
 
        void dump_speakers (std::ostream&);
 
-        XMLNode& get_state ();
-        int set_state (const XMLNode&, int version);
+       XMLNode& get_state ();
+       int set_state (const XMLNode&, int version);
 
        PBD::Signal0<void> Changed;
-        
+
 protected:
        std::vector<Speaker>  _speakers;
 
-       virtual void update () {}  
+       virtual void update () {}
 };
 
 } /* namespace */
index 28af6d4c928ced92bab42886d465026a826f9f42..6a12e96d522a905a6606d2346eb7364242b43a12 100644 (file)
@@ -30,8 +30,8 @@ typedef struct _spline_point SplinePoint;
 
 struct _spline_point
 {
-    float x;
-    float y;
+       float x;
+       float y;
 };
 
 Spline *spline_new (void);
index 0a3846b179c1d7c2e4a436341ac4cd59a87169bb..eed43201739756a56e42e15da07a222e3f6749db 100644 (file)
@@ -22,7 +22,7 @@
 namespace ARDOUR {
 
 /// A filter to strip silence from regions
-class StripSilence : public Filter 
+class StripSilence : public Filter
 {
   public:
        StripSilence (Session &, const AudioIntervalMap&, framecnt_t fade_length);
@@ -30,7 +30,7 @@ class StripSilence : public Filter
        int run (boost::shared_ptr<ARDOUR::Region>, Progress* progress = 0);
 
 private:
-        const AudioIntervalMap& _smap;
+       const AudioIntervalMap& _smap;
        framecnt_t _fade_length; ///< fade in/out to use on trimmed regions, in samples
 };
 
index f4de25e711ae23637bc4e59f7084c15c49ed4226..9f61d1d54d405e7f4411d694a9e33dc84aa332b0 100644 (file)
@@ -145,17 +145,17 @@ typedef std::list<MetricSection*> Metrics;
 class TempoMetric {
   public:
        TempoMetric (const Meter& m, const Tempo& t) : _meter (&m), _tempo (&t), _frame (0) {}
-       
+
        void set_tempo (const Tempo& t)    { _tempo = &t; }
        void set_meter (const Meter& m)    { _meter = &m; }
        void set_frame (framepos_t f)      { _frame = f; }
        void set_start (const Timecode::BBT_Time& t) { _start = t; }
-       
+
        const Meter&    meter() const { return *_meter; }
        const Tempo&    tempo() const { return *_tempo; }
        framepos_t      frame() const { return _frame; }
        const Timecode::BBT_Time& start() const { return _start; }
-       
+
   private:
        const Meter*       _meter;
        const Tempo*       _tempo;
@@ -246,8 +246,8 @@ class TempoMap : public PBD::StatefulDestructible
        Timecode::BBT_Time bbt_add (const Timecode::BBT_Time& a, const Timecode::BBT_Time& b) const;
        Timecode::BBT_Time bbt_subtract (const Timecode::BBT_Time&, const Timecode::BBT_Time&) const;
 
-        framepos_t framepos_plus_bbt (framepos_t pos, Timecode::BBT_Time b) const;
-        double framewalk_to_beats (framepos_t pos, framecnt_t distance) const;
+       framepos_t framepos_plus_bbt (framepos_t pos, Timecode::BBT_Time b) const;
+       double framewalk_to_beats (framepos_t pos, framecnt_t distance) const;
 
        void change_existing_tempo_at (framepos_t, double bpm, double note_type);
        void change_initial_tempo (double bpm, double note_type);
index 8e927471a062eec94298157ebb7fc275aa7d5757..f75efa082d280c8e514b979147b233da56f52dfa 100644 (file)
@@ -11,21 +11,21 @@ namespace ARDOUR {
 class BufferSet;
 
 class ThreadBuffers {
-  public:  
-        ThreadBuffers ();
-        ~ThreadBuffers ();
+public:
+       ThreadBuffers ();
+       ~ThreadBuffers ();
 
-        void ensure_buffers (ChanCount howmany = ChanCount::ZERO);
+       void ensure_buffers (ChanCount howmany = ChanCount::ZERO);
 
-        BufferSet* silent_buffers;
-        BufferSet* scratch_buffers;
-        BufferSet* mix_buffers;
-        gain_t*    gain_automation_buffer;
-        pan_t**    pan_automation_buffer;
-        uint32_t   npan_buffers;
+       BufferSet* silent_buffers;
+       BufferSet* scratch_buffers;
+       BufferSet* mix_buffers;
+       gain_t*    gain_automation_buffer;
+       pan_t**    pan_automation_buffer;
+       uint32_t   npan_buffers;
 
-  private:
-        void allocate_pan_automation_buffers (framecnt_t nframes, uint32_t howmany, bool force);
+private:
+       void allocate_pan_automation_buffers (framecnt_t nframes, uint32_t howmany, bool force);
 };
 
 } // namespace
index 7568811e29f2c606de60cdf81e849cf82da6b70a..050cc2206620bde8641c280f61d788ebf8a54043 100644 (file)
@@ -1,16 +1,16 @@
 /*
        Copyright (C) 2006 Paul Davis
-       
+
        This program is free software; you can redistribute it and/or modify it
        under the terms of the GNU Lesser General Public License as published
        by the Free Software Foundation; either version 2 of the License, or
        (at your option) any later version.
-       
+
        This program is distributed in the hope that it will be useful, but WITHOUT
        ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
        FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
        for more details.
-       
+
        You should have received a copy of the GNU General Public License along
        with this program; if not, write to the Free Software Foundation, Inc.,
        675 Mass Ave, Cambridge, MA 02139, USA.
index 5e77b4c6e9881910b6daecba2a5aa31f60740b30..7f801b31ccb193cc107614aab7fbcc8c03e59903 100644 (file)
@@ -39,7 +39,7 @@ class Track : public Route, public PublicDiskstream
        Track (Session&, std::string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal, DataType default_type = DataType::AUDIO);
        virtual ~Track ();
 
-        int init ();
+       int init ();
 
        bool set_name (const std::string& str);
 
@@ -49,23 +49,23 @@ class Track : public Route, public PublicDiskstream
        PBD::Signal0<void> TrackModeChanged;
 
        virtual int no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
-                       bool state_changing, bool can_record, bool rec_monitors_input);
+                            bool state_changing, bool can_record, bool rec_monitors_input);
 
        int silent_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
-                         bool can_record, bool rec_monitors_input, bool& need_butler);
+                        bool can_record, bool rec_monitors_input, bool& need_butler);
 
        virtual int roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
-                          int declick, bool can_record, bool rec_monitors_input, bool& need_butler) = 0;
+                         int declick, bool can_record, bool rec_monitors_input, bool& need_butler) = 0;
 
-        bool needs_butler() const { return _needs_butler; }
+       bool needs_butler() const { return _needs_butler; }
        void toggle_monitor_input ();
 
        virtual DataType data_type () const = 0;
 
        bool can_record();
 
-        virtual void use_new_diskstream () = 0;
-        virtual void set_diskstream (boost::shared_ptr<Diskstream>);
+       virtual void use_new_diskstream () = 0;
+       virtual void set_diskstream (boost::shared_ptr<Diskstream>);
 
        void set_latency_compensation (framecnt_t);
 
@@ -109,7 +109,7 @@ class Track : public Route, public PublicDiskstream
        bool destructive () const;
        std::list<boost::shared_ptr<Source> > & last_capture_sources ();
        void set_capture_offset ();
-        std::list<boost::shared_ptr<Source> > steal_write_sources();
+       std::list<boost::shared_ptr<Source> > steal_write_sources();
        void reset_write_sources (bool, bool force = false);
        float playback_buffer_load () const;
        float capture_buffer_load () const;
@@ -133,7 +133,7 @@ class Track : public Route, public PublicDiskstream
        void transport_stopped_wallclock (struct tm &, time_t, bool);
        bool pending_overwrite () const;
        double speed () const;
-        void prepare_to_stop (framepos_t);
+       void prepare_to_stop (framepos_t);
        void set_slaved (bool);
        ChanCount n_channels ();
        framepos_t get_capture_start_frame (uint32_t n = 0) const;
@@ -147,8 +147,8 @@ class Track : public Route, public PublicDiskstream
        void set_align_choice (AlignChoice, bool force=false);
        int use_copy_playlist ();
        int use_new_playlist ();
-        void adjust_playback_buffering ();
-        void adjust_capture_buffering ();
+       void adjust_playback_buffering ();
+       void adjust_capture_buffering ();
 
        PBD::Signal0<void> DiskstreamChanged;
        PBD::Signal0<void> FreezeChange;
@@ -163,7 +163,7 @@ class Track : public Route, public PublicDiskstream
        boost::shared_ptr<Diskstream> _diskstream;
        MeterPoint  _saved_meter_point;
        TrackMode   _mode;
-        bool        _needs_butler;
+       bool        _needs_butler;
 
        //private: (FIXME)
        struct FreezeRecordProcessorInfo {
@@ -203,7 +203,7 @@ class Track : public Route, public PublicDiskstream
        XMLNode*              pending_state;
        bool                  _destructive;
 
-        void maybe_declick (BufferSet&, framecnt_t, int);
+       void maybe_declick (BufferSet&, framecnt_t, int);
 
        virtual bool send_silence () const;
 
index 0e071e03a8c3bc7ca0c6662cc6e20e3b5ee9016c..322e4cbc7583f69929c7b30a5d300a50cef35bf9 100644 (file)
@@ -30,31 +30,29 @@ class Session;
 
 class TransientDetector : public AudioAnalyser
 {
+public:
+       TransientDetector (float sample_rate);
+       ~TransientDetector();
 
-  public:
-    TransientDetector (float sample_rate);
-    ~TransientDetector();
+       static std::string operational_identifier();
 
-    static std::string operational_identifier();
+       void set_threshold (float);
+       void set_sensitivity (float);
 
-    void set_threshold (float);
-    void set_sensitivity (float);
+       float get_threshold () const;
+       float get_sensitivity () const;
 
-    float get_threshold () const;
-    float get_sensitivity () const;
+       int run (const std::string& path, Readable*, uint32_t channel, AnalysisFeatureList& results);
+       void update_positions (Readable* src, uint32_t channel, AnalysisFeatureList& results);
 
-    int run (const std::string& path, Readable*, uint32_t channel, AnalysisFeatureList& results);
-    void update_positions (Readable* src, uint32_t channel, AnalysisFeatureList& results);
-    
-    static void cleanup_transients (AnalysisFeatureList&, float sr, float gap_msecs);
-    
+       static void cleanup_transients (AnalysisFeatureList&, float sr, float gap_msecs);
 
-  protected:
-    AnalysisFeatureList* current_results;
-    int use_features (Vamp::Plugin::FeatureSet&, std::ostream*);
+protected:
+       AnalysisFeatureList* current_results;
+       int use_features (Vamp::Plugin::FeatureSet&, std::ostream*);
 
-    static std::string _op_id;
-    float threshold;
+       static std::string _op_id;
+       float threshold;
 };
 
 } /* namespace */
index 28bb9da09577feddb5d70198a78b295ab107f3b4..2b56057e4ae5d131cd81f0d54718acda6ba13cf8 100644 (file)
@@ -1,34 +1,34 @@
 #ifndef __libardour_trimmable_h__
 #define __libardour_trimmable_h__
 
-namespace ARDOUR { 
+namespace ARDOUR {
 
 class Trimmable {
   public:
-        Trimmable() {}
-        virtual ~Trimmable() {}
+       Trimmable() {}
+       virtual ~Trimmable() {}
 
-        enum CanTrim { 
-                FrontTrimEarlier = 0x1,
-                FrontTrimLater = 0x2,
-                EndTrimEarlier = 0x4,
-                EndTrimLater = 0x8,
-                TopTrimUp = 0x10,
-                TopTrimDown = 0x20,
-                BottomTrimUp = 0x40,
-                BottomTrimDown = 0x80
-        } ;
+       enum CanTrim {
+               FrontTrimEarlier = 0x1,
+               FrontTrimLater = 0x2,
+               EndTrimEarlier = 0x4,
+               EndTrimLater = 0x8,
+               TopTrimUp = 0x10,
+               TopTrimDown = 0x20,
+               BottomTrimUp = 0x40,
+               BottomTrimDown = 0x80
+       } ;
 
-        virtual CanTrim can_trim() const { 
-                return CanTrim (FrontTrimEarlier |
-                                FrontTrimLater |
-                                EndTrimEarlier |
-                                EndTrimLater |
-                                TopTrimUp |
-                                TopTrimDown |
-                                BottomTrimUp |
-                                BottomTrimDown); 
-        }
+       virtual CanTrim can_trim() const {
+               return CanTrim (FrontTrimEarlier |
+                               FrontTrimLater |
+                               EndTrimEarlier |
+                               EndTrimLater |
+                               TopTrimUp |
+                               TopTrimDown |
+                               BottomTrimUp |
+                               BottomTrimDown);
+       }
 };
 
 }
index 6cce6bb64f554119cf4f0954461a265d3cca214a..26775a8d7083a74e358ecdb9abbc15b95a0b6fb4 100644 (file)
@@ -68,7 +68,7 @@ namespace ARDOUR {
        */
        typedef int64_t frameoffset_t;
 
-       /* Any count of audio frames. 
+       /* Any count of audio frames.
           Assumed to be positive but not enforced.
        */
        typedef int64_t framecnt_t;
@@ -105,22 +105,22 @@ namespace ARDOUR {
                OverlapEnd,       // overlap begins within and covers end
                OverlapExternal   // overlap extends to (at least) begin+end
        };
-        
-        ARDOUR::OverlapType coverage (framepos_t sa, framepos_t ea,
-                                      framepos_t sb, framepos_t eb);
 
-        /* policies for inserting/pasting material where overlaps
-           might be an issue.
-        */
+       ARDOUR::OverlapType coverage (framepos_t sa, framepos_t ea,
+                                     framepos_t sb, framepos_t eb);
 
-        enum InsertMergePolicy {
-                InsertMergeReject,  // no overlaps allowed
-                InsertMergeRelax,   // we just don't care about overlaps
-                InsertMergeReplace, // replace old with new
-                InsertMergeTruncateExisting, // shorten existing to avoid overlap
-                InsertMergeTruncateAddition, // shorten new to avoid overlap
-                InsertMergeExtend   // extend new (or old) to the range of old+new
-        };
+       /* policies for inserting/pasting material where overlaps
+          might be an issue.
+       */
+
+       enum InsertMergePolicy {
+               InsertMergeReject,  // no overlaps allowed
+               InsertMergeRelax,   // we just don't care about overlaps
+               InsertMergeReplace, // replace old with new
+               InsertMergeTruncateExisting, // shorten existing to avoid overlap
+               InsertMergeTruncateAddition, // shorten new to avoid overlap
+               InsertMergeExtend   // extend new (or old) to the range of old+new
+       };
 
        /** See evoral/Parameter.hpp
         */
@@ -171,14 +171,14 @@ namespace ARDOUR {
        enum AlignChoice {
                UseCaptureTime,
                UseExistingMaterial,
-                Automatic
+               Automatic
        };
 
        enum MeterPoint {
                MeterInput,
                MeterPreFader,
                MeterPostFader,
-                MeterOutput,
+               MeterOutput,
                MeterCustom
        };
 
@@ -237,10 +237,10 @@ namespace ARDOUR {
                };
 
                AnyTime() { type = Frames; frames = 0; }
-               
+
                bool operator== (AnyTime const & other) const {
                        if (type != other.type) { return false; }
-                       
+
                        switch (type) {
                          case Timecode:
                                return timecode == other.timecode;
@@ -252,7 +252,7 @@ namespace ARDOUR {
                                return seconds == other.seconds;
                        }
                }
-               
+
                bool not_zero() const
                {
                        switch (type) {
@@ -404,7 +404,7 @@ namespace ARDOUR {
 
        struct InterThreadInfo {
                InterThreadInfo () : done (false), cancel (false), progress (0), thread (0) {}
-                       
+
                volatile bool  done;
                volatile bool  cancel;
                volatile float progress;
@@ -551,13 +551,13 @@ namespace ARDOUR {
                bool meter_visibly_changed;
        };
 
-        struct BusProfile {
-            AutoConnectOption input_ac;      /* override the RC config for input auto-connection */
-            AutoConnectOption output_ac;     /* override the RC config for output auto-connection */
-            uint32_t master_out_channels;    /* how many channels for the master bus */
-            uint32_t requested_physical_in;  /* now many of the available physical inputs to consider usable */
-            uint32_t requested_physical_out; /* now many of the available physical inputs to consider usable */
-        };
+       struct BusProfile {
+               AutoConnectOption input_ac;      /* override the RC config for input auto-connection */
+               AutoConnectOption output_ac;     /* override the RC config for output auto-connection */
+               uint32_t master_out_channels;    /* how many channels for the master bus */
+               uint32_t requested_physical_in;  /* now many of the available physical inputs to consider usable */
+               uint32_t requested_physical_out; /* now many of the available physical inputs to consider usable */
+       };
 
        enum FadeShape {
                FadeLinear,
index 2753094756ec94f4c25c2a5db6d223d22a911af2..36981030ce844bed2e7141c0870e68997f95ac7c 100755 (executable)
@@ -52,7 +52,7 @@ public:
        bool can_support_io_configuration (const ChanCount &, ChanCount &) const {
                return false;
        }
-       
+
        XMLNode & state (bool);
 
 private:
index 83bf58c4aca65a0e0ca3e2696477f5804c413e5f..d1522059d1f8c4c63352701d05591a2f02acc997 100644 (file)
@@ -100,7 +100,7 @@ private:
        bool load_user_preset (PresetRecord);
        bool load_plugin_preset (PresetRecord);
        void add_state (XMLNode *) const;
-       
+
        FSTHandle* handle;
        FST*       _fst;
        AEffect*   _plugin;
index ab43d410cf617ad0502e7d80b7a8ed24b357faac..cd76e53100fea4c08a8e3594a7d6cfd0638834c4 100644 (file)
@@ -441,7 +441,7 @@ AudioDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool ca
                (*chan)->current_playback_buffer = 0;
        }
 
-       // Safeguard against situations where process() goes haywire when autopunching 
+       // Safeguard against situations where process() goes haywire when autopunching
        // and last_recordable_frame < first_recordable_frame
 
        if (last_recordable_frame < first_recordable_frame) {
@@ -452,7 +452,7 @@ AudioDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool ca
 
                OverlapType ot = coverage (first_recordable_frame, last_recordable_frame, transport_frame, transport_frame + nframes);
                calculate_record_range (ot, transport_frame, nframes, rec_nframes, rec_offset);
-                
+
                if (rec_nframes && !was_recording) {
                        capture_captured = 0;
                        was_recording = true;
@@ -626,7 +626,7 @@ AudioDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool ca
 
                _speed = _target_speed;
 
-       } 
+       }
 
        ret = 0;
 
@@ -685,11 +685,11 @@ AudioDiskstream::commit (framecnt_t /* nframes */)
                capture_captured += adjust_capture_position;
                adjust_capture_position = 0;
        }
-       
+
        if (c->empty()) {
                return false;
        }
-       
+
        if (_slaved) {
                if (_io && _io->active()) {
                        need_butler = c->front()->playback_buf->write_space() >= c->front()->playback_buf->bufsize() / 2;
@@ -731,7 +731,7 @@ AudioDiskstream::overwrite_existing_buffers ()
                _pending_overwrite = false;
                return 0;
        }
-       
+
        Sample* mixdown_buffer;
        float* gain_buffer;
        int ret = -1;
@@ -865,7 +865,7 @@ AudioDiskstream::internal_playback_seek (framecnt_t distance)
 }
 
 int
-AudioDiskstream::read (Sample* buf, Sample* mixdown_buffer, float* gain_buffer, 
+AudioDiskstream::read (Sample* buf, Sample* mixdown_buffer, float* gain_buffer,
                        framepos_t& start, framecnt_t cnt,
                        ChannelInfo* /*channel_info*/, int channel, bool reversed)
 {
@@ -912,7 +912,7 @@ AudioDiskstream::read (Sample* buf, Sample* mixdown_buffer, float* gain_buffer,
        if (reversed) {
                start -= cnt;
        }
-       
+
        while (cnt) {
 
                /* take any loop into account. we can't read past the end of the loop. */
@@ -1187,7 +1187,7 @@ AudioDiskstream::_do_refill (Sample* mixdown_buffer, float* gain_buffer)
 
        file_frame = file_frame_tmp;
        assert (file_frame >= 0);
-       
+
   out:
 
        return ret;
@@ -1473,18 +1473,18 @@ AudioDiskstream::transport_stopped_wallclock (struct tm& when, time_t twhen, boo
                        string region_name;
 
                        RegionFactory::region_name (region_name, whole_file_region_name, false);
-                        
+
                        DEBUG_TRACE (DEBUG::CaptureAlignment, string_compose ("%1 capture start @ %2 length %3 add new region %4\n",
                                                                              _name, (*ci)->start, (*ci)->frames, region_name));
 
                        try {
 
                                PropertyList plist;
-                               
+
                                plist.add (Properties::start, buffer_position);
                                plist.add (Properties::length, (*ci)->frames);
                                plist.add (Properties::name, region_name);
-                               
+
                                boost::shared_ptr<Region> rx (RegionFactory::create (srcs, plist));
                                region = boost::dynamic_pointer_cast<AudioRegion> (rx);
                        }
@@ -1503,7 +1503,7 @@ AudioDiskstream::transport_stopped_wallclock (struct tm& when, time_t twhen, boo
                                region->set_layer (_playlist->top_layer() + 1);
                                region->set_pending_explicit_relayer (true);
                        }
-                       
+
                        _playlist->add_region (region, (*ci)->start, 1, non_layered());
                        i_am_the_modifier--;
 
@@ -1841,11 +1841,11 @@ AudioDiskstream::use_new_write_source (uint32_t n)
        /* do not remove destructive files even if they are empty */
 
        chan->write_source->set_allow_remove_if_empty (!destructive());
-       
+
        return 0;
 }
 
-list<boost::shared_ptr<Source> > 
+list<boost::shared_ptr<Source> >
 AudioDiskstream::steal_write_sources()
 {
        /* not possible to steal audio write sources */
@@ -1881,7 +1881,7 @@ AudioDiskstream::reset_write_sources (bool mark_write_complete, bool /*force*/)
                                        (*chan)->write_source->mark_for_remove ();
                                        (*chan)->write_source->drop_references ();
                                }
-                               
+
                                (*chan)->write_source.reset ();
                        }
 
@@ -2001,7 +2001,7 @@ AudioDiskstream::add_channel_to (boost::shared_ptr<ChannelList> c, uint32_t how_
 {
        while (how_many--) {
                c->push_back (new ChannelInfo(
-                                     _session.butler()->audio_diskstream_playback_buffer_size(), 
+                                     _session.butler()->audio_diskstream_playback_buffer_size(),
                                      _session.butler()->audio_diskstream_capture_buffer_size(),
                                      speed_buffer_size, wrap_buffer_size));
                interpolation.add_channel_to (
@@ -2067,7 +2067,7 @@ AudioDiskstream::capture_buffer_load () const
        if (c->empty ()) {
                return 0;
        }
-       
+
        return (float) ((double) c->front()->capture_buf->write_space()/
                        (double) c->front()->capture_buf->bufsize());
 }
@@ -2142,9 +2142,9 @@ AudioDiskstream::use_pending_capture_data (XMLNode& node)
        boost::shared_ptr<AudioRegion> region;
 
        try {
-               
+
                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));
@@ -2253,7 +2253,7 @@ AudioDiskstream::can_become_destructive (bool& requires_bounce) const
        return true;
 }
 
-void 
+void
 AudioDiskstream::adjust_playback_buffering ()
 {
        boost::shared_ptr<ChannelList> c = channels.reader();
@@ -2263,7 +2263,7 @@ AudioDiskstream::adjust_playback_buffering ()
        }
 }
 
-void 
+void
 AudioDiskstream::adjust_capture_buffering ()
 {
        boost::shared_ptr<ChannelList> c = channels.reader();
@@ -2370,7 +2370,7 @@ AudioDiskstream::set_name (string const & name)
        boost::shared_ptr<ChannelList> c = channels.reader();
        ChannelList::iterator i;
        int n = 0;
-       
+
        for (n = 0, i = c->begin(); i != c->end(); ++i, ++n) {
                use_new_write_source (n);
        }
index c433fe4d0e66fd99afcdc81a588f356cd21a7975..12b2e4062aa3acb3b127d06df4d243c0eb885512 100644 (file)
@@ -54,7 +54,7 @@ CrossfadeListProperty::CrossfadeListProperty (AudioPlaylist& pl)
         : SequenceProperty<std::list<boost::shared_ptr<Crossfade> > > (Properties::crossfades.property_id, boost::bind (&AudioPlaylist::update, &pl, _1))
         , _playlist (pl)
 {
-       
+
 }
 
 CrossfadeListProperty::CrossfadeListProperty (CrossfadeListProperty const & p)
@@ -125,7 +125,7 @@ AudioPlaylist::AudioPlaylist (boost::shared_ptr<const AudioPlaylist> other, stri
        , _crossfades (*this)
 {
        add_property (_crossfades);
-       
+
        RegionList::const_iterator in_o  = other->regions.begin();
        RegionList::iterator in_n = regions.begin();
 
@@ -170,7 +170,7 @@ AudioPlaylist::AudioPlaylist (boost::shared_ptr<const AudioPlaylist> other, fram
 {
        RegionLock rlock2 (const_cast<AudioPlaylist*> (other.get()));
        in_set_state++;
-       
+
        add_property (_crossfades);
 
        framepos_t const end = start + cnt - 1;
@@ -219,7 +219,7 @@ AudioPlaylist::AudioPlaylist (boost::shared_ptr<const AudioPlaylist> other, fram
                                fade_out = region->fade_out()->back()->when - ( region->last_frame() - end );  //end is inside the fadeout, preserve the fades endpoint
                        break;
                }
-               
+
                case OverlapEnd: {
                        position = 0;
                        offset = start - region->position();
@@ -227,12 +227,12 @@ AudioPlaylist::AudioPlaylist (boost::shared_ptr<const AudioPlaylist> other, fram
 
                        if (start < region->last_frame() - region->fade_out()->back()->when)  //start is before fade-out, preserve the fadeout
                                fade_out = region->fade_out()->back()->when;
-                       
+
                        if (start < region->position() + region->fade_in()->back()->when)
                                fade_in = region->fade_in()->back()->when - (start - region->position());  //end is inside the fade-in, preserve the fade-in endpoint
                        break;
                }
-               
+
                case OverlapExternal:
                        fade_in = region->fade_in()->back()->when;
                        fade_out = region->fade_out()->back()->when;
@@ -1015,25 +1015,25 @@ AudioPlaylist::copy_dependents (const vector<TwoRegions>& old_and_new, Playlist*
                for (Crossfades::const_iterator i = _crossfades.begin(); i != _crossfades.end(); ++i) {
 
                        if ((*i)->in() == on->first) {
-                               
+
                                CrossfadeInfo::iterator cf;
 
                                if ((cf = crossfade_info.find (*i)) != crossfade_info.end()) {
 
-                                       /* already have a record for the old fade-in region, 
+                                       /* already have a record for the old fade-in region,
                                           so note the new fade-in region
                                        */
-                                       
+
                                        cf->second.new_in = on->second;
-                                       
+
                                } else {
-                                       
+
                                        /* add a record of this crossfade, keeping an association
                                           with the new fade-in region
                                        */
-                                       
+
                                        crossfade_triple ct;
-                                       
+
                                        ct.old_in = on->first;
                                        ct.new_in = on->second;
 
@@ -1041,21 +1041,21 @@ AudioPlaylist::copy_dependents (const vector<TwoRegions>& old_and_new, Playlist*
                                }
 
                        } else if ((*i)->out() == on->first) {
-                               
+
                                /* this old region is the fade-out region of this crossfade */
-                               
+
                                CrossfadeInfo::iterator cf;
-                               
+
                                if ((cf = crossfade_info.find (*i)) != crossfade_info.end()) {
-                                       
+
                                        /* already have a record for this crossfade, so just keep
                                           an association for the new fade out region
                                        */
-                                       
+
                                        cf->second.new_out = on->second;
 
                                } else {
-                                       
+
                                        /* add a record of this crossfade, keeping an association
                                           with the new fade-in region
                                        */
@@ -1072,19 +1072,19 @@ AudioPlaylist::copy_dependents (const vector<TwoRegions>& old_and_new, Playlist*
        }
 
        for (CrossfadeInfo::iterator ci = crossfade_info.begin(); ci != crossfade_info.end(); ++ci) {
-               
+
                /* for each crossfade that involves at least two of the old regions,
                   create a new identical crossfade with the new regions
                */
-               
+
                if (!ci->second.new_in || !ci->second.new_out) {
                        continue;
                }
 
-               boost::shared_ptr<Crossfade> new_xfade (new Crossfade (ci->first, 
+               boost::shared_ptr<Crossfade> new_xfade (new Crossfade (ci->first,
                                                                       boost::dynamic_pointer_cast<AudioRegion>(ci->second.new_in),
                                                                       boost::dynamic_pointer_cast<AudioRegion>(ci->second.new_out)));
-               
+
                /* add it at the right position - which must be at the start
                 * of the fade-in region
                 */
@@ -1178,11 +1178,11 @@ AudioPlaylist::pre_uncombine (vector<boost::shared_ptr<Region> >& originals, boo
                ar->set_scale_amplitude (ar->scale_amplitude() * cr->scale_amplitude());
 
                if (i == originals.begin()) {
-                       
+
                        /* copy the compound region's fade in back into the first
                           original region.
                        */
-                       
+
                        if (cr->fade_in()->back()->when <= ar->length()) {
                                /* don't do this if the fade is longer than the
                                 * region
@@ -1190,13 +1190,13 @@ AudioPlaylist::pre_uncombine (vector<boost::shared_ptr<Region> >& originals, boo
                                ar->set_fade_in (cr->fade_in());
                        }
 
-                       
+
                } else if (*i == originals.back()) {
 
                        /* copy the compound region's fade out back into the last
                           original region.
                        */
-                       
+
                        if (cr->fade_out()->back()->when <= ar->length()) {
                                /* don't do this if the fade is longer than the
                                 * region
index eb71dc449b8f54007c144f4f40330aea94d4cd01..ab98b85010e1b8d46a9cfd7a50f31d8c1f8946de 100644 (file)
@@ -46,7 +46,7 @@ using namespace std;
 using namespace ARDOUR;
 using namespace PBD;
 
-AudioPlaylistSource::AudioPlaylistSource (Session& s, const ID& orig, const std::string& name, boost::shared_ptr<AudioPlaylist> p, 
+AudioPlaylistSource::AudioPlaylistSource (Session& s, const ID& orig, const std::string& name, boost::shared_ptr<AudioPlaylist> p,
                                          uint32_t chn, frameoffset_t begin, framecnt_t len, Source::Flag flags)
        : Source (s, DataType::AUDIO, name)
        , PlaylistSource (s, orig, name, p, DataType::AUDIO, begin, len, flags)
@@ -68,7 +68,7 @@ AudioPlaylistSource::AudioPlaylistSource (Session& s, const XMLNode& node)
        /* ancestors have already called ::set_state() in their XML-based
           constructors.
        */
-       
+
        if (set_state (node, Stateful::loading_state_version, false)) {
                throw failed_constructor ();
        }
@@ -93,18 +93,18 @@ AudioPlaylistSource::get_state ()
 
        return node;
 }
-       
+
 int
-AudioPlaylistSource::set_state (const XMLNode& node, int version) 
+AudioPlaylistSource::set_state (const XMLNode& node, int version)
 {
        return set_state (node, version, true);
 }
 
 int
-AudioPlaylistSource::set_state (const XMLNode& node, int version, bool with_descendants) 
+AudioPlaylistSource::set_state (const XMLNode& node, int version, bool with_descendants)
 {
        if (with_descendants) {
-               if (Source::set_state (node, version) || 
+               if (Source::set_state (node, version) ||
                    PlaylistSource::set_state (node, version) ||
                    AudioSource::set_state (node, version)) {
                        return -1;
@@ -126,7 +126,7 @@ AudioPlaylistSource::set_state (const XMLNode& node, int version, bool with_desc
        return 0;
 }
 
-framecnt_t 
+framecnt_t
 AudioPlaylistSource::read_unlocked (Sample* dst, framepos_t start, framecnt_t cnt) const
 {
        boost::shared_ptr<Sample> sbuf;
@@ -148,7 +148,7 @@ AudioPlaylistSource::read_unlocked (Sample* dst, framepos_t start, framecnt_t cn
                to_zero = 0;
        }
 
-       { 
+       {
                /* Don't need to hold the lock for the actual read, and
                   actually, we cannot, but we do want to interlock
                   with any changes to the list of buffers caused
@@ -168,8 +168,8 @@ AudioPlaylistSource::read_unlocked (Sample* dst, framepos_t start, framecnt_t cn
        return cnt;
 }
 
-framecnt_t 
-AudioPlaylistSource::write_unlocked (Sample *src, framecnt_t cnt) 
+framecnt_t
+AudioPlaylistSource::write_unlocked (Sample *src, framecnt_t cnt)
 {
        fatal << string_compose (_("programming error: %1"), "AudioPlaylistSource::write() called - should be impossible") << endmsg;
        /*NOTREACHED*/
index b0c8d452210a0a22169c7650210137fc875a6f0f..556f6e0c2a0775ae6430e8f5eda76036acbf126d 100644 (file)
@@ -56,7 +56,7 @@ void
 AudioPort::cycle_end (pframes_t nframes)
 {
         if (sends_output() && !_buffer->written()) {
-                /* we can't use nframes here because the current buffer capacity may 
+                /* we can't use nframes here because the current buffer capacity may
                    be shorter than the full buffer size if we split the cycle.
                 */
                if (_buffer->capacity () > 0) {
@@ -74,7 +74,7 @@ AudioBuffer&
 AudioPort::get_audio_buffer (pframes_t nframes)
 {
        /* caller must hold process lock */
-       _buffer->set_data ((Sample *) jack_port_get_buffer (_jack_port, _cycle_nframes) + 
+       _buffer->set_data ((Sample *) jack_port_get_buffer (_jack_port, _cycle_nframes) +
                           _global_port_buffer_offset + _port_buffer_offset, nframes);
        return *_buffer;
 }
index 080538a34ee1c04df988f61c2a30817f81536eda..aa7768a22872a839433f09ef4acd7db2310885a7 100644 (file)
@@ -366,7 +366,7 @@ AudioTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_fram
        Sample* tmpb;
        framepos_t transport_frame;
        boost::shared_ptr<AudioDiskstream> diskstream = audio_diskstream();
-        
+
        automation_snapshot (start_frame, false);
 
        if (n_outputs().n_total() == 0 && _processors.empty()) {
@@ -568,7 +568,7 @@ AudioTrack::export_stuff (BufferSet& buffers, framepos_t start, framecnt_t nfram
                boost::shared_ptr<Processor> processor = boost::dynamic_pointer_cast<Processor> (*i);
                boost::shared_ptr<Delivery> delivery = boost::dynamic_pointer_cast<Delivery> (*i);
                boost::shared_ptr<PeakMeter> meter = boost::dynamic_pointer_cast<PeakMeter> (*i);
-               
+
                if (processor && (!delivery || !Delivery::role_requires_output_ports (delivery->role())) && !meter) {
                        processor->run (buffers, start, start+nframes, nframes, true);
                }
@@ -669,7 +669,7 @@ AudioTrack::freeze_me (InterThreadInfo& itt)
        /* create a new region from all filesources, keep it private */
 
        PropertyList plist;
-       
+
        plist.add (Properties::start, 0);
        plist.add (Properties::length, srcs[0]->length(srcs[0]->timeline_position()));
        plist.add (Properties::name, region_name);
index b695f5460fb9d1458f57a89566b19999f7a0c4a1..9c1f8948ce58e8148ba20cd90c3e346904fd60c2 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2006-2009 Paul Davis 
+    Copyright (C) 2006-2009 Paul Davis
     Some portions Copyright (C) Sophia Poirier.
 
     This program is free software; you can redistribute it and/or modify
@@ -81,7 +81,7 @@ static string preset_suffix = ".aupreset";
 static bool preset_search_path_initialized = false;
 static bool debug_io_config = true;
 
-static OSStatus 
+static OSStatus
 _render_callback(void *userData,
                 AudioUnitRenderActionFlags *ioActionFlags,
                 const AudioTimeStamp    *inTimeStamp,
@@ -95,19 +95,19 @@ _render_callback(void *userData,
        return paramErr;
 }
 
-static OSStatus 
+static OSStatus
 _get_beat_and_tempo_callback (void*    userData,
-                              Float64* outCurrentBeat, 
+                              Float64* outCurrentBeat,
                               Float64* outCurrentTempo)
 {
        if (userData) {
                return ((AUPlugin*)userData)->get_beat_and_tempo_callback (outCurrentBeat, outCurrentTempo);
        }
-    
+
        return paramErr;
 }
 
-static OSStatus 
+static OSStatus
 _get_musical_time_location_callback (void *     userData,
                                      UInt32 *   outDeltaSampleOffsetToNextBeat,
                                      Float32 *  outTimeSig_Numerator,
@@ -123,7 +123,7 @@ _get_musical_time_location_callback (void *     userData,
        return paramErr;
 }
 
-static OSStatus 
+static OSStatus
 _get_transport_state_callback (void*     userData,
                               Boolean*  outIsPlaying,
                               Boolean*  outTransportStateChanged,
@@ -142,7 +142,7 @@ _get_transport_state_callback (void*     userData,
 }
 
 
-static int 
+static int
 save_property_list (CFPropertyListRef propertyList, Glib::ustring path)
 
 {
@@ -150,7 +150,7 @@ save_property_list (CFPropertyListRef propertyList, Glib::ustring path)
        int fd;
 
        // Convert the property list into XML data.
-       
+
        xmlData = CFPropertyListCreateXMLData( kCFAllocatorDefault, propertyList);
 
        if (!xmlData) {
@@ -184,10 +184,10 @@ save_property_list (CFPropertyListRef propertyList, Glib::ustring path)
        close (fd);
        return 0;
 }
 
-static CFPropertyListRef 
-load_property_list (Glib::ustring path) 
+
+static CFPropertyListRef
+load_property_list (Glib::ustring path)
 {
        int fd;
        CFPropertyListRef propertyList = 0;
@@ -195,12 +195,12 @@ load_property_list (Glib::ustring path)
        CFStringRef       errorString;
 
        // Read the XML file.
-       
+
        if ((fd = open (path.c_str(), O_RDONLY)) < 0) {
                return propertyList;
 
        }
-       
+
        off_t len = lseek (fd, 0, SEEK_END);
        char* buf = new char[len];
        lseek (fd, 0, SEEK_SET);
@@ -210,13 +210,13 @@ load_property_list (Glib::ustring path)
                close (fd);
                return propertyList;
        }
-       
+
        close (fd);
 
        xmlData = CFDataCreateWithBytesNoCopy (kCFAllocatorDefault, (UInt8*) buf, len, kCFAllocatorNull);
-       
+
        // Reconstitute the dictionary using the XML data.
-       
+
        propertyList = CFPropertyListCreateFromXMLData( kCFAllocatorDefault,
                                                        xmlData,
                                                        kCFPropertyListImmutable,
@@ -229,7 +229,7 @@ load_property_list (Glib::ustring path)
 }
 
 //-----------------------------------------------------------------------------
-static void 
+static void
 set_preset_name_in_plist (CFPropertyListRef plist, string preset_name)
 {
        if (!plist) {
@@ -240,7 +240,7 @@ set_preset_name_in_plist (CFPropertyListRef plist, string preset_name)
        if (CFGetTypeID (plist) == CFDictionaryGetTypeID()) {
                CFDictionarySetValue ((CFMutableDictionaryRef)plist, CFSTR(kAUPresetNameKey), pn);
        }
-       
+
        CFRelease (pn);
 }
 
@@ -264,7 +264,7 @@ get_preset_name_in_plist (CFPropertyListRef plist)
                        if (CFStringGetCString (str, local_buffer, len, kCFStringEncodingUTF8)) {
                                ret = local_buffer;
                        }
-               } 
+               }
        }
        return ret;
 }
@@ -278,7 +278,7 @@ Boolean ComponentDescriptionsMatch_General(const ComponentDescription * inCompon
        if ( (inComponentDescription1 == NULL) || (inComponentDescription2 == NULL) )
                return FALSE;
 
-       if ( (inComponentDescription1->componentSubType == inComponentDescription2->componentSubType) 
+       if ( (inComponentDescription1->componentSubType == inComponentDescription2->componentSubType)
                        && (inComponentDescription1->componentManufacturer == inComponentDescription2->componentManufacturer) )
        {
                // only sub-type and manufacturer IDs need to be equal
@@ -315,7 +315,7 @@ Boolean ComponentAndDescriptionMatch_General(Component inComponent, const Compon
 
 //--------------------------------------------------------------------------
 // determine if 2 ComponentDescriptions are basically equal
-// (by that, I mean that the important identifying values are compared, 
+// (by that, I mean that the important identifying values are compared,
 // but not the ComponentDescription flags)
 Boolean ComponentDescriptionsMatch(const ComponentDescription * inComponentDescription1, const ComponentDescription * inComponentDescription2)
 {
@@ -358,7 +358,7 @@ AUPlugin::AUPlugin (AudioEngine& engine, Session& session, boost::shared_ptr<CAC
        , frames_processed (0)
        , last_transport_rolling (false)
        , last_transport_speed (0.0)
-{                      
+{
        if (!preset_search_path_initialized) {
                Glib::ustring p = Glib::get_home_dir();
                p += "/Library/Audio/Presets:";
@@ -383,7 +383,7 @@ AUPlugin::AUPlugin (const AUPlugin& other)
        , current_offset (0)
        , current_buffers (0)
        , frames_processed (0)
-         
+
 {
        init ();
 }
@@ -406,7 +406,7 @@ AUPlugin::discover_factory_presets ()
        CFArrayRef presets;
        UInt32 dataSize = sizeof (presets);
        OSStatus err;
-       
+
        TRACE_API ("get property FactoryPresets in global scope\n");
        if ((err = unit->GetProperty (kAudioUnitProperty_FactoryPresets, kAudioUnitScope_Global, 0, (void*) &presets, &dataSize)) != 0) {
                cerr << "cannot get factory preset info: " << err << endl;
@@ -425,7 +425,7 @@ AUPlugin::discover_factory_presets ()
                string name = CFStringRefToStdString (preset->presetName);
                factory_preset_map[name] = preset->presetNumber;
        }
-       
+
        CFRelease (presets);
 }
 
@@ -446,7 +446,7 @@ AUPlugin::init ()
                error << _("AudioUnit: Could not convert CAComponent to CAAudioUnit") << endmsg;
                throw failed_constructor ();
        }
-       
+
        TRACE_API ("count global elements\n");
        unit->GetElementCount (kAudioUnitScope_Global, global_elements);
        TRACE_API ("count input elements\n");
@@ -456,12 +456,12 @@ AUPlugin::init ()
 
        if (input_elements > 0) {
                AURenderCallbackStruct renderCallbackInfo;
-                
+
                renderCallbackInfo.inputProc = _render_callback;
                renderCallbackInfo.inputProcRefCon = this;
-                
+
                TRACE_API ("set render callback in input scope\n");
-               if ((err = unit->SetProperty (kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input, 
+               if ((err = unit->SetProperty (kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input,
                                              0, (void*) &renderCallbackInfo, sizeof(renderCallbackInfo))) != 0) {
                        cerr << "cannot install render callback (err = " << err << ')' << endl;
                        throw failed_constructor();
@@ -476,12 +476,12 @@ AUPlugin::init ()
        info.beatAndTempoProc = _get_beat_and_tempo_callback;
        info.musicalTimeLocationProc = _get_musical_time_location_callback;
        info.transportStateProc = _get_transport_state_callback;
-       
+
        //ignore result of this - don't care if the property isn't supported
        TRACE_API ("set host callbacks in global scope\n");
-       unit->SetProperty (kAudioUnitProperty_HostCallbacks, 
-                          kAudioUnitScope_Global, 
-                          0, //elementID 
+       unit->SetProperty (kAudioUnitProperty_HostCallbacks,
+                          kAudioUnitScope_Global,
+                          0, //elementID
                           &info,
                           sizeof (HostCallbackInfo));
 
@@ -511,8 +511,8 @@ void
 AUPlugin::discover_parameters ()
 {
        /* discover writable parameters */
-       
-       AudioUnitScope scopes[] = { 
+
+       AudioUnitScope scopes[] = {
                kAudioUnitScope_Global,
                kAudioUnitScope_Output,
                kAudioUnitScope_Input
@@ -523,7 +523,7 @@ AUPlugin::discover_parameters ()
        for (uint32_t i = 0; i < sizeof (scopes) / sizeof (scopes[0]); ++i) {
 
                AUParamInfo param_info (unit->AU(), false, false, scopes[i]);
-               
+
                for (uint32_t i = 0; i < param_info.NumParams(); ++i) {
 
                        AUParameterDescriptor d;
@@ -602,10 +602,10 @@ AUPlugin::discover_parameters ()
                        d.toggled = (info.unit == kAudioUnitParameterUnit_Boolean) ||
                                (d.integer_step && ((d.upper - d.lower) == 1.0));
                        d.sr_dependent = (info.unit == kAudioUnitParameterUnit_SampleFrames);
-                       d.automatable = !d.toggled && 
+                       d.automatable = !d.toggled &&
                                !(info.flags & kAudioUnitParameterFlag_NonRealTime) &&
                                (info.flags & kAudioUnitParameterFlag_IsWritable);
-                       
+
                        d.logarithmic = (info.flags & kAudioUnitParameterFlag_DisplayLogarithmic);
                        d.unit = info.unit;
 
@@ -639,8 +639,8 @@ AUPlugin::maybe_fix_broken_au_id (const std::string& id)
 
        /* ID format is xxxx-xxxx-xxxx
           where x maybe \xNN or a printable character.
-          
-          Split at the '-' and and process each part into an integer. 
+
+          Split at the '-' and and process each part into an integer.
           Then put it back together.
        */
 
@@ -672,16 +672,16 @@ AUPlugin::maybe_fix_broken_au_id (const std::string& id)
                                ++in;
 
                        } else {
-                               
+
                                if (cstr[1] == 'x' && isxdigit (cstr[2]) && isxdigit (cstr[3])) {
-                                       
+
                                        /* parse \xNN */
-                                       
+
                                        memcpy (short_buf, &cstr[2], 2);
                                        nascent[in] = strtol (short_buf, NULL, 16);
                                        cstr += 4;
                                        ++in;
-                                       
+
                                } else {
 
                                        /* treat as literal characters */
@@ -720,7 +720,7 @@ AUPlugin::maybe_fix_broken_au_id (const std::string& id)
        }
 
        s << n[0] << '-' << n[1] << '-' << n[2];
-       
+
        return s.str();
 
   err:
@@ -767,24 +767,24 @@ AUPlugin::set_parameter (uint32_t which, float val)
        if (which >= descriptors.size()) {
                return;
        }
-       
+
        const AUParameterDescriptor& d (descriptors[which]);
        TRACE_API ("set parameter %d in scope %d element %d to %f\n", d.id, d.scope, d.element, val);
        unit->SetParameter (d.id, d.scope, d.element, val);
-       
+
        /* tell the world what we did */
-       
+
        AudioUnitEvent theEvent;
-       
+
        theEvent.mEventType = kAudioUnitEvent_ParameterValueChange;
        theEvent.mArgument.mParameter.mAudioUnit = unit->AU();
        theEvent.mArgument.mParameter.mParameterID = d.id;
        theEvent.mArgument.mParameter.mScope = d.scope;
        theEvent.mArgument.mParameter.mElement = d.element;
-       
+
        TRACE_API ("notify about parameter change\n");
        AUEventListenerNotify (NULL, NULL, &theEvent);
-       
+
        Plugin::set_parameter (which, val);
 }
 
@@ -806,7 +806,7 @@ AUPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& pd) con
        if (which < descriptors.size()) {
                pd = descriptors[which];
                return 0;
-       } 
+       }
        return -1;
 }
 
@@ -870,7 +870,7 @@ AUPlugin::set_block_size (pframes_t nframes)
        }
 
        TRACE_API ("set MaximumFramesPerSlice in global scope to %u\n", numFrames);
-       if ((err = unit->SetProperty (kAudioUnitProperty_MaximumFramesPerSlice, kAudioUnitScope_Global, 
+       if ((err = unit->SetProperty (kAudioUnitProperty_MaximumFramesPerSlice, kAudioUnitScope_Global,
                                      0, &numFrames, sizeof (numFrames))) != noErr) {
                cerr << "cannot set max frames (err = " << err << ')' << endl;
                return -1;
@@ -1021,7 +1021,7 @@ AUPlugin::can_support_io_configuration (const ChanCount& in, ChanCount& out) con
                                plugcnt = 1;
                        }
                }
-               
+
                if (possible_in == -1) {
 
                        /* wildcard for input */
@@ -1043,8 +1043,8 @@ AUPlugin::can_support_io_configuration (const ChanCount& in, ChanCount& out) con
                                audio_out = possible_out;
                                plugcnt = 1;
                        }
-               }       
-                       
+               }
+
                if (possible_in == -2) {
 
                        if (possible_out == -1) {
@@ -1097,7 +1097,7 @@ AUPlugin::can_support_io_configuration (const ChanCount& in, ChanCount& out) con
                if (possible_in == audio_in) {
 
                        /* exact number of inputs ... must match obviously */
-                       
+
                        if (possible_out == -1) {
                                /* out must match in */
                                audio_out = audio_in;
@@ -1154,8 +1154,8 @@ AUPlugin::set_output_format (AudioStreamBasicDescription& fmt)
                free (buffers);
                buffers = 0;
        }
-       
-       buffers = (AudioBufferList *) malloc (offsetof(AudioBufferList, mBuffers) + 
+
+       buffers = (AudioBufferList *) malloc (offsetof(AudioBufferList, mBuffers) +
                                              fmt.mChannelsPerFrame * sizeof(::AudioBuffer));
 
        Glib::Mutex::Lock em (_session.engine().process_lock());
@@ -1189,7 +1189,7 @@ AUPlugin::set_stream_format (int scope, uint32_t cnt, AudioStreamBasicDescriptio
        return 0;
 }
 
-OSStatus 
+OSStatus
 AUPlugin::render_callback(AudioUnitRenderActionFlags*,
                          const AudioTimeStamp*,
                          UInt32,
@@ -1214,12 +1214,12 @@ AUPlugin::render_callback(AudioUnitRenderActionFlags*,
                        case MIDI_CMD_BENDER:
                        case MIDI_CMD_PGM_CHANGE:
                        case MIDI_CMD_CHANNEL_PRESSURE:
-                       { 
+                       {
                                const uint8_t* b = ev.buffer();
                                unit->MIDIEvent (b[0], b[1], b[2], ev.time());
                                break;
                        }
-                       
+
                        default:
                                /* plugins do not get other stuff by default */
                                break;
@@ -1256,7 +1256,7 @@ int
 AUPlugin::connect_and_run (BufferSet& bufs, ChanMapping in_map, ChanMapping out_map, pframes_t nframes, framecnt_t offset)
 {
        Plugin::connect_and_run (bufs, in_map, out_map, nframes, offset);
-       
+
        AudioUnitRenderActionFlags flags = 0;
        AudioTimeStamp ts;
        OSErr err;
@@ -1287,7 +1287,7 @@ AUPlugin::connect_and_run (BufferSet& bufs, ChanMapping in_map, ChanMapping out_
 
                current_maxbuf = 0;
                frames_processed += nframes;
-               
+
                uint32_t limit = min ((uint32_t) buffers->mNumberBuffers, maxbuf);
                uint32_t i;
 
@@ -1309,22 +1309,22 @@ AUPlugin::connect_and_run (BufferSet& bufs, ChanMapping in_map, ChanMapping out_
                }
 
                return 0;
-       } 
+       }
 
        cerr << name() << " render status " << err << endl;
        return -1;
 }
 
-OSStatus 
-AUPlugin::get_beat_and_tempo_callback (Float64* outCurrentBeat, 
+OSStatus
+AUPlugin::get_beat_and_tempo_callback (Float64* outCurrentBeat,
                                       Float64* outCurrentTempo)
 {
        TempoMap& tmap (_session.tempo_map());
 
        TRACE_API ("AU calls ardour beat&tempo callback\n");
 
-       /* more than 1 meter or more than 1 tempo means that a simplistic computation 
-          (and interpretation) of a beat position will be incorrect. So refuse to 
+       /* more than 1 meter or more than 1 tempo means that a simplistic computation
+          (and interpretation) of a beat position will be incorrect. So refuse to
           offer the value.
        */
 
@@ -1352,7 +1352,7 @@ AUPlugin::get_beat_and_tempo_callback (Float64* outCurrentBeat,
 
 }
 
-OSStatus 
+OSStatus
 AUPlugin::get_musical_time_location_callback (UInt32*   outDeltaSampleOffsetToNextBeat,
                                              Float32*  outTimeSig_Numerator,
                                              UInt32*   outTimeSig_Denominator,
@@ -1362,8 +1362,8 @@ AUPlugin::get_musical_time_location_callback (UInt32*   outDeltaSampleOffsetToNe
 
        TRACE_API ("AU calls ardour music time location callback\n");
 
-       /* more than 1 meter or more than 1 tempo means that a simplistic computation 
-          (and interpretation) of a beat position will be incorrect. So refuse to 
+       /* more than 1 meter or more than 1 tempo means that a simplistic computation
+          (and interpretation) of a beat position will be incorrect. So refuse to
           offer the value.
        */
 
@@ -1384,7 +1384,7 @@ AUPlugin::get_musical_time_location_callback (UInt32*   outDeltaSampleOffsetToNe
                                                                          metric.tempo().frames_per_beat(_session.frame_rate(), metric.meter())); // frames per beat
                }
        }
-       
+
        if (outTimeSig_Numerator) {
                *outTimeSig_Numerator = (UInt32) lrintf (metric.meter().beats_per_bar());
        }
@@ -1394,11 +1394,11 @@ AUPlugin::get_musical_time_location_callback (UInt32*   outDeltaSampleOffsetToNe
 
        if (outCurrentMeasureDownBeat) {
 
-               /* beat for the start of the bar. 
+               /* beat for the start of the bar.
                   1|1|0 -> 1
                   2|1|0 -> 1 + beats_per_bar
                   3|1|0 -> 1 + (2 * beats_per_bar)
-                  etc. 
+                  etc.
                */
 
                *outCurrentMeasureDownBeat = 1 + metric.meter().beats_per_bar() * (bbt.bars - 1);
@@ -1407,7 +1407,7 @@ AUPlugin::get_musical_time_location_callback (UInt32*   outDeltaSampleOffsetToNe
        return noErr;
 }
 
-OSStatus 
+OSStatus
 AUPlugin::get_transport_state_callback (Boolean*  outIsPlaying,
                                        Boolean*  outTransportStateChanged,
                                        Float64*  outCurrentSampleInTimeLine,
@@ -1455,14 +1455,14 @@ AUPlugin::get_transport_state_callback (Boolean*  outIsPlaying,
 
                                TempoMap& tmap (_session.tempo_map());
 
-                               /* more than 1 meter means that a simplistic computation (and interpretation) of 
+                               /* more than 1 meter means that a simplistic computation (and interpretation) of
                                   a beat position will be incorrect. so refuse to offer the value.
                                */
 
                                if (tmap.n_meters() > 1) {
                                        return kAudioUnitErr_CannotDoInCurrentContext;
                                }
-                               
+
                                Timecode::BBT_Time bbt;
 
                                if (outCycleStartBeat) {
@@ -1473,19 +1473,19 @@ AUPlugin::get_transport_state_callback (Boolean*  outIsPlaying,
                                        beat = metric.meter().beats_per_bar() * bbt.bars;
                                        beat += bbt.beats;
                                        beat += bbt.ticks / BBT_Time::ticks_per_beat;
-                                       
+
                                        *outCycleStartBeat = beat;
                                }
 
                                if (outCycleEndBeat) {
                                        TempoMetric metric = tmap.metric_at (loc->end() + current_offset);
                                        _session.tempo_map().bbt_time_with_metric (loc->end(), bbt, metric);
-                                       
+
                                        float beat;
                                        beat = metric.meter().beats_per_bar() * bbt.bars;
                                        beat += bbt.beats;
                                        beat += bbt.ticks / BBT_Time::ticks_per_beat;
-                                       
+
                                        *outCycleEndBeat = beat;
                                }
                        }
@@ -1567,7 +1567,7 @@ AUPlugin::add_state (XMLNode* root)
        }
 
        // Convert the property list into XML data.
-       
+
        xmlData = CFPropertyListCreateXMLData( kCFAllocatorDefault, propertyList);
 
        if (!xmlData) {
@@ -1611,7 +1611,7 @@ AUPlugin::set_state(const XMLNode& node, int version)
                error << _("Bad node sent to AUPlugin::set_state") << endmsg;
                return -1;
        }
-       
+
        if (node.children().empty()) {
                return -1;
        }
@@ -1632,22 +1632,22 @@ AUPlugin::set_state(const XMLNode& node, int version)
                                                        &errorString);
 
        CFRelease (xmlData);
-       
+
        if (propertyList) {
                TRACE_API ("set preset\n");
                if (unit->SetAUPreset (propertyList) == noErr) {
                        ret = 0;
-                       
+
                        /* tell the world */
 
                        AudioUnitParameter changedUnit;
                        changedUnit.mAudioUnit = unit->AU();
                        changedUnit.mParameterID = kAUParameterListener_AnyParameter;
                        AUParameterListenerNotify (NULL, NULL, &changedUnit);
-               } 
+               }
                CFRelease (propertyList);
        }
-       
+
        Plugin::set_state (node, version);
        return ret;
 #else
@@ -1664,7 +1664,7 @@ bool
 AUPlugin::load_preset (PluginRecord r)
 {
        Plugin::load_preset (r);
-       
+
 #ifdef AU_STATE_SUPPORT
        bool ret = false;
        CFPropertyListRef propertyList;
@@ -1675,14 +1675,14 @@ AUPlugin::load_preset (PluginRecord r)
        /* look first in "user" presets */
 
        if ((ux = user_preset_map.find (preset_label)) != user_preset_map.end()) {
-       
+
                if ((propertyList = load_property_list (ux->second)) != 0) {
                        TRACE_API ("set preset from user presets\n");
                        if (unit->SetAUPreset (propertyList) == noErr) {
                                ret = true;
 
                                /* tell the world */
-                               
+
                                AudioUnitParameter changedUnit;
                                changedUnit.mAudioUnit = unit->AU();
                                changedUnit.mParameterID = kAUParameterListener_AnyParameter;
@@ -1692,12 +1692,12 @@ AUPlugin::load_preset (PluginRecord r)
                }
 
        } else if ((fx = factory_preset_map.find (preset_label)) != factory_preset_map.end()) {
-               
+
                AUPreset preset;
-               
+
                preset.presetNumber = fx->second;
                preset.presetName = CFStringCreateWithCString (kCFAllocatorDefault, fx->first.c_str(), kCFStringEncodingUTF8);
-               
+
                TRACE_API ("set preset from factory presets\n");
 
                if (unit->SetPresentPreset (preset) == 0) {
@@ -1711,7 +1711,7 @@ AUPlugin::load_preset (PluginRecord r)
                        AUParameterListenerNotify (NULL, NULL, &changedUnit);
                }
        }
-               
+
        return ret;
 #else
        if (!seen_loading_message) {
@@ -1735,7 +1735,7 @@ AUPlugin::save_preset (string preset_name)
 
        std::string m = maker();
        std::string n = name();
-       
+
        strip_whitespace_edges (m);
        strip_whitespace_edges (n);
 
@@ -1745,7 +1745,7 @@ AUPlugin::save_preset (string preset_name)
        v.push_back ("Presets");
        v.push_back (m);
        v.push_back (n);
-       
+
        user_preset_path = Glib::build_filename (v);
 
        if (g_mkdir_with_parents (user_preset_path.c_str(), 0775) < 0) {
@@ -1761,11 +1761,11 @@ AUPlugin::save_preset (string preset_name)
        // add the actual preset name */
 
        v.push_back (preset_name + preset_suffix);
-               
+
        // rebuild
 
        user_preset_path = Glib::build_filename (v);
-       
+
        set_preset_name_in_plist (propertyList, preset_name);
 
        if (save_property_list (propertyList, user_preset_path)) {
@@ -1789,7 +1789,7 @@ AUPlugin::save_preset (string preset_name)
 
 //-----------------------------------------------------------------------------
 // this is just a little helper function used by GetAUComponentDescriptionFromPresetFile()
-static SInt32 
+static SInt32
 GetDictionarySInt32Value(CFDictionaryRef inAUStateDictionary, CFStringRef inDictionaryKey, Boolean * outSuccess)
 {
        CFNumberRef cfNumber;
@@ -1817,7 +1817,7 @@ GetDictionarySInt32Value(CFDictionaryRef inAUStateDictionary, CFStringRef inDict
                return 0;
 }
 
-static OSStatus 
+static OSStatus
 GetAUComponentDescriptionFromStateData(CFPropertyListRef inAUStateData, ComponentDescription * outComponentDescription)
 {
        CFDictionaryRef auStateDictionary;
@@ -1827,7 +1827,7 @@ GetAUComponentDescriptionFromStateData(CFPropertyListRef inAUStateData, Componen
 
        if ( (inAUStateData == NULL) || (outComponentDescription == NULL) )
                return paramErr;
-       
+
        // the property list for AU state data must be of the dictionary type
        if (CFGetTypeID(inAUStateData) != CFDictionaryGetTypeID()) {
                return kAudioUnitErr_InvalidPropertyValue;
@@ -1865,7 +1865,7 @@ static bool au_preset_filter (const string& str, void* arg)
        /* Not a dotfile, has a prefix before a period, suffix is aupreset */
 
        bool ret;
-       
+
        ret = (str[0] != '.' && str.length() > 9 && str.find (preset_suffix) == (str.length() - preset_suffix.length()));
 
        if (ret && arg) {
@@ -1890,32 +1890,32 @@ static bool au_preset_filter (const string& str, void* arg)
                        match = m;
                        match += '/';
                        match += n;
-                       
+
                        ret = str.find (match) != string::npos;
                }
        }
-       
+
        return ret;
 }
 
-bool 
+bool
 check_and_get_preset_name (Component component, const string& pathstr, string& preset_name)
 {
        OSStatus status;
        CFPropertyListRef plist;
        ComponentDescription presetDesc;
        bool ret = false;
-               
+
        plist = load_property_list (pathstr);
 
        if (!plist) {
                return ret;
        }
-       
+
        // get the ComponentDescription from the AU preset file
-       
+
        status = GetAUComponentDescriptionFromStateData(plist, &presetDesc);
-       
+
        if (status == noErr) {
                if (ComponentAndDescriptionMatch_Loosely(component, &presetDesc)) {
 
@@ -1938,7 +1938,7 @@ check_and_get_preset_name (Component component, const string& pathstr, string& p
                                        }
                                }
                        }
-               } 
+               }
        }
 
        CFRelease (plist);
@@ -1950,7 +1950,7 @@ std::string
 AUPlugin::current_preset() const
 {
        string preset_name;
-       
+
 #ifdef AU_STATE_SUPPORT
        CFPropertyListRef propertyList;
 
@@ -1973,7 +1973,7 @@ AUPlugin::find_presets ()
        user_preset_map.clear ();
 
        preset_files = scanner (preset_search_path, au_preset_filter, this, true, true, -1, true);
-       
+
        if (!preset_files) {
                return;
        }
@@ -1995,7 +1995,7 @@ AUPlugin::find_presets ()
 
                if (check_and_get_preset_name (get_comp()->Comp(), path, preset_name)) {
                        user_preset_map[preset_name] = path;
-               } 
+               }
 
                delete *x;
        }
@@ -2046,13 +2046,13 @@ AUPluginInfo::load (Session& session)
 
                TRACE_API ("load AU as a component\n");
                boost::shared_ptr<CAComponent> comp (new CAComponent(*descriptor));
-               
+
                if (!comp->IsValid()) {
                        error << ("AudioUnit: not a valid Component") << endmsg;
                } else {
                        plugin.reset (new AUPlugin (session.engine(), session, comp));
                }
-               
+
                AUPluginInfo *aup = new AUPluginInfo (*this);
                plugin->set_info (PluginInfoPtr (aup));
                boost::dynamic_pointer_cast<AUPlugin> (plugin)->set_fixed_size_buffers (aup->creator == "Universal Audio");
@@ -2080,7 +2080,7 @@ AUPluginInfo::discover ()
        }
 
        PluginInfoList* plugs = new PluginInfoList;
-       
+
        discover_fx (*plugs);
        discover_music (*plugs);
        discover_generators (*plugs);
@@ -2152,7 +2152,7 @@ AUPluginInfo::discover_by_description (PluginInfoList& plugs, CAComponentDescrip
                CAComponentDescription temp;
                GetComponentInfo (comp, &temp, NULL, NULL, NULL);
 
-               AUPluginInfoPtr info (new AUPluginInfo 
+               AUPluginInfoPtr info (new AUPluginInfo
                                      (boost::shared_ptr<CAComponentDescription> (new CAComponentDescription(temp))));
 
                /* although apple designed the subtype field to be a "category" indicator,
@@ -2160,7 +2160,7 @@ AUPluginInfo::discover_by_description (PluginInfoList& plugs, CAComponentDescrip
                   there are no categories for AudioUnits. However, to keep the plugins
                   showing up under "categories", we'll use the "type" as a high level
                   selector.
-                  
+
                   NOTE: no panners, format converters or i/o AU's for our purposes
                 */
 
@@ -2194,7 +2194,7 @@ AUPluginInfo::discover_by_description (PluginInfoList& plugs, CAComponentDescrip
                }
 
                AUPluginInfo::get_names (temp, info->name, info->creator);
-               
+
                info->type = ARDOUR::AudioUnit;
                info->unique_id = stringify_descriptor (*info->descriptor);
 
@@ -2206,7 +2206,7 @@ AUPluginInfo::discover_by_description (PluginInfoList& plugs, CAComponentDescrip
                if (cacomp.GetResourceVersion (info->version) != noErr) {
                        info->version = 0;
                }
-               
+
                if (cached_io_configuration (info->unique_id, info->version, cacomp, info->cache, info->name)) {
 
                        /* here we have to map apple's wildcard system to a simple pair
@@ -2225,16 +2225,16 @@ AUPluginInfo::discover_by_description (PluginInfoList& plugs, CAComponentDescrip
                } else {
                        error << string_compose (_("Cannot get I/O configuration info for AU %1"), info->name) << endmsg;
                }
-               
+
                comp = FindNextComponent (comp, &desc);
        }
 }
 
 bool
-AUPluginInfo::cached_io_configuration (const std::string& unique_id, 
+AUPluginInfo::cached_io_configuration (const std::string& unique_id,
                                       UInt32 version,
-                                      CAComponent& comp, 
-                                      AUPluginCachedInfo& cinfo, 
+                                      CAComponent& comp,
+                                      AUPluginCachedInfo& cinfo,
                                       const std::string& name)
 {
        std::string id;
@@ -2261,9 +2261,9 @@ AUPluginInfo::cached_io_configuration (const std::string& unique_id,
        AUChannelInfo* channel_info;
        UInt32 cnt;
        int ret;
-       
+
        ARDOUR::BootMessage (string_compose (_("Checking AudioUnit: %1"), name));
-       
+
        try {
 
                if (CAAudioUnit::Open (comp, unit) != noErr) {
@@ -2277,7 +2277,7 @@ AUPluginInfo::cached_io_configuration (const std::string& unique_id,
                return false;
 
        }
-               
+
        TRACE_API ("get AU channel info\n");
        if ((ret = unit.GetChannelInfo (&channel_info, cnt)) < 0) {
                return false;
@@ -2289,9 +2289,9 @@ AUPluginInfo::cached_io_configuration (const std::string& unique_id,
                cinfo.io_configs.push_back (pair<int,int> (-1, -1));
 
        } else {
-               
+
                /* store each configuration */
-               
+
                for (uint32_t n = 0; n < cnt; ++n) {
                        cinfo.io_configs.push_back (pair<int,int> (channel_info[n].inChannels,
                                                                   channel_info[n].outChannels));
@@ -2321,7 +2321,7 @@ AUPluginInfo::save_cached_info ()
 
        node = new XMLNode (X_("AudioUnitPluginCache"));
        node->add_property( "version", AU_CACHE_VERSION );
-       
+
        for (map<string,AUPluginCachedInfo>::iterator i = cached_info.begin(); i != cached_info.end(); ++i) {
                XMLNode* parent = new XMLNode (X_("plugin"));
                parent->add_property ("id", i->first);
@@ -2357,7 +2357,7 @@ AUPluginInfo::load_cached_info ()
 {
        Glib::ustring path = au_cache_path ();
        XMLTree tree;
-       
+
        if (!Glib::file_test (path, Glib::FILE_TEST_EXISTS)) {
                return 0;
        }
@@ -2366,28 +2366,28 @@ AUPluginInfo::load_cached_info ()
                error << "au_cache is not a valid XML file.  AU plugins will be re-scanned" << endmsg;
                return -1;
        }
-       
+
        const XMLNode* root (tree.root());
 
        if (root->name() != X_("AudioUnitPluginCache")) {
                return -1;
        }
-       
+
        //initial version has incorrectly stored i/o info, and/or garbage chars.
        const XMLProperty* version = root->property(X_("version"));
        if (! ((version != NULL) && (version->value() == X_(AU_CACHE_VERSION)))) {
                error << "au_cache is not correct version.  AU plugins will be re-scanned" << endmsg;
                return -1;
        }
-       
+
        cached_info.clear ();
 
        const XMLNodeList children = root->children();
 
        for (XMLNodeConstIterator iter = children.begin(); iter != children.end(); ++iter) {
-               
+
                const XMLNode* child = *iter;
-               
+
                if (child->name() == X_("plugin")) {
 
                        const XMLNode* gchild;
@@ -2397,7 +2397,7 @@ AUPluginInfo::load_cached_info ()
                        if (!prop) {
                                continue;
                        }
-                       
+
                        string id = prop->value();
                        string fixed;
                        string version;
@@ -2415,7 +2415,7 @@ AUPluginInfo::load_cached_info ()
                        if (fixed.empty()) {
                                error << string_compose (_("Your AudioUnit configuration cache contains an AU plugin whose ID cannot be understood - ignored (%1)"), id) << endmsg;
                                continue;
-                       } 
+                       }
 
                        id = fixed;
                        id += version;
@@ -2437,7 +2437,7 @@ AUPluginInfo::load_cached_info ()
                                            ((oprop = gchild->property (X_("out"))) != 0)) {
                                                in = atoi (iprop->value());
                                                out = atoi (oprop->value());
-                                               
+
                                                cinfo.io_configs.push_back (pair<int,int> (in, out));
                                        }
                                }
@@ -2473,16 +2473,16 @@ AUPluginInfo::get_names (CAComponentDescription& comp_desc, std::string& name, s
                        DisposeHandle(nameHandle);
                }
        }
-    
+
        // if Marc-style fails, do the original way
        if (itemName == NULL) {
                CFStringRef compTypeString = UTCreateStringForOSType(comp_desc.componentType);
                CFStringRef compSubTypeString = UTCreateStringForOSType(comp_desc.componentSubType);
                CFStringRef compManufacturerString = UTCreateStringForOSType(comp_desc.componentManufacturer);
-    
-               itemName = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("%@ - %@ - %@"), 
+
+               itemName = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("%@ - %@ - %@"),
                        compTypeString, compManufacturerString, compSubTypeString);
-    
+
                if (compTypeString != NULL)
                        CFRelease(compTypeString);
                if (compSubTypeString != NULL)
@@ -2490,7 +2490,7 @@ AUPluginInfo::get_names (CAComponentDescription& comp_desc, std::string& name, s
                if (compManufacturerString != NULL)
                        CFRelease(compManufacturerString);
        }
-       
+
        string str = CFStringRefToStdString(itemName);
        string::size_type colon = str.find (':');
 
index d6d3b45d18260d847864bd09df24144b5f402794..64f4481c6cea13b651c52ae34f0bd260b27f736f 100644 (file)
@@ -171,7 +171,7 @@ AudioEngine::set_jack_callbacks ()
         } else {
                 jack_on_shutdown (_priv_jack, halted, this);
         }
-       
+
         jack_set_thread_init_callback (_priv_jack, _thread_init_callback, this);
         jack_set_process_thread (_priv_jack, _process_thread, this);
         jack_set_sample_rate_callback (_priv_jack, _sample_rate_callback, this);
@@ -187,7 +187,7 @@ AudioEngine::set_jack_callbacks ()
                 jack_set_timebase_callback (_priv_jack, 0, _jack_timebase_callback, this);
         }
 
-#ifdef HAVE_JACK_SESSION 
+#ifdef HAVE_JACK_SESSION
         if( jack_set_session_callback)
                 jack_set_session_callback (_priv_jack, _session_callback, this);
 #endif
@@ -231,7 +231,7 @@ AudioEngine::start ()
                  * this is reliable, but not clean.
                  */
 
-                if (!jack_port_type_get_buffer_size) { 
+                if (!jack_port_type_get_buffer_size) {
                         jack_bufsize_callback (blocksize);
                 }
 
@@ -426,7 +426,7 @@ AudioEngine::_connect_callback (jack_port_id_t id_a, jack_port_id_t id_b, int co
                }
                ++i;
        }
-       
+
        ae->PortConnectedOrDisconnected (port_a, port_b, conn == 0 ? false : true); /* EMIT SIGNAL */
 }
 
@@ -449,7 +449,7 @@ AudioEngine::split_cycle (pframes_t offset)
 void*
 AudioEngine::process_thread ()
 {
-        /* JACK doesn't do this for us when we use the wait API 
+        /* JACK doesn't do this for us when we use the wait API
          */
 
         _thread_init_callback (0);
@@ -528,7 +528,7 @@ AudioEngine::process_callback (pframes_t nframes)
 
 
        if (_freewheeling && !Freewheel.empty()) {
-               /* emit the Freewheel signal and stop freewheeling in the event of trouble 
+               /* emit the Freewheel signal and stop freewheeling in the event of trouble
                 */
                 boost::optional<int> r = Freewheel (nframes);
                if (r.get_value_or (0)) {
@@ -656,25 +656,25 @@ AudioEngine::jack_bufsize_callback (pframes_t nframes)
         } else {
 
                 /* Old version of JACK.
-                   
+
                    These crude guesses, see below where we try to get the right answers.
-                   
+
                    Note that our guess for MIDI deliberatey tries to overestimate
                    by a little. It would be nicer if we could get the actual
-                   size from a port, but we have to use this estimate in the 
+                   size from a port, but we have to use this estimate in the
                    event that there are no MIDI ports currently. If there are
                    the value will be adjusted below.
                 */
-                
+
                 _raw_buffer_sizes[DataType::AUDIO] = nframes * sizeof (Sample);
                 _raw_buffer_sizes[DataType::MIDI] = nframes * 4 - (nframes/2);
         }
 
-       { 
+       {
                Glib::Mutex::Lock lm (_process_lock);
-               
+
                boost::shared_ptr<Ports> p = ports.reader();
-               
+
                for (Ports::iterator i = p->begin(); i != p->end(); ++i) {
                        (*i)->reset();
                }
@@ -725,25 +725,25 @@ void
 AudioEngine::set_session (Session *s)
 {
        Glib::Mutex::Lock pl (_process_lock);
-       
+
        SessionHandlePtr::set_session (s);
 
        if (_session) {
 
                start_metering_thread ();
-               
+
                pframes_t blocksize = jack_get_buffer_size (_jack);
-               
+
                /* page in as much of the session process code as we
                   can before we really start running.
                */
-               
+
                boost::shared_ptr<Ports> p = ports.reader();
-               
+
                for (Ports::iterator i = p->begin(); i != p->end(); ++i) {
                        (*i)->cycle_start (blocksize);
                }
-               
+
                _session->process (blocksize);
                _session->process (blocksize);
                _session->process (blocksize);
@@ -752,12 +752,12 @@ AudioEngine::set_session (Session *s)
                _session->process (blocksize);
                _session->process (blocksize);
                _session->process (blocksize);
-               
+
                for (Ports::iterator i = p->begin(); i != p->end(); ++i) {
                        (*i)->cycle_end (blocksize);
                }
        }
-} 
+}
 
 void
 AudioEngine::remove_session ()
@@ -1047,17 +1047,17 @@ void
 AudioEngine::halted_info (jack_status_t code, const char* reason, void *arg)
 {
         /* called from jack shutdown handler  */
-        
+
         AudioEngine* ae = static_cast<AudioEngine *> (arg);
         bool was_running = ae->_running;
-        
+
         ae->stop_metering_thread ();
-        
+
         ae->_running = false;
         ae->_buffer_size = 0;
         ae->_frame_rate = 0;
         ae->_jack = 0;
-        
+
         if (was_running) {
 #ifdef HAVE_JACK_ON_INFO_SHUTDOWN
                 switch (code) {
@@ -1128,7 +1128,7 @@ ChanCount
 AudioEngine::n_physical (unsigned long flags) const
 {
        ChanCount c;
-       
+
        GET_PRIVATE_JACK_POINTER_RET (_jack, c);
 
        const char ** ports = jack_get_ports (_priv_jack, NULL, NULL, JackPortIsPhysical | flags);
@@ -1249,7 +1249,7 @@ AudioEngine::freewheel (bool onoff)
 
        if (onoff != _freewheeling) {
                 return jack_set_freewheel (_priv_jack, onoff);
-                
+
        } else {
                 /* already doing what has been asked for */
                 return 0;
@@ -1262,7 +1262,7 @@ AudioEngine::remove_all_ports ()
        /* make sure that JACK callbacks that will be invoked as we cleanup
         * ports know that they have nothing to do.
         */
-        
+
        port_remove_in_progress = true;
 
        /* process lock MUST be held by caller
@@ -1394,7 +1394,7 @@ AudioEngine::reconnect_to_jack ()
        GET_PRIVATE_JACK_POINTER_RET (_jack,-1);
 
        MIDI::Manager::instance()->reestablish (_priv_jack);
-       
+
        if (_session) {
                _session->reset_jack_connection (_priv_jack);
                 jack_bufsize_callback (jack_get_buffer_size (_priv_jack));
@@ -1402,7 +1402,7 @@ AudioEngine::reconnect_to_jack ()
        }
 
        last_monitor_check = 0;
-       
+
         set_jack_callbacks ();
 
        if (jack_activate (_priv_jack) == 0) {
@@ -1435,7 +1435,7 @@ AudioEngine::request_buffer_size (pframes_t nframes)
        if (nframes == jack_get_buffer_size (_priv_jack)) {
                 return 0;
        }
-       
+
        return jack_set_buffer_size (_priv_jack, nframes);
 }
 
@@ -1507,10 +1507,10 @@ AudioEngine::create_process_thread (boost::function<void()> f, pthread_t* thread
         GET_PRIVATE_JACK_POINTER_RET (_jack, 0);
         ThreadData* td = new ThreadData (this, f, stacksize);
 
-        if (jack_client_create_thread (_priv_jack, thread, jack_client_real_time_priority (_priv_jack), 
+        if (jack_client_create_thread (_priv_jack, thread, jack_client_real_time_priority (_priv_jack),
                                        jack_is_realtime (_priv_jack), _start_process_thread, td)) {
                 return -1;
-        } 
+        }
 
         return 0;
 }
@@ -1527,7 +1527,7 @@ AudioEngine::_start_process_thread (void* arg)
         return 0;
 }
 
-bool 
+bool
 AudioEngine::port_is_physical (const std::string& portname) const
 {
         GET_PRIVATE_JACK_POINTER_RET(_jack, false);
@@ -1537,11 +1537,11 @@ AudioEngine::port_is_physical (const std::string& portname) const
         if (!port) {
                 return false;
         }
-        
+
         return jack_port_flags (port) & JackPortIsPhysical;
 }
 
-void 
+void
 AudioEngine::ensure_monitor_input (const std::string& portname, bool yn) const
 {
         GET_PRIVATE_JACK_POINTER(_jack);
index 63f7b55016455d7a02a9a862e2b65c81b8c49c16..d3d3a4f4a77e85a02afc9f9d27ad2f5562450e1b 100644 (file)
@@ -129,7 +129,7 @@ AudioFileSource::AudioFileSource (Session& s, const XMLNode& node, bool must_exi
        if (set_state (node, Stateful::loading_state_version)) {
                throw failed_constructor ();
        }
-       
+
        if (init (_path, must_exist)) {
                throw failed_constructor ();
        }
@@ -246,7 +246,7 @@ AudioFileSource::get_soundfile_info (string path, SoundFileInfo& _info, string&
        if (SndFileSource::get_soundfile_info (path, _info, error_msg) != 0) {
                return true;
        }
-        
+
 #ifdef HAVE_COREAUDIO
        if (CoreAudioSource::get_soundfile_info (path, _info, error_msg) == 0) {
                return true;
index a68b7b1f650fe58389b741686ecd563792ffdcdf..0a7e3f122ce21a335c0b034f5b052a71825a37b8 100644 (file)
@@ -103,7 +103,7 @@ AudioRegion::register_properties ()
        , _fade_in_active (Properties::fade_in_active, true) \
        , _fade_out_active (Properties::fade_out_active, true) \
        , _scale_amplitude (Properties::scale_amplitude, 1.0)
-       
+
 #define AUDIOREGION_COPY_STATE(other) \
        _envelope_active (Properties::envelope_active, other->_envelope_active) \
        , _default_fade_in (Properties::default_fade_in, other->_default_fade_in) \
@@ -259,7 +259,7 @@ AudioRegion::post_set (const PropertyChange& /*ignored*/)
        if (_left_of_split) {
                if (_fade_in->back()->when >= _length) {
                        set_default_fade_in ();
-               } 
+               }
                set_default_fade_out ();
                _left_of_split = false;
        }
@@ -267,7 +267,7 @@ AudioRegion::post_set (const PropertyChange& /*ignored*/)
        if (_right_of_split) {
                if (_fade_out->back()->when >= _length) {
                        set_default_fade_out ();
-               } 
+               }
 
                set_default_fade_in ();
                _right_of_split = false;
@@ -372,7 +372,7 @@ AudioRegion::master_read_at (Sample *buf, Sample *mixdown_buffer, float *gain_bu
 framecnt_t
 AudioRegion::_read_at (const SourceList& /*srcs*/, framecnt_t limit,
                       Sample *buf, Sample *mixdown_buffer, float *gain_buffer,
-                      framepos_t position, 
+                      framepos_t position,
                       framecnt_t cnt,
                       uint32_t chan_n,
                       framecnt_t /*read_frames*/,
@@ -442,7 +442,7 @@ AudioRegion::_read_at (const SourceList& /*srcs*/, framecnt_t limit,
                if (Config->get_replicate_missing_region_channels()) {
                        /* track is N-channel, this region has less channels, so use a relevant channel
                         */
-                       
+
                        uint32_t channel = n_channels() % chan_n;
                        boost::shared_ptr<AudioSource> src = audio_source (channel);
 
@@ -580,10 +580,10 @@ AudioRegion::state ()
        child = node.add_child ("Envelope");
 
        bool default_env = false;
-       
+
        // If there are only two points, the points are in the start of the region and the end of the region
        // so, if they are both at 1.0f, that means the default region.
-       
+
        if (_envelope->size() == 2 &&
            _envelope->front()->value == 1.0f &&
            _envelope->back()->value==1.0f) {
@@ -591,7 +591,7 @@ AudioRegion::state ()
                        default_env = true;
                }
        }
-       
+
        if (default_env) {
                child->add_property ("default", "yes");
        } else {
@@ -623,7 +623,7 @@ AudioRegion::_set_state (const XMLNode& node, int version, PropertyChange& what_
        const XMLNodeList& nlist = node.children();
        const XMLProperty *prop;
        LocaleGuard lg (X_("POSIX"));
-       boost::shared_ptr<Playlist> the_playlist (_playlist.lock());    
+       boost::shared_ptr<Playlist> the_playlist (_playlist.lock());
 
        suspend_property_changes ();
 
@@ -752,7 +752,7 @@ AudioRegion::set_fade_in (boost::shared_ptr<AutomationList> f)
        _fade_in->freeze ();
        *_fade_in = *f;
        _fade_in->thaw ();
-       
+
        send_change (PropertyChange (Properties::fade_in));
 }
 
@@ -985,7 +985,7 @@ AudioRegion::recompute_at_end ()
        _envelope->truncate_end (_length);
        _envelope->set_max_xval (_length);
        _envelope->thaw ();
-       
+
        suspend_property_changes();
 
        if (_left_of_split) {
@@ -1000,7 +1000,7 @@ AudioRegion::recompute_at_end ()
                _fade_in->extend_to (_length);
                send_change (PropertyChange (Properties::fade_in));
        }
-       
+
        resume_property_changes();
 }
 
@@ -1010,7 +1010,7 @@ AudioRegion::recompute_at_start ()
        /* as above, but the shift was from the front */
 
        _envelope->truncate_start (_length);
-       
+
        suspend_property_changes();
 
        if (_right_of_split) {
@@ -1025,7 +1025,7 @@ AudioRegion::recompute_at_start ()
                _fade_out->extend_to (_length);
                send_change (PropertyChange (Properties::fade_out));
        }
-       
+
        resume_property_changes();
 }
 
@@ -1062,7 +1062,7 @@ AudioRegion::separate_by_channel (Session& /*session*/, vector<boost::shared_ptr
                 */
 
                PropertyList plist;
-               
+
                plist.add (Properties::start, _start.val());
                plist.add (Properties::length, _length.val());
                plist.add (Properties::name, new_name);
@@ -1179,7 +1179,7 @@ AudioRegion::maximum_amplitude (Progress* p) const
 
        framecnt_t const blocksize = 64 * 1024;
        Sample buf[blocksize];
-       
+
        while (fpos < fend) {
 
                uint32_t n;
@@ -1331,17 +1331,17 @@ AudioRegion::audio_source (uint32_t n) const
        return boost::dynamic_pointer_cast<AudioSource>(source(n));
 }
 
-int 
+int
 AudioRegion::adjust_transients (frameoffset_t delta)
 {
        for (AnalysisFeatureList::iterator x = _transients.begin(); x != _transients.end(); ++x) {
                (*x) = (*x) + delta;
        }
-       
+
        send_change (PropertyChange (Properties::valid_transients));
-       
-       return 0;  
-} 
+
+       return 0;
+}
 
 int
 AudioRegion::update_transient (framepos_t old_position, framepos_t new_position)
@@ -1350,11 +1350,11 @@ AudioRegion::update_transient (framepos_t old_position, framepos_t new_position)
                if ((*x) == old_position) {
                        (*x) = new_position;
                        send_change (PropertyChange (Properties::valid_transients));
-                       
+
                        break;
                }
        }
-       
+
        return 0;
 }
 
@@ -1363,7 +1363,7 @@ AudioRegion::add_transient (framepos_t where)
 {
        _transients.push_back(where);
        _valid_transients = true;
-       
+
        send_change (PropertyChange (Properties::valid_transients));
 }
 
@@ -1372,7 +1372,7 @@ AudioRegion::remove_transient (framepos_t where)
 {
        _transients.remove(where);
        _valid_transients = true;
-       
+
        send_change (PropertyChange (Properties::valid_transients));
 }
 
@@ -1382,9 +1382,9 @@ AudioRegion::set_transients (AnalysisFeatureList& results)
        _transients.clear();
        _transients = results;
        _valid_transients = true;
-       
+
        send_change (PropertyChange (Properties::valid_transients));
-       
+
        return 0;
 }
 
index 037352e9fd61a4f10061fdf47b9711eed2b8015a..aeb5f12baecd5d2412d5ddc099054aa673af9552 100644 (file)
@@ -446,7 +446,7 @@ AudioSource::read_peaks_with_fpp (PeakData *peaks, framecnt_t npeaks, framepos_t
                */
 
                const framecnt_t chunksize = (framecnt_t) min (expected_peaks, 65536.0);
-               
+
                staging = new PeakData[chunksize];
 
                /* compute the rounded up frame position  */
@@ -582,14 +582,14 @@ AudioSource::read_peaks_with_fpp (PeakData *peaks, framecnt_t npeaks, framepos_t
                                            adjusting zero_fill and npeaks and then breaking out of
                                            this loop early
                                        */
-                                        
+
                                         memset (raw_staging, 0, sizeof (Sample) * chunksize);
-                                        
+
                                 } else {
-                                        
+
                                         to_read = min (chunksize, (_length - current_frame));
-                                        
-                                        
+
+
                                         if ((frames_read = read_unlocked (raw_staging, current_frame, to_read)) == 0) {
                                                 error << string_compose(_("AudioSource[%1]: peak read - cannot read %2 samples at offset %3 of %4 (%5)"),
                                                                         _name, to_read, current_frame, _length, strerror (errno))
@@ -597,7 +597,7 @@ AudioSource::read_peaks_with_fpp (PeakData *peaks, framecnt_t npeaks, framepos_t
                                                 goto out;
                                         }
                                 }
-                                
+
                                i = 0;
                        }
 
@@ -956,7 +956,7 @@ AudioSource::dec_read_data_count (framecnt_t cnt)
 
         if (val < _read_data_count) {
                 _read_data_count -= val;
-        } else { 
+        } else {
                 _read_data_count = 0;
         }
 }
@@ -975,28 +975,28 @@ void
 AudioSource::allocate_working_buffers (framecnt_t framerate)
 {
        Glib::Mutex::Lock lm (_level_buffer_lock);
-       
-       
+
+
        /* Note: we don't need any buffers allocated until
           a level 1 audiosource is created, at which
           time we'll call ::ensure_buffers_for_level()
           with the right value and do the right thing.
        */
-       
+
        if (!_mixdown_buffers.empty()) {
                ensure_buffers_for_level_locked ( _mixdown_buffers.size(), framerate);
        }
 }
 
 void
-AudioSource::ensure_buffers_for_level (uint32_t level, framecnt_t frame_rate) 
+AudioSource::ensure_buffers_for_level (uint32_t level, framecnt_t frame_rate)
 {
        Glib::Mutex::Lock lm (_level_buffer_lock);
        ensure_buffers_for_level_locked (level, frame_rate);
 }
 
 void
-AudioSource::ensure_buffers_for_level_locked (uint32_t level, framecnt_t frame_rate) 
+AudioSource::ensure_buffers_for_level_locked (uint32_t level, framecnt_t frame_rate)
 {
        framecnt_t nframes = (framecnt_t) floor (Config->get_audio_playback_buffer_seconds() * frame_rate);
 
index 1874e3da7a2d856ecd10dff6f23eb4102f3414b4..bdcd232106eb99b87190c6d95219b5117babad8b 100644 (file)
@@ -140,7 +140,7 @@ Auditioner::audition_current_playlist ()
 
        /* force a panner reset now that we have all channels */
 
-       _main_outs->panner_shell()->configure_io (ChanCount (DataType::AUDIO, _diskstream->n_channels().n_audio()), 
+       _main_outs->panner_shell()->configure_io (ChanCount (DataType::AUDIO, _diskstream->n_channels().n_audio()),
                                                   ChanCount (DataType::AUDIO, n_outputs().n_audio()));
 
        g_atomic_int_set (&_auditioning, 1);
@@ -182,7 +182,7 @@ Auditioner::audition_region (boost::shared_ptr<Region> region)
                Glib::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
 
                if (configure_processors (&ps)) {
-                       error << string_compose (_("Cannot setup auditioner processing flow for %1 channels"), 
+                       error << string_compose (_("Cannot setup auditioner processing flow for %1 channels"),
                                                 _diskstream->n_channels()) << endmsg;
                        return;
                }
@@ -276,7 +276,7 @@ Auditioner::output_changed (IOChange change, void* /*src*/)
        }
 }
 
-ChanCount 
+ChanCount
 Auditioner::input_streams () const
 {
         /* auditioner never has any inputs - its channel configuration
@@ -285,7 +285,7 @@ Auditioner::input_streams () const
 
         if (audio_diskstream()) {
                 return audio_diskstream()->n_channels();
-        } 
+        }
 
         return ChanCount ();
 }
index 392938fde2fa9ee527ddf1905f795fd811976287..661b1532446a8d1f775de504b62e4d6aec3f7c5e 100644 (file)
@@ -156,7 +156,7 @@ Automatable::add_control(boost::shared_ptr<Evoral::Control> ac)
 
        boost::shared_ptr<AutomationList> al = boost::dynamic_pointer_cast<AutomationList> (ac->list ());
        assert (al);
-       
+
        al->automation_state_changed.connect_same_thread (
                _list_connections, boost::bind (&Automatable::automation_list_automation_state_changed, this, ac->parameter(), _1)
                );
@@ -256,7 +256,7 @@ Automatable::set_automation_xml_state (const XMLNode& node, Evoral::Parameter le
                         }
 
 
-                       
+
                        if (!id_prop) {
                                warning << "AutomationList node without automation-id property, "
                                        << "using default: " << EventTypeMap::instance().to_symbol(legacy_param) << endmsg;
@@ -415,7 +415,7 @@ Automatable::transport_stopped (framepos_t now)
                 if (c) {
                         boost::shared_ptr<AutomationList> l
                                = boost::dynamic_pointer_cast<AutomationList>(c->list());
-                        
+
                         if (l) {
                                /* Stop any active touch gesture just before we mark the write pass
                                   as finished.  If we don't do this, the transport can end up stopped with
@@ -425,11 +425,11 @@ Automatable::transport_stopped (framepos_t now)
                                */
                                l->stop_touch (true, now);
                                 l->write_pass_finished (now);
-                                
+
                                 if (l->automation_playback()) {
                                         c->set_value(c->list()->eval(now));
                                 }
-                                
+
                                 if (l->automation_state() == Write) {
                                         l->set_automation_state (Touch);
                                 }
index 092a1b75233b8a74f2e0af34ef212e6f38c58f94..fd4a2280377418bbb65a80df8e60da8e1394feab 100644 (file)
@@ -57,12 +57,12 @@ AutomationControl::set_value(double value)
 {
        bool to_list = _list && _session.transport_stopped()
                && ((AutomationList*)_list.get())->automation_write();
+
         if (to_list && parameter().toggled()) {
 
-                // store the previous value just before this so any 
+                // store the previous value just before this so any
                 // interpolation works right
-                
+
                 _list->add (get_double(), _session.transport_frame()-1);
         }
 
index aaab84f2da7b50d07163d303f042e36f7631b8fa..b2bda4a20302dd572de6d15fafc674ebb8874874 100644 (file)
@@ -219,7 +219,7 @@ AutomationList::stop_touch (bool mark, double when)
                */
                return;
        }
-       
+
        g_atomic_int_set (&_touching, 0);
 
         if (_state == Touch) {
@@ -227,13 +227,13 @@ AutomationList::stop_touch (bool mark, double when)
                assert (!nascent.empty ());
 
                 Glib::Mutex::Lock lm (ControlList::_lock);
-                
+
                 if (mark) {
 
                        nascent.back()->end_time = when;
-                        
+
                 } else {
-                        
+
                         /* nascent info created in start touch but never used. just get rid of it.
                          */
 
@@ -495,7 +495,7 @@ AutomationList::set_state (const XMLNode& node, int version)
        }
 
        bool have_events = false;
-       
+
        for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
                if ((*niter)->name() == X_("events")) {
                        deserialize_events (*(*niter));
index a960f1a221b34b654a78cb392e3575ab3dee4b77..59c0bb28962ffe10e954e9ed68ced4dbc0de6b35 100644 (file)
@@ -28,7 +28,7 @@ framecnt_t
 BeatsFramesConverter::to (double beats) const
 {
        assert (beats >= 0);
-       
+
        return _tempo_map.framepos_plus_bbt (_origin_b, Timecode::BBT_Time(beats)) - _origin_b;
 }
 
index 12fafa29fefc773fc06725a284c92f00456876b9..cdc63cae11bfa5826cd59d3e178dedcd9da95579 100644 (file)
@@ -53,7 +53,7 @@ snprintf_bounded_null_filled (char* target, size_t target_size, char const * fmt
 
 BroadcastInfo::BroadcastInfo ()
 {
-       
+
 }
 
 void
index 821360179817956f75d4d6528929da58330afacf..5ebbce26293ce618d3407508176326ade897c342 100644 (file)
@@ -34,10 +34,10 @@ BufferManager::init (uint32_t size)
         thread_buffers = new ThreadBufferFIFO (size+1); // must be one larger than requested
        thread_buffers_list = new ThreadBufferList;
 
-        /* and populate with actual ThreadBuffers 
+        /* and populate with actual ThreadBuffers
          */
 
-        for (uint32_t n = 0; n < size; ++n) {        
+        for (uint32_t n = 0; n < size; ++n) {
                 ThreadBuffers* ts = new ThreadBuffers;
                 thread_buffers->write (&ts, 1);
                thread_buffers_list->push_back (ts);
index 46069e83b41d1bd67f3ee43ffa967fb12a9a7efc..2f091854cf6d7abeb3a98f1fa1d6aa7d7084be8f 100644 (file)
@@ -75,13 +75,13 @@ BufferSet::clear()
        _count.reset();
        _available.reset();
 
-#ifdef VST_SUPPORT     
+#ifdef VST_SUPPORT
        for (VSTBuffers::iterator i = _vst_buffers.begin(); i != _vst_buffers.end(); ++i) {
                delete *i;
        }
 
        _vst_buffers.clear ();
-#endif 
+#endif
 }
 
 /** Set up this BufferSet so that its data structures mirror a PortSet's buffers.
@@ -195,7 +195,7 @@ BufferSet::ensure_buffers(DataType type, size_t num_buffers, size_t buffer_capac
                        _vst_buffers.push_back (new VSTBuffer (buffer_capacity));
                }
        }
-#endif 
+#endif
 
        // Post-conditions
        assert(bufs[0]->type() == type);
@@ -246,7 +246,7 @@ LV2EventBuffer&
 BufferSet::get_lv2_midi(bool input, size_t i)
 {
        assert (count().get(DataType::MIDI) > i);
-       
+
        MidiBuffer& mbuf = get_midi(i);
        LV2Buffers::value_type b = _lv2_buffers.at(i * 2 + (input ? 0 : 1));
        LV2EventBuffer* ebuf = b.second;
@@ -256,7 +256,7 @@ BufferSet::get_lv2_midi(bool input, size_t i)
                for (MidiBuffer::iterator e = mbuf.begin(); e != mbuf.end(); ++e) {
                        const Evoral::MIDIEvent<framepos_t> ev(*e, false);
                        uint32_t type = LV2Plugin::midi_event_type();
-#ifndef NDEBUG                
+#ifndef NDEBUG
                         DEBUG_TRACE (PBD::DEBUG::LV2, string_compose ("(FLUSH) MIDI event of size %1\n", ev.size()));
                         for (uint16_t x = 0; x < ev.size(); ++x) {
                                 DEBUG_TRACE (PBD::DEBUG::LV2, string_compose ("\tByte[%1] = %2\n", x, (int) ev.buffer()[x]));
@@ -283,7 +283,7 @@ BufferSet::flush_lv2_midi(bool input, size_t i)
                uint16_t size;
                uint8_t* data;
                ebuf->get_event(&frames, &subframes, &type, &size, &data);
-#ifndef NDEBUG                
+#ifndef NDEBUG
                 DEBUG_TRACE (PBD::DEBUG::LV2, string_compose ("(FLUSH) MIDI event of size %1\n", size));
                 for (uint16_t x = 0; x < size; ++x) {
                         DEBUG_TRACE (PBD::DEBUG::LV2, string_compose ("\tByte[%1] = %2\n", x, (int) data[x]));
@@ -308,7 +308,7 @@ BufferSet::get_vst_midi (size_t b)
        for (MidiBuffer::iterator i = m.begin(); i != m.end(); ++i) {
                vst->push_back (*i);
        }
-       
+
        return vst->events();
 }
 
@@ -354,7 +354,7 @@ BufferSet::VSTBuffer::push_back (Evoral::MIDIEvent<framepos_t> const & ev)
 
        _events->events[n] = reinterpret_cast<VstEvent*> (_midi_events + n);
        VstMidiEvent* v = reinterpret_cast<VstMidiEvent*> (_events->events[n]);
-       
+
        v->type = kVstMidiType;
        v->byteSize = sizeof (VstMidiEvent);
        v->deltaFrames = ev.time ();
@@ -426,7 +426,7 @@ BufferSet::is_silent (bool yn)
                        (*b)->is_silent (yn);
                }
        }
-               
+
 }
 
 } // namespace ARDOUR
index e42239a1ea18c58bacfe9d541d4c63de464a8e32..37e4733e14d606456514cabe28d297020332cc8d 100644 (file)
@@ -494,7 +494,7 @@ Bundle::channel_type (uint32_t c) const
 
        Glib::Mutex::Lock lm (_channel_mutex);
        return _channel[c].type;
-}      
+}
 
 ostream &
 operator<< (ostream& os, Bundle const & b)
index 27b1c0fc27c347718dc315b7ef540ec666d167d8..ad31c71e1527f85864bd8e6b4c93a26c926df0e1 100644 (file)
@@ -220,9 +220,9 @@ Butler::thread_work ()
                bytes = 0;
                compute_io = true;
 
-restart:               
+restart:
                disk_work_outstanding = false;
-               
+
                if (transport_work_requested()) {
                        _session.butler_transport_work ();
                }
@@ -299,7 +299,7 @@ restart:
                        if (!tr) {
                                continue;
                        }
-                       
+
                        /* note that we still try to flush diskstreams attached to inactive routes
                         */
 
@@ -435,12 +435,12 @@ void
 Butler::empty_pool_trash ()
 {
        /* look in the trash, deleting empty pools until we come to one that is not empty */
-       
+
        RingBuffer<CrossThreadPool*>::rw_vector vec;
        pool_trash.get_read_vector (&vec);
 
        guint deleted = 0;
-       
+
        for (int i = 0; i < 2; ++i) {
                for (guint j = 0; j < vec.len[i]; ++j) {
                        if (vec.buf[i][j]->empty()) {
index 3a66836748ffa4cb47b3179b603ffb326ab24d8e..85449dac03139ff80c477f32ff2f50b0e4bbefe2 100644 (file)
@@ -77,7 +77,7 @@ mothership_blocked ()
 void
 call_the_mothership (const string& version)
 {
-        /* check if the user says never to do this 
+        /* check if the user says never to do this
          */
 
         if (mothership_blocked()) {
@@ -91,7 +91,7 @@ call_the_mothership (const string& version)
         if (uname (&utb)) {
                 return;
         }
-        
+
         curl_global_init (CURL_GLOBAL_NOTHING);
 
         c = curl_easy_init ();
@@ -105,26 +105,26 @@ call_the_mothership (const string& version)
         if (!wm.empty()) {
                 data += string_compose ("&watermark=%1", wm);
         }
-        
+
         curl_easy_setopt(c, CURLOPT_POSTFIELDS, data.c_str());
         curl_easy_setopt(c, CURLOPT_URL, PING_URL);
-        curl_easy_setopt(c, CURLOPT_WRITEFUNCTION, curl_write_data); 
-        curl_easy_setopt(c, CURLOPT_WRITEDATA, &versionstr); 
-        
+        curl_easy_setopt(c, CURLOPT_WRITEFUNCTION, curl_write_data);
+        curl_easy_setopt(c, CURLOPT_WRITEDATA, &versionstr);
+
         std::cerr << "Callback to ardour.org ...\n";
 
         char errbuf[CURL_ERROR_SIZE];
-        curl_easy_setopt(c, CURLOPT_ERRORBUFFER, errbuf); 
+        curl_easy_setopt(c, CURLOPT_ERRORBUFFER, errbuf);
 
         if (curl_easy_perform (c) == 0) {
                 cerr << "Current release is " << versionstr << endl;
 
                 vector<string> ours;
                 vector<string> current;
-                
+
                 split (version, ours, '.');
                 split (versionstr, current, '.');
-                
+
                 if (ours.size() == 3 && current.size() == 3) {
 
                         int ours_n[3];
@@ -141,7 +141,7 @@ call_the_mothership (const string& version)
                         current_n[2] = atoi (current[2]);
 
                         if (ours_n[0] < current_n[0] ||
-                            ((ours_n[0] == current_n[0]) && (ours_n[1] < current_n[1])) || 
+                            ((ours_n[0] == current_n[0]) && (ours_n[1] < current_n[1])) ||
                             ((ours_n[0] == current_n[0]) && (ours_n[1] == current_n[1]) && (ours_n[2] < current_n[2]))) {
                                 cerr << "TOO OLD\n";
                         } else {
@@ -151,6 +151,6 @@ call_the_mothership (const string& version)
                         cerr << "Unusual local version: " << version << endl;
                 }
         }
-        
+
         curl_easy_cleanup (c);
 }
index cb9ccc1f6d499d83893581395f12aeccf8f3a40f..c4b463aba7f2ee3b4f110ebcf92de25a42a6680b 100644 (file)
@@ -82,5 +82,5 @@ CapturingProcessor::state (bool full)
        node.add_property (X_("type"), X_("capture"));
        return node;
 }
-       
+
 } // namespace ARDOUR
index acfe7e360364376acd61308ac2161c249ff406bc..afb322f41b926eb0d0bbb40529dc3d94e4f9f252 100644 (file)
@@ -73,7 +73,7 @@ ControlProtocolManager::set_session (Session* s)
                        if ((*i)->requested || (*i)->mandatory) {
                                instantiate (**i);
                                (*i)->requested = false;
-                               
+
                                if ((*i)->protocol && (*i)->state) {
                                        (*i)->protocol->set_state (*(*i)->state, Stateful::loading_state_version);
                                }
index 57a767ee7ad3460bbdf95b8f3590d563b0529d38..d6fe1243b546f22cd7ea018fd47598d4ebe51dd5 100644 (file)
@@ -149,7 +149,7 @@ Crossfade::Crossfade (const Playlist& playlist, XMLNode const & node)
                */
                r = RegionFactory::region_by_id (id);
        }
-       
+
        if (!r) {
                error << string_compose (_("Crossfade: no \"in\" region %1 found in playlist %2 nor in region map"), id, playlist.name())
                      << endmsg;
@@ -172,7 +172,7 @@ Crossfade::Crossfade (const Playlist& playlist, XMLNode const & node)
        if (!r) {
                r = RegionFactory::region_by_id (id2);
        }
-       
+
        if (!r) {
                error << string_compose (_("Crossfade: no \"out\" region %1 found in playlist %2 nor in region map"), id2, playlist.name())
                      << endmsg;
@@ -236,7 +236,7 @@ Crossfade::initialize ()
         for (SourceList::iterator i = _sources.begin(); i != _sources.end(); ++i) {
                 (*i)->inc_use_count ();
         }
-        
+
        _master_sources = _in->master_sources();
        _master_sources.insert(_master_sources.end(), _out->master_sources().begin(), _out->master_sources().end());
 
@@ -314,7 +314,7 @@ Crossfade::read_raw_internal (Sample* buf, framecnt_t start, framecnt_t cnt, int
        Sample* mixdown = new Sample[cnt];
        float* gain = new float[cnt];
        framecnt_t ret;
-       
+
        ret = read_at (buf, mixdown, gain, start, cnt, channel, cnt);
 
        delete [] mixdown;
@@ -438,7 +438,7 @@ Crossfade::refresh ()
                Invalidated (shared_from_this());
                return false;
        }
-        
+
         /* regions must cannot be identically sized and placed */
 
         if (_in->position() == _out->position() && _in->length() == _out->length()) {
@@ -976,7 +976,7 @@ Crossfade::set_xfade_length (framecnt_t len)
        _length = len;
 
        PropertyChanged (PropertyChange (Properties::length));
-       
+
        return len;
 }
 
index 31337e7e83c18e22bc7874a95cdfe6338f486d13..c192a2218492e6b65d1ada85282fb09855242eff 100644 (file)
@@ -53,7 +53,7 @@ bool                          Delivery::panners_legal = false;
 
 /* deliver to an existing IO object */
 
-Delivery::Delivery (Session& s, boost::shared_ptr<IO> io, boost::shared_ptr<Pannable> pannable, 
+Delivery::Delivery (Session& s, boost::shared_ptr<IO> io, boost::shared_ptr<Pannable> pannable,
                     boost::shared_ptr<MuteMaster> mm, const string& name, Role r)
        : IOProcessor(s, boost::shared_ptr<IO>(), (role_requires_output_ports (r) ? io : boost::shared_ptr<IO>()), name)
        , _role (r)
@@ -99,7 +99,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));
        delete _output_buffers;
 }
 
@@ -214,7 +214,7 @@ Delivery::configure_io (ChanCount in, ChanCount out)
                }
 
        }
-       
+
        if (!Processor::configure_io (in, out)) {
                return false;
        }
@@ -298,7 +298,7 @@ Delivery::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pf
 #endif
 
        if (panner && !panner->bypassed()) {
-                
+
                // Use the panner to distribute audio to output port buffers
 
                _panshell->run (bufs, output_buffers(), start_frame, end_frame, nframes);
@@ -458,7 +458,7 @@ Delivery::flush_buffers (framecnt_t nframes, framepos_t time)
        /* io_lock, not taken: function must be called from Session::process() calltree */
 
        PortSet& ports (_output->ports());
-        
+
        for (PortSet::iterator i = ports.begin(); i != ports.end(); ++i) {
                (*i).flush_buffers (nframes, time);
        }
@@ -472,7 +472,7 @@ Delivery::transport_stopped (framepos_t now)
 
         if (_output) {
                 PortSet& ports (_output->ports());
-                
+
                 for (PortSet::iterator i = ports.begin(); i != ports.end(); ++i) {
                         (*i).transport_stopped ();
                 }
@@ -484,7 +484,7 @@ Delivery::realtime_locate ()
 {
         if (_output) {
                 PortSet& ports (_output->ports());
-                
+
                 for (PortSet::iterator i = ports.begin(); i != ports.end(); ++i) {
                         (*i).realtime_locate ();
                 }
@@ -509,7 +509,7 @@ Delivery::target_gain ()
        }
 
         MuteMaster::MutePoint mp = MuteMaster::Main; // stupid gcc uninit warning
-        
+
         switch (_role) {
         case Main:
                 mp = MuteMaster::Main;
@@ -529,17 +529,17 @@ Delivery::target_gain ()
         }
 
         gain_t desired_gain = _mute_master->mute_gain_at (mp);
-        
+
         if (_role == Listen && _session.monitor_out() && !_session.listening()) {
-                
+
                 /* nobody is soloed, and this delivery is a listen-send to the
                    control/monitor/listen bus, we should be silent since
                    it gets its signal from the master out.
                 */
-                
+
                 desired_gain = 0.0;
-                
-        } 
+
+        }
 
        return desired_gain;
 }
index 4bc20c14aeec84817dffd9f14881615f608f9c4e..9d5925322d42a3afa93584f71c4febcac3585ff9 100644 (file)
@@ -355,7 +355,7 @@ Diskstream::get_captured_frames (uint32_t n) const
        if (capture_info.size() > n) {
                /* this is a completed capture */
                return capture_info[n]->frames;
-       } else {  
+       } else {
                /* this is the currently in-progress capture */
                return capture_captured;
        }
@@ -481,7 +481,7 @@ Diskstream::get_state ()
        if (_extra_xml) {
                node->add_child_copy (*_extra_xml);
        }
-        
+
         return *node;
 }
 
@@ -548,11 +548,11 @@ Diskstream::playlist_ranges_moved (list< Evoral::RangeMove<framepos_t> > const &
           automation undo (it must, since automation-follows-regions
           can lose automation data).  Hence we can do nothing here.
        */
-       
+
        if (from_undo) {
                return;
        }
-       
+
        if (!_track || Config->get_automation_follows_regions () == false) {
                return;
        }
@@ -569,14 +569,14 @@ Diskstream::playlist_ranges_moved (list< Evoral::RangeMove<framepos_t> > const &
        /* move panner automation */
        boost::shared_ptr<Pannable> pannable = _track->pannable();
         Evoral::ControlSet::Controls& c (pannable->controls());
-        
+
         for (Evoral::ControlSet::Controls::iterator ci = c.begin(); ci != c.end(); ++ci) {
                 boost::shared_ptr<AutomationControl> ac = boost::dynamic_pointer_cast<AutomationControl>(ci->second);
                 if (!ac) {
                         continue;
                 }
                 boost::shared_ptr<AutomationList> alist = ac->alist();
-                
+
                 XMLNode & before = alist->get_state ();
                 bool const things_moved = alist->move_ranges (movements);
                 if (things_moved) {
@@ -657,19 +657,19 @@ Diskstream::check_record_status (framepos_t transport_frame, bool can_record)
                                                                       name(), first_recordable_frame, last_recordable_frame, capture_start_frame,
                                                                       _capture_offset,
                                                                       existing_material_offset,
-                                                                      transport_frame, 
+                                                                      transport_frame,
                                                                       _roll_delay,
                                                                       _session.transport_frame(),
                                                                       _session.worst_output_latency(),
                                                                       _session.worst_track_latency()));
-                                                                    
+
 
                 if (_alignment_style == ExistingMaterial) {
                         first_recordable_frame += existing_material_offset;
                         DEBUG_TRACE (DEBUG::CaptureAlignment, string_compose ("\tshift FRF by EMO %1\n",
                                                                               first_recordable_frame));
-                } 
-                
+                }
+
                 prepare_record_status (capture_start_frame);
 
         } else {
@@ -677,22 +677,22 @@ Diskstream::check_record_status (framepos_t transport_frame, bool can_record)
                 if (last_possibly_recording == fully_rec_enabled) {
 
                         /* we were recording last time */
-                        
+
                         if (change & transport_rolling) {
 
                                 /* transport-change (stopped rolling): last_recordable_frame was set in ::prepare_to_stop(). We
                                    had to set it there because we likely rolled past the stopping point to declick out,
                                    and then backed up.
                                  */
-                                
+
                         } else {
                                 /* punch out */
-                                
+
                                 last_recordable_frame = _session.transport_frame() + _capture_offset;
-                                
+
                                 if (_alignment_style == ExistingMaterial) {
                                         last_recordable_frame += existing_material_offset;
-                                } 
+                                }
                         }
                 }
         }
@@ -751,7 +751,7 @@ Diskstream::calculate_record_range(OverlapType ot, framepos_t transport_frame, f
        }
 
         DEBUG_TRACE (DEBUG::CaptureAlignment, string_compose ("%1 rec? %2 @ %3 (for %4) FRF %5 LRF %6 : rf %7 @ %8\n",
-                                                              _name, enum_2_string (ot), transport_frame, nframes, 
+                                                              _name, enum_2_string (ot), transport_frame, nframes,
                                                               first_recordable_frame, last_recordable_frame, rec_nframes, rec_offset));
 }
 
index 878da1e381bf14345b38f4bbadf99c1671089b57..2509862241e827ec8e01f248eeea130827190952 100644 (file)
@@ -255,7 +255,7 @@ setup_enum_writer ()
        REGISTER_ENUM (MoveAddHigher);
        REGISTER_ENUM (AddHigher);
        REGISTER (_LayerModel);
-        
+
         REGISTER_ENUM (InsertMergeReject);
         REGISTER_ENUM (InsertMergeRelax);
         REGISTER_ENUM (InsertMergeReplace);
@@ -557,7 +557,7 @@ setup_enum_writer ()
        REGISTER_CLASS_ENUM (MidiModel::PatchChangeDiffCommand, Program);
        REGISTER_CLASS_ENUM (MidiModel::PatchChangeDiffCommand, Bank);
        REGISTER (_MidiModel_PatchChangeDiffCommand_Property);
-       
+
        REGISTER_ENUM(Linear);
        REGISTER_ENUM(Logarithmic);
        REGISTER(_WaveformScale);
@@ -580,90 +580,90 @@ setup_enum_writer ()
 
 /* deserializing types from ardour/types.h */
 
-std::istream& operator>>(std::istream& o, HeaderFormat& var) 
-{ 
+std::istream& operator>>(std::istream& o, HeaderFormat& var)
+{
        std::string s;
        o >> s;
        var = (HeaderFormat) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const HeaderFormat& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const HeaderFormat& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
 
-std::istream& operator>>(std::istream& o, SampleFormat& var) 
-{ 
+std::istream& operator>>(std::istream& o, SampleFormat& var)
+{
        std::string s;
        o >> s;
        var = (SampleFormat) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const SampleFormat& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const SampleFormat& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, AutoConnectOption& var) 
-{ 
+std::istream& operator>>(std::istream& o, AutoConnectOption& var)
+{
        std::string s;
        o >> s;
        var = (AutoConnectOption) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const AutoConnectOption& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const AutoConnectOption& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
 
-std::istream& operator>>(std::istream& o, MonitorModel& var) 
-{ 
+std::istream& operator>>(std::istream& o, MonitorModel& var)
+{
        std::string s;
        o >> s;
        var = (MonitorModel) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const MonitorModel& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const MonitorModel& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
 
-std::istream& operator>>(std::istream& o, PFLPosition& var) 
-{ 
+std::istream& operator>>(std::istream& o, PFLPosition& var)
+{
        std::string s;
        o >> s;
        var = (PFLPosition) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const PFLPosition& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const PFLPosition& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
 
-std::istream& operator>>(std::istream& o, AFLPosition& var) 
-{ 
+std::istream& operator>>(std::istream& o, AFLPosition& var)
+{
        std::string s;
        o >> s;
        var = (AFLPosition) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const AFLPosition& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const AFLPosition& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
 
-std::istream& operator>>(std::istream& o, RemoteModel& var) 
+std::istream& operator>>(std::istream& o, RemoteModel& var)
 {
        std::string s;
        o >> s;
@@ -671,179 +671,179 @@ std::istream& operator>>(std::istream& o, RemoteModel& var)
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const RemoteModel& var) 
+std::ostream& operator<<(std::ostream& o, const RemoteModel& var)
 {
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, EditMode& var) 
-{ 
+std::istream& operator>>(std::istream& o, EditMode& var)
+{
        std::string s;
        o >> s;
        var = (EditMode) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const EditMode& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const EditMode& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, ListenPosition& var) 
-{ 
+std::istream& operator>>(std::istream& o, ListenPosition& var)
+{
        std::string s;
        o >> s;
        var = (ListenPosition) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const ListenPosition& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const ListenPosition& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, LayerModel& var) 
-{ 
+std::istream& operator>>(std::istream& o, LayerModel& var)
+{
        std::string s;
        o >> s;
        var = (LayerModel) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const LayerModel& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const LayerModel& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
 
-std::istream& operator>>(std::istream& o, InsertMergePolicy& var) 
-{ 
+std::istream& operator>>(std::istream& o, InsertMergePolicy& var)
+{
        std::string s;
        o >> s;
        var = (InsertMergePolicy) string_2_enum (s, var);
        return o;
 }
-std::ostream& operator<<(std::ostream& o, const InsertMergePolicy& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const InsertMergePolicy& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
 
-std::istream& operator>>(std::istream& o, CrossfadeModel& var) 
-{ 
+std::istream& operator>>(std::istream& o, CrossfadeModel& var)
+{
        std::string s;
        o >> s;
        var = (CrossfadeModel) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const CrossfadeModel& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const CrossfadeModel& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, SyncSource& var) 
-{ 
+std::istream& operator>>(std::istream& o, SyncSource& var)
+{
        std::string s;
        o >> s;
        var = (SyncSource) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const SyncSource& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const SyncSource& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, ShuttleBehaviour& var) 
-{ 
+std::istream& operator>>(std::istream& o, ShuttleBehaviour& var)
+{
        std::string s;
        o >> s;
        var = (ShuttleBehaviour) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const ShuttleBehaviour& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const ShuttleBehaviour& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, ShuttleUnits& var) 
-{ 
+std::istream& operator>>(std::istream& o, ShuttleUnits& var)
+{
        std::string s;
        o >> s;
        var = (ShuttleUnits) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const ShuttleUnits& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const ShuttleUnits& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, TimecodeFormat& var) 
-{ 
+std::istream& operator>>(std::istream& o, TimecodeFormat& var)
+{
        std::string s;
        o >> s;
        var = (TimecodeFormat) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const TimecodeFormat& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const TimecodeFormat& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, DenormalModel& var) 
-{ 
+std::istream& operator>>(std::istream& o, DenormalModel& var)
+{
        std::string s;
        o >> s;
        var = (DenormalModel) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const DenormalModel& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const DenormalModel& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, WaveformScale& var) 
-{ 
+std::istream& operator>>(std::istream& o, WaveformScale& var)
+{
        std::string s;
        o >> s;
        var = (WaveformScale) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const WaveformScale& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const WaveformScale& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, WaveformShape& var) 
-{ 
+std::istream& operator>>(std::istream& o, WaveformShape& var)
+{
        std::string s;
        o >> s;
        var = (WaveformShape) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const WaveformShape& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const WaveformShape& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
 
-std::istream& operator>>(std::istream& o, PositionLockStyle& var) 
-{ 
+std::istream& operator>>(std::istream& o, PositionLockStyle& var)
+{
        std::string s;
        o >> s;
        var = (PositionLockStyle) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const PositionLockStyle& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const PositionLockStyle& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
index 936b0f8a625f148230fe2c5ac7143186fd79e852..785648393ec86b53114e0fc1d53187d7afedc4af 100644 (file)
@@ -65,7 +65,7 @@ PortExportChannel::read (Sample const *& data, framecnt_t frames) const
                data = (*ports.begin())->get_audio_buffer(frames).data();
                return;
        }
-       
+
        memset (buffer.get(), 0, frames * sizeof (Sample));
 
        for (PortSet::const_iterator it = ports.begin(); it != ports.end(); ++it) {
index eb3b2838c64e68cf3bd117d873359f9fbf5db444..31729e171b2f4bac3d7637ee30521b5e605fe518 100644 (file)
@@ -103,12 +103,12 @@ void
 ExportChannelConfiguration::configurations_for_files (std::list<boost::shared_ptr<ExportChannelConfiguration> > & configs)
 {
        configs.clear ();
-       
+
        if (!split) {
                configs.push_back (shared_from_this ());
                return;
        }
-       
+
        for (ChannelList::const_iterator it = channels.begin (); it != channels.end (); ++it) {
                boost::shared_ptr<ExportChannelConfiguration> config (new ExportChannelConfiguration (session));
                config->set_name (_name);
index fa6f1198e94167437e344d04736de2138b245002..92400b5e474f68203fe4f0c5f9b68ed23f3b3186 100644 (file)
@@ -204,7 +204,7 @@ ExportFormatBase::nearest_sample_rate (framecnt_t sample_rate)
        int diff = 0;
        int smallest_diff = INT_MAX;
        SampleRate best_match = SR_None;
-       
+
        #define DO_SR_COMPARISON(rate) \
        diff = std::abs((rate) - sample_rate); \
        if(diff < smallest_diff) { \
@@ -219,7 +219,7 @@ ExportFormatBase::nearest_sample_rate (framecnt_t sample_rate)
        DO_SR_COMPARISON(SR_88_2);
        DO_SR_COMPARISON(SR_96);
        DO_SR_COMPARISON(SR_192);
-       
+
        return best_match;
        #undef DO_SR_COMPARISON
 }
index df787abafb9bd842e56c7ef4c5234d470375201e..d3e99db7f578cf0e9f298481130e9b9d4f47236c 100644 (file)
@@ -126,7 +126,7 @@ ExportFormatManager::init_formats ()
        fl_ptr->add_sample_format (ExportFormatBase::SF_32);
        fl_ptr->add_sample_format (ExportFormatBase::SF_Float);
        fl_ptr->add_sample_format (ExportFormatBase::SF_Double);
-       fl_ptr->add_endianness (ExportFormatBase::E_Big); 
+       fl_ptr->add_endianness (ExportFormatBase::E_Big);
        fl_ptr->set_default_sample_format (ExportFormatBase::SF_16);
        fl_ptr->set_extension ("aiff");
        add_format (f_ptr);
@@ -161,7 +161,7 @@ ExportFormatManager::init_formats ()
        fl_ptr->add_sample_format (ExportFormatBase::SF_32);
        fl_ptr->add_sample_format (ExportFormatBase::SF_Float);
        fl_ptr->add_sample_format (ExportFormatBase::SF_Double);
-       fl_ptr->add_endianness (ExportFormatBase::E_Little); 
+       fl_ptr->add_endianness (ExportFormatBase::E_Little);
        fl_ptr->set_default_sample_format (ExportFormatBase::SF_16);
        fl_ptr->set_extension ("wav");
        add_format (f_ptr);
index bf2585a28113a79b5d79bd94decaa54a9829a345..3f6e2b83c89908e3d4e59c4b54ee7399d1353fd1 100644 (file)
@@ -219,7 +219,7 @@ ExportFormatSpecification::ExportFormatSpecification (ExportFormatSpecification
 
        set_silence_beginning (other.silence_beginning_time());
        set_silence_end (other.silence_end_time());
-       
+
        set_extension(other.extension());
 }
 
index 9a6a9da81b1565f3ff596e1b36e65da3015671c9..86d374a1da425eb8a9a31b3d30463a0cf9380b4a 100644 (file)
@@ -42,7 +42,7 @@ int
 ExportGraphBuilder::process (framecnt_t frames, bool last_cycle)
 {
        assert(frames <= process_buffer_frames);
-       
+
        for (ChannelMap::iterator it = channels.begin(); it != channels.end(); ++it) {
                Sample const * process_buffer = 0;
                it->first->read (process_buffer, frames);
@@ -50,7 +50,7 @@ ExportGraphBuilder::process (framecnt_t frames, bool last_cycle)
                if (last_cycle) { context().set_flag (ProcessContext<Sample>::EndOfInput); }
                it->second->process (context);
        }
-       
+
        return 0;
 }
 
@@ -64,7 +64,7 @@ ExportGraphBuilder::process_normalize ()
                        ++it;
                }
        }
-       
+
        return normalizers.empty();
 }
 
@@ -101,28 +101,28 @@ ExportGraphBuilder::add_config (FileSpec const & config)
                framecnt_t session_rate = session.nominal_frame_rate();
                new_config.format->set_sample_rate(ExportFormatBase::nearest_sample_rate(session_rate));
        }
-       
-       
+
+
        if (!new_config.channel_config->get_split ()) {
                add_split_config (new_config);
                return;
        }
-       
+
        // Split channel configurations are split into several channel configurations,
        // each corresponding to a file, at this stage
        typedef std::list<boost::shared_ptr<ExportChannelConfiguration> > ConfigList;
        ConfigList file_configs;
        new_config.channel_config->configurations_for_files (file_configs);
-       
+
        unsigned chan = 1;
        for (ConfigList::iterator it = file_configs.begin(); it != file_configs.end(); ++it, ++chan) {
                FileSpec copy = new_config;
                copy.channel_config = *it;
-               
+
                copy.filename.reset (new ExportFilename (*copy.filename));
                copy.filename->include_channel = true;
                copy.filename->set_channel (chan);
-               
+
                add_split_config (copy);
        }
 }
@@ -136,7 +136,7 @@ ExportGraphBuilder::add_split_config (FileSpec const & config)
                        return;
                }
        }
-       
+
        // No duplicate channel config found, create new one
        channel_configs.push_back (new ChannelConfig (*this, config, channels));
 }
@@ -197,7 +197,7 @@ ExportGraphBuilder::Encoder::init_writer (boost::shared_ptr<AudioGrapher::Sndfil
        int format = get_real_format (config);
        config.filename->set_channel_config(config.channel_config);
        string filename = config.filename->get_path (config.format);
-       
+
        writer.reset (new AudioGrapher::SndfileWriter<T> (filename, format, channels, config.format->sample_rate(), config.broadcast_info));
        writer->FileWritten.connect_same_thread (copy_files_connection, boost::bind (&ExportGraphBuilder::Encoder::copy_files, this, _1));
 }
@@ -220,7 +220,7 @@ ExportGraphBuilder::SFC::SFC (ExportGraphBuilder &, FileSpec const & new_config,
        config = new_config;
        data_width = sndfile_data_width (Encoder::get_real_format (config));
        unsigned channels = new_config.channel_config->get_n_chans();
-       
+
        if (data_width == 8 || data_width == 16) {
                short_converter = ShortConverterPtr (new SampleFormatConverter<short> (channels));
                short_converter->init (max_frames, config.format->dither_type(), data_width);
@@ -258,10 +258,10 @@ ExportGraphBuilder::SFC::add_child (FileSpec const & new_config)
                        return;
                }
        }
-       
+
        children.push_back (new Encoder());
        Encoder & encoder = children.back();
-       
+
        if (data_width == 8 || data_width == 16) {
                short_converter->add_output (encoder.init<short> (new_config));
        } else if (data_width == 24 || data_width == 32) {
@@ -284,22 +284,22 @@ ExportGraphBuilder::Normalizer::Normalizer (ExportGraphBuilder & parent, FileSpe
 {
        config = new_config;
        max_frames_out = 4086; // TODO good chunk size
-       
+
        buffer.reset (new AllocatingProcessContext<Sample> (max_frames_out, config.channel_config->get_n_chans()));
        peak_reader.reset (new PeakReader ());
        normalizer.reset (new AudioGrapher::Normalizer (config.format->normalize_target()));
        threader.reset (new Threader<Sample> (parent.thread_pool));
-       
+
        normalizer->alloc_buffer (max_frames_out);
        normalizer->add_output (threader);
-       
+
        int format = ExportFormatBase::F_RAW | ExportFormatBase::SF_Float;
-       tmp_file.reset (new TmpFile<float> (format, config.channel_config->get_n_chans(), 
+       tmp_file.reset (new TmpFile<float> (format, config.channel_config->get_n_chans(),
                                            config.format->sample_rate()));
        tmp_file->FileWritten.connect_same_thread (post_processing_connection, boost::bind (&Normalizer::start_post_processing, this));
-       
+
        add_child (new_config);
-       
+
        peak_reader->add_output (tmp_file);
 }
 
@@ -318,7 +318,7 @@ ExportGraphBuilder::Normalizer::add_child (FileSpec const & new_config)
                        return;
                }
        }
-       
+
        children.push_back (new SFC (parent, new_config, max_frames_out));
        threader->add_output (children.back().sink());
 }
@@ -356,7 +356,7 @@ ExportGraphBuilder::SRC::SRC (ExportGraphBuilder & parent, FileSpec const & new_
        ExportFormatSpecification & format = *new_config.format;
        converter->init (parent.session.nominal_frame_rate(), format.sample_rate(), format.src_quality());
        max_frames_out = converter->allocate_buffers (max_frames);
-       
+
        add_child (new_config);
 }
 
@@ -386,7 +386,7 @@ ExportGraphBuilder::SRC::add_child_to_list (FileSpec const & new_config, boost::
                        return;
                }
        }
-       
+
        list.push_back (new T (parent, new_config, max_frames_out));
        converter->add_output (list.back().sink ());
 }
@@ -404,17 +404,17 @@ ExportGraphBuilder::SilenceHandler::SilenceHandler (ExportGraphBuilder & parent,
        config = new_config;
        max_frames_in = max_frames;
        framecnt_t sample_rate = parent.session.nominal_frame_rate();
-       
+
        silence_trimmer.reset (new SilenceTrimmer<Sample>(max_frames_in));
        silence_trimmer->set_trim_beginning (config.format->trim_beginning());
        silence_trimmer->set_trim_end (config.format->trim_end());
-       
+
        framecnt_t sb = config.format->silence_beginning_at (parent.timespan->get_start(), sample_rate);
        framecnt_t se = config.format->silence_end_at (parent.timespan->get_end(), sample_rate);
-       
+
        silence_trimmer->add_silence_to_beginning (sb);
        silence_trimmer->add_silence_to_end (se);
-       
+
        add_child (new_config);
 }
 
@@ -433,7 +433,7 @@ ExportGraphBuilder::SilenceHandler::add_child (FileSpec const & new_config)
                        return;
                }
        }
-       
+
        children.push_back (new SRC (parent, new_config, max_frames_in));
        silence_trimmer->add_output (children.back().sink());
 }
@@ -455,13 +455,13 @@ ExportGraphBuilder::ChannelConfig::ChannelConfig (ExportGraphBuilder & parent, F
   : parent (parent)
 {
        typedef ExportChannelConfiguration::ChannelList ChannelList;
-       
+
        config = new_config;
        max_frames = parent.session.engine().frames_per_cycle();
-       
+
        interleaver.reset (new Interleaver<Sample> ());
        interleaver->init (new_config.channel_config->get_n_chans(), max_frames);
-       
+
        ChannelList const & channel_list = config.channel_config->get_channels();
        unsigned chan = 0;
        for (ChannelList::const_iterator it = channel_list.begin(); it != channel_list.end(); ++it, ++chan) {
@@ -474,7 +474,7 @@ ExportGraphBuilder::ChannelConfig::ChannelConfig (ExportGraphBuilder & parent, F
                }
                map_it->second->add_output (interleaver->input (chan));
        }
-       
+
        add_child (new_config);
 }
 
@@ -487,7 +487,7 @@ ExportGraphBuilder::ChannelConfig::add_child (FileSpec const & new_config)
                        return;
                }
        }
-       
+
        framecnt_t const max_frames_out = new_config.channel_config->get_n_chans() * max_frames;
        children.push_back (new SilenceHandler (parent, new_config, max_frames_out));
        interleaver->add_output (children.back().sink ());
index 104894abe3f5cef82f73e6f49793ebe06b9eda1f..677bbd980301e7a9cfe067eba3a4de9428ae2ddc 100644 (file)
@@ -123,7 +123,7 @@ ExportHandler::add_export_config (TimespanPtr timespan, ChannelConfigPtr channel
        FileSpec spec (channel_config, format, filename, broadcast_info);
        ConfigPair pair (timespan, spec);
        config_map.insert (pair);
-       
+
        return true;
 }
 
@@ -198,7 +198,7 @@ ExportHandler::process_timespan (framecnt_t frames)
        framecnt_t frames_to_read = 0;
        framepos_t const start = current_timespan->get_start();
        framepos_t const end = current_timespan->get_end();
-       
+
        bool const last_cycle = (process_position + frames >= end);
 
        if (last_cycle) {
@@ -223,7 +223,7 @@ ExportHandler::process_normalize ()
        if (graph_builder->process_normalize ()) {
                finish_timespan ();
        }
-       
+
        return 0;
 }
 
index 4d2b7795a412f93a713605ab528b6b3c1ae1db4d..a86b2a7768388aee9266aaadc5c5c0761f0db842 100644 (file)
@@ -361,7 +361,7 @@ ExportProfileManager::init_timespans (XMLNodeList nodes)
        if (timespans.empty()) {
                TimespanStatePtr state (new TimespanState (session_range, selection_range, ranges));
                timespans.push_back (state);
-               
+
                // Add session as default selection
                TimespanPtr timespan = handler->add_timespan();
                timespan->set_name (session_range->name());
@@ -473,15 +473,15 @@ ExportProfileManager::init_channel_configs (XMLNodeList nodes)
        if (nodes.empty()) {
                ChannelConfigStatePtr config (new ChannelConfigState (handler->add_channel_config()));
                channel_configs.push_back (config);
-               
+
                // Add master outs as default
                IO* master_out = session.master_out()->output().get();
                if (!master_out) { return false; }
-               
+
                for (uint32_t n = 0; n < master_out->n_ports().n_audio(); ++n) {
                        PortExportChannel * channel = new PortExportChannel ();
                        channel->add_port (master_out->audio (n));
-                       
+
                        ExportChannelPtr chan_ptr (channel);
                        config->config->register_channel (chan_ptr);
                }
index 5b62c7dfcc72072ac6636b0f904b83806beca44b..20b535836c94f50bfb1f01e7f52dfa99246f79e4 100644 (file)
@@ -34,7 +34,7 @@ ExportTimespan::ExportTimespan (ExportStatusPtr status, framecnt_t frame_rate) :
        position (0),
        frame_rate (frame_rate)
 {
-       
+
 }
 
 ExportTimespan::~ExportTimespan ()
index eb6978c6e86eed12045aa407f1528e2f3b61f226..409d978a11b84ad616b8130b53c893a8834b7bae 100644 (file)
@@ -87,7 +87,7 @@ FileSource::prevent_deletion ()
 {
         /* if this file already exists, it cannot be removed, ever
          */
-        
+
         if (Glib::file_test (_path, Glib::FILE_TEST_EXISTS)) {
                 if (!(_flags & Destructive)) {
                         mark_immutable ();
@@ -101,9 +101,9 @@ bool
 FileSource::removable () const
 {
         bool r = ((_flags & Removable)
-                  && ((_flags & RemoveAtDestroy) || 
+                  && ((_flags & RemoveAtDestroy) ||
                       ((_flags & RemovableIfEmpty) && empty() == 0)));
-        
+
         return r;
 }
 
@@ -241,7 +241,7 @@ FileSource::find (Session& s, DataType type, const string& path, bool must_exist
         string keeppath;
 
        isnew = false;
-        
+
         if (!Glib::path_is_absolute (path)) {
                 vector<string> dirs;
                 vector<string> hits;
@@ -256,33 +256,33 @@ FileSource::find (Session& s, DataType type, const string& path, bool must_exist
                 }
 
                 split (search_path, dirs, ':');
-                
+
                 cnt = 0;
                 hits.clear ();
-                
+
                 for (vector<string>::iterator i = dirs.begin(); i != dirs.end(); ++i) {
-                        
+
                         fullpath = Glib::build_filename (*i, path);
-                        
+
                         if (Glib::file_test (fullpath, Glib::FILE_TEST_EXISTS|Glib::FILE_TEST_IS_REGULAR)) {
                                 keeppath = fullpath;
                                 hits.push_back (fullpath);
                                 ++cnt;
                         }
                 }
-                
+
                 if (cnt > 1) {
-                        
+
                         int which = FileSource::AmbiguousFileName (path, search_path, hits).get_value_or (-1);
-                        
+
                         if (which < 0) {
                                 goto out;
                         } else {
                                 keeppath = hits[which];
                         }
-                        
+
                 } else if (cnt == 0) {
-                        
+
                         if (must_exist) {
                                 error << string_compose(
                                         _("Filesource: cannot find required file (%1): while searching %2"),
@@ -295,9 +295,9 @@ FileSource::find (Session& s, DataType type, const string& path, bool must_exist
         } else {
                 keeppath = path;
         }
-        
+
         /* Current find() is unable to parse relative path names to yet non-existant
-           sources. QuickFix(tm) 
+           sources. QuickFix(tm)
         */
         if (keeppath == "") {
                 if (must_exist) {
@@ -306,11 +306,11 @@ FileSource::find (Session& s, DataType type, const string& path, bool must_exist
                         keeppath = path;
                 }
         }
-        
+
         found_path = keeppath;
-        
+
         ret = true;
-        
+
   out:
        return ret;
 }
@@ -353,7 +353,7 @@ FileSource::find_2X (Session& s, DataType type, const string& path, bool must_ex
                cnt = 0;
 
                for (vector<string>::iterator i = dirs.begin(); i != dirs.end(); ++i) {
-                        
+
                         fullpath = Glib::build_filename (*i, pathstr);
 
                        /* i (paul) made a nasty design error by using ':' as a special character in
@@ -504,7 +504,7 @@ FileSource::set_source_name (const string& newname, bool destructive)
                error << string_compose (_("Programming error! %1 tried to rename a file over another file! It's safe to continue working, but please report this to the developers."), PROGRAM_NAME) << endmsg;
                return -1;
        }
-        
+
         if (::rename (oldpath.c_str(), newpath.c_str()) != 0) {
                 error << string_compose (_("cannot rename file %1 to %2 (%3)"), oldpath, newpath, strerror(errno)) << endmsg;
                 return -1;
@@ -543,9 +543,9 @@ FileSource::set_path (const std::string& newpath)
         _path = newpath;
 }
 
-void 
+void
 FileSource::inc_use_count ()
 {
         Source::inc_use_count ();
 }
+
index 932416ef413afd4e8b403c8833079dc5161baf05..5dc5e4dbdef823bb31cf4fc796e5a6a4d37801ec 100644 (file)
@@ -47,20 +47,20 @@ user_config_directory ()
                p = c;
        } else {
                const string home_dir = Glib::get_home_dir();
-       
+
                if (home_dir.empty ()) {
                        const string error_msg = "Unable to determine home directory";
-                       
+
                        // log the error
                        error << error_msg << endmsg;
-                       
+
                        throw sys::filesystem_error(error_msg);
                }
 
                p = home_dir;
                p /= ".config";
        }
-       
+
        p /= user_config_dir_name;
 
        return p;
index c82f6ae4d6d4a438313892fcac4780dd8899332e..8067edf14ec71fc69377d88a6077c24329dfb9dc 100644 (file)
@@ -121,7 +121,7 @@ Filter::finish (boost::shared_ptr<Region> region, SourceList& nsrcs, string regi
        results.clear ();
 
        PropertyList plist;
-       
+
        plist.add (Properties::start, 0);
        plist.add (Properties::length, region->length());
        plist.add (Properties::name, region_name);
index 751a671d4102989c05d86579d43fa0e0df1c4174..83d0990bf4fde0ef81229326035ad8c8bed4d2f6 100644 (file)
@@ -114,13 +114,13 @@ void ARDOUR::setup_enum_writer ();
 */
 PBD::PropertyChange ARDOUR::bounds_change;
 
-namespace ARDOUR { 
+namespace ARDOUR {
        namespace Properties {
 
                /* the envelope and fades are not scalar items and so
                   currently (2010/02) are not stored using Property.
                   However, these descriptors enable us to notify
-                  about changes to them via PropertyChange. 
+                  about changes to them via PropertyChange.
 
                   Declared in ardour/audioregion.h ...
                */
@@ -202,7 +202,7 @@ setup_hardware_optimization (bool try_optimization)
 
                info << "No H/W specific optimizations in use" << endmsg;
        }
-       
+
        AudioGrapher::Routines::override_compute_peak (compute_peak);
        AudioGrapher::Routines::override_apply_gain_to_buffer (apply_gain_to_buffer);
 }
@@ -245,7 +245,7 @@ ARDOUR::init (bool use_vst, bool try_optimization)
 
        PBD::ID::init ();
        SessionEvent::init_event_pool ();
-       
+
        make_property_quarks ();
        SessionObject::make_property_quarks ();
        Region::make_property_quarks ();
@@ -286,7 +286,7 @@ ARDOUR::init (bool use_vst, bool try_optimization)
        if (Config->load_state ()) {
                return -1;
        }
-        
+
        Config->set_use_vst (use_vst);
 
        Profile = new RuntimeProfile;
index 18ea19d0bc45277f344a143902d6aa24c6fe24fe..685deaeee0bc0ebba15fe81d1a5a166be65261ae 100644 (file)
@@ -52,8 +52,8 @@ int alloc_allowed ()
 }
 #endif
 
-Graph::Graph (Session & session) 
-        : SessionHandleRef (session) 
+Graph::Graph (Session & session)
+        : SessionHandleRef (session)
         , _quit_threads (false)
        , _execution_sem ("graph_execution", 0)
        , _callback_start_sem ("graph_start", 0)
@@ -74,15 +74,15 @@ Graph::Graph (Session & session)
         _setup_chain   = 1;
         _quit_threads = false;
         _graph_empty = true;
-        
+
         reset_thread_list ();
 
         Config->ParameterChanged.connect_same_thread (processor_usage_connection, boost::bind (&Graph::parameter_changed, this, _1));
 
-#ifdef DEBUG_RT_ALLOC  
+#ifdef DEBUG_RT_ALLOC
        graph = this;
        pbd_alloc_allowed = &::alloc_allowed;
-#endif 
+#endif
 }
 
 void
@@ -189,7 +189,7 @@ Graph::clear_other_chain ()
                 /* setup chain == pending chain - we have
                    to wait till this is no longer true.
                 */
-                _cleanup_cond.wait (_swap_mutex);                
+                _cleanup_cond.wait (_swap_mutex);
         }
 }
 
@@ -240,7 +240,7 @@ Graph::dec_ref()
 
                 // ok... this cycle is finished now.
                 // we are the only thread alive.
-       
+
                 this->restart_cycle();
         }
 }
@@ -330,7 +330,7 @@ Graph::rechain (boost::shared_ptr<RouteList> routelist)
                 for (RouteList::iterator ri=routelist->begin(); ri!=routelist->end(); ri++) {
                         if (rp->direct_feeds (*ri)) {
                                 if (is_feedback (routelist, rp.get(), *ri)) {
-                                        continue; 
+                                        continue;
                                 }
 
                                 has_output = true;
@@ -355,7 +355,7 @@ Graph::rechain (boost::shared_ptr<RouteList> routelist)
 
                 if (!has_output)
                         _init_finished_refcount[chain] += 1;
-        } 
+        }
 
         _pending_chain = chain;
         dump(chain);
@@ -421,10 +421,10 @@ static void get_rt()
 
         if (priority) {
                 struct sched_param rtparam;
-       
+
                 memset (&rtparam, 0, sizeof (rtparam));
                 rtparam.sched_priority = priority;
-       
+
                 pthread_setschedparam (pthread_self(), SCHED_FIFO, &rtparam);
         }
 }
@@ -567,7 +567,7 @@ Graph::process_routes (pframes_t nframes, framepos_t start_frame, framepos_t end
 }
 
 int
-Graph::routes_no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, 
+Graph::routes_no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
                        bool non_rt_pending, bool can_record, int declick)
 {
        DEBUG_TRACE (DEBUG::ProcessThreads, string_compose ("no-roll graph execution from %1 to %2 = %3\n", start_frame, end_frame, nframes));
@@ -613,7 +613,7 @@ Graph::process_one_route (Route* route)
         if (retval) {
                 _process_retval = retval;
         }
-    
+
         if (need_butler) {
                 _process_need_butler = true;
         }
index 7c0bc936d7d3759993cfce41e5e28173ec8cf96f..8a2deed80817cc15cccb60316ccd69df86b69ea1 100644 (file)
@@ -26,7 +26,7 @@ using namespace ARDOUR;
 
 GraphNode::GraphNode (graph_ptr_t graph)
         : _graph(graph)
-{ 
+{
 }
 
 GraphNode::~GraphNode()
index 0316f7f325056c3e4863d36ffa32e3fcfda265a8..7209236fe8ddcbe4b4abd6c6c03631a0476e09b5 100644 (file)
@@ -129,4 +129,4 @@ InternalReturn::can_support_io_configuration (const ChanCount& in, ChanCount& ou
        return true;
 }
 
-       
+
index 210835d17607f427c89326d902352160203e7ae2..e455722dd087b90688b2ab6dbc7649e70ad34d35 100644 (file)
@@ -57,11 +57,11 @@ InternalSend::use_target (boost::shared_ptr<Route> sendto)
        if (_send_to) {
                _send_to->remove_send_from_internal_return (this);
        }
-       
+
         _send_to = sendto;
 
         _send_to->add_send_to_internal_return (this);
-        
+
         set_name (sendto->name());
         _send_to_id = _send_to->id();
 
@@ -106,7 +106,7 @@ InternalSend::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame
 
                Amp::apply_gain (mixbufs, nframes, _current_gain, tgain);
                _current_gain = tgain;
-                
+
        } else if (tgain == 0.0) {
 
                /* we were quiet last time, and we're still supposed to be quiet.
index 7dcc1b7ccbfab551c28c8c3197b09ec3464b9c6c..20ab584885e7f19dd6bd348c2648b5d429c08c1b 100644 (file)
@@ -73,13 +73,13 @@ CubicInterpolation::interpolate (int channel, framecnt_t nframes, Sample *input,
     }
 
     /* keep this condition out of the inner loop */
-    
+
     if (input && output) {
 
            Sample inm1;
-           
+
            if (floor (distance) == 0.0) {
-                   /* best guess for the fake point we have to add to be able to interpolate at i == 0: 
+                   /* best guess for the fake point we have to add to be able to interpolate at i == 0:
                       .... maintain slope of first actual segment ...
                    */
                    inm1 = input[i] - (input[i+1] - input[i]);
@@ -106,7 +106,7 @@ CubicInterpolation::interpolate (int channel, framecnt_t nframes, Sample *input,
                    if (fractional_phase_part >= 1.0) {
                            fractional_phase_part -= 1.0;
                            ++i;
-                   } 
+                   }
 
                    // Cubically interpolate into the output buffer: keep this inlined for speed and rely on compiler
                    // optimization to take care of the rest
index 55eaeb7a3295e4bbd4a294a66f323f1b95370d3a..5c2cdcf53ecfb6a8deea31ddb6389793326e3e76 100644 (file)
@@ -96,7 +96,7 @@ IO::~IO ()
        }
 }
 
-void 
+void
 IO::increment_port_buffer_offset (pframes_t offset)
 {
        /* io_lock, not taken: function must be called from Session::process() calltree */
@@ -178,23 +178,23 @@ IO::disconnect (Port* our_port, string other_port, void* src)
 
         {
                 Glib::Mutex::Lock lm (io_lock);
-                
+
                 /* check that our_port is really one of ours */
-                
+
                 if ( ! _ports.contains(our_port)) {
                         return -1;
                 }
-                
+
                 /* disconnect it from the source */
-                
+
                 if (our_port->disconnect (other_port)) {
                         error << string_compose(_("IO: cannot disconnect port %1 from %2"), our_port->name(), other_port) << endmsg;
                         return -1;
                 }
-                
+
                 check_bundles_connected ();
         }
-        
+
         changed (IOChange (IOChange::ConnectionsChanged), src); /* EMIT SIGNAL */
 
        _session.set_dirty ();
@@ -211,15 +211,15 @@ IO::connect (Port* our_port, string other_port, void* src)
 
        {
                Glib::Mutex::Lock lm (io_lock);
-               
+
                /* check that our_port is really one of ours */
-               
+
                if ( ! _ports.contains(our_port) ) {
                        return -1;
                }
-               
+
                /* connect it to the source */
-               
+
                if (our_port->connect (other_port)) {
                        return -1;
                }
@@ -327,7 +327,7 @@ IO::add_port (string destination, void* src, DataType type)
                }
 
                PortCountChanged (n_ports()); /* EMIT SIGNAL */
-               
+
                // pan_changed (src); /* EMIT SIGNAL */
                change.type = IOChange::ConfigurationChanged;
                change.after = _ports.count ();
@@ -351,14 +351,14 @@ IO::disconnect (void* src)
 {
        {
                Glib::Mutex::Lock lm (io_lock);
-               
+
                for (PortSet::iterator i = _ports.begin(); i != _ports.end(); ++i) {
                        i->disconnect_all ();
                }
-               
+
                check_bundles_connected ();
        }
-       
+
        changed (IOChange (IOChange::ConnectionsChanged), src); /* EMIT SIGNAL */
 
        return 0;
@@ -369,7 +369,7 @@ bool
 IO::ensure_ports_locked (ChanCount count, bool clear, void* /*src*/)
 {
        assert (!AudioEngine::instance()->process_lock().trylock());
-       
+
        Port* port = 0;
        bool  changed    = false;
 
@@ -439,7 +439,7 @@ int
 IO::ensure_ports (ChanCount count, bool clear, void* src)
 {
        assert (!AudioEngine::instance()->process_lock().trylock());
-       
+
        bool changed = false;
 
        if (count == n_ports() && !clear) {
@@ -449,7 +449,7 @@ IO::ensure_ports (ChanCount count, bool clear, void* src)
        IOChange change;
 
        change.before = _ports.count ();
-       
+
        {
                Glib::Mutex::Lock im (io_lock);
                changed = ensure_ports_locked (count, clear, src);
@@ -472,7 +472,7 @@ int
 IO::ensure_io (ChanCount count, bool clear, void* src)
 {
        assert (!AudioEngine::instance()->process_lock().trylock());
-       
+
        return ensure_ports (count, clear, src);
 }
 
@@ -852,7 +852,7 @@ IO::create_ports (const XMLNode& node, int version)
 
        {
                Glib::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
-               
+
                if (ensure_ports (n, true, this)) {
                        error << string_compose(_("%1: cannot create I/O ports"), _name) << endmsg;
                        return -1;
@@ -909,12 +909,12 @@ IO::make_connections (const XMLNode& node, int version, bool in)
                                        if ((prop = cnode->property (X_("other"))) == 0) {
                                                continue;
                                        }
-                                        
+
                                        if (prop) {
                                                 connect (p, prop->value(), this);
                                        }
                                }
-                       } 
+                       }
                }
        }
 
@@ -1030,7 +1030,7 @@ IO::set_ports (const string& str)
 
        {
                Glib::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
-               
+
                // FIXME: audio-only
                if (ensure_ports (ChanCount(DataType::AUDIO, nports), true, this)) {
                        return -1;
@@ -1129,7 +1129,7 @@ IO::set_name (const string& requested_name)
 
        /* replace all colons in the name. i wish we didn't have to do this */
 
-       replace_all (name, ":", "-"); 
+       replace_all (name, ":", "-");
 
        for (PortSet::iterator i = _ports.begin(); i != _ports.end(); ++i) {
                string current_name = i->name();
@@ -1157,14 +1157,14 @@ IO::latency () const
        for (PortSet::const_iterator i = _ports.begin(); i != _ports.end(); ++i) {
                if ((latency = i->private_latency_range (_direction == Output).max) > max_latency) {
                         DEBUG_TRACE (DEBUG::Latency, string_compose ("port %1 has %2 latency of %3 - use\n",
-                                                                     name(), 
+                                                                     name(),
                                                                      ((_direction == Output) ? "PLAYBACK" : "CAPTURE"),
                                                                      latency));
                        max_latency = latency;
                }
        }
 
-        DEBUG_TRACE (DEBUG::Latency, string_compose ("%1: max %4 latency from %2 ports = %3\n", 
+        DEBUG_TRACE (DEBUG::Latency, string_compose ("%1: max %4 latency from %2 ports = %3\n",
                                                      name(), _ports.num_ports(), max_latency,
                                                      ((_direction == Output) ? "PLAYBACK" : "CAPTURE")));
        return max_latency;
@@ -1485,13 +1485,13 @@ bool
 IO::connected () const
 {
         /* do we have any connections at all? */
-        
+
         for (PortSet::const_iterator p = _ports.begin(); p != _ports.end(); ++p) {
                 if (p->connected()) {
                         return true;
                 }
         }
-        
+
         return false;
 }
 
index a0c78f07b5903376857b265bd2f8b3ed5b298f97..8e7cba0ab12eafe100cda5e2c7d3dc8c1e58ad51 100644 (file)
@@ -249,7 +249,7 @@ IOProcessor::silence (framecnt_t nframes)
        }
 }
 
-void 
+void
 IOProcessor::increment_port_buffer_offset (pframes_t offset)
 {
         if (_own_output && _output) {
index f5426500a47d85524b8ce106370780c194c7e47c..1fc8b2f1a0012352030747760e7eb6be14f17a36 100644 (file)
@@ -283,7 +283,7 @@ LadspaPlugin::set_parameter (uint32_t which, float val)
        if (which < _descriptor->PortCount) {
                _shadow_data[which] = (LADSPA_Data) val;
 
-#if 0          
+#if 0
                if (which < parameter_count() && controls[which]) {
                        controls[which]->Changed ();
                }
@@ -544,7 +544,7 @@ LadspaPlugin::connect_and_run (BufferSet& bufs,
                pframes_t nframes, framecnt_t offset)
 {
        Plugin::connect_and_run (bufs, in_map, out_map, nframes, offset);
-       
+
        cycles_t now;
        cycles_t then = get_cycles ();
 
@@ -637,7 +637,7 @@ LadspaPlugin::run_in_place (pframes_t nframes)
        }
 
        assert (_was_activated);
-       
+
        _descriptor->run (_handle, nframes);
 }
 
@@ -768,7 +768,7 @@ lrdf_remove_preset (const char *source, const char *setting_uri)
        lrdf_statement *i;
        char setting_uri_copy[64];
        char buf[64];
-       
+
        strncpy(setting_uri_copy, setting_uri, sizeof(setting_uri_copy));
 
        p.subject = setting_uri_copy;
@@ -811,7 +811,7 @@ LadspaPlugin::do_remove_preset (string name)
        if (!p) {
                return;
        }
-       
+
        string const source = preset_source (envvar);
        lrdf_remove_preset (source.c_str(), p->uri.c_str ());
 
@@ -825,7 +825,7 @@ LadspaPlugin::preset_envvar () const
        if ((envvar = getenv ("HOME")) == 0) {
                return "";
        }
-       
+
        return envvar;
 }
 
@@ -870,7 +870,7 @@ LadspaPlugin::do_save_preset (string name)
                        input_parameter_pids.push_back (i);
                }
        }
-       
+
        std::string unique (unique_id());
 
        if (!isdigit (unique[0])) {
index 086b6ed0c891ab21f6a59365c04c2288234a032d..7095596101be1e6fbc9cbceb48f1f99d7f2406b0 100644 (file)
@@ -95,7 +95,7 @@ Location::Location (Session& s, const XMLNode& node)
        /* Note: _position_lock_style is initialised above in case set_state doesn't set it
           (for 2.X session file compatibility).
        */
-       
+
        if (set_state (node, Stateful::loading_state_version)) {
                throw failed_constructor ();
        }
@@ -163,14 +163,14 @@ Location::set_start (framepos_t s, bool force, bool allow_bbt_recompute)
 
                assert (_start >= 0);
                assert (_end >= 0);
-               
+
                return 0;
        }
-       
+
        if (s != _start) {
 
                framepos_t const old = _start;
-               
+
                _start = s;
                if (allow_bbt_recompute) {
                        recompute_bbt_from_frames ();
@@ -183,7 +183,7 @@ Location::set_start (framepos_t s, bool force, bool allow_bbt_recompute)
        }
 
        assert (_start >= 0);
-       
+
        return 0;
 }
 
@@ -204,7 +204,7 @@ Location::set_end (framepos_t e, bool force, bool allow_bbt_recompute)
                        return -1;
                }
        }
-       
+
        if (is_mark()) {
                if (_start != e) {
                        _start = e;
@@ -218,13 +218,13 @@ Location::set_end (framepos_t e, bool force, bool allow_bbt_recompute)
 
                assert (_start >= 0);
                assert (_end >= 0);
-               
+
                return 0;
        }
 
        if (e != _end) {
                framepos_t const old = _end;
-               
+
                _end = e;
                if (allow_bbt_recompute) {
                        recompute_bbt_from_frames ();
@@ -520,7 +520,7 @@ Location::recompute_bbt_from_frames ()
        if (_position_lock_style != MusicTime) {
                return;
        }
-       
+
        _session.tempo_map().bbt_time (_start, _bbt_start);
        _session.tempo_map().bbt_time (_end, _bbt_end);
 }
@@ -710,7 +710,7 @@ void
 Locations::add (Location *loc, bool make_current)
 {
        assert (loc);
-       
+
        {
                Glib::Mutex::Lock lm (lock);
                locations.push_back (loc);
@@ -823,7 +823,7 @@ Locations::set_state (const XMLNode& node, int version)
                                XMLProperty const * prop_id = (*niter)->property ("id");
                                assert (prop_id);
                                PBD::ID id (prop_id->value ());
-                               
+
                                LocationList::const_iterator i = locations.begin();
                                while (i != locations.end () && (*i)->id() != id) {
                                        ++i;
@@ -970,7 +970,7 @@ void
 Locations::marks_either_side (framepos_t const frame, framepos_t& before, framepos_t& after) const
 {
        before = after = max_framepos;
-       
+
        LocationList locs;
 
        {
@@ -979,7 +979,7 @@ Locations::marks_either_side (framepos_t const frame, framepos_t& before, framep
        }
 
        /* Get a list of positions; don't store any that are exactly on our requested position */
-       
+
        std::list<framepos_t> positions;
 
        for (LocationList::const_iterator i = locs.begin(); i != locs.end(); ++i) {
@@ -1026,7 +1026,7 @@ Locations::marks_either_side (framepos_t const frame, framepos_t& before, framep
                /* none before */
                return;
        }
-       
+
        --i;
        before = *i;
 }
index 48ffede5910961343a340c4ab7982c8ea522af7e..38e3eb4286d475b3dc8e74c3de9faa0710f4ccc3 100644 (file)
@@ -258,7 +258,7 @@ LV2Plugin::init(void* c_plugin, framecnt_t rate)
                                _ui      = this_ui;
                                _ui_type = this_ui_type;
                                break;
-                       } 
+                       }
                }
 #else
                // Look for Gtk native UI
@@ -460,8 +460,8 @@ LV2Plugin::lv2_persist_store_callback(void*       host_data,
                            _uri_map.id_to_uri(NULL, type)));
 
        LV2PersistState* state = (LV2PersistState*)host_data;
-       state->add_uri(key,  _uri_map.id_to_uri(NULL, key)); 
-       state->add_uri(type, _uri_map.id_to_uri(NULL, type)); 
+       state->add_uri(key,  _uri_map.id_to_uri(NULL, key));
+       state->add_uri(type, _uri_map.id_to_uri(NULL, type));
        return state->add_value(key, value, size, type, flags);
 }
 
@@ -562,7 +562,7 @@ LV2Plugin::lv2_files_new_file_path(LV2_Files_Host_Data host_data,
 
        DEBUG_TRACE(DEBUG::LV2, string_compose("new file path %1 => %2\n",
                                               relative_path, path));
-       
+
        return g_strndup(path.c_str(), path.length());
 }
 
index c69d3424d796914933c4fabd51bc6a2208da253e..6839d37c4928b83415ca27545149ad58c01ea8d0 100644 (file)
@@ -257,7 +257,7 @@ LV2Plugin::init(void* c_plugin, framecnt_t rate)
                                _impl->ui      = this_ui;
                                _impl->ui_type = this_ui_type;
                                break;
-                       } 
+                       }
                }
 #else
                // Look for Gtk native UI
@@ -455,8 +455,8 @@ LV2Plugin::lv2_persist_store_callback(void*       host_data,
                            _uri_map.id_to_uri(NULL, type)));
 
        LV2PersistState* state = (LV2PersistState*)host_data;
-       state->add_uri(key,  _uri_map.id_to_uri(NULL, key)); 
-       state->add_uri(type, _uri_map.id_to_uri(NULL, type)); 
+       state->add_uri(key,  _uri_map.id_to_uri(NULL, key));
+       state->add_uri(type, _uri_map.id_to_uri(NULL, type));
        return state->add_value(key, value, size, type, flags);
 }
 
@@ -557,7 +557,7 @@ LV2Plugin::lv2_files_new_file_path(LV2_Files_Host_Data host_data,
 
        DEBUG_TRACE(DEBUG::LV2, string_compose("new file path %1 => %2\n",
                                               relative_path, path));
-       
+
        return g_strndup(path.c_str(), path.length());
 }
 
index 50ce3073883ab0c701e48e5fb25c39e6b486941f..0f8e4884ca0931dbfa0d6d2a7848884954f85efb 100644 (file)
@@ -29,7 +29,7 @@ MidiAutomationListBinder::MidiAutomationListBinder (boost::shared_ptr<MidiSource
        : _source (s)
        , _parameter (p)
 {
-       
+
 }
 
 MidiAutomationListBinder::MidiAutomationListBinder (XMLNode* node, Session::SourceMap const & sources)
@@ -37,7 +37,7 @@ MidiAutomationListBinder::MidiAutomationListBinder (XMLNode* node, Session::Sour
 {
        XMLProperty* source = node->property ("source-id");
        assert (source);
-       
+
        XMLProperty* parameter = node->property ("parameter");
        assert (parameter);
 
@@ -53,10 +53,10 @@ MidiAutomationListBinder::get ()
 {
        boost::shared_ptr<MidiModel> model = _source->model ();
        assert (model);
-       
+
        boost::shared_ptr<AutomationControl> control = model->automation_control (_parameter);
        assert (control);
-       
+
        return control->alist().get();
 }
 
index 588f7c63d613f0f9a9e8c996b0346573b2f804e8..cc717d5fb4d1a158c09c08ece4f0e1a24f6bfa52 100644 (file)
@@ -182,7 +182,7 @@ MIDIClock_Slave::update_midi_clock (Parser& /*parser*/, framepos_t timestamp)
                                                       t1 * session->frame_rate(),
                                                       session->frame_rate(),
                                                       ((t1 - t0) * session->frame_rate()) / one_ppqn_in_frames));
-       
+
        last_timestamp = timestamp;
 }
 
@@ -209,7 +209,7 @@ MIDIClock_Slave::reset ()
 
        _starting = true;
        _started  = true;
-       
+
        // session->request_locate(0, false);
 }
 
@@ -332,7 +332,7 @@ MIDIClock_Slave::speed_and_position (double& speed, framepos_t& pos)
 
        // calculate speed
        speed = ((t1 - t0) * session->frame_rate()) / one_ppqn_in_frames;
-       
+
        // provide a 3% deadzone to lock the speed
        if (fabs(speed - 1.0) <= 0.03)
                speed = 1.0;
index a99feec465f704baccad8daa91bfbc8fd4bc9e6e..0539e3b62f744e5d0e4f4f4f579d2f3edf5cc70e 100644 (file)
@@ -170,7 +170,7 @@ MidiDiskstream::non_realtime_input_change ()
                                                         _n_channels, input_change_pending.type)
                                      << endmsg;
                        }
-                       
+
                        if (ni == 0) {
                                _source_port = 0;
                        } else {
@@ -522,7 +522,7 @@ MidiDiskstream::process (framepos_t transport_frame, pframes_t nframes, bool can
        }
 
        if (nominally_recording || rec_nframes) {
-               
+
                // Pump entire port buffer into the ring buffer (FIXME: split cycles?)
                MidiBuffer& buf = _source_port->get_midi_buffer(nframes);
                for (MidiBuffer::iterator i = buf.begin(); i != buf.end(); ++i) {
@@ -820,7 +820,7 @@ MidiDiskstream::do_refill ()
        //      << frames_written - frames_read << endl;
 
        to_read = (framecnt_t) min ((framecnt_t) to_read, (framecnt_t) (max_framepos - file_frame));
+
        if (read (file_frame, to_read, reversed)) {
                ret = -1;
        }
@@ -1070,7 +1070,7 @@ MidiDiskstream::transport_stopped_wallclock (struct tm& /*when*/, time_t /*twhen
                                _write_source.reset();
                        }
                }
-               
+
 
                mark_write_completed = true;
        }
@@ -1286,7 +1286,7 @@ MidiDiskstream::use_new_write_source (uint32_t n)
        if (!_session.writable() || !recordable()) {
                return 1;
        }
-       
+
        assert(n == 0);
 
        _write_source.reset();
@@ -1366,7 +1366,7 @@ MidiDiskstream::set_align_style_from_io ()
                return;
        }
 
-       /* XXX Not sure what, if anything we can do with MIDI 
+       /* XXX Not sure what, if anything we can do with MIDI
           as far as capture alignment etc.
        */
 
@@ -1413,7 +1413,7 @@ MidiDiskstream::get_playback (MidiBuffer& dst, framepos_t start, framepos_t end)
 
 #ifndef NDEBUG
        DEBUG_TRACE (DEBUG::MidiDiskstreamIO, string_compose (
-                            "%1 MDS pre-read read from %2 write to %3\n", _name, 
+                            "%1 MDS pre-read read from %2 write to %3\n", _name,
                             _playback_buf->get_read_ptr(), _playback_buf->get_write_ptr()));
 //        cerr << "================\n";
 //        _playback_buf->dump (cerr);
index b23631da0e8ebbe4b009637c0ebc1bf0f2e98462..b6500563ba46604a376bd43548cf42baba6efb5a 100644 (file)
@@ -59,7 +59,7 @@ MidiModel::new_note_diff_command (const string name)
 {
        boost::shared_ptr<MidiSource> ms = _midi_source.lock ();
        assert (ms);
-       
+
        return new NoteDiffCommand (ms->model(), name);
 }
 
@@ -69,7 +69,7 @@ MidiModel::new_sysex_diff_command (const string name)
 {
        boost::shared_ptr<MidiSource> ms = _midi_source.lock ();
        assert (ms);
-       
+
        return new SysExDiffCommand (ms->model(), name);
 }
 
@@ -79,7 +79,7 @@ MidiModel::new_patch_change_diff_command (const string name)
 {
        boost::shared_ptr<MidiSource> ms = _midi_source.lock ();
        assert (ms);
-       
+
        return new PatchChangeDiffCommand (ms->model(), name);
 }
 
@@ -165,7 +165,7 @@ MidiModel::NoteDiffCommand::change (const NotePtr note, Property prop,
                                     uint8_t new_value)
 {
        assert (note);
-       
+
        NoteChange change;
 
        switch (prop) {
@@ -211,7 +211,7 @@ MidiModel::NoteDiffCommand::change (const NotePtr note, Property prop,
                                     TimeType new_time)
 {
        assert (note);
-       
+
        NoteChange change;
 
        switch (prop) {
@@ -372,7 +372,7 @@ MidiModel::NoteDiffCommand::undo ()
                for (ChangeList::iterator i = _changes.begin(); i != _changes.end(); ++i) {
                        Property prop = i->property;
                        switch (prop) {
-                               
+
                        case NoteNumber:
                                if (
                                        temporary_removals.find (i->note) == temporary_removals.end() &&
@@ -384,13 +384,13 @@ MidiModel::NoteDiffCommand::undo ()
                                           list (which means that it has already been removed and it
                                           will be re-added anyway)
                                        */
-                                       
+
                                        _model->remove_note_unlocked (i->note);
                                        temporary_removals.insert (i->note);
                                }
                                i->note->set_note (i->old_value);
                                break;
-                               
+
                        case StartTime:
                                if (
                                        temporary_removals.find (i->note) == temporary_removals.end() &&
@@ -404,7 +404,7 @@ MidiModel::NoteDiffCommand::undo ()
                                }
                                i->note->set_time (i->old_time);
                                break;
-                               
+
                        case Channel:
                                if (
                                        temporary_removals.find (i->note) == temporary_removals.end() &&
@@ -412,7 +412,7 @@ MidiModel::NoteDiffCommand::undo ()
                                        ) {
 
                                        /* See above ... */
-                                       
+
                                        _model->remove_note_unlocked (i->note);
                                        temporary_removals.insert (i->note);
                                }
@@ -425,7 +425,7 @@ MidiModel::NoteDiffCommand::undo ()
                        case Velocity:
                                i->note->set_velocity (i->old_value);
                                break;
-                               
+
                        case Length:
                                i->note->set_length (i->old_time);
                                break;
@@ -725,29 +725,29 @@ MidiModel::NoteDiffCommand::get_state ()
        diff_command->add_property("midi-source", _model->midi_source()->id().to_s());
 
        XMLNode* changes = diff_command->add_child(DIFF_NOTES_ELEMENT);
-       for_each(_changes.begin(), _changes.end(), 
+       for_each(_changes.begin(), _changes.end(),
                 boost::bind (
                         boost::bind (&XMLNode::add_child_nocopy, changes, _1),
                         boost::bind (&NoteDiffCommand::marshal_change, this, _1)));
 
        XMLNode* added_notes = diff_command->add_child(ADDED_NOTES_ELEMENT);
-       for_each(_added_notes.begin(), _added_notes.end(), 
+       for_each(_added_notes.begin(), _added_notes.end(),
                 boost::bind(
                         boost::bind (&XMLNode::add_child_nocopy, added_notes, _1),
                         boost::bind (&NoteDiffCommand::marshal_note, this, _1)));
 
        XMLNode* removed_notes = diff_command->add_child(REMOVED_NOTES_ELEMENT);
-       for_each(_removed_notes.begin(), _removed_notes.end(), 
+       for_each(_removed_notes.begin(), _removed_notes.end(),
                 boost::bind (
                         boost::bind (&XMLNode::add_child_nocopy, removed_notes, _1),
                         boost::bind (&NoteDiffCommand::marshal_note, this, _1)));
 
-       /* if this command had side-effects, store that state too 
+       /* if this command had side-effects, store that state too
         */
 
        if (!side_effect_removals.empty()) {
                XMLNode* side_effect_notes = diff_command->add_child(SIDE_EFFECT_REMOVALS_ELEMENT);
-               for_each(side_effect_removals.begin(), side_effect_removals.end(), 
+               for_each(side_effect_removals.begin(), side_effect_removals.end(),
                         boost::bind (
                                 boost::bind (&XMLNode::add_child_nocopy, side_effect_notes, _1),
                                 boost::bind (&NoteDiffCommand::marshal_note, this, _1)));
@@ -920,7 +920,7 @@ MidiModel::SysExDiffCommand::get_state ()
        diff_command->add_property ("midi-source", _model->midi_source()->id().to_s());
 
        XMLNode* changes = diff_command->add_child(DIFF_SYSEXES_ELEMENT);
-       for_each (_changes.begin(), _changes.end(), 
+       for_each (_changes.begin(), _changes.end(),
                  boost::bind (
                          boost::bind (&XMLNode::add_child_nocopy, changes, _1),
                          boost::bind (&SysExDiffCommand::marshal_change, this, _1)));
@@ -997,7 +997,7 @@ MidiModel::PatchChangeDiffCommand::change_bank (PatchChangePtr patch, int bank)
        c.patch = patch;
        c.old_bank = patch->bank ();
        c.new_bank = bank;
-       
+
        _changes.push_back (c);
 }
 
@@ -1006,7 +1006,7 @@ MidiModel::PatchChangeDiffCommand::operator() ()
 {
        {
                MidiModel::WriteLock lock (_model->edit_lock ());
-               
+
                for (list<PatchChangePtr>::iterator i = _added.begin(); i != _added.end(); ++i) {
                        _model->add_patch_change_unlocked (*i);
                }
@@ -1014,7 +1014,7 @@ MidiModel::PatchChangeDiffCommand::operator() ()
                for (list<PatchChangePtr>::iterator i = _removed.begin(); i != _removed.end(); ++i) {
                        _model->remove_patch_change_unlocked (*i);
                }
-               
+
                set<PatchChangePtr> temporary_removals;
 
                for (ChangeList::iterator i = _changes.begin(); i != _changes.end(); ++i) {
@@ -1062,7 +1062,7 @@ MidiModel::PatchChangeDiffCommand::undo ()
                for (list<PatchChangePtr>::iterator i = _removed.begin(); i != _removed.end(); ++i) {
                        _model->add_patch_change_unlocked (*i);
                }
-               
+
                set<PatchChangePtr> temporary_removals;
 
                for (ChangeList::iterator i = _changes.begin(); i != _changes.end(); ++i) {
@@ -1092,7 +1092,7 @@ MidiModel::PatchChangeDiffCommand::undo ()
                for (set<PatchChangePtr>::iterator i = temporary_removals.begin(); i != temporary_removals.end(); ++i) {
                        _model->add_patch_change_unlocked (*i);
                }
-               
+
        }
 
        _model->ContentsChanged (); /* EMIT SIGNAL */
@@ -1179,7 +1179,7 @@ MidiModel::PatchChangeDiffCommand::marshal_change (const Change& c)
                s << c.patch->id ();
                n->add_property ("id", s.str ());
        }
-       
+
        return *n;
 }
 
@@ -1197,7 +1197,7 @@ MidiModel::PatchChangeDiffCommand::unmarshal_patch_change (XMLNode* n)
                istringstream s (prop->value());
                s >> id;
        }
-       
+
        if ((prop = n->property ("time")) != 0) {
                istringstream s (prop->value ());
                s >> time;
@@ -1236,7 +1236,7 @@ MidiModel::PatchChangeDiffCommand::unmarshal_change (XMLNode* n)
        prop = n->property ("id");
        assert (prop);
        Evoral::event_id_t const id = atoi (prop->value().c_str());
-       
+
        prop = n->property ("old");
        assert (prop);
        {
@@ -1311,7 +1311,7 @@ MidiModel::PatchChangeDiffCommand::get_state ()
        diff_command->add_property("midi-source", _model->midi_source()->id().to_s());
 
        XMLNode* added = diff_command->add_child (ADDED_PATCH_CHANGES_ELEMENT);
-       for_each (_added.begin(), _added.end(), 
+       for_each (_added.begin(), _added.end(),
                  boost::bind (
                          boost::bind (&XMLNode::add_child_nocopy, added, _1),
                          boost::bind (&PatchChangeDiffCommand::marshal_patch_change, this, _1)
@@ -1319,13 +1319,13 @@ MidiModel::PatchChangeDiffCommand::get_state ()
                );
 
        XMLNode* removed = diff_command->add_child (REMOVED_PATCH_CHANGES_ELEMENT);
-       for_each (_removed.begin(), _removed.end(), 
+       for_each (_removed.begin(), _removed.end(),
                  boost::bind (
                          boost::bind (&XMLNode::add_child_nocopy, removed, _1),
                          boost::bind (&PatchChangeDiffCommand::marshal_patch_change, this, _1)
                          )
                );
-       
+
        XMLNode* changes = diff_command->add_child (DIFF_PATCH_CHANGES_ELEMENT);
        for_each (_changes.begin(), _changes.end(),
                  boost::bind (
@@ -1357,7 +1357,7 @@ MidiModel::write_to (boost::shared_ptr<MidiSource> source)
 
        boost::shared_ptr<MidiSource> ms = _midi_source.lock ();
        assert (ms);
-       
+
        source->drop_model();
        source->mark_streaming_midi_write_started (note_mode());
 
@@ -1388,7 +1388,7 @@ MidiModel::sync_to_source ()
 
        boost::shared_ptr<MidiSource> ms = _midi_source.lock ();
        assert (ms);
-       
+
        ms->mark_streaming_midi_write_started (note_mode());
 
        for (Evoral::Sequence<TimeType>::const_iterator i = begin(0, true); i != end(); ++i) {
@@ -1422,7 +1422,7 @@ MidiModel::write_section_to (boost::shared_ptr<MidiSource> source, Evoral::Music
 
        boost::shared_ptr<MidiSource> ms = _midi_source.lock ();
        assert (ms);
-       
+
        source->drop_model();
        source->mark_streaming_midi_write_started (note_mode());
 
@@ -1431,7 +1431,7 @@ MidiModel::write_section_to (boost::shared_ptr<MidiSource> source, Evoral::Music
 
                if (ev.time() >= begin_time && ev.time() < end_time) {
 
-                       const Evoral::MIDIEvent<Evoral::MusicalTime>* mev = 
+                       const Evoral::MIDIEvent<Evoral::MusicalTime>* mev =
                                static_cast<const Evoral::MIDIEvent<Evoral::MusicalTime>* > (&ev);
 
                        if (!mev) {
@@ -1609,8 +1609,8 @@ MidiModel::resolve_overlaps_unlocked (const NotePtr note, void* arg)
        TimeType note_length = note->length();
 
        DEBUG_TRACE (DEBUG::Sequence, string_compose ("%1 checking overlaps for note %2 @ %3\n", this, (int)note->note(), note->time()));
-       
-       for (Pitches::const_iterator i = p.lower_bound (search_note); 
+
+       for (Pitches::const_iterator i = p.lower_bound (search_note);
             i != p.end() && (*i)->note() == note->note(); ++i) {
 
                TimeType sb = (*i)->time();
@@ -1662,7 +1662,7 @@ MidiModel::resolve_overlaps_unlocked (const NotePtr note, void* arg)
                        case InsertMergeExtend:
                                if (cmd) {
                                        cmd->change ((*i), NoteDiffCommand::Length, note->end_time() - (*i)->time());
-                               } 
+                               }
                                (*i)->set_length (note->end_time() - (*i)->time());
                                return -1; /* do not add the new note */
                                break;
@@ -1764,14 +1764,14 @@ MidiModel::resolve_overlaps_unlocked (const NotePtr note, void* arg)
        if (set_note_time) {
                if (cmd) {
                        cmd->change (note, NoteDiffCommand::StartTime, note_time);
-               } 
+               }
                note->set_time (note_time);
        }
 
        if (set_note_length) {
                if (cmd) {
                        cmd->change (note, NoteDiffCommand::Length, note_length);
-               } 
+               }
                note->set_length (note_length);
        }
 
@@ -1779,7 +1779,7 @@ MidiModel::resolve_overlaps_unlocked (const NotePtr note, void* arg)
 }
 
 InsertMergePolicy
-MidiModel::insert_merge_policy () const 
+MidiModel::insert_merge_policy () const
 {
        /* XXX ultimately this should be a per-track or even per-model policy */
        boost::shared_ptr<MidiSource> ms = _midi_source.lock ();
@@ -1792,7 +1792,7 @@ void
 MidiModel::set_midi_source (boost::shared_ptr<MidiSource> s)
 {
        boost::shared_ptr<MidiSource> old = _midi_source.lock ();
-       
+
        if (old) {
                old->invalidate ();
        }
@@ -1888,16 +1888,16 @@ MidiModel::insert_silence_at_start (TimeType t)
 {
        boost::shared_ptr<MidiSource> s = _midi_source.lock ();
        assert (s);
-       
+
        /* Notes */
 
        if (!notes().empty ()) {
                NoteDiffCommand* c = new_note_diff_command ("insert silence");
-               
+
                for (Notes::const_iterator i = notes().begin(); i != notes().end(); ++i) {
                        c->change (*i, NoteDiffCommand::StartTime, (*i)->time() + t);
                }
-               
+
                apply_command_as_subcommand (s->session(), c);
        }
 
@@ -1936,20 +1936,20 @@ void
 MidiModel::transpose (TimeType from, TimeType to, int semitones)
 {
        boost::shared_ptr<const MidiSource> s = midi_source ();
-       
+
        NoteDiffCommand* c = new_note_diff_command (_("transpose"));
-       
+
        for (Notes::iterator i = notes().begin(); i != notes().end(); ++i) {
 
                if ((*i)->time() >= to) {
-                       
+
                        /* finished */
                        break;
-                       
+
                } else if ((*i)->time() >= from) {
 
                        int new_note = (*i)->note() + semitones;
-                       
+
                        if (new_note < 0) {
                                new_note = 0;
                        } else if (new_note > 127) {
@@ -1957,7 +1957,7 @@ MidiModel::transpose (TimeType from, TimeType to, int semitones)
                        }
 
                        c->change (*i, NoteDiffCommand::NoteNumber, (uint8_t) new_note);
-                       
+
                }
        }
 
index bdf642281aa381df60fc786568460d412229970b..3b2c8dbb489ec574a1e168fd35b0e877c3b22dcd 100644 (file)
@@ -57,7 +57,7 @@ This code has been in place as a stub in case anyone gets any brilliant ideas
 on other ways to approach this issue.
 ********************************************************************************/
 
-MidiPlaylistSource::MidiPlaylistSource (Session& s, const ID& orig, const std::string& name, boost::shared_ptr<MidiPlaylist> p, 
+MidiPlaylistSource::MidiPlaylistSource (Session& s, const ID& orig, const std::string& name, boost::shared_ptr<MidiPlaylist> p,
                                        uint32_t chn, frameoffset_t begin, framecnt_t len, Source::Flag flags)
        : Source (s, DataType::MIDI, name)
        , MidiSource (s, name, flags)
@@ -76,7 +76,7 @@ MidiPlaylistSource::MidiPlaylistSource (Session& s, const XMLNode& node)
        /* ancestors have already called ::set_state() in their XML-based
           constructors.
        */
-       
+
        if (set_state (node, Stateful::loading_state_version, false)) {
                throw failed_constructor ();
        }
@@ -98,18 +98,18 @@ MidiPlaylistSource::get_state ()
        return node;
 }
 
-       
+
 int
-MidiPlaylistSource::set_state (const XMLNode& node, int version) 
+MidiPlaylistSource::set_state (const XMLNode& node, int version)
 {
        return set_state (node, version, true);
 }
 
 int
-MidiPlaylistSource::set_state (const XMLNode& node, int version, bool with_descendants) 
+MidiPlaylistSource::set_state (const XMLNode& node, int version, bool with_descendants)
 {
        if (with_descendants) {
-               if (Source::set_state (node, version) || 
+               if (Source::set_state (node, version) ||
                    MidiSource::set_state (node, version) ||
                    PlaylistSource::set_state (node, version)) {
                        return -1;
@@ -126,11 +126,11 @@ MidiPlaylistSource::length (framepos_t)  const
        return extent.second - extent.first;
 }
 
-framepos_t 
+framepos_t
 MidiPlaylistSource::read_unlocked (Evoral::EventSink<framepos_t>& dst,
                                   framepos_t position,
                                   framepos_t start, framecnt_t cnt,
-                                  MidiStateTracker* tracker) const 
+                                  MidiStateTracker* tracker) const
 {
        boost::shared_ptr<MidiPlaylist> mp = boost::dynamic_pointer_cast<MidiPlaylist> (_playlist);
 
@@ -141,24 +141,24 @@ MidiPlaylistSource::read_unlocked (Evoral::EventSink<framepos_t>& dst,
        return mp->read (dst, start, cnt);
 }
 
-framepos_t 
+framepos_t
 MidiPlaylistSource::write_unlocked (MidiRingBuffer<framepos_t>& dst,
                                    framepos_t position,
-                                   framecnt_t cnt) 
+                                   framecnt_t cnt)
 {
        fatal << string_compose (_("programming error: %1"), "MidiPlaylistSource::write_unlocked() called - should be impossible") << endmsg;
        /*NOTREACHED*/
        return 0;
 }
 
-void 
+void
 MidiPlaylistSource::append_event_unlocked_beats(const Evoral::Event<Evoral::MusicalTime>& /*ev*/)
 {
        fatal << string_compose (_("programming error: %1"), "MidiPlaylistSource::append_event_unlocked_beats() called - should be impossible") << endmsg;
        /*NOTREACHED*/
 }
 
-void 
+void
 MidiPlaylistSource::append_event_unlocked_frames(const Evoral::Event<framepos_t>& ev, framepos_t source_start)
 {
        fatal << string_compose (_("programming error: %1"), "MidiPlaylistSource::append_event_unlocked_frames() called - should be impossible") << endmsg;
@@ -166,13 +166,13 @@ MidiPlaylistSource::append_event_unlocked_frames(const Evoral::Event<framepos_t>
 }
 
 void
-MidiPlaylistSource::load_model (bool, bool) 
+MidiPlaylistSource::load_model (bool, bool)
 {
        /* nothing to do */
 }
 
 void
-MidiPlaylistSource::destroy_model () 
+MidiPlaylistSource::destroy_model ()
 {
        /* nothing to do */
 }
index 77fe712c5caeb28b84fc273bb74077fc68338803..a8bff5bfa704a188d7a33baa67506dd88c81984f 100644 (file)
@@ -84,12 +84,12 @@ MidiPort::get_midi_buffer (pframes_t nframes)
 
                        /* check that the event is in the acceptable time range */
 
-                       if ((ev.time >= (_global_port_buffer_offset + _port_buffer_offset)) && 
+                       if ((ev.time >= (_global_port_buffer_offset + _port_buffer_offset)) &&
                            (ev.time < (_global_port_buffer_offset + _port_buffer_offset + nframes))) {
                                _buffer->push_back (ev);
                        } else {
-                               cerr << "Dropping incoming MIDI at time " << ev.time << "; offset=" 
-                                    << _global_port_buffer_offset << " limit=" 
+                               cerr << "Dropping incoming MIDI at time " << ev.time << "; offset="
+                                    << _global_port_buffer_offset << " limit="
                                     << (_global_port_buffer_offset + _port_buffer_offset + nframes) << "\n";
                        }
                }
@@ -122,28 +122,28 @@ void
 MidiPort::resolve_notes (void* jack_buffer, MidiBuffer::TimeType when)
 {
        uint8_t ev[3];
-       
+
        ev[2] = 0;
-       
+
        for (uint8_t channel = 0; channel <= 0xF; channel++) {
                ev[0] = (MIDI_CMD_CONTROL | channel);
-               
+
                /* we need to send all notes off AND turn the
                 * sustain/damper pedal off to handle synths
                 * that prioritize sustain over AllNotesOff
                 */
-               
+
                ev[1] = MIDI_CTL_SUSTAIN;
-               
+
                if (jack_midi_event_write (jack_buffer, when, ev, 3) != 0) {
                        cerr << "failed to deliver sustain-zero on channel " << channel << " on port " << name() << endl;
-               } 
-               
+               }
+
                ev[1] = MIDI_CTL_ALL_NOTES_OFF;
-               
+
                if (jack_midi_event_write (jack_buffer, 0, ev, 3) != 0) {
                        cerr << "failed to deliver ALL NOTES OFF on channel " << channel << " on port " << name() << endl;
-               } 
+               }
        }
 }
 
@@ -175,11 +175,11 @@ MidiPort::flush_buffers (pframes_t nframes, framepos_t time)
 
                        if (ev.time() >= _global_port_buffer_offset + _port_buffer_offset) {
                                if (jack_midi_event_write (jack_buffer, (jack_nframes_t) ev.time(), ev.buffer(), ev.size()) != 0) {
-                                       cerr << "write failed, drop flushed note off on the floor, time " 
+                                       cerr << "write failed, drop flushed note off on the floor, time "
                                             << ev.time() << " > " << _global_port_buffer_offset + _port_buffer_offset << endl;
                                }
                        } else {
-                               cerr << "drop flushed event on the floor, time " << ev.time() 
+                               cerr << "drop flushed event on the floor, time " << ev.time()
                                     << " < " << _global_port_buffer_offset + _port_buffer_offset << endl;
                        }
                }
index f8640e01977b77553918b37a3b15f6e2c6261a9d..ba926211a3fa2f5512cbd80c201443558bee4aa2 100644 (file)
@@ -115,7 +115,7 @@ MidiRegion::~MidiRegion ()
 {
 }
 
-/** Create a new MidiRegion that has its own version of some/all of the Source used by another. 
+/** Create a new MidiRegion that has its own version of some/all of the Source used by another.
  */
 boost::shared_ptr<MidiRegion>
 MidiRegion::clone ()
@@ -189,7 +189,7 @@ MidiRegion::master_read_at (MidiRingBuffer<framepos_t>& out, framepos_t position
 }
 
 framecnt_t
-MidiRegion::_read_at (const SourceList& /*srcs*/, Evoral::EventSink<framepos_t>& dst, framepos_t position, framecnt_t dur, uint32_t chan_n, 
+MidiRegion::_read_at (const SourceList& /*srcs*/, Evoral::EventSink<framepos_t>& dst, framepos_t position, framecnt_t dur, uint32_t chan_n,
                      NoteMode mode, MidiStateTracker* tracker) const
 {
        frameoffset_t internal_offset = 0;
@@ -224,7 +224,7 @@ MidiRegion::_read_at (const SourceList& /*srcs*/, Evoral::EventSink<framepos_t>&
 
        boost::shared_ptr<MidiSource> src = midi_source(chan_n);
        src->set_note_mode(mode);
-        
+
        /*
          cerr << "MR read @ " << position << " * " << to_read
          << " _position = " << _position
@@ -315,7 +315,7 @@ MidiRegion::model_changed ()
        if (!model()) {
                return;
        }
-       
+
        /* build list of filtered Parameters, being those whose automation state is not `Play' */
 
        _filtered_parameters.clear ();
@@ -342,14 +342,14 @@ MidiRegion::model_changed ()
 void
 MidiRegion::model_contents_changed ()
 {
-       send_change (PropertyChange (Properties::midi_data));        
+       send_change (PropertyChange (Properties::midi_data));
 }
 
 void
 MidiRegion::model_automation_state_changed (Evoral::Parameter const & p)
 {
        /* Update our filtered parameters list after a change to a parameter's AutoState */
-       
+
        boost::shared_ptr<AutomationControl> ac = model()->automation_control (p);
        assert (ac);
 
index 824d3bad8436f829a567d0ae738c01256bea783f..434fa0c33ea608242b8f6106c4832f49a6e78264 100644 (file)
@@ -48,7 +48,7 @@ MidiRingBuffer<T>::read(MidiBuffer& dst, framepos_t start, framepos_t end, frame
           to the MidiBuffer with adjusted times.  The situation is as follows:
 
           session frames----------------------------->
-          
+
                     |                            |                    |
                start_of_loop                   start              end_of_loop
 
@@ -100,12 +100,12 @@ MidiRingBuffer<T>::read(MidiBuffer& dst, framepos_t start, framepos_t end, frame
                } else {
                        DEBUG_TRACE (DEBUG::MidiDiskstreamIO, string_compose ("MRB event @ %1 in range %2 .. %3\n", ev_time, start, end));
                }
-               
+
                /* lets see if we are going to be able to write this event into dst.
                 */
 
                assert(ev_time >= start);
-               
+
                ev_time -= start;
                ev_time += offset;
 
@@ -206,8 +206,8 @@ MidiRingBuffer<T>::dump(ostream& str)
                return;
        }
 
-       str << this << ": Dump size = " << vec.len[0] + vec.len[1] 
-           << " r@ " << RingBufferNPT<uint8_t>::get_read_ptr() 
+       str << this << ": Dump size = " << vec.len[0] + vec.len[1]
+           << " r@ " << RingBufferNPT<uint8_t>::get_read_ptr()
            << " w@" << RingBufferNPT<uint8_t>::get_write_ptr() << endl;
 
 
@@ -222,7 +222,7 @@ MidiRingBuffer<T>::dump(ostream& str)
        const uint8_t* end = buf + vec.len[0] + vec.len[1];
 
        while (data < end) {
-                
+
                memcpy (&ev_time, data, sizeof (T));
                data += sizeof (T);
                str << "\ttime " << ev_time;
index fe7a7821db8312bb1522871bb5b25af74fe800e4..4c7abd22d8004b352e1509353a32d94f1d214f82 100644 (file)
@@ -130,7 +130,7 @@ MidiSource::set_state (const XMLNode& node, int /*version*/)
                                error << _("Missing parameter property on InterpolationStyle") << endmsg;
                                return -1;
                        }
-                       
+
                        Evoral::Parameter p = EventTypeMap::instance().new_parameter (prop->value());
 
                        if ((prop = (*i)->property (X_("style"))) == 0) {
@@ -140,16 +140,16 @@ MidiSource::set_state (const XMLNode& node, int /*version*/)
 
                        Evoral::ControlList::InterpolationStyle s = static_cast<Evoral::ControlList::InterpolationStyle> (string_2_enum (prop->value(), s));
                        set_interpolation_of (p, s);
-                       
+
                } else if ((*i)->name() == X_("AutomationState")) {
-                       
+
                        XMLProperty* prop;
 
                        if ((prop = (*i)->property (X_("parameter"))) == 0) {
                                error << _("Missing parameter property on AutomationState") << endmsg;
                                return -1;
                        }
-                       
+
                        Evoral::Parameter p = EventTypeMap::instance().new_parameter (prop->value());
 
                        if ((prop = (*i)->property (X_("state"))) == 0) {
@@ -325,14 +325,14 @@ MidiSource::clone (Evoral::MusicalTime begin, Evoral::MusicalTime end)
        /* get a new name for the MIDI file we're going to write to
         */
 
-       do { 
+       do {
 
                newname = bump_name_once (newname, '-');
                /* XXX build path safely */
                newpath = _session.session_directory().midi_path().to_string() +"/"+ newname + ".mid";
 
        } while (Glib::file_test (newpath, Glib::FILE_TEST_EXISTS));
-        
+
        boost::shared_ptr<MidiSource> newsrc = boost::dynamic_pointer_cast<MidiSource>(
                SourceFactory::createWritable(DataType::MIDI, _session,
                                              newpath, string(), false, _session.frame_rate()));
@@ -355,20 +355,20 @@ MidiSource::clone (Evoral::MusicalTime begin, Evoral::MusicalTime end)
        newsrc->flush_midi();
 
        /* force a reload of the model if the range is partial */
-        
+
        if (begin != Evoral::MinMusicalTime || end != Evoral::MaxMusicalTime) {
                newsrc->load_model (true, true);
        } else {
                newsrc->set_model (_model);
        }
-        
+
        return newsrc;
 }
 
 void
 MidiSource::session_saved()
 {
-       /* this writes a copy of the data to disk. 
+       /* this writes a copy of the data to disk.
           XXX do we need to do this every time?
        */
 
@@ -383,7 +383,7 @@ MidiSource::session_saved()
                */
 
                boost::shared_ptr<MidiModel> mm = _model ;
-               _model.reset ();   
+               _model.reset ();
 
                /* flush model contents to disk
                 */
@@ -410,7 +410,7 @@ MidiSource::set_note_mode(NoteMode mode)
 void
 MidiSource::drop_model ()
 {
-       _model.reset(); 
+       _model.reset();
        ModelChanged (); /* EMIT SIGNAL */
 }
 
@@ -457,7 +457,7 @@ MidiSource::set_interpolation_of (Evoral::Parameter p, Evoral::ControlList::Inte
        if (interpolation_of (p) == s) {
                return;
        }
-       
+
        if (EventTypeMap::instance().interpolation_of (p) == s) {
                /* interpolation type is being set to the default, so we don't need a note in our map */
                _interpolation_style.erase (p);
@@ -474,7 +474,7 @@ MidiSource::set_automation_state_of (Evoral::Parameter p, AutoState s)
        if (automation_state_of (p) == s) {
                return;
        }
-       
+
        if (s == Play) {
                /* automation state is being set to the default, so we don't need a note in our map */
                _automation_state.erase (p);
index 8ff9c3e0c5f7988faf233be43ea03a0b7e329333..52a0cac27e24c8160a83fa66c42e0fbb3455b08f 100644 (file)
@@ -98,7 +98,7 @@ void
 MidiTrack::set_diskstream (boost::shared_ptr<Diskstream> ds)
 {
        Track::set_diskstream (ds);
-       
+
        _diskstream->set_track (this);
        _diskstream->set_destructive (_mode == Destructive);
 
@@ -440,7 +440,7 @@ MidiTrack::push_midi_input_to_step_edit_ringbuffer (framecnt_t nframes)
                        const Evoral::MIDIEvent<framepos_t> ev(*e, false);
 
                        /* note on, since for step edit, note length is determined
-                          elsewhere 
+                          elsewhere
                        */
 
                        if (ev.is_note_on()) {
@@ -460,7 +460,7 @@ MidiTrack::write_out_of_band_data (BufferSet& bufs, framepos_t /*start*/, framep
 
        if (_immediate_events.read_space()) {
 
-               DEBUG_TRACE (DEBUG::MidiIO, string_compose ("%1 has %2 of immediate events to deliver\n", 
+               DEBUG_TRACE (DEBUG::MidiIO, string_compose ("%1 has %2 of immediate events to deliver\n",
                                                            name(), _immediate_events.read_space()));
 
                /* write as many of the immediate events as we can, but give "true" as
@@ -468,10 +468,10 @@ MidiTrack::write_out_of_band_data (BufferSet& bufs, framepos_t /*start*/, framep
                 * ship the rest out next time.
                 *
                 * the (nframes-1) argument puts all these events at the last
-                * possible position of the output buffer, so that we do not 
+                * possible position of the output buffer, so that we do not
                 * violate monotonicity when writing.
                 */
-               
+
                _immediate_events.read (buf, 0, 1, nframes-1, true);
        }
 
@@ -664,7 +664,7 @@ MidiTrack::diskstream_data_recorded (boost::shared_ptr<MidiBuffer> buf, boost::w
 {
        DataRecorded (buf, src); /* EMIT SIGNAL */
 }
-                              
+
 bool
 MidiTrack::should_monitor () const
 {
index 2b39d6c0329b12b3204ce509c0bdf3c9e9be648b..06c9428ad7b2a2b5b618bce310fac8e0f9305c8c 100644 (file)
@@ -46,7 +46,7 @@ MidiControlUI* MidiControlUI::_instance = 0;
 
 MidiControlUI::MidiControlUI (Session& s)
        : AbstractUI<MidiUIRequest> (_("midiui"))
-       , _session (s) 
+       , _session (s)
 {
        MIDI::Manager::instance()->PortsChanged.connect_same_thread (rebind_connection, boost::bind (&MidiControlUI::change_midi_ports, this));
        _instance = this;
@@ -145,13 +145,13 @@ MidiControlUI::reset_ports ()
 
                        port_sources.push_back (psrc->gobj());
                        g_source_ref (psrc->gobj());
-               } 
+               }
        }
 }
 
 void
 MidiControlUI::thread_init ()
-{      
+{
        struct sched_param rtparam;
 
        pthread_set_name (X_("midiUI"));
index 7ec2a8ef4c915dd8edbf9d279f0581437c7f503a..57d4a57c74b31a263c5140709fdb39008371b59d 100644 (file)
@@ -34,11 +34,11 @@ MonitorProcessor::MonitorProcessor (Session& s)
         , _dim_all_ptr (new MPControl<bool> (false, _("monitor dim"), Controllable::Toggle))
         , _cut_all_ptr (new MPControl<bool> (false, _("monitor cut"), Controllable::Toggle))
         , _mono_ptr (new MPControl<bool> (false, _("monitor mono"), Controllable::Toggle))
-        , _dim_level_ptr (new MPControl<volatile gain_t> 
+        , _dim_level_ptr (new MPControl<volatile gain_t>
                           (0.2, _("monitor mono"), Controllable::Flag (0), 0.0f, 1.0f))
-        , _solo_boost_level_ptr (new MPControl<volatile gain_t> 
+        , _solo_boost_level_ptr (new MPControl<volatile gain_t>
                                  (1.0, _("monitor mono"), Controllable::Flag (0), 1.0f, 3.0f))
-          
+
         , _dim_all_control (_dim_all_ptr)
         , _cut_all_control (_cut_all_ptr)
         , _mono_control (_mono_ptr)
@@ -108,7 +108,7 @@ MonitorProcessor::set_state (const XMLNode& node, int version)
                       << endmsg;
                 return -1;
         }
-        
+
         allocate_channels (atoi (prop->value()));
 
         if ((prop = node.property (X_("dim-level"))) != 0) {
@@ -150,7 +150,7 @@ MonitorProcessor::set_state (const XMLNode& node, int version)
                                       << endmsg;
                                 return -1;
                         }
-                        
+
                         if (chn >= _channels.size()) {
                                 error << string_compose (X_("programming error: %1"), X_("MonitorProcessor XML settings has an illegal channel count"))
                                       << endmsg;
@@ -185,7 +185,7 @@ MonitorProcessor::set_state (const XMLNode& node, int version)
                         }
                 }
         }
-        
+
         /* reset solo cnt */
 
         solo_cnt = 0;
@@ -195,7 +195,7 @@ MonitorProcessor::set_state (const XMLNode& node, int version)
                         solo_cnt++;
                 }
         }
-        
+
         return 0;
 }
 
@@ -208,7 +208,7 @@ MonitorProcessor::state (bool full)
        /* this replaces any existing "type" property */
 
        node.add_property (X_("type"), X_("monitor"));
-        
+
         snprintf (buf, sizeof(buf), "%.12g", _dim_level.val());
         node.add_property (X_("dim-level"), buf);
 
@@ -218,7 +218,7 @@ MonitorProcessor::state (bool full)
         node.add_property (X_("cut-all"), (_cut_all ? "yes" : "no"));
         node.add_property (X_("dim-all"), (_dim_all ? "yes" : "no"));
         node.add_property (X_("mono"), (_mono ? "yes" : "no"));
-        
+
         uint32_t limit = _channels.size();
 
         snprintf (buf, sizeof (buf), "%u", limit);
@@ -232,12 +232,12 @@ MonitorProcessor::state (bool full)
 
                 snprintf (buf, sizeof (buf), "%u", chn);
                 chn_node->add_property ("id", buf);
-                
+
                 chn_node->add_property (X_("cut"), (*x)->cut == 1.0f ? "no" : "yes");
                 chn_node->add_property (X_("invert"), (*x)->polarity == 1.0f ? "no" : "yes");
                 chn_node->add_property (X_("dim"), (*x)->dim ? "yes" : "no");
                 chn_node->add_property (X_("solo"), (*x)->soloed ? "yes" : "no");
-                
+
                 node.add_child_nocopy (*chn_node);
         }
 
@@ -331,7 +331,7 @@ MonitorProcessor::configure_io (ChanCount in, ChanCount out)
         return Processor::configure_io (in, out);
 }
 
-bool 
+bool
 MonitorProcessor::can_support_io_configuration (const ChanCount& in, ChanCount& out) const
 {
        out = in;
@@ -346,7 +346,7 @@ MonitorProcessor::set_polarity (uint32_t chn, bool invert)
         } else {
                 _channels[chn]->polarity = 1.0f;
         }
-}       
+}
 
 void
 MonitorProcessor::set_dim (uint32_t chn, bool yn)
@@ -369,7 +369,7 @@ MonitorProcessor::set_solo (uint32_t chn, bool solo)
 {
         if (solo != _channels[chn]->soloed) {
                 _channels[chn]->soloed = solo;
-                
+
                 if (solo) {
                         solo_cnt++;
                 } else {
@@ -404,27 +404,27 @@ MonitorProcessor::display_to_user () const
         return false;
 }
 
-bool 
+bool
 MonitorProcessor::soloed (uint32_t chn) const
 {
         return _channels[chn]->soloed;
 }
 
 
-bool 
+bool
 MonitorProcessor::inverted (uint32_t chn) const
 {
         return _channels[chn]->polarity < 0.0f;
 }
 
 
-bool 
+bool
 MonitorProcessor::cut (uint32_t chn) const
 {
         return _channels[chn]->cut == 0.0f;
 }
 
-bool 
+bool
 MonitorProcessor::dimmed (uint32_t chn) const
 {
         return _channels[chn]->dim;
@@ -490,12 +490,12 @@ MonitorProcessor::ChannelRecord::ChannelRecord (uint32_t chn)
        , dim_ptr (new MPControl<bool> (false, string_compose (_("dim control"), chn), PBD::Controllable::Toggle))
        , polarity_ptr (new MPControl<gain_t> (1.0, string_compose (_("polarity control"), chn), PBD::Controllable::Toggle))
        , soloed_ptr (new MPControl<bool> (false, string_compose (_("solo control"), chn), PBD::Controllable::Toggle))
-         
+
        , cut_control (cut_ptr)
        , dim_control (dim_ptr)
        , polarity_control (polarity_ptr)
        , soloed_control (soloed_ptr)
-         
+
        , cut (*cut_ptr)
        , dim (*dim_ptr)
        , polarity (*polarity_ptr)
index ee9bef05702eb844e68a54043151eb379f696c4f..5edb5583f71055e108ef6f6c798d9709c6f9d0b8 100644 (file)
@@ -60,7 +60,7 @@ MTC_Slave::MTC_Slave (Session& s, MIDI::Port& p)
        reset_position = false;
 
        pic = new PIChaser();
-       
+
        last_mtc_fps_byte = session.get_mtc_timecode_bits ();
        mtc_frame = 0;
 
@@ -81,7 +81,7 @@ MTC_Slave::~MTC_Slave()
        delete [] speed_accumulator;
 }
 
-bool 
+bool
 MTC_Slave::give_slave_full_control_over_transport_speed() const
 {
        return true; // for PiC control */
@@ -92,9 +92,9 @@ void
 MTC_Slave::rebind (MIDI::Port& p)
 {
        port_connections.drop_connections ();
-       
+
        port = &p;
-       
+
        port->parser()->mtc_time.connect_same_thread (port_connections,  boost::bind (&MTC_Slave::update_mtc_time, this, _1, _2, _3));
        port->parser()->mtc_qtr.connect_same_thread (port_connections, boost::bind (&MTC_Slave::update_mtc_qtr, this, _1, _2, _3));
        port->parser()->mtc_status.connect_same_thread (port_connections, boost::bind (&MTC_Slave::update_mtc_status, this, _1));
@@ -126,7 +126,7 @@ MTC_Slave::update_mtc_time (const byte *msg, bool was_full, framepos_t now)
        framepos_t window_root = -1;
 
        DEBUG_TRACE (DEBUG::MTC, string_compose ("full mtc time known at %1, full ? %2\n", now, was_full));
-       
+
        timecode.hours = msg[3];
        timecode.minutes = msg[2];
        timecode.seconds = msg[1];
@@ -180,9 +180,9 @@ MTC_Slave::update_mtc_time (const byte *msg, bool was_full, framepos_t now)
                session.config.set_timecode_format (tc_format);
        }
 
-       DEBUG_TRACE (DEBUG::MTC, string_compose ("MTC time timestamp = %1 TC %2 = frame %3 (from full message ? %4)\n", 
+       DEBUG_TRACE (DEBUG::MTC, string_compose ("MTC time timestamp = %1 TC %2 = frame %3 (from full message ? %4)\n",
                                                 now, timecode, mtc_frame, was_full));
-       
+
        if (was_full || outside_window (mtc_frame)) {
 
                session.timecode_to_sample (timecode, mtc_frame, true, false);
@@ -193,25 +193,25 @@ MTC_Slave::update_mtc_time (const byte *msg, bool was_full, framepos_t now)
                reset_window (mtc_frame);
 
        } else {
-                       
+
                /* we've had the first set of 8 qtr frame messages, determine position
                   and allow continuing qtr frame messages to provide position
                   and speed information.
                */
-               
+
                /* do a careful conversion of the timecode value to a position
-                  so that we take drop/nondrop and all that nonsense into 
+                  so that we take drop/nondrop and all that nonsense into
                   consideration.
                */
 
                session.timecode_to_sample (timecode, mtc_frame, true, false);
-               
+
                /* We received the last quarter frame 7 quarter frames (1.75 mtc
                   frames) after the instance when the contents of the mtc quarter
                   frames were decided. Add time to compensate for the elapsed 1.75
                   frames. Also compensate for audio latency.
                */
-               
+
                mtc_frame += (long) (1.75 * session.frames_per_timecode_frame()) + session.worst_playback_latency();
 
 
@@ -225,13 +225,13 @@ MTC_Slave::update_mtc_time (const byte *msg, bool was_full, framepos_t now)
                        } else {
 
                                if (give_slave_full_control_over_transport_speed()) {
-                                       /* PIC 
-                                        * 
+                                       /* PIC
+                                        *
                                         * its not the average, but we will assign it to current.speed below
                                         */
 
-                                   static framepos_t last_seen_timestamp = 0; 
-                                   static framepos_t last_seen_position = 0; 
+                                   static framepos_t last_seen_timestamp = 0;
+                                   static framepos_t last_seen_position = 0;
 
                                    if ((now - last_seen_timestamp) < 300) {
                                        mtc_frame = (mtc_frame + last_seen_position)/2;
@@ -240,24 +240,24 @@ MTC_Slave::update_mtc_time (const byte *msg, bool was_full, framepos_t now)
                                    last_seen_timestamp = now;
                                    last_seen_position = mtc_frame;
 
-                                       
-                                       
+
+
                                } else {
 
-                                       /* Non-PiC 
+                                       /* Non-PiC
                                         */
 
                                        framepos_t time_delta = (now - last_mtc_timestamp);
-                                       
+
                                        if (time_delta != 0) {
                                                double apparent_speed = (mtc_frame - last_mtc_frame) / (double) (time_delta);
-                                               
+
                                                process_apparent_speed (apparent_speed);
                                                DEBUG_TRACE (DEBUG::Slave, string_compose ("apparent speed was %1 average is now %2\n", apparent_speed, average_speed));
                                        } else {
                                                DEBUG_TRACE (DEBUG::Slave, string_compose ("no apparent calc, average is %1\n", average_speed));
                                        }
-                                       
+
                                        /* every second, recalibrate the starting point for the speed measurement */
                                        if (mtc_frame - last_mtc_frame > session.frame_rate()) {
                                                last_mtc_timestamp = now;
@@ -358,7 +358,7 @@ MTC_Slave::update_mtc_status (MIDI::MTC_Status status)
                current.guard2++;
                break;
        }
-       
+
 }
 
 void
@@ -423,19 +423,19 @@ MTC_Slave::speed_and_position (double& speed, framepos_t& pos)
 
        if (give_slave_full_control_over_transport_speed()) {
                in_control = (session.slave_state() == Session::Running);
-               framepos_t pic_want_locate = 0; 
+               framepos_t pic_want_locate = 0;
                //framepos_t slave_pos = session.audible_frame();
                framepos_t slave_pos = session.transport_frame();
                static double average_speed = 0;
-               
+
                framepos_t ref_now = session.engine().frame_time_at_cycle_start();
                average_speed = pic->get_ratio (last.timestamp, last.position, ref_now, slave_pos, in_control, session.engine().frames_per_cycle());
-  
+
                pic_want_locate = pic->want_locate();
-               
+
                if (in_control && pic_want_locate) {
                        last.speed = average_speed + (double) (pic_want_locate - session.transport_frame()) / (double)session.get_block_size();
-                       std::cout << "locate req " << pic_want_locate << " speed: " << average_speed << "\n"; 
+                       std::cout << "locate req " << pic_want_locate << " speed: " << average_speed << "\n";
                } else {
                        last.speed = average_speed;
                }
@@ -463,16 +463,16 @@ MTC_Slave::speed_and_position (double& speed, framepos_t& pos)
        if (in_control) {
                pos = session.transport_frame();
        } else {
-               pos = last.position + elapsed; 
+               pos = last.position + elapsed;
        }
 
        speed = last.speed;
 
        DEBUG_TRACE (DEBUG::MTC, string_compose ("MTC::speed_and_position FINAL %1 %2\n", last.speed, pos));
 
-       
+
        DEBUG_TRACE (DEBUG::MTC, string_compose ("last = %1 elapsed = %2 pos = %3 speed = %4\n", last.position, elapsed, pos, speed));
-       
+
        return true;
 }
 
@@ -501,7 +501,7 @@ MTC_Slave::maybe_reset ()
                reset (reset_position);
                reset_pending = 0;
                reset_position = false;
-       } 
+       }
 }
 
 void
@@ -537,7 +537,7 @@ MTC_Slave::reset (bool with_position)
 void
 MTC_Slave::reset_window (framepos_t root)
 {
-       
+
        /* if we're waiting for the master to catch us after seeking ahead, keep the window
           of acceptable MTC frames wide open. otherwise, shrink it down to just 2 video frames
           ahead of the window root (taking direction into account).
@@ -572,7 +572,7 @@ MTC_Slave::reset_window (framepos_t root)
                }
                window_end = root;
                break;
-               
+
        default:
                /* do nothing */
                break;
index c0e5ca836823324c285e701082909f031182676d..a58bb8a421d11edced397bd4e62c97b49d1564c1 100644 (file)
@@ -37,7 +37,7 @@ MuteMaster::MuteMaster (Session& s, const std::string&)
         , _soloed (false)
         , _solo_ignore (false)
 {
-       
+
        if (Config->get_mute_affects_pre_fader ()) {
                _mute_point = MutePoint (_mute_point | PreFader);
        }
@@ -109,7 +109,7 @@ MuteMaster::mute_gain_at (MutePoint mp) const
                         }
                 }
         }
-        
+
         return gain;
 }
 
@@ -119,14 +119,14 @@ MuteMaster::set_mute_points (const std::string& mute_point)
         MutePoint old = _mute_point;
 
        _mute_point = (MutePoint) string_2_enum (mute_point, _mute_point);
-        
+
         if (old != _mute_point) {
                 MutePointChanged(); /* EMIT SIGNAL */
         }
 }
 
 void
-MuteMaster::set_mute_points (MutePoint mp) 
+MuteMaster::set_mute_points (MutePoint mp)
 {
         if (_mute_point != mp) {
                 _mute_point = mp;
@@ -166,4 +166,4 @@ MuteMaster::muted_by_others_at (MutePoint mp) const
 {
        return (!_solo_ignore && _session.soloing() && (_mute_point & mp));
 }
-       
+
index f8b8ea9a89f932ad00841b0ba80194a7cc955151..dde2d3067c0d0073f59764cf65015e7bc105aa98 100644 (file)
@@ -114,14 +114,14 @@ Pannable::set_automation_state (AutoState state)
                 _auto_state = state;
 
                 const Controls& c (controls());
-        
+
                 for (Controls::const_iterator ci = c.begin(); ci != c.end(); ++ci) {
                         boost::shared_ptr<AutomationControl> ac = boost::dynamic_pointer_cast<AutomationControl>(ci->second);
                         if (ac) {
                                 ac->alist()->set_automation_state (state);
                         }
                 }
-                
+
                 session().set_dirty ();
                 automation_state_changed (_auto_state);
         }
@@ -134,14 +134,14 @@ Pannable::set_automation_style (AutoStyle style)
                 _auto_style = style;
 
                 const Controls& c (controls());
-                
+
                 for (Controls::const_iterator ci = c.begin(); ci != c.end(); ++ci) {
                         boost::shared_ptr<AutomationControl> ac = boost::dynamic_pointer_cast<AutomationControl>(ci->second);
                         if (ac) {
                                 ac->alist()->set_automation_style (style);
                         }
                 }
-                
+
                 session().set_dirty ();
                 automation_style_changed ();
         }
@@ -151,7 +151,7 @@ void
 Pannable::start_touch (double when)
 {
         const Controls& c (controls());
-        
+
         for (Controls::const_iterator ci = c.begin(); ci != c.end(); ++ci) {
                 boost::shared_ptr<AutomationControl> ac = boost::dynamic_pointer_cast<AutomationControl>(ci->second);
                 if (ac) {
@@ -165,7 +165,7 @@ void
 Pannable::stop_touch (bool mark, double when)
 {
         const Controls& c (controls());
-        
+
         for (Controls::const_iterator ci = c.begin(); ci != c.end(); ++ci) {
                 boost::shared_ptr<AutomationControl> ac = boost::dynamic_pointer_cast<AutomationControl>(ci->second);
                 if (ac) {
@@ -192,7 +192,7 @@ Pannable::state (bool full)
         snprintf (buf, sizeof(buf), "%.12g", pan_azimuth_control->get_value());
         control_node->add_property (X_("value"), buf);
         node->add_child_nocopy (*control_node);
-        
+
         control_node = new XMLNode (X_("width"));
         snprintf (buf, sizeof(buf), "%.12g", pan_width_control->get_value());
         control_node->add_property (X_("value"), buf);
@@ -212,7 +212,7 @@ Pannable::state (bool full)
         snprintf (buf, sizeof(buf), "%.12g", pan_lfe_control->get_value());
         control_node->add_property (X_("value"), buf);
         node->add_child_nocopy (*control_node);
-        
+
         node->add_child_nocopy (get_automation_xml_state ());
 
      return *node;
@@ -225,7 +225,7 @@ Pannable::set_state (const XMLNode& root, int /*version - not used*/)
                 warning << string_compose (_("Pannable given XML data for %1 - ignored"), root.name()) << endmsg;
                 return -1;
         }
-        
+
         XMLNodeList nlist;
        XMLNodeConstIterator niter;
        const XMLProperty *prop;
@@ -262,20 +262,20 @@ Pannable::set_state (const XMLNode& root, int /*version - not used*/)
                         set_automation_xml_state (**niter, PanAzimuthAutomation);
                 }
         }
-        
+
         _has_state = true;
 
         return 0;
 }
 
-string 
+string
 Pannable::value_as_string (boost::shared_ptr<AutomationControl> ac) const
 {
         boost::shared_ptr<Panner> p = panner ();
 
         if (p) {
                 return p->value_as_string (ac);
-        } 
+        }
 
         return Automatable::value_as_string (ac);
 }
index fc6c1acb0ae5745233bafd08f4a9e0581e07ecd4..7b0726770ae22d081deb3bb93751e7e48bd3601d 100644 (file)
@@ -124,7 +124,7 @@ Panner::touching () const
         return _pannable->touching ();
 }
 
-set<Evoral::Parameter> 
+set<Evoral::Parameter>
 Panner::what_can_be_automated() const
 {
         return _pannable->what_can_be_automated ();
@@ -136,7 +136,7 @@ Panner::describe_parameter (Evoral::Parameter p)
         return _pannable->describe_parameter (p);
 }
 
-string 
+string
 Panner::value_as_string (boost::shared_ptr<AutomationControl> ac) const
 {
         return _pannable->value_as_string (ac);
index 4d25fd6f87d15481355b1cd0026568565c62fe75..8644ae2ccea97dff2a6ab57fd8c9c8785f5bae2d 100644 (file)
@@ -108,7 +108,7 @@ PannerManager::select_panner (ChanCount in, ChanCount out)
         PanPluginDescriptor* d;
         int32_t nin = in.n_audio();
         int32_t nout = out.n_audio();
-        
+
         /* look for exact match first */
 
         for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
@@ -123,7 +123,7 @@ PannerManager::select_panner (ChanCount in, ChanCount out)
 
         for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
                 d = &(*p)->descriptor;
-         
+
                 if (d->in == nin && d->out == -1) {
                         return *p;
                 }
@@ -133,7 +133,7 @@ PannerManager::select_panner (ChanCount in, ChanCount out)
 
         for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
                 d = &(*p)->descriptor;
-         
+
                 if (d->in == -1 && d->out == nout) {
                         return *p;
                 }
@@ -143,7 +143,7 @@ PannerManager::select_panner (ChanCount in, ChanCount out)
 
         for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
                 d = &(*p)->descriptor;
-         
+
                 if (d->in == -1 && d->out == -1) {
                         return *p;
                 }
index a72563d9cc5c60bc765f2f182f78498cd0177212..da464c9078f070e4ce44c0069cedab9117c31fc1 100644 (file)
@@ -167,9 +167,9 @@ PannerShell::set_state (const XMLNode& node, int version)
                                                   are of the same type. pretty good
                                                   assumption, but it's still an assumption.
                                                */
-                                                        
+
                                                 _panner.reset ((*p)->descriptor.factory (_pannable, _session.get_speakers ()));
-                                                
+
                                                if (_panner->set_state (**niter, version) == 0) {
                                                         return -1;
                                                 }
@@ -306,7 +306,7 @@ PannerShell::run (BufferSet& inbufs, BufferSet& outbufs, framepos_t start_frame,
 
                // Speed quietning
                gain_t gain_coeff = 1.0;
-                
+
                if (fabsf(_session.transport_speed()) > 1.5f && Config->get_quieten_at_speed ()) {
                        gain_coeff = speed_quietning;
                }
@@ -321,7 +321,7 @@ PannerShell::run (BufferSet& inbufs, BufferSet& outbufs, framepos_t start_frame,
                 for (BufferSet::audio_iterator i = outbufs.audio_begin(); i != outbufs.audio_end(); ++i) {
                         i->silence(nframes);
                 }
-                
+
                 _panner->distribute_automated (inbufs, outbufs, start_frame, end_frame, nframes, _session.pan_automation_buffer());
         }
 }
index 2ecfe730d8cd117cffa2737d0aada32750dcd8f1..a165aa9e40d379bb3c8dff2a05c81e14163ef0f3 100644 (file)
@@ -1,11 +1,11 @@
 /*
   Copyright (C) 2008 Torben Hohn
-  
+
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.
-  
+
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -25,8 +25,8 @@
 static inline double hann(double x) {
        return 0.5 * (1.0 - cos(2 * M_PI * x));
 }
-    
-PIController::PIController (double resample_factor, int fir_size) 
+
+PIController::PIController (double resample_factor, int fir_size)
 {
        resample_mean = resample_factor;
        static_resample_factor = resample_factor;
@@ -35,12 +35,12 @@ PIController::PIController (double resample_factor, int fir_size)
        offset_differential_index = 0;
        offset_integral = 0.0;
        smooth_size = fir_size;
-        
+
        for (int i = 0; i < fir_size; i++) {
                 offset_array[i] = 0.0;
                 window_array[i] = hann(double(i) / (double(fir_size) - 1.0));
        }
-       
+
        // These values could be configurable
        catch_factor = 20000;
        catch_factor2 = 4000;
@@ -62,7 +62,7 @@ PIController::get_ratio (int fill_level, int period_size)
        double this_catch_factor = catch_factor;
        double this_catch_factor2 = catch_factor2 * 4096.0/(double)period_size;
 
-       
+
        // Save offset.
        if( fir_empty ) {
            for (int i = 0; i < smooth_size; i++) {
@@ -72,50 +72,50 @@ PIController::get_ratio (int fill_level, int period_size)
        } else {
            offset_array[(offset_differential_index++) % smooth_size] = offset;
        }
-        
+
        // Build the mean of the windowed offset array basically fir lowpassing.
        smooth_offset = 0.0;
        for (int i = 0; i < smooth_size; i++) {
                 smooth_offset += offset_array[(i + offset_differential_index - 1) % smooth_size] * window_array[i];
        }
        smooth_offset /= double(smooth_size);
-        
+
        // This is the integral of the smoothed_offset
        offset_integral += smooth_offset;
 
        std::cerr << smooth_offset << " ";
-       
+
        // Clamp offset : the smooth offset still contains unwanted noise which would go straigth onto the resample coeff.
        // It only used in the P component and the I component is used for the fine tuning anyways.
-    
+
        if (fabs(smooth_offset) < pclamp)
                 smooth_offset = 0.0;
-       
+
        smooth_offset += (static_resample_factor - resample_mean) * this_catch_factor;
-       
-       // Ok, now this is the PI controller. 
+
+       // Ok, now this is the PI controller.
        // u(t) = K * (e(t) + 1/T \int e(t') dt')
-       // Kp = 1/catch_factor and T = catch_factor2  Ki = Kp/T 
-       current_resample_factor 
+       // Kp = 1/catch_factor and T = catch_factor2  Ki = Kp/T
+       current_resample_factor
                 = static_resample_factor - smooth_offset / this_catch_factor - offset_integral / this_catch_factor / this_catch_factor2;
-       
+
        // Now quantize this value around resample_mean, so that the noise which is in the integral component doesnt hurt.
        current_resample_factor = floor((current_resample_factor - resample_mean) * controlquant + 0.5) / controlquant + resample_mean;
-       
+
        // Calculate resample_mean so we can init ourselves to saner values.
        // resample_mean = 0.9999 * resample_mean + 0.0001 * current_resample_factor;
        resample_mean = (1.0-0.01) * resample_mean + 0.01 * current_resample_factor;
        std::cerr << fill_level << " " << smooth_offset << " " << offset_integral << " " << current_resample_factor << " " << resample_mean << "\n";
        return current_resample_factor;
 }
-        
-void 
+
+void
 PIController::out_of_bounds()
 {
        int i;
        // Set the resample_rate... we need to adjust the offset integral, to do this.
        // first look at the PI controller, this code is just a special case, which should never execute once
-       // everything is swung in. 
+       // everything is swung in.
        offset_integral = - (resample_mean - static_resample_factor) * catch_factor * catch_factor2;
        // Also clear the array. we are beginning a new control cycle.
        for (i = 0; i < smooth_size; i++) {
@@ -157,7 +157,7 @@ PIChaser::get_ratio(framepos_t chasetime_measured, framepos_t chasetime, framepo
        feed_estimator( chasetime_measured, chasetime );
        std::cerr << (double)chasetime_measured/48000.0 << " " << chasetime << " " << slavetime << " ";
        double crude = get_estimate();
-       double fine;  
+       double fine;
        framepos_t massaged_chasetime = chasetime + (framepos_t)( (double)(slavetime_measured - chasetime_measured) * crude );
 
        fine = pic->get_ratio (slavetime - massaged_chasetime, period_size);
@@ -183,7 +183,7 @@ PIChaser::get_ratio(framepos_t chasetime_measured, framepos_t chasetime, framepo
            speed = crude;
            pic->reset( crude );
        }
-       
+
        return speed;
 }
 
index a9f57adc8661ac98cbaeacb434a918bcd3259e6e..da3e53ed1c23101419733029a4a608b25db9a59f 100644 (file)
@@ -80,7 +80,7 @@ RegionListProperty::RegionListProperty (Playlist& pl)
        : SequenceProperty<std::list<boost::shared_ptr<Region> > > (Properties::regions.property_id, boost::bind (&Playlist::update, &pl, _1))
        , _playlist (pl)
 {
-       
+
 }
 
 RegionListProperty::RegionListProperty (RegionListProperty const & p)
@@ -108,7 +108,7 @@ RegionListProperty::get_content_as_xml (boost::shared_ptr<Region> region, XMLNod
        /* All regions (even those which are deleted) have their state saved by other
           code, so we can just store ID here.
        */
-       
+
        node.add_property ("id", region->id().to_s ());
 }
 
@@ -121,7 +121,7 @@ RegionListProperty::get_content_from_xml (XMLNode const & node) const
        PBD::ID id (prop->value ());
 
        boost::shared_ptr<Region> ret = _playlist.region_by_id (id);
-        
+
        if (!ret) {
                ret = RegionFactory::region_by_id (id);
        }
@@ -142,7 +142,7 @@ Playlist::Playlist (Session& sess, string nom, DataType type, bool hide)
 
 Playlist::Playlist (Session& sess, const XMLNode& node, DataType type, bool hide)
        : SessionObject(sess, "unnamed playlist")
-       , regions (*this)       
+       , regions (*this)
        , _type(type)
 {
 #ifndef NDEBUG
@@ -251,7 +251,7 @@ Playlist::Playlist (boost::shared_ptr<const Playlist> other, framepos_t start, f
 
                RegionFactory::region_name (new_name, region->name(), false);
 
-               PropertyList plist; 
+               PropertyList plist;
 
                plist.add (Properties::start, region->start() + offset);
                plist.add (Properties::length, len);
@@ -328,7 +328,7 @@ Playlist::init (bool hide)
 
        _session.history().BeginUndoRedo.connect_same_thread (*this, boost::bind (&Playlist::begin_undo, this));
        _session.history().EndUndoRedo.connect_same_thread (*this, boost::bind (&Playlist::end_undo, this));
-       
+
        ContentsChanged.connect_same_thread (*this, boost::bind (&Playlist::mark_session_dirty, this));
 }
 
@@ -355,7 +355,7 @@ Playlist::_set_sort_id ()
          or <track name>.<edit group name>.<id> where id
          is an integer. We extract the id and sort by that.
        */
-        
+
        size_t dot_position = _name.val().find_last_of(".");
 
        if (dot_position == string::npos) {
@@ -384,7 +384,7 @@ Playlist::set_name (const string& str)
 
        if (_refcnt > 2) {
                return false;
-       } 
+       }
 
        bool ret =  SessionObject::set_name(str);
        if (ret) {
@@ -515,17 +515,17 @@ Playlist::notify_region_start_trimmed (boost::shared_ptr<Region> r)
        }
 
        Evoral::Range<framepos_t> const extra (r->position(), r->last_position());
-       
+
        if (holding_state ()) {
-               
+
                pending_region_extensions.push_back (extra);
-               
+
        } else {
-               
+
                list<Evoral::Range<framepos_t> > r;
                r.push_back (extra);
                RegionsExtended (r);
-               
+
        }
 }
 
@@ -679,7 +679,7 @@ Playlist::flush_notifications (bool from_undo)
        if (!pending_region_extensions.empty ()) {
                RegionsExtended (pending_region_extensions);
        }
-       
+
        clear_pending ();
 
        in_flush = false;
@@ -741,7 +741,7 @@ Playlist::add_region (boost::shared_ptr<Region> region, framepos_t position, flo
 
                {
                        PropertyList plist;
-                       
+
                        plist.add (Properties::start, region->start());
                        plist.add (Properties::length, length);
                        plist.add (Properties::name, name);
@@ -1009,7 +1009,7 @@ Playlist::partition_internal (framepos_t start, framepos_t end, bool cutting, Re
                                        RegionFactory::region_name (new_name, current->name(), false);
 
                                        PropertyList plist;
-                                       
+
                                        plist.add (Properties::start, current->start() + (pos2 - pos1));
                                        plist.add (Properties::length, pos3 - pos2);
                                        plist.add (Properties::name, new_name);
@@ -1028,14 +1028,14 @@ Playlist::partition_internal (framepos_t start, framepos_t end, bool cutting, Re
                                RegionFactory::region_name (new_name, current->name(), false);
 
                                PropertyList plist;
-                               
+
                                plist.add (Properties::start, current->start() + (pos3 - pos1));
                                plist.add (Properties::length, pos4 - pos3);
                                plist.add (Properties::name, new_name);
                                plist.add (Properties::layer, regions.size());
                                plist.add (Properties::automatic, true);
                                plist.add (Properties::right_of_split, true);
-                               
+
                                region = RegionFactory::create (current, plist);
 
                                add_region_internal (region, end);
@@ -1064,9 +1064,9 @@ Playlist::partition_internal (framepos_t start, framepos_t end, bool cutting, Re
                                        /* end +++++ */
 
                                        RegionFactory::region_name (new_name, current->name(), false);
-                                       
+
                                        PropertyList plist;
-                                       
+
                                        plist.add (Properties::start, current->start() + (pos2 - pos1));
                                        plist.add (Properties::length, pos4 - pos2);
                                        plist.add (Properties::name, new_name);
@@ -1109,7 +1109,7 @@ Playlist::partition_internal (framepos_t start, framepos_t end, bool cutting, Re
                                        RegionFactory::region_name (new_name, current->name(), false);
 
                                        PropertyList plist;
-                                       
+
                                        plist.add (Properties::start, current->start());
                                        plist.add (Properties::length, pos3 - pos1);
                                        plist.add (Properties::name, new_name);
@@ -1311,14 +1311,14 @@ Playlist::duplicate (boost::shared_ptr<Region> region, framepos_t position, floa
                framecnt_t length = (framecnt_t) floor (region->length() * (times - floor (times)));
                string name;
                RegionFactory::region_name (name, region->name(), false);
-               
+
                {
                        PropertyList plist;
-                       
+
                        plist.add (Properties::start, region->start());
                        plist.add (Properties::length, length);
                        plist.add (Properties::name, name);
-                       
+
                        boost::shared_ptr<Region> sub = RegionFactory::create (region, plist);
                        add_region_internal (sub, pos);
                }
@@ -1884,7 +1884,7 @@ Playlist::regions_to_read (framepos_t start, framepos_t end)
                                                                                           (*x)->name(),
                                                                                           (*t)));
                                }
-                                        
+
                        }
 
                        RegionSortByLayer cmp;
@@ -2174,9 +2174,9 @@ Playlist::clear_owned_changes ()
 void
 Playlist::update (const RegionListProperty::ChangeRecord& change)
 {
-       DEBUG_TRACE (DEBUG::Properties, string_compose ("Playlist %1 updates from a change record with %2 adds %3 removes\n", 
+       DEBUG_TRACE (DEBUG::Properties, string_compose ("Playlist %1 updates from a change record with %2 adds %3 removes\n",
                                                        name(), change.added.size(), change.removed.size()));
-        
+
        freeze ();
        /* add the added regions */
        for (RegionListProperty::ChangeContainer::iterator i = change.added.begin(); i != change.added.end(); ++i) {
@@ -2245,7 +2245,7 @@ Playlist::set_state (const XMLNode& node, int version)
                                error << _("region state node has no ID, ignored") << endmsg;
                                continue;
                        }
-                       
+
                        ID id = prop->value ();
 
                        if ((region = region_by_id (id))) {
@@ -2256,14 +2256,14 @@ Playlist::set_state (const XMLNode& node, int version)
                                        region->resume_property_changes ();
                                        continue;
                                }
-                               
+
                        } else if ((region = RegionFactory::create (_session, *child, true)) != 0) {
                                region->suspend_property_changes ();
                        } else {
                                error << _("Playlist: cannot create region from XML") << endmsg;
                                continue;
                        }
-                       
+
 
                        add_region (region, region->position(), 1.0);
 
@@ -2271,7 +2271,7 @@ Playlist::set_state (const XMLNode& node, int version)
                        region->set_last_layer_op( region->layer());
                        region->resume_property_changes ();
 
-               } 
+               }
        }
 
        /* update dependents, which was not done during add_region_internal
@@ -2524,7 +2524,7 @@ Playlist::relayer ()
                for (int k = start_division; k <= end_division; ++k) {
                        layers[j][k].push_back (*i);
                }
-               
+
                if ((*i)->layer() != j) {
                        changed = true;
                }
@@ -3009,7 +3009,7 @@ bool
 Playlist::has_region_at (framepos_t const p) const
 {
        RegionLock (const_cast<Playlist *> (this));
-       
+
        RegionList::const_iterator i = regions.begin ();
        while (i != regions.end() && !(*i)->covers (p)) {
                ++i;
@@ -3023,12 +3023,12 @@ void
 Playlist::remove_region_by_source (boost::shared_ptr<Source> s)
 {
        RegionLock rl (this);
-       
+
        RegionList::iterator i = regions.begin();
        while (i != regions.end()) {
                RegionList::iterator j = i;
                ++j;
-               
+
                if ((*i)->uses_source (s)) {
                        remove_region_internal (*i);
                }
@@ -3046,7 +3046,7 @@ framepos_t
 Playlist::find_next_top_layer_position (framepos_t t) const
 {
        RegionLock rlock (const_cast<Playlist *> (this));
-       
+
        layer_t const top = top_layer ();
 
        RegionList copy = regions.rlist ();
@@ -3064,7 +3064,7 @@ Playlist::find_next_top_layer_position (framepos_t t) const
 boost::shared_ptr<Region>
 Playlist::combine (const RegionList& r)
 {
-       PropertyList plist; 
+       PropertyList plist;
        uint32_t channels = 0;
        uint32_t layer = 0;
        framepos_t earliest_position = max_framepos;
@@ -3112,7 +3112,7 @@ Playlist::combine (const RegionList& r)
                /* make position relative to zero */
 
                pl->add_region (copied_region, original_region->position() - earliest_position);
-               
+
                /* use the maximum number of channels for any region */
 
                channels = max (channels, original_region->n_channels());
@@ -3134,12 +3134,12 @@ Playlist::combine (const RegionList& r)
 
        SourceList sources;
        pair<framepos_t,framepos_t> extent = pl->get_extent();
-       
+
        for (uint32_t chn = 0; chn < channels; ++chn) {
                sources.push_back (SourceFactory::createFromPlaylist (_type, _session, pl, id(), parent_name, chn, 0, extent.second, false, false));
-       
+
        }
-       
+
        /* now a new whole-file region using the list of sources */
 
        plist.add (Properties::start, 0);
@@ -3150,7 +3150,7 @@ Playlist::combine (const RegionList& r)
        boost::shared_ptr<Region> parent_region = RegionFactory::create (sources, plist, true);
 
        /* now the non-whole-file region that we will actually use in the
-        * playlist 
+        * playlist
         */
 
        plist.clear ();
@@ -3165,19 +3165,19 @@ Playlist::combine (const RegionList& r)
         */
 
        freeze ();
-       
+
        for (RegionList::const_iterator i = r.begin(); i != r.end(); ++i) {
                remove_region (*i);
        }
 
        /* do type-specific stuff with the originals and the new compound
-          region 
+          region
        */
-       
+
        post_combine (originals, compound_region);
 
        /* add the new region at the right location */
-       
+
        add_region (compound_region, earliest_position);
 
        _combine_ops++;
@@ -3196,7 +3196,7 @@ Playlist::uncombine (boost::shared_ptr<Region> target)
        vector<TwoRegions> old_and_new_regions;
 
        // (1) check that its really a compound region
-       
+
        if ((pls = boost::dynamic_pointer_cast<PlaylistSource>(target->source (0))) == 0) {
                return;
        }
@@ -3209,23 +3209,23 @@ Playlist::uncombine (boost::shared_ptr<Region> target)
        /* the leftmost (earliest) edge of the compound region
           starts at zero in its source, or larger if it
           has been trimmed or content-scrolled.
-          
+
           the rightmost (latest) edge of the compound region
           relative to its source is the starting point plus
           the length of the region.
        */
-       
+
        // (2) get all the original regions
 
        const RegionList& rl (pl->region_list().rlist());
        RegionFactory::CompoundAssociations& cassocs (RegionFactory::compound_associations());
        frameoffset_t move_offset = 0;
-       
+
        /* there are two possibilities here:
           1) the playlist that the playlist source was based on
           is us, so just add the originals (which belonged to
           us anyway) back in the right place.
-          
+
           2) the playlist that the playlist source was based on
           is NOT us, so we need to make copies of each of
           the original regions that we find, and add them
@@ -3272,7 +3272,7 @@ Playlist::uncombine (boost::shared_ptr<Region> target)
 
                switch (original->coverage (adjusted_start, adjusted_end)) {
                case OverlapNone:
-                       /* original region does not cover any part 
+                       /* original region does not cover any part
                           of the current state of the compound region
                        */
                        continue;
@@ -3284,7 +3284,7 @@ Playlist::uncombine (boost::shared_ptr<Region> target)
                        original->trim_to (adjusted_start, adjusted_end - adjusted_start);
                        modified_region = true;
                        break;
-                               
+
                case OverlapExternal:
                        /* overlap fully covers original, so leave it
                           as is
@@ -3298,7 +3298,7 @@ Playlist::uncombine (boost::shared_ptr<Region> target)
                        original->trim_front (adjusted_start);
                        modified_region = true;
                        break;
-                               
+
                case OverlapStart:
                        /* overlap covers start but ends within, so
                         * trim the end of the region.
@@ -3320,7 +3320,7 @@ Playlist::uncombine (boost::shared_ptr<Region> target)
                }
 
                /* and add to the list of regions waiting to be
-                * re-inserted 
+                * re-inserted
                 */
 
                originals.push_back (original);
@@ -3343,7 +3343,7 @@ Playlist::uncombine (boost::shared_ptr<Region> target)
        }
 
        /* now move dependent regions back from the compound to this playlist */
-       
+
        pl->copy_dependents (old_and_new_regions, this);
 
        in_partition = false;
index 7bbfdecd822efb4b2cd8edb922633336babe9251..c49f51c70e76de45e4e2a937c59088921bfc10fe 100644 (file)
@@ -64,7 +64,7 @@ PlaylistSource::PlaylistSource (Session& s, const XMLNode& node)
 {
        /* PlaylistSources are never writable, renameable, removable or destructive */
        _flags = Flag (_flags & ~(Writable|CanRename|Removable|RemovableIfEmpty|RemoveAtDestroy|Destructive));
-       
+
 
        if (set_state (node, Stateful::loading_state_version)) {
                throw failed_constructor ();
@@ -87,12 +87,12 @@ PlaylistSource::add_state (XMLNode& node)
        snprintf (buf, sizeof (buf), "%" PRIu64, _playlist_length);
        node.add_property ("length", buf);
        node.add_property ("original", _id.to_s());
-       
+
        node.add_child_nocopy (_playlist->get_state());
 }
 
 int
-PlaylistSource::set_state (const XMLNode& node, int version) 
+PlaylistSource::set_state (const XMLNode& node, int version)
 {
        /* check that we have a playlist ID */
 
@@ -127,7 +127,7 @@ PlaylistSource::set_state (const XMLNode& node, int version)
        if ((prop = node.property (X_("name"))) == 0) {
                throw failed_constructor ();
        }
-       
+
        set_name (prop->value());
 
        if ((prop = node.property (X_("offset"))) == 0) {
index b6e433c0b003bd8a63b0e69e13565c9e2b0f2a03..90e9146af10882e3d9c828cb28c8623094632eaf 100644 (file)
@@ -83,12 +83,12 @@ Plugin::Plugin (const Plugin& other)
        , _have_pending_stop_events (false)
        , _parameter_changed_since_last_preset (false)
 {
-       
+
 }
 
 Plugin::~Plugin ()
 {
-       
+
 }
 
 void
@@ -200,7 +200,7 @@ Plugin::preset_by_label (const string& label)
                        return &i->second;
                }
        }
-       
+
        return 0;
 }
 
@@ -226,7 +226,7 @@ Plugin::connect_and_run (BufferSet& bufs,
                MidiBuffer& b = bufs.get_midi (0);
                bool looped;
                _tracker.track (b.begin(), b.end(), looped);
-               
+
                if (_have_pending_stop_events) {
                        /* Transmit note-offs that are pending from the last transport stop */
                        bufs.merge_from (_pending_stop_events, 0);
@@ -243,7 +243,7 @@ Plugin::realtime_handle_transport_stopped ()
        /* Create note-offs for any active notes and put them in _pending_stop_events, to be picked
           up on the next call to connect_and_run ().
        */
-       
+
        _pending_stop_events.ensure_buffers (DataType::MIDI, 1, 4096);
        _pending_stop_events.get_midi(0).clear ();
        _tracker.resolve_notes (_pending_stop_events.get_midi (0), 0);
@@ -262,7 +262,7 @@ Plugin::get_presets ()
        for (map<string, PresetRecord>::const_iterator i = _presets.begin(); i != _presets.end(); ++i) {
                p.push_back (i->second);
        }
-       
+
        return p;
 }
 
index 4ba82eb4d2f52b069ae60beeeb3035395041215b..de7f011e97d82f5befa3260c7397afb7606d54ee 100644 (file)
@@ -426,23 +426,23 @@ PluginInsert::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end
                        }
 
                        bufs.count().set_audio (out);
-               
+
                } else {
 
                        /* does this need to be done with MIDI? it appears not */
-                       
+
                        uint32_t in = _plugins[0]->get_info()->n_inputs.n_audio();
                        uint32_t out = _plugins[0]->get_info()->n_outputs.n_audio();
-                       
+
                        if (out > in) {
-                               
+
                                /* not active, but something has make up for any channel count increase */
-                               
+
                                for (uint32_t n = out - in; n < out; ++n) {
                                        memcpy (bufs.get_audio(n).data(), bufs.get_audio(in - 1).data(), sizeof (Sample) * nframes);
                                }
                        }
-                       
+
                        bufs.count().set_audio (out);
                }
        }
index a2c4d0e97b2d83928c19132ec82255f8bf355536..8221f7b46e7988b354d38b81df9abe3cf688f030 100644 (file)
@@ -640,7 +640,7 @@ PluginManager::save_statuses ()
                        ofs << "Hidden";
                        break;
                }
-       
+
                ofs << ' ';
                ofs << (*i).unique_id;;
                ofs << endl;
@@ -659,7 +659,7 @@ PluginManager::load_statuses ()
        if (!ifs) {
                return;
        }
-       
+
        std::string stype;
        std::string sstatus;
        std::string id;
@@ -714,12 +714,12 @@ PluginManager::load_statuses ()
                              << endmsg;
                        continue;
                }
-               
+
                id = buf;
                strip_whitespace_edges (id);
                set_status (type, id, status);
        }
-       
+
        ifs.close ();
 }
 
index 647f470325d9bdf828ae16120afa6a27ae37d67e..5a7c859dbd29109015ff9895d0ba744c9bd8f711 100644 (file)
@@ -104,7 +104,7 @@ bool
 Port::connected_to (std::string const & o) const
 {
        if (!_engine->connected()) {
-               /* in some senses, this answer isn't the right one all the time, 
+               /* in some senses, this answer isn't the right one all the time,
                   because we know about our connections and will re-establish
                   them when we reconnect to JACK.
                */
@@ -128,7 +128,7 @@ Port::get_connections (std::vector<std::string> & c) const
                                c.push_back (jc[i]);
                                ++n;
                        }
-                        
+
                         if (jack_free) {
                                 jack_free (jc);
                         } else {
@@ -240,7 +240,7 @@ Port::increment_port_buffer_offset (pframes_t nframes)
 {
         _port_buffer_offset += nframes;
 }
-        
+
 void
 Port::set_public_latency_range (jack_latency_range_t& range, bool playback) const
 {
@@ -251,7 +251,7 @@ Port::set_public_latency_range (jack_latency_range_t& range, bool playback) cons
        if (!jack_port_set_latency_range) {
                return;
        }
-        
+
        DEBUG_TRACE (DEBUG::Latency,
                     string_compose ("SET PORT %1 %4 PUBLIC latency now [%2 - %3]\n",
                                     name(), range.min, range.max,
@@ -270,14 +270,14 @@ Port::set_private_latency_range (jack_latency_range_t& range, bool playback)
                DEBUG_TRACE (DEBUG::Latency, string_compose (
                                     "SET PORT %1 playback PRIVATE latency now [%2 - %3]\n",
                                     name(),
-                                    _private_playback_latency.min, 
+                                    _private_playback_latency.min,
                                     _private_playback_latency.max));
        } else {
                _private_capture_latency = range;
                DEBUG_TRACE (DEBUG::Latency, string_compose (
                                     "SET PORT %1 capture PRIVATE latency now [%2 - %3]\n",
-                                    name(), 
-                                    _private_capture_latency.min, 
+                                    name(),
+                                    _private_capture_latency.min,
                                     _private_capture_latency.max));
        }
 
@@ -292,15 +292,15 @@ Port::private_latency_range (bool playback) const
        if (playback) {
                DEBUG_TRACE (DEBUG::Latency, string_compose (
                                     "GET PORT %1 playback PRIVATE latency now [%2 - %3]\n",
-                                    name(), 
-                                    _private_playback_latency.min, 
-                                    _private_playback_latency.max)); 
+                                    name(),
+                                    _private_playback_latency.min,
+                                    _private_playback_latency.max));
                return _private_playback_latency;
        } else {
                DEBUG_TRACE (DEBUG::Latency, string_compose (
                                     "GET PORT %1 capture PRIVATE latency now [%2 - %3]\n",
-                                    name(), 
-                                    _private_playback_latency.min, 
+                                    name(),
+                                    _private_playback_latency.min,
                                     _private_playback_latency.max));
                return _private_capture_latency;
        }
@@ -311,11 +311,11 @@ Port::public_latency_range (bool playback) const
 {
        jack_latency_range_t r;
 
-       jack_port_get_latency_range (_jack_port, 
+       jack_port_get_latency_range (_jack_port,
                                     sends_output() ? JackPlaybackLatency : JackCaptureLatency,
                                     &r);
        DEBUG_TRACE (DEBUG::Latency, string_compose (
-                            "GET PORT %1: %4 PUBLIC latency range %2 .. %3\n", 
+                            "GET PORT %1: %4 PUBLIC latency range %2 .. %3\n",
                             name(), r.min, r.max,
                             sends_output() ? "PLAYBACK" : "CAPTURE"));
        return r;
@@ -330,7 +330,7 @@ Port::get_connected_latency_range (jack_latency_range_t& range, bool playback) c
 
        vector<string> connections;
        jack_client_t* jack = _engine->jack();
-        
+
        if (!jack) {
                range.min = 0;
                range.max = 0;
@@ -341,7 +341,7 @@ Port::get_connected_latency_range (jack_latency_range_t& range, bool playback) c
        get_connections (connections);
 
        if (!connections.empty()) {
-                
+
                range.min = ~((jack_nframes_t) 0);
                range.max = 0;
 
@@ -351,7 +351,7 @@ Port::get_connected_latency_range (jack_latency_range_t& range, bool playback) c
                     c != connections.end(); ++c) {
 
                         jack_latency_range_t lr;
-                                
+
                         if (!AudioEngine::instance()->port_is_mine (*c)) {
 
                                 /* port belongs to some other JACK client, use
@@ -365,7 +365,7 @@ Port::get_connected_latency_range (jack_latency_range_t& range, bool playback) c
                                                 remote_port,
                                                 (playback ? JackPlaybackLatency : JackCaptureLatency),
                                                 &lr);
-                                        
+
                                         DEBUG_TRACE (DEBUG::Latency, string_compose (
                                                              "\t%1 <-> %2 : latter has latency range %3 .. %4\n",
                                                              name(), *c, lr.min, lr.max));
@@ -473,7 +473,7 @@ Port::physically_connected () const
                for (int i = 0; jc[i]; ++i) {
 
                        jack_port_t* port = jack_port_by_name (_engine->jack(), jc[i]);
-                        
+
                        if (port && (jack_port_flags (port) & JackPortIsPhysical)) {
                                 if (jack_free) {
                                         jack_free (jc);
index 0fb82fca8f9ba6dd7091d3dba9b22058f7b29c56..c21f04364797e129814c4a2beb124861570b2d36 100644 (file)
@@ -83,8 +83,8 @@ PortInsert::set_measured_latency (framecnt_t n)
         _measured_latency = n;
 }
 
-framecnt_t 
-PortInsert::latency() const 
+framecnt_t
+PortInsert::latency() const
 {
        /* because we deliver and collect within the same cycle,
           all I/O is necessarily delayed by at least frames_per_cycle().
@@ -108,37 +108,37 @@ PortInsert::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame,
        }
 
         if (_latency_detect) {
-                
+
                 if (_input->n_ports().n_audio() != 0) {
 
                         AudioBuffer& outbuf (_output->ports().nth_audio_port(0)->get_audio_buffer (nframes));
                         Sample* in = _input->ports().nth_audio_port(0)->get_audio_buffer (nframes).data();
                         Sample* out = outbuf.data();
-                        
+
                         _mtdm->process (nframes, in, out);
-                        
+
                         outbuf.is_silent (false);
                 }
-                
+
                 return;
-                
+
         } else if (_latency_flush_frames) {
-                
+
                 /* wait for the entire input buffer to drain before picking up input again so that we can't
                    hear the remnants of whatever MTDM pumped into the pipeline.
                 */
-                
+
                 silence (nframes);
-                
+
                 if (_latency_flush_frames > nframes) {
                         _latency_flush_frames -= nframes;
                 } else {
                         _latency_flush_frames = 0;
                 }
-                
+
                 return;
         }
-        
+
        if (!_active && !_pending_active) {
                /* deliver silence */
                silence (nframes);
@@ -208,7 +208,7 @@ PortInsert::set_state (const XMLNode& node, int version)
         if ((prop = node.property ("block_size")) != 0) {
                 sscanf (prop->value().c_str(), "%u", &blocksize);
         }
-        
+
         //if the jack period is the same as when the value was saved, we can recall our latency..
         if ( (_session.get_block_size() == blocksize) && (prop = node.property ("latency")) != 0) {
                 uint32_t latency = 0;
@@ -249,13 +249,13 @@ bool
 PortInsert::configure_io (ChanCount in, ChanCount out)
 {
        assert (!AudioEngine::instance()->process_lock().trylock());
-       
+
        /* for an insert, processor input corresponds to IO output, and vice versa */
 
        if (_input->ensure_io (in, false, this) != 0) {
                return false;
        }
-       
+
        if (_output->ensure_io (out, false, this) != 0) {
                return false;
        }
index 60f36d0f703bd63395c1cc6ce89ff8175a22a175..2105d184fb9e3921b27f3d6b0b082ae96675f08f 100644 (file)
@@ -36,34 +36,34 @@ static bool sort_ports_by_name (Port* a, Port* b)
 {
        string aname (a->name());
        string bname (b->name());
-        
+
        string::size_type last_digit_position_a = aname.size();
        string::reverse_iterator r_iterator = aname.rbegin();
-        
+
        while (r_iterator!= aname.rend() && Glib::Unicode::isdigit(*r_iterator)) {
-               r_iterator++; 
+               r_iterator++;
                last_digit_position_a--;
        }
-        
+
        string::size_type last_digit_position_b = bname.size();
        r_iterator = bname.rbegin();
-        
+
        while (r_iterator != bname.rend() && Glib::Unicode::isdigit(*r_iterator)) {
-               r_iterator++; 
+               r_iterator++;
                last_digit_position_b--;
        }
-        
+
        // if some of the names don't have a number as posfix, compare as strings
 
        if (last_digit_position_a == aname.size() or last_digit_position_b == bname.size()) {
                return aname < bname;
        }
-        
+
        const std::string       prefix_a = aname.substr(0, last_digit_position_a - 1);
        const unsigned int      posfix_a = std::atoi(aname.substr(last_digit_position_a, aname.size() - last_digit_position_a).c_str());
        const std::string       prefix_b = bname.substr(0, last_digit_position_b - 1);
        const unsigned int      posfix_b = std::atoi(bname.substr(last_digit_position_b, bname.size() - last_digit_position_b).c_str());
-        
+
        if (prefix_a != prefix_b) {
                return aname < bname;
        } else {
index 046bc2015fb6968511f8f165eb48bc3f7a7b5450..58d51bef4e3d75a9d869eee7f22794e9460d03db 100644 (file)
@@ -31,7 +31,7 @@ using namespace std;
 
 Private<ThreadBuffers>* ProcessThread::_private_thread_buffers = 0;
 
-static void 
+static void
 release_thread_buffer (void* arg)
 {
         BufferManager::put_thread_buffers ((ThreadBuffers*) arg);
index 7d88e4aa10c0e9d5b3ed36a0547717582033491b..bb004c313d3f97beab2ab1f174c9f2c3fa1c29c2 100644 (file)
@@ -186,7 +186,7 @@ Processor::set_state (const XMLNode& node, int version)
        if (version < 3000) {
                return set_state_2X (node, version);
        }
-       
+
        const XMLProperty *prop;
        const XMLProperty *legacy_active = 0;
 
@@ -284,7 +284,7 @@ Processor::configure_io (ChanCount in, ChanCount out)
 }
 
 void
-Processor::set_display_to_user (bool yn) 
+Processor::set_display_to_user (bool yn)
 {
        _display_to_user = yn;
 }
index 6b1dbdec93d65e700fb9d8dc8b9d324eaa50f768..bc040709f4fbd3a76f9fe6283c22797650dc144f 100644 (file)
@@ -81,7 +81,7 @@ RBEffect::run (boost::shared_ptr<Region> r, Progress*)
        framepos_t pos = 0;
        framecnt_t avail = 0;
        boost::shared_ptr<AudioRegion> result;
-       
+
        cerr << "RBEffect: source region: position = " << region->position()
             << ", start = " << region->start()
             << ", length = " << region->length()
index 3b22bfc24719f32447f07a05666c5ce838ed4488..a17fd9f5a509fcb5f9f3717d0bcb596b5b59823a 100644 (file)
@@ -210,10 +210,10 @@ RCConfiguration::get_state ()
        root = new XMLNode("Ardour");
 
         MIDI::Manager* mm = MIDI::Manager::instance();
-        
+
         if (mm) {
                 const MIDI::Manager::PortList& ports = mm->get_midi_ports();
-                
+
                 for (MIDI::Manager::PortList::const_iterator i = ports.begin(); i != ports.end(); ++i) {
                         root->add_child_nocopy((*i)->get_state());
                 }
index 7c064cd0feadc3d3f05b1212e992bad20d080c68..17698d88a75f22fd1f223a581816ceea7933f973 100644 (file)
@@ -47,7 +47,7 @@ using namespace std;
 using namespace ARDOUR;
 using namespace PBD;
 
-namespace ARDOUR { 
+namespace ARDOUR {
        namespace Properties {
                PBD::PropertyDescriptor<bool> muted;
                PBD::PropertyDescriptor<bool> opaque;
@@ -74,7 +74,7 @@ namespace ARDOUR {
                PBD::PropertyDescriptor<PositionLockStyle> position_lock_style;
        }
 }
-       
+
 PBD::Signal2<void,boost::shared_ptr<ARDOUR::Region>,const PropertyChange&> Region::RegionPropertyChanged;
 
 void
@@ -280,14 +280,14 @@ Region::Region (boost::shared_ptr<const Region> other)
        /* sync pos is relative to start of file. our start-in-file is now zero,
           so set our sync position to whatever the the difference between
           _start and _sync_pos was in the other region.
-                          
+
           result is that our new sync pos points to the same point in our source(s)
           as the sync in the other region did in its source(s).
-                          
+
           since we start at zero in our source(s), it is not possible to use a sync point that
           is before the start. reset it to _start if that was true in the other region.
        */
-                       
+
        if (other->sync_marked()) {
                if (other->_start < other->_sync_position) {
                        /* sync pos was after the start point of the other region */
@@ -346,12 +346,12 @@ Region::Region (boost::shared_ptr<const Region> other, frameoffset_t offset)
        use_sources (other->_sources);
 
        _start = other->_start + offset;
-               
+
        /* if the other region had a distinct sync point
           set, then continue to use it as best we can.
           otherwise, reset sync point back to start.
        */
-               
+
        if (other->sync_marked()) {
                if (other->_sync_position < _start) {
                        _sync_marked = false;
@@ -551,19 +551,19 @@ Region::set_position_lock_style (PositionLockStyle ps)
        if (_position_lock_style != ps) {
 
                boost::shared_ptr<Playlist> pl (playlist());
-               
+
                if (!pl) {
                        return;
                }
-               
+
                _position_lock_style = ps;
-               
+
                if (_position_lock_style == MusicTime) {
                        _session.tempo_map().bbt_time (_position, _bbt_time);
                }
 
                send_change (Properties::position_lock_style);
-               
+
        }
 }
 
@@ -599,7 +599,7 @@ Region::set_position (framepos_t pos)
           a GUI that has moved its representation already.
        */
        send_change (Properties::position);
-       
+
 }
 
 void
@@ -754,7 +754,7 @@ Region::trim_start (framepos_t new_position)
                } else {
                        new_start = _start + start_shift;
                }
-               
+
        } else {
                return;
        }
@@ -805,7 +805,7 @@ Region::modify_front (framepos_t new_position, bool reset_fade)
        }
 
        if (new_position < end) { /* can't trim it zero or negative length */
-               
+
                framecnt_t newlen = 0;
                framepos_t delta = 0;
 
@@ -813,7 +813,7 @@ Region::modify_front (framepos_t new_position, bool reset_fade)
                        /* can't trim it back past where source position zero is located */
                        new_position = max (new_position, source_zero);
                }
-               
+
                if (new_position > _position) {
                        newlen = _length - (new_position - _position);
                        delta = -1 * (new_position - _position);
@@ -821,17 +821,17 @@ Region::modify_front (framepos_t new_position, bool reset_fade)
                        newlen = _length + (_position - new_position);
                        delta = _position - new_position;
                }
-               
+
                trim_to_internal (new_position, newlen);
-               
+
                if (reset_fade) {
                        _right_of_split = true;
                }
-       
+
                if (!property_changes_suspended()) {
                        recompute_at_start ();
                }
-               
+
                if (_transients.size() > 0){
                        adjust_transients(delta);
                }
@@ -930,7 +930,7 @@ Region::trim_to_internal (framepos_t position, framecnt_t length)
         *    length in beats from (1) but at the new position, which is wrong if the region
         *    straddles a tempo/meter change.
         */
-       
+
        if (_position != position) {
                if (!property_changes_suspended()) {
                        _last_position = _position;
@@ -938,7 +938,7 @@ Region::trim_to_internal (framepos_t position, framecnt_t length)
                set_position_internal (position, true);
                what_changed.add (Properties::position);
        }
-       
+
        if (_length != length) {
                if (!property_changes_suspended()) {
                        _last_length = _length;
@@ -1208,14 +1208,14 @@ Region::state ()
        }
 
        if (max_source_level() > 0) {
-               
+
                XMLNode* nested_node = new XMLNode (X_("NestedSource"));
-               
+
                /* region is compound - get its playlist and
                   store that before we list the region that
                   needs it ...
                */
-               
+
                for (SourceList::const_iterator s = _sources.begin(); s != _sources.end(); ++s) {
                        nested_node->add_child_nocopy ((*s)->get_state ());
                }
@@ -1287,7 +1287,7 @@ Region::_set_state (const XMLNode& node, int /*version*/, PropertyChange& what_c
        if (_stretch == 0.0f) {
                _stretch = 1.0f;
        }
-       
+
        if (_shift == 0.0f) {
                _shift = 1.0f;
        }
@@ -1295,14 +1295,14 @@ Region::_set_state (const XMLNode& node, int /*version*/, PropertyChange& what_c
        if (send) {
                send_change (what_changed);
        }
-       
+
        /* Quick fix for 2.x sessions when region is muted */
        if ((prop = node.property (X_("flags")))) {
                if (string::npos != prop->value().find("Muted")){
                        set_muted (true);
                }
        }
-       
+
 
        return 0;
 }
@@ -1336,7 +1336,7 @@ Region::send_change (const PropertyChange& what_changed)
        Stateful::send_change (what_changed);
 
        if (!Stateful::frozen()) {
-               
+
                /* Try and send a shared_pointer unless this is part of the constructor.
                   If so, do nothing.
                */
@@ -1434,7 +1434,7 @@ Region::source_equivalent (boost::shared_ptr<const Region> other) const
 {
        if (!other)
                return false;
-       
+
        if ((_sources.size() != other->_sources.size()) ||
            (_master_sources.size() != other->_master_sources.size())) {
                return false;
@@ -1465,7 +1465,7 @@ Region::source_string () const
 
        stringstream res;
        res << _sources.size() << ":";
-       
+
        SourceList::const_iterator i;
 
        for (i = _sources.begin(); i != _sources.end(); ++i) {
@@ -1606,7 +1606,7 @@ Region::invalidate_transients ()
 {
        _valid_transients = false;
        _transients.clear ();
-       
+
        send_change (PropertyChange (Properties::valid_transients));
 }
 
@@ -1657,7 +1657,7 @@ Region::can_trim () const
                return ct;
        }
 
-       /* if not locked, we can always move the front later, and the end earlier 
+       /* if not locked, we can always move the front later, and the end earlier
         */
 
        ct = CanTrim (ct | FrontTrimLater | EndTrimEarlier);
@@ -1674,7 +1674,7 @@ Region::can_trim () const
 
        return ct;
 }
-                      
+
 uint32_t
 Region::max_source_level () const
 {
index f4fd209fea964e1fd3b02dda9b660f3414d7d3f9..3ca33cac0119905a2c755b52fabfbc55039c2a69 100644 (file)
@@ -113,7 +113,7 @@ RegionFactory::create (boost::shared_ptr<Region> region, const PropertyList& pli
                }
        }
 
-#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS     
+#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
         boost_debug_shared_ptr_mark_interesting (ret.get(), "Region");
 #endif
        return ret;
@@ -129,7 +129,7 @@ RegionFactory::create (boost::shared_ptr<Region> region, frameoffset_t offset, c
        if ((other_a = boost::dynamic_pointer_cast<AudioRegion>(region)) != 0) {
 
                ret = boost::shared_ptr<Region> (new AudioRegion (other_a, offset));
-               
+
        } else if ((other_m = boost::dynamic_pointer_cast<MidiRegion>(region)) != 0) {
 
                ret = boost::shared_ptr<Region> (new MidiRegion (other_m, offset));
@@ -169,7 +169,7 @@ RegionFactory::create (boost::shared_ptr<Region> region, const SourceList& srcs,
        if ((other = boost::dynamic_pointer_cast<AudioRegion>(region)) != 0) {
 
                // XXX use me in caller where plist is setup, this is start i think srcs.front()->length (srcs.front()->timeline_position())
-               
+
                ret = boost::shared_ptr<Region> (new AudioRegion (other, srcs));
 
        } else {
@@ -187,7 +187,7 @@ RegionFactory::create (boost::shared_ptr<Region> region, const SourceList& srcs,
                }
        }
 
-#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS     
+#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
         boost_debug_shared_ptr_mark_interesting (ret.get(), "Region");
 #endif
        return ret;
@@ -204,7 +204,7 @@ RegionFactory::create (boost::shared_ptr<Source> src, const PropertyList& plist,
 boost::shared_ptr<Region>
 RegionFactory::create (const SourceList& srcs, const PropertyList& plist, bool announce)
 {
-       boost::shared_ptr<Region> ret; 
+       boost::shared_ptr<Region> ret;
        boost::shared_ptr<AudioSource> as;
        boost::shared_ptr<MidiSource> ms;
 
@@ -253,7 +253,7 @@ RegionFactory::create (SourceList& srcs, const XMLNode& node)
                ret = boost::shared_ptr<Region> (new AudioRegion (srcs));
 
        } else if (srcs[0]->type() == DataType::MIDI) {
-               
+
                ret = boost::shared_ptr<Region> (new MidiRegion (srcs));
 
        }
@@ -280,7 +280,7 @@ RegionFactory::map_add (boost::shared_ptr<Region> r)
        p.first = r->id();
        p.second = r;
 
-       { 
+       {
                Glib::Mutex::Lock lm (region_map_lock);
                region_map.insert (p);
        }
@@ -319,7 +319,7 @@ RegionFactory::map_remove_with_equivalents (boost::shared_ptr<Region> r)
                        region_map.erase (i);
                } else if (r == i->second) {
                        region_map.erase (i);
-               } 
+               }
 
                i = tmp;
        }
@@ -346,7 +346,7 @@ RegionFactory::wholefile_region_by_name (const std::string& name)
                }
        }
        return boost::shared_ptr<Region>();
-}      
+}
 
 boost::shared_ptr<Region>
 RegionFactory::region_by_name (const std::string& name)
@@ -357,7 +357,7 @@ RegionFactory::region_by_name (const std::string& name)
                }
        }
        return boost::shared_ptr<Region>();
-}      
+}
 
 void
 RegionFactory::clear_map ()
@@ -394,7 +394,7 @@ RegionFactory::delete_all_regions ()
           vanish as we leave this scope, thus calling all destructors.
        */
 }
-        
+
 uint32_t
 RegionFactory::nregions ()
 {
@@ -507,25 +507,25 @@ RegionFactory::new_region_name (string old)
        char buf[len];
 
        if ((last_period = old.find_last_of ('.')) == string::npos) {
-               
+
                /* no period present - add one explicitly */
-               
+
                old += '.';
                last_period = old.length() - 1;
                number = 0;
-               
+
        } else {
-               
+
                if (last_period < old.length() - 1) {
 
                        string period_to_end = old.substr (last_period+1);
-                       
+
                        /* extra material after the period */
 
                        string::size_type numerals_end = period_to_end.find_first_not_of ("0123456789");
-                       
+
                        number = atoi (period_to_end);
-                       
+
                        if (numerals_end < period_to_end.length() - 1) {
                                /* extra material after the end of the digits */
                                remainder = period_to_end.substr (numerals_end);
@@ -538,7 +538,7 @@ RegionFactory::new_region_name (string old)
        }
 
        while (number < (UINT_MAX-1)) {
-               
+
                const RegionMap& regions (RegionFactory::regions());
                RegionMap::const_iterator i;
                string sbuf;
@@ -567,7 +567,7 @@ RegionFactory::new_region_name (string old)
        return old;
 }
 
-void 
+void
 RegionFactory::get_regions_using_source (boost::shared_ptr<Source> s, std::set<boost::shared_ptr<Region> >& r)
 {
        Glib::Mutex::Lock lm (region_map_lock);
@@ -579,7 +579,7 @@ RegionFactory::get_regions_using_source (boost::shared_ptr<Source> s, std::set<b
        }
 }
 
-void 
+void
 RegionFactory::remove_regions_using_source (boost::shared_ptr<Source> src)
 {
        Glib::Mutex::Lock lm (region_map_lock);
index 1d6028156528b2d04649c9a61977a5e29b78dad3..6184e1a3d636879fabdfc6d32d63de363df53141 100644 (file)
@@ -55,7 +55,7 @@ ResampledImportableSource::ResampledImportableSource (boost::shared_ptr<Importab
        input = new float[blocksize];
 
        seek (0);
-       
+
        src_data.src_ratio = ((float) rate) / source->samplerate();
 }
 
@@ -128,12 +128,12 @@ ResampledImportableSource::seek (framepos_t pos)
                error << string_compose(_("Import: src_new() failed : %1"), src_strerror (err)) << endmsg ;
                throw failed_constructor ();
        }
-       
+
        src_data.input_frames = 0;
        src_data.data_in = input;
        src_data.end_of_input = 0;
 }
-       
+
 framepos_t
 ResampledImportableSource::natural_position () const
 {
index e64db79c869770e7c4d34e602fcf120dcce44ae9..a1374feb8adcb475ebaba1a09bd4f3bbd2b38a84 100644 (file)
@@ -98,7 +98,7 @@ Return::set_state (const XMLNode& node, int version)
                sscanf (prop->value().c_str(), "%" PRIu32, &_bitslot);
                _session.mark_return_id (_bitslot);
        }
-        
+
        return 0;
 }
 
index 1ea43e4a64c99cc4c61d613dc52b44771dea2292..0e8c93d75e0b364f74b3bc00a5afe40a5e624808 100644 (file)
@@ -160,7 +160,7 @@ Route::init ()
                _intreturn.reset (new InternalReturn (_session));
                _intreturn->activate ();
 
-               /* the thing that provides proper control over a control/monitor/listen bus 
+               /* the thing that provides proper control over a control/monitor/listen bus
                   (such as per-channel cut, dim, solo, invert, etc).
                */
                _monitor_control.reset (new MonitorProcessor (_session));
@@ -188,13 +188,13 @@ Route::~Route ()
 {
        DEBUG_TRACE (DEBUG::Destruction, string_compose ("route %1 destructor\n", _name));
 
-       /* do this early so that we don't get incoming signals as we are going through destruction 
+       /* do this early so that we don't get incoming signals as we are going through destruction
         */
 
        drop_connections ();
 
        /* don't use clear_processors here, as it depends on the session which may
-          be half-destroyed by now 
+          be half-destroyed by now
        */
 
        Glib::RWLock::WriterLock lm (_processor_lock);
@@ -291,7 +291,7 @@ Route::sync_order_keys (std::string const & base)
        }
 
        bool changed = false;
-       
+
        for (; i != order_keys.end(); ++i) {
                if (i->second != key) {
                        i->second = key;
@@ -496,7 +496,7 @@ Route::process_output_buffers (BufferSet& bufs,
                                abort ();
                        }
                }
-#endif                
+#endif
                /* should we NOT run plugins here if the route is inactive?
                   do we catch route != active somewhere higher?
                */
@@ -599,7 +599,7 @@ Route::set_solo_safe (bool yn, void *src)
        if (_solo_safe != yn) {
                _solo_safe = yn;
                solo_safe_changed (src);
-       } 
+       }
 }
 
 bool
@@ -655,16 +655,16 @@ Route::mod_solo_by_others_upstream (int32_t delta)
 
        DEBUG_TRACE (DEBUG::Solo, string_compose (
                             "%1 SbU delta %2 = %3 old = %4 sbd %5 ss %6 exclusive %7\n",
-                            name(), delta, _soloed_by_others_upstream, old_sbu, 
+                            name(), delta, _soloed_by_others_upstream, old_sbu,
                             _soloed_by_others_downstream, _self_solo, Config->get_exclusive_solo()));
 
-       /* push the inverse solo change to everything that feeds us. 
+       /* push the inverse solo change to everything that feeds us.
 
           This is important for solo-within-group. When we solo 1 track out of N that
           feed a bus, that track will cause mod_solo_by_upstream (+1) to be called
           on the bus. The bus then needs to call mod_solo_by_downstream (-1) on all
           tracks that feed it. This will silence them if they were audible because
-          of a bus solo, but the newly soloed track will still be audible (because 
+          of a bus solo, but the newly soloed track will still be audible (because
           it is self-soloed).
 
           but .. do this only when we are being told to solo-by-upstream (i.e delta = +1),
@@ -672,7 +672,7 @@ Route::mod_solo_by_others_upstream (int32_t delta)
        */
 
        if ((_self_solo || _soloed_by_others_downstream) &&
-           ((old_sbu == 0 && _soloed_by_others_upstream > 0) || 
+           ((old_sbu == 0 && _soloed_by_others_upstream > 0) ||
             (old_sbu > 0 && _soloed_by_others_upstream == 0))) {
 
                if (delta > 0 || !Config->get_exclusive_solo()) {
@@ -683,7 +683,7 @@ Route::mod_solo_by_others_upstream (int32_t delta)
                                        sr->mod_solo_by_others_downstream (-delta);
                                }
                        }
-               } 
+               }
        }
 
        set_mute_master_solo ();
@@ -730,7 +730,7 @@ Route::set_solo_isolated (bool yn, void *src)
                _route_group->foreach_route (boost::bind (&Route::set_solo_isolated, _1, yn, _route_group));
                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 ();
@@ -742,7 +742,7 @@ Route::set_solo_isolated (bool yn, void *src)
 
                bool sends_only;
                bool does_feed = direct_feeds (*i, &sends_only); // we will recurse anyway, so don't use ::feeds()
-               
+
                if (does_feed && !sends_only) {
                        (*i)->set_solo_isolated (yn, (*i)->route_group());
                }
@@ -857,7 +857,7 @@ Route::add_processor (boost::shared_ptr<Processor> processor, ProcessorList::ite
 
        DEBUG_TRACE (DEBUG::Processors, string_compose (
                             "%1 adding processor %2\n", name(), processor->name()));
-       
+
        ChanCount old_pms = processor_max_streams;
 
        if (!_session.engine().connected() || !processor) {
@@ -945,7 +945,7 @@ Route::add_processor_from_xml_2X (const XMLNode& node, int version)
 
                XMLNodeList const & children = node.children ();
                XMLNodeList::const_iterator i = children.begin ();
-               
+
                while (i != children.end() && (*i)->name() != X_("Redirect")) {
                        ++i;
                }
@@ -962,7 +962,7 @@ Route::add_processor_from_xml_2X (const XMLNode& node, int version)
 
                        if ((prop = node.property ("type")) != 0) {
 
-                               if (prop->value() == "ladspa" || prop->value() == "Ladspa" || 
+                               if (prop->value() == "ladspa" || prop->value() == "Ladspa" ||
                                                prop->value() == "lv2" ||
                                                prop->value() == "vst" ||
                                                prop->value() == "audiounit") {
@@ -1307,7 +1307,7 @@ Route::remove_processor (boost::shared_ptr<Processor> processor, ProcessorStream
        {
                Glib::RWLock::WriterLock lm (_processor_lock);
                ProcessorState pstate (this);
-               
+
                ProcessorList::iterator i;
                bool removed = false;
 
@@ -1352,7 +1352,7 @@ Route::remove_processor (boost::shared_ptr<Processor> processor, ProcessorStream
 
                {
                        Glib::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
-               
+
                        if (configure_processors_unlocked (err)) {
                                pstate.restore ();
                                /* we know this will work, because it worked before :) */
@@ -1396,7 +1396,7 @@ Route::remove_processors (const ProcessorList& to_be_deleted, ProcessorStreams*
        {
                Glib::RWLock::WriterLock lm (_processor_lock);
                ProcessorState pstate (this);
-               
+
                ProcessorList::iterator i;
                boost::shared_ptr<Processor> processor;
 
@@ -1442,7 +1442,7 @@ Route::remove_processors (const ProcessorList& to_be_deleted, ProcessorStreams*
 
                {
                        Glib::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
-               
+
                        if (configure_processors_unlocked (err)) {
                                pstate.restore ();
                                /* we know this will work, because it worked before :) */
@@ -1482,12 +1482,12 @@ int
 Route::configure_processors (ProcessorStreams* err)
 {
        assert (!AudioEngine::instance()->process_lock().trylock());
-       
+
        if (!_in_configure_processors) {
                Glib::RWLock::WriterLock lm (_processor_lock);
                return configure_processors_unlocked (err);
        }
-       
+
        return 0;
 }
 
@@ -1522,7 +1522,7 @@ Route::try_configure_processors_unlocked (ChanCount in, ProcessorStreams* err)
                        DEBUG_TRACE (DEBUG::Processors, "--- CONFIGURE ABORTED due to unknown processor.\n");
                        break;
                }
-               
+
                if ((*p)->can_support_io_configuration(in, out)) {
                        DEBUG_TRACE (DEBUG::Processors, string_compose ("\t%1 ID=%2 in=%3 out=%4\n",(*p)->name(), (*p)->id(), in, out));
                        configuration.push_back(make_pair(in, out));
@@ -1540,7 +1540,7 @@ Route::try_configure_processors_unlocked (ChanCount in, ProcessorStreams* err)
        }
 
        DEBUG_TRACE (DEBUG::Processors, "}\n");
-       
+
        return configuration;
 }
 
@@ -1577,7 +1577,7 @@ Route::configure_processors_unlocked (ProcessorStreams* err)
                if (boost::dynamic_pointer_cast<UnknownProcessor> (*p)) {
                        break;
                }
-               
+
                (*p)->configure_io(c->first, c->second);
                processor_max_streams = ChanCount::max(processor_max_streams, c->first);
                processor_max_streams = ChanCount::max(processor_max_streams, c->second);
@@ -1690,7 +1690,7 @@ Route::reorder_processors (const ProcessorList& new_order, ProcessorStreams* err
        {
                Glib::RWLock::WriterLock lm (_processor_lock);
                ProcessorState pstate (this);
-               
+
                ProcessorList::iterator oiter;
                ProcessorList::const_iterator niter;
                ProcessorList as_it_will_be;
@@ -1748,7 +1748,7 @@ Route::reorder_processors (const ProcessorList& new_order, ProcessorStreams* err
 
                {
                        Glib::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
-               
+
                        if (configure_processors_unlocked (err)) {
                                pstate.restore ();
                                return -1;
@@ -2063,12 +2063,12 @@ Route::_set_state_2X (const XMLNode& node, int version)
        } else {
                _flags = Flag (0);
        }
-       
+
        if ((prop = node.property (X_("phase-invert"))) != 0) {
                boost::dynamic_bitset<> p (_input->n_ports().n_audio ());
                if (string_is_affirmative (prop->value ())) {
                        p.set ();
-               }                       
+               }
                set_phase_invert (p);
        }
 
@@ -2085,60 +2085,60 @@ Route::_set_state_2X (const XMLNode& node, int version)
        }
 
        if ((prop = node.property (X_("muted"))) != 0) {
-               
+
                bool first = true;
                bool muted = string_is_affirmative (prop->value());
-               
+
                if (muted) {
 
                        string mute_point;
-                       
+
                        if ((prop = node.property (X_("mute-affects-pre-fader"))) != 0) {
-                         
+
                                if (string_is_affirmative (prop->value())){
                                        mute_point = mute_point + "PreFader";
                                        first = false;
                                }
                        }
-                       
+
                        if ((prop = node.property (X_("mute-affects-post-fader"))) != 0) {
-                         
+
                                if (string_is_affirmative (prop->value())){
-                                 
+
                                        if (!first) {
                                                mute_point = mute_point + ",";
                                        }
-                                       
+
                                        mute_point = mute_point + "PostFader";
                                        first = false;
                                }
                        }
 
                        if ((prop = node.property (X_("mute-affects-control-outs"))) != 0) {
-                         
+
                                if (string_is_affirmative (prop->value())){
-                                 
+
                                        if (!first) {
                                                mute_point = mute_point + ",";
                                        }
-                                       
+
                                        mute_point = mute_point + "Listen";
                                        first = false;
                                }
                        }
 
                        if ((prop = node.property (X_("mute-affects-main-outs"))) != 0) {
-                         
+
                                if (string_is_affirmative (prop->value())){
-                                 
+
                                        if (!first) {
                                                mute_point = mute_point + ",";
                                        }
-                                       
+
                                        mute_point = mute_point + "Main";
                                }
                        }
-                       
+
                        _mute_master->set_mute_points (mute_point);
                        _mute_master->set_muted_by_self (true);
                }
@@ -2212,7 +2212,7 @@ Route::_set_state_2X (const XMLNode& node, int version)
                                _active = !yn; // force switch
                                set_active (yn, this);
                        }
-                       
+
                        if ((prop = child->property (X_("gain"))) != 0) {
                                gain_t val;
 
@@ -2220,17 +2220,17 @@ Route::_set_state_2X (const XMLNode& node, int version)
                                        _amp->gain_control()->set_value (val);
                                }
                        }
-                       
+
                        /* Set up Panners in the IO */
                        XMLNodeList io_nlist = child->children ();
-                       
+
                        XMLNodeConstIterator io_niter;
                        XMLNode *io_child;
-                       
+
                        for (io_niter = io_nlist.begin(); io_niter != io_nlist.end(); ++io_niter) {
 
                                io_child = *io_niter;
-                               
+
                                if (io_child->name() == X_("Panner")) {
                                        _main_outs->panner_shell()->set_state(*io_child, version);
                                } else if (io_child->name() == X_("Automation")) {
@@ -2283,7 +2283,7 @@ Route::_set_state_2X (const XMLNode& node, int version)
                                set_remote_control_id (x);
                        }
 
-               } 
+               }
        }
 
        return 0;
@@ -2359,7 +2359,7 @@ Route::set_processor_state (const XMLNode& node)
                                }
                        }
 
-                       // If the processor (*niter) is not on the route then create it 
+                       // If the processor (*niter) is not on the route then create it
 
                        if (o == _processors.end()) {
 
@@ -2461,22 +2461,22 @@ void
 Route::silence_unlocked (framecnt_t nframes)
 {
        /* Must be called with the processor lock held */
-       
+
        if (!_silent) {
 
                _output->silence (nframes);
 
                for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
                        boost::shared_ptr<PluginInsert> pi;
-                       
+
                        if (!_active && (pi = boost::dynamic_pointer_cast<PluginInsert> (*i)) != 0) {
                                // skip plugins, they don't need anything when we're not active
                                continue;
                        }
-                       
+
                        (*i)->silence (nframes);
                }
-               
+
                if (nframes == _session.get_block_size()) {
                        // _silent = true;
                }
@@ -2526,13 +2526,13 @@ Route::listen_via_monitor ()
 {
        /* master never sends to control outs */
        assert (!is_master ());
-       
+
        /* make sure we have one */
        if (!_monitor_send) {
                _monitor_send.reset (new InternalSend (_session, _pannable, _mute_master, _session.monitor_out(), Delivery::Listen));
                _monitor_send->set_display_to_user (false);
        }
-       
+
        /* set it up */
        Glib::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
        configure_processors (0);
@@ -2540,7 +2540,7 @@ Route::listen_via_monitor ()
        return 0;
 }
 
-/** Add an internal send to a route.  
+/** Add an internal send to a route.
  *  @param route route to send to.
  *  @param placement placement for the send.
  */
@@ -2548,7 +2548,7 @@ int
 Route::listen_via (boost::shared_ptr<Route> route, Placement placement)
 {
        assert (route != _session.monitor_out ());
-       
+
        {
                Glib::RWLock::ReaderLock rm (_processor_lock);
 
@@ -2676,7 +2676,7 @@ Route::direct_feeds (boost::shared_ptr<Route> other, bool* only_send)
                return true;
        }
 
-       
+
        for (ProcessorList::iterator r = _processors.begin(); r != _processors.end(); ++r) {
 
                boost::shared_ptr<IOProcessor> iop;
@@ -2694,7 +2694,7 @@ Route::direct_feeds (boost::shared_ptr<Route> other, bool* only_send)
                } else {
                        DEBUG_TRACE (DEBUG::Graph,  string_compose ("\tPROC %1 is not an IOP\n", (*r)->name()));
                }
-                       
+
        }
 
        DEBUG_TRACE (DEBUG::Graph,  string_compose ("\tdoes NOT feed %1\n", other->name()));
@@ -2771,7 +2771,7 @@ Route::no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
                if (_session.transport_speed() != 0.0f) {
                        /* we're rolling but some state is changing (e.g. our diskstream contents)
                           so we cannot use them. Be silent till this is over.
-                          
+
                           XXX note the absurdity of ::no_roll() being called when we ARE rolling!
                        */
                        silence_unlocked (nframes);
@@ -2819,7 +2819,7 @@ Route::check_initial_delay (framecnt_t nframes, framecnt_t& transport_frame)
 
                _roll_delay = 0;
 
-       } 
+       }
 
        return nframes;
 }
@@ -2832,7 +2832,7 @@ Route::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, in
        if (!lm.locked()) {
                return 0;
        }
-       
+
        automation_snapshot (_session.transport_frame(), false);
 
        if (n_outputs().n_total() == 0) {
@@ -2925,22 +2925,22 @@ Route::set_meter_point (MeterPoint p, bool force)
        }
 
        _meter_point = p;
-       
+
        bool meter_was_visible_to_user = _meter->display_to_user ();
 
        {
                Glib::RWLock::WriterLock lm (_processor_lock);
-       
+
                if (_meter_point != MeterCustom) {
 
                        _meter->set_display_to_user (false);
-                       
+
                        setup_invisible_processors ();
-                       
+
                        ProcessorList::iterator loc = find (_processors.begin(), _processors.end(), _meter);
 
                        ChanCount m_in;
-                       
+
                        if (loc == _processors.begin()) {
                                m_in = _input->n_ports();
                        } else {
@@ -2948,19 +2948,19 @@ Route::set_meter_point (MeterPoint p, bool force)
                                --before;
                                m_in = (*before)->output_streams ();
                        }
-                       
+
                        _meter->reflect_inputs (m_in);
-                       
+
                        /* we do not need to reconfigure the processors, because the meter
                           (a) is always ready to handle processor_max_streams
                           (b) is always an N-in/N-out processor, and thus moving
                           it doesn't require any changes to the other processors.
                        */
-                       
+
                } else {
-                       
+
                        // just make it visible and let the user move it
-                       
+
                        _meter->set_display_to_user (true);
                }
        }
@@ -2968,7 +2968,7 @@ Route::set_meter_point (MeterPoint p, bool force)
        meter_change (); /* EMIT SIGNAL */
 
        bool const meter_visibly_changed = (_meter->display_to_user() != meter_was_visible_to_user);
-       
+
        processors_changed (RouteProcessorChange (RouteProcessorChange::MeterPointChange, meter_visibly_changed)); /* EMIT SIGNAL */
 }
 
@@ -2981,7 +2981,7 @@ Route::listen_position_changed ()
 
                {
                        Glib::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
-                       
+
                        if (configure_processors_unlocked (0)) {
                                pstate.restore ();
                                configure_processors_unlocked (0); // it worked before we tried to add it ...
@@ -2998,7 +2998,7 @@ boost::shared_ptr<CapturingProcessor>
 Route::add_export_point()
 {
        if (!_capturing_processor) {
-               
+
                _capturing_processor.reset (new CapturingProcessor (_session));
                _capturing_processor->activate ();
 
@@ -3008,7 +3008,7 @@ Route::add_export_point()
                }
 
        }
-       
+
        return _capturing_processor;
 }
 
@@ -3094,7 +3094,7 @@ Route::SoloControllable::set_value (double val)
        if (!r) {
                return;
        }
-       
+
        rl->push_back (r);
 
        if (Config->get_solo_control_is_listen_control()) {
@@ -3111,7 +3111,7 @@ Route::SoloControllable::get_value () const
        if (!r) {
                return 0;
        }
-       
+
        if (Config->get_solo_control_is_listen_control()) {
                return r->listening_via_monitor() ? 1.0f : 0.0f;
        } else {
@@ -3139,7 +3139,7 @@ Route::MuteControllable::set_value (double val)
        if (!r) {
                return;
        }
-       
+
        rl->push_back (r);
        _session.set_mute (rl, bval);
 }
@@ -3151,7 +3151,7 @@ Route::MuteControllable::get_value () const
        if (!r) {
                return 0;
        }
-       
+
        return r->muted() ? 1.0f : 0.0f;
 }
 
@@ -3161,7 +3161,7 @@ Route::set_block_size (pframes_t nframes)
        for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
                (*i)->set_block_size (nframes);
        }
-       
+
        _session.ensure_buffers (n_process_buffers ());
 }
 
@@ -3276,7 +3276,7 @@ Route::set_name (const string& str)
                 * just fine as it is (it will not contain the route
                 * name if its a port insert, port send or port return).
                 */
-               
+
                if (_main_outs) {
                        if (_main_outs->set_name (name)) {
                                /* XXX returning false here is stupid because
@@ -3365,7 +3365,7 @@ Route::set_active (bool yn, void* src)
                _route_group->foreach_route (boost::bind (&Route::set_active, _1, yn, _route_group));
                return;
        }
-       
+
        if (_active != yn) {
                _active = yn;
                _input->set_active (yn);
@@ -3479,7 +3479,7 @@ Route::nth_send (uint32_t n)
                        if (n-- == 0) {
                                return *i;
                        }
-               } 
+               }
        }
 
        return boost::shared_ptr<Processor> ();
@@ -3543,7 +3543,7 @@ list<string>
 Route::unknown_processors () const
 {
        list<string> p;
-       
+
        Glib::RWLock::ReaderLock lm (_processor_lock);
        for (ProcessorList::const_iterator i = _processors.begin(); i != _processors.end(); ++i) {
                if (boost::dynamic_pointer_cast<UnknownProcessor const> (*i)) {
@@ -3674,11 +3674,11 @@ Route::setup_invisible_processors ()
        }
 
        /* we'll build this new list here and then use it */
-       
+
        ProcessorList new_processors;
 
        /* find visible processors */
-       
+
        for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
                if ((*i)->display_to_user ()) {
                        new_processors.push_back (*i);
@@ -3787,7 +3787,7 @@ Route::setup_invisible_processors ()
                assert (!_monitor_control->display_to_user ());
                new_processors.push_front (_monitor_control);
        }
-       
+
        /* INTERNAL RETURN */
 
        /* doing this here means that any monitor control will come just after
@@ -3800,7 +3800,7 @@ Route::setup_invisible_processors ()
        }
 
        /* EXPORT PROCESSOR */
-       
+
        if (_capturing_processor) {
                assert (!_capturing_processor->display_to_user ());
                new_processors.push_front (_capturing_processor);
index c64e5f77d14af6e1317fd504876f517c8ce687b4..7352112217ef4614c7619f813c4be87729c88d79 100644 (file)
@@ -51,7 +51,7 @@ namespace ARDOUR {
                PropertyDescriptor<bool> select;
                PropertyDescriptor<bool> edit;
                PropertyDescriptor<bool> route_active;
-       }       
+       }
 }
 
 void
@@ -116,7 +116,7 @@ RouteGroup::~RouteGroup ()
                ++tmp;
 
                (*i)->leave_route_group ();
-               
+
                i = tmp;
        }
 }
@@ -130,14 +130,14 @@ RouteGroup::add (boost::shared_ptr<Route> r)
        if (find (routes->begin(), routes->end(), r) != routes->end()) {
                return 0;
        }
-       
+
        r->leave_route_group ();
 
        routes->push_back (r);
 
        r->join_route_group (this);
        r->DropReferences.connect_same_thread (*this, boost::bind (&RouteGroup::remove_when_going_away, this, boost::weak_ptr<Route> (r)));
-       
+
        _session.set_dirty ();
        MembershipChanged (); /* EMIT SIGNAL */
        return 0;
@@ -216,12 +216,12 @@ XMLNode&
 RouteGroup::get_state (void)
 {
        XMLNode *node = new XMLNode ("RouteGroup");
-       
+
        add_properties (*node);
 
        if (!routes->empty()) {
                stringstream str;
-               
+
                for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) {
                        str << (*i)->id () << ' ';
                }
@@ -247,14 +247,14 @@ RouteGroup::set_state (const XMLNode& node, int version)
                stringstream str (prop->value());
                vector<string> ids;
                split (str.str(), ids, ' ');
-               
+
                for (vector<string>::iterator i = ids.begin(); i != ids.end(); ++i) {
                        PBD::ID id (*i);
                        boost::shared_ptr<Route> r = _session.route_by_id (id);
-                       
+
                        if (r) {
                                add (r);
-                       } 
+                       }
                }
        }
 
@@ -357,7 +357,7 @@ RouteGroup::set_active (bool yn, void* /*src*/)
 
        _active = yn;
        send_change (PropertyChange (Properties::active));
-               
+
        _session.set_dirty ();
 }
 
@@ -377,7 +377,7 @@ RouteGroup::set_hidden (bool yn, void* /*src*/)
        if (is_hidden() == yn) {
                return;
        }
-       
+
        if (yn) {
                _hidden = true;
                if (Config->get_hiding_groups_deactivates_groups()) {
@@ -391,7 +391,7 @@ RouteGroup::set_hidden (bool yn, void* /*src*/)
        }
 
        PropertyChanged (Properties::hidden); /* EMIT SIGNAL */
-       
+
        _session.set_dirty ();
 }
 
@@ -442,7 +442,7 @@ RouteGroup::make_subgroup (bool aux, Placement placement)
        } else {
 
                boost::shared_ptr<Bundle> bundle = subgroup_bus->input()->bundle ();
-               
+
                for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) {
                        (*i)->output()->disconnect (this);
                        (*i)->output()->connect_ports_to_bundle (bundle, this);
@@ -456,7 +456,7 @@ RouteGroup::destroy_subgroup ()
        if (!subgroup_bus) {
                return;
        }
-       
+
        for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) {
                (*i)->output()->disconnect (this);
                /* XXX find a new bundle to connect to */
index 2ec9a10bda6df85e3796dfc050433feb2ec8a57f..f537c9dfdfc7b21fb45d93103800c039f6950b2b 100644 (file)
@@ -66,7 +66,7 @@ Send::deactivate ()
        _amp->deactivate ();
        _meter->deactivate ();
        _meter->reset ();
-       
+
        Processor::deactivate ();
 }
 
@@ -144,7 +144,7 @@ Send::set_state (const XMLNode& node, int version)
        if (version < 3000) {
                return set_state_2X (node, version);
        }
-       
+
        const XMLProperty* prop;
 
        Delivery::set_state (node, version);
index 19bfa295bf88c3461b4c01499a1040ef423c58f7..923fd6164f332cd76799666fc18d555f32e10c89 100644 (file)
@@ -162,7 +162,7 @@ Session::Session (AudioEngine &eng,
        , _suspend_timecode_transmission (0)
 {
        _locations = new Locations (*this);
-               
+
        playlists.reset (new SessionPlaylists);
 
        _all_route_group->set_active (true, this);
@@ -262,7 +262,7 @@ Session::destroy ()
 
        routes.flush ();
        _bundles.flush ();
-       
+
        AudioDiskstream::free_working_buffers();
 
        /* tell everyone who is still standing that we're about to die */
@@ -308,7 +308,7 @@ Session::destroy ()
 
        DEBUG_TRACE (DEBUG::Destruction, "delete route groups\n");
        for (list<RouteGroup *>::iterator i = _route_groups.begin(); i != _route_groups.end(); ++i) {
-               
+
                delete *i;
        }
 
@@ -373,13 +373,13 @@ Session::when_engine_running ()
                        } else {
                                c = _click_io->set_state (*child->children().front(), Stateful::loading_state_version);
                        }
-                                       
+
 
                        if (c == 0) {
                                _clicking = Config->get_clicking ();
-                               
+
                        } else {
-                               
+
                                error << _("could not setup Click I/O") << endmsg;
                                _clicking = false;
                        }
@@ -399,13 +399,13 @@ Session::when_engine_running ()
                                        }
                                }
                        }
-                       
+
                        if (_click_io->n_ports () > ChanCount::ZERO) {
                                _clicking = Config->get_clicking ();
                        }
                }
        }
-       
+
        catch (failed_constructor& err) {
                error << _("cannot setup Click I/O") << endmsg;
        }
@@ -497,13 +497,13 @@ Session::when_engine_running ()
        for (uint32_t np = 0; np < inputs[DataType::MIDI].size(); ++np) {
                string n = inputs[DataType::MIDI][np];
                boost::erase_first (n, X_("alsa_pcm:"));
-               
+
                boost::shared_ptr<Bundle> c (new Bundle (n, false));
                c->add_channel ("", DataType::MIDI);
                c->set_port (0, inputs[DataType::MIDI][np]);
                add_bundle (c);
        }
-               
+
        /* MIDI output bundles */
 
        for (uint32_t np = 0; np < outputs[DataType::MIDI].size(); ++np) {
@@ -534,7 +534,7 @@ Session::when_engine_running ()
        if (_is_new && !no_auto_connect()) {
 
                Glib::Mutex::Lock lm (AudioEngine::instance()->process_lock());
-                
+
                /* don't connect the master bus outputs if there is a monitor bus */
 
                if (_master_out && Config->get_auto_connect_standard_busses() && !_monitor_out) {
@@ -613,7 +613,7 @@ Session::when_engine_running ()
                                        uint32_t limit = _monitor_out->n_outputs().get (DataType::AUDIO);
 
                                        if (mod != 0) {
-                                               
+
                                                for (uint32_t n = 0; n < limit; ++n) {
 
                                                        Port* p = _monitor_out->output()->ports().port(DataType::AUDIO, n);
@@ -621,7 +621,7 @@ Session::when_engine_running ()
                                                        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 (
@@ -700,15 +700,15 @@ Session::hookup_io ()
        if (_monitor_out) {
                boost::shared_ptr<RouteList> r = routes.reader ();
                for (RouteList::iterator x = r->begin(); x != r->end(); ++x) {
-                        
+
                        if ((*x)->is_monitor()) {
-                                
+
                                /* relax */
-                                
+
                        } else if ((*x)->is_master()) {
-                                
+
                                /* relax */
-                                
+
                        } else {
 
                                (*x)->listen_via_monitor ();
@@ -744,7 +744,7 @@ Session::track_playlist_changed (boost::weak_ptr<Track> wp)
        if (!track) {
                return;
        }
-       
+
        boost::shared_ptr<Playlist> playlist;
 
        if ((playlist = track->playlist()) != 0) {
@@ -987,20 +987,20 @@ Session::enable_record ()
 {
        while (1) {
                RecordState rs = (RecordState) g_atomic_int_get (&_record_status);
-                
+
                if (rs == Recording) {
                        break;
                }
 
                if (g_atomic_int_compare_and_exchange (&_record_status, rs, Recording)) {
-                        
+
                        _last_record_location = _transport_frame;
                        MIDI::Manager::instance()->mmc()->send (MIDI::MachineControlCommand (MIDI::MachineControl::cmdRecordStrobe));
-                        
+
                        if (Config->get_monitoring_model() == HardwareMonitoring && config.get_auto_input()) {
                                set_track_monitor_input_status (true);
                        }
-                        
+
                        RecordStateChanged ();
                        break;
                }
@@ -1060,9 +1060,9 @@ Session::maybe_enable_record ()
           means that we save pending state of which sources the next record will use,
           which gives us some chance of recovering from a crash during the record.
        */
-       
+
        save_state ("", true);
-       
+
        if (_transport_speed) {
                if (!config.get_punch_in()) {
                        enable_record ();
@@ -1233,7 +1233,7 @@ struct RouteSorter {
                     }
             }
     }
-            
+
     bool operator() (boost::shared_ptr<Route> r1, boost::shared_ptr<Route> r2) {
            if (r2->feeds (r1)) {
                    /* r1 fed by r2; run r2 early */
@@ -1244,7 +1244,7 @@ struct RouteSorter {
            } else {
                    if (r1->not_fed ()) {
                            if (r2->not_fed ()) {
-                                   /* no ardour-based connections inbound to either route. */ 
+                                   /* no ardour-based connections inbound to either route. */
                                     return sort_by_rec_enabled (r1, r2);
                            } else {
                                    /* r2 has connections, r1 does not; run r1 early */
@@ -1276,7 +1276,7 @@ trace_terminal (boost::shared_ptr<Route> r1, boost::shared_ptr<Route> rbase)
        /* make a copy of the existing list of routes that feed r1 */
 
        Route::FedBy existing (r1->fed_by());
-                        
+
        /* for each route that feeds r1, recurse, marking it as feeding
           rbase as well.
        */
@@ -1286,7 +1286,7 @@ trace_terminal (boost::shared_ptr<Route> r1, boost::shared_ptr<Route> rbase)
                        /* (*i) went away, ignore it */
                        continue;
                }
-               
+
                /* r2 is a route that feeds r1 which somehow feeds base. mark
                   base as being fed by r2
                */
@@ -1337,7 +1337,7 @@ Session::resort_routes ()
        boost::shared_ptr<RouteList> rl = routes.reader ();
        for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
                DEBUG_TRACE (DEBUG::Graph, string_compose ("%1 fed by ...\n", (*i)->name()));
-                
+
                const Route::FedBy& fb ((*i)->fed_by());
 
                for (Route::FedBy::const_iterator f = fb.begin(); f != fb.end(); ++f) {
@@ -1391,7 +1391,7 @@ Session::resort_routes_using (boost::shared_ptr<RouteList> r)
 #ifndef NDEBUG
        DEBUG_TRACE (DEBUG::Graph, "Routes resorted, order follows:\n");
        for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
-               DEBUG_TRACE (DEBUG::Graph, string_compose ("\t%1 signal order %2\n", 
+               DEBUG_TRACE (DEBUG::Graph, string_compose ("\t%1 signal order %2\n",
                                                           (*i)->name(), (*i)->order_key ("signal")));
        }
 #endif
@@ -1418,7 +1418,7 @@ Session::find_route_name (string const & base, uint32_t& id, char* name, size_t
                snprintf (name, name_len, "%s", base.c_str());
                return true;
        }
-               
+
        do {
                snprintf (name, name_len, "%s %" PRIu32, base.c_str(), id);
 
@@ -1467,7 +1467,7 @@ Session::new_midi_track (TrackMode mode, RouteGroup* route_group, uint32_t how_m
        control_id = ntracks() + nbusses();
 
        bool const use_number = (how_many != 1);
-       
+
        while (how_many) {
                if (!find_route_name (name_template.empty() ? _("Midi") : name_template, ++track_id, track_name, sizeof(track_name), use_number)) {
                        error << "cannot find name for new midi track" << endmsg;
@@ -1475,7 +1475,7 @@ Session::new_midi_track (TrackMode mode, RouteGroup* route_group, uint32_t how_m
                }
 
                boost::shared_ptr<MidiTrack> track;
-                
+
                try {
                        track.reset (new MidiTrack (*this, track_name, Route::Flag (0), mode));
 
@@ -1551,16 +1551,16 @@ Session::midi_output_change_handler (IOChange change, void * /*src*/, boost::wea
                         return;
                 }
 
-                /* new audio ports: make sure the audio goes somewhere useful, 
+                /* new audio ports: make sure the audio goes somewhere useful,
                    unless the user has no-auto-connect selected.
-                
+
                    The existing ChanCounts don't matter for this call as they are only
                    to do with matching input and output indices, and we are only changing
                    outputs here.
                 */
 
                 ChanCount dummy;
-                
+
                 auto_connect_route (midi_track, dummy, dummy, false, false, ChanCount(), change.before);
         }
 }
@@ -1570,7 +1570,7 @@ Session::midi_output_change_handler (IOChange change, void * /*src*/, boost::wea
  *  @param output_start As \a input_start, but for outputs.
  */
 void
-Session::auto_connect_route (boost::shared_ptr<Route> route, ChanCount& existing_inputs, ChanCount& existing_outputs, 
+Session::auto_connect_route (boost::shared_ptr<Route> route, ChanCount& existing_inputs, ChanCount& existing_outputs,
                              bool with_lock, bool connect_inputs, ChanCount input_start, ChanCount output_start)
 {
        if (!IO::connecting_legal) {
@@ -1624,7 +1624,7 @@ Session::auto_connect_route (boost::shared_ptr<Route> route, ChanCount& existing
 
                        for (uint32_t i = input_start.get(*t); i < route->n_inputs().get(*t) && i < nphysical_in; ++i) {
                                string port;
-                                
+
                                if (Config->get_input_auto_connect() & AutoConnectPhysical) {
                                        DEBUG_TRACE (DEBUG::Graph,
                                                     string_compose("Get index %1 + %2 % %3 = %4\n",
@@ -1694,7 +1694,7 @@ Session::new_audio_track (
        control_id = ntracks() + nbusses() + 1;
 
        bool const use_number = (how_many != 1);
-       
+
        while (how_many) {
                if (!find_route_name (name_template.empty() ? _("Audio") : name_template, ++track_id, track_name, sizeof(track_name), use_number)) {
                        error << "cannot find name for new audio track" << endmsg;
@@ -1702,7 +1702,7 @@ Session::new_audio_track (
                }
 
                boost::shared_ptr<AudioTrack> track;
-                
+
                try {
                        track.reset (new AudioTrack (*this, track_name, Route::Flag (0), mode));
 
@@ -1725,7 +1725,7 @@ Session::new_audio_track (
                                              << endmsg;
                                        goto failed;
                                }
-                               
+
                                if (track->output()->ensure_io (ChanCount(DataType::AUDIO, output_channels), false, this)) {
                                        error << string_compose (
                                                _("cannot configure %1 in/%2 out configuration for new audio track"),
@@ -1838,8 +1838,8 @@ Session::new_audio_route (int input_channels, int output_channels, RouteGroup* r
                                              << endmsg;
                                        goto failure;
                                }
-                               
-                               
+
+
                                if (bus->output()->ensure_io (ChanCount(DataType::AUDIO, output_channels), false, this)) {
                                        error << string_compose (_("cannot configure %1 in/%2 out configuration for new audio track"),
                                                                 input_channels, output_channels)
@@ -1935,9 +1935,9 @@ Session::new_route_from_template (uint32_t how_many, const std::string& template
                                   picks up the configuration of the route. During session
                                   loading this normally happens in a different way.
                                */
-                               
+
                                Glib::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
-                               
+
                                IOChange change (IOChange::Type (IOChange::ConfigurationChanged | IOChange::ConnectionsChanged));
                                change.after = route->input()->n_ports();
                                route->input()->changed (change, this);
@@ -1977,7 +1977,7 @@ Session::add_routes (RouteList& new_routes, bool auto_connect, bool save)
 {
         ChanCount existing_inputs;
         ChanCount existing_outputs;
-        
+
         count_existing_track_channels (existing_inputs, existing_outputs);
 
        {
@@ -2030,7 +2030,7 @@ Session::add_routes (RouteList& new_routes, bool auto_connect, bool save)
                                 mt->output()->changed.connect_same_thread (*this, boost::bind (&Session::midi_output_change_handler, this, _1, _2, boost::weak_ptr<Route>(mt)));
                        }
                }
-        
+
                if (auto_connect) {
                        auto_connect_route (r, existing_inputs, existing_outputs, true);
                }
@@ -2194,7 +2194,7 @@ Session::remove_route (boost::shared_ptr<Route> route)
                                (*i)->remove_processor (s);
                        }
                }
-       }       
+       }
 
        boost::shared_ptr<MidiTrack> mt = boost::dynamic_pointer_cast<MidiTrack> (route);
        if (mt && mt->step_editing()) {
@@ -2257,7 +2257,7 @@ Session::route_listen_changed (void* /*src*/, boost::weak_ptr<Route> wpr)
                        for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
                                if ((*i) == route || (*i)->solo_isolated() || (*i)->is_master() || (*i)->is_monitor() || (*i)->is_hidden()) {
                                        continue;
-                               } 
+                               }
                                (*i)->set_listen (false, this);
                        }
                }
@@ -2281,7 +2281,7 @@ Session::route_solo_isolated_changed (void* /*src*/, boost::weak_ptr<Route> wpr)
                error << string_compose (_("programming error: %1"), X_("invalid route weak ptr passed to route_solo_changed")) << endmsg;
                return;
        }
-        
+
        bool send_changed = false;
 
        if (route->solo_isolated()) {
@@ -2300,7 +2300,7 @@ Session::route_solo_isolated_changed (void* /*src*/, boost::weak_ptr<Route> wpr)
                IsolatedChanged (); /* EMIT SIGNAL */
        }
 }
-            
+
 void
 Session::route_solo_changed (bool self_solo_change, void* /*src*/, boost::weak_ptr<Route> wpr)
 {
@@ -2321,7 +2321,7 @@ Session::route_solo_changed (bool self_solo_change, void* /*src*/, boost::weak_p
                error << string_compose (_("programming error: %1"), X_("invalid route weak ptr passed to route_solo_changed")) << endmsg;
                return;
        }
-        
+
        boost::shared_ptr<RouteList> r = routes.reader ();
        int32_t delta;
 
@@ -2330,28 +2330,28 @@ Session::route_solo_changed (bool self_solo_change, void* /*src*/, boost::weak_p
        } else {
                delta = -1;
        }
+
        if (delta == 1 && Config->get_exclusive_solo()) {
                /* new solo: disable all other solos */
                for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
                        if ((*i) == route || (*i)->solo_isolated() || (*i)->is_master() || (*i)->is_monitor() || (*i)->is_hidden()) {
                                continue;
-                       } 
+                       }
                        (*i)->set_solo (false, this);
                }
        }
 
        solo_update_disabled = true;
-        
+
        RouteList uninvolved;
-        
+
        for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
                bool via_sends_only;
                bool in_signal_flow;
 
                if ((*i) == route || (*i)->solo_isolated() || (*i)->is_master() || (*i)->is_monitor() || (*i)->is_hidden()) {
                        continue;
-               } 
+               }
 
                in_signal_flow = false;
 
@@ -2362,8 +2362,8 @@ Session::route_solo_changed (bool self_solo_change, void* /*src*/, boost::weak_p
                                }
                                in_signal_flow = true;
                        }
-               } 
-                
+               }
+
                if (route->feeds (*i, &via_sends_only)) {
                        (*i)->mod_solo_by_others_upstream (delta);
                        in_signal_flow = true;
@@ -2433,7 +2433,7 @@ Session::update_route_solo_state (boost::shared_ptr<RouteList> r)
        }
 }
 
-boost::shared_ptr<RouteList> 
+boost::shared_ptr<RouteList>
 Session::get_routes_with_internal_returns() const
 {
        boost::shared_ptr<RouteList> r = routes.reader ();
@@ -2451,17 +2451,17 @@ bool
 Session::io_name_is_legal (const std::string& name)
 {
        boost::shared_ptr<RouteList> r = routes.reader ();
-        
+
        for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
                if ((*i)->name() == name) {
                        return false;
                }
-                
+
                if ((*i)->has_io_processor_named (name)) {
                        return false;
                }
        }
-        
+
        return true;
 }
 
@@ -2559,15 +2559,15 @@ Session::maybe_update_session_range (framepos_t a, framepos_t b)
        }
 
        if (_session_range_location == 0) {
-               
+
                add_session_range_location (a, b);
-               
+
        } else {
-               
+
                if (a < _session_range_location->start()) {
                        _session_range_location->set_start (a);
                }
-               
+
                if (b > _session_range_location->end()) {
                        _session_range_location->set_end (b);
                }
@@ -2643,7 +2643,7 @@ Session::destroy_sources (list<boost::shared_ptr<Source> > srcs)
        }
 
        for (list<boost::shared_ptr<Source> >::iterator s = srcs.begin(); s != srcs.end(); ) {
-                
+
                {
                        Glib::Mutex::Lock ls (source_lock);
                        /* remove from the main source list */
@@ -2670,7 +2670,7 @@ Session::remove_last_capture ()
                if (!tr) {
                        continue;
                }
-               
+
                list<boost::shared_ptr<Source> >& l = tr->last_capture_sources();
 
                if (!l.empty()) {
@@ -2709,7 +2709,7 @@ Session::add_source (boost::shared_ptr<Source> source)
                set_dirty();
 
                boost::shared_ptr<AudioFileSource> afs;
-                
+
                if ((afs = boost::dynamic_pointer_cast<AudioFileSource>(source)) != 0) {
                        if (Config->get_auto_analyse_audio()) {
                                Analyser::queue_source_for_analysis (source, false);
@@ -2726,7 +2726,7 @@ Session::remove_source (boost::weak_ptr<Source> src)
        if (_state_of_the_state & Deletion) {
                return;
        }
-       
+
        SourceMap::iterator i;
        boost::shared_ptr<Source> source = src.lock();
 
@@ -3002,7 +3002,7 @@ Session::new_audio_source_name (const string& base, uint32_t nchan, uint32_t cha
                        string spath = sdir.sound_path().to_string();
 
                        /* note that we search *without* the extension so that
-                          we don't end up both "Audio 1-1.wav" and "Audio 1-1.caf" 
+                          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
                           a file format change.
                        */
@@ -3025,7 +3025,7 @@ Session::new_audio_source_name (const string& base, uint32_t nchan, uint32_t cha
                        throw failed_constructor();
                }
        }
-        
+
        return Glib::path_get_basename (buf);
 }
 
@@ -3093,7 +3093,7 @@ Session::new_midi_source_name (const string& base)
 boost::shared_ptr<MidiSource>
 Session::create_midi_source_for_session (Track* track, string const & n)
 {
-       /* try to use the existing write source for the track, to keep numbering sane 
+       /* try to use the existing write source for the track, to keep numbering sane
         */
 
        if (track) {
@@ -3102,7 +3102,7 @@ Session::create_midi_source_for_session (Track* track, string const & n)
                */
 
                list<boost::shared_ptr<Source> > l = track->steal_write_sources ();
-                
+
                if (!l.empty()) {
                        assert (boost::dynamic_pointer_cast<MidiSource> (l.front()));
                        return boost::dynamic_pointer_cast<MidiSource> (l.front());
@@ -3200,7 +3200,7 @@ Session::cancel_audition ()
 bool
 Session::RoutePublicOrderSorter::operator() (boost::shared_ptr<Route> a, boost::shared_ptr<Route> b)
 {
-       if (a->is_monitor()) { 
+       if (a->is_monitor()) {
                return true;
        }
        if (b->is_monitor()) {
@@ -3283,7 +3283,7 @@ Session::available_capture_duration ()
        if (_total_free_4k_blocks * scale > (double) max_framecnt) {
                return max_framecnt;
        }
-        
+
        return (framecnt_t) floor (_total_free_4k_blocks * scale);
 }
 
@@ -3346,7 +3346,7 @@ Session::tempo_map_changed (const PropertyChange&)
        playlists->update_after_tempo_map_change ();
 
        _locations->apply (*this, &Session::update_locations_after_tempo_map_change);
-       
+
        set_dirty ();
 }
 
@@ -3686,7 +3686,7 @@ Session::write_one_track (AudioTrack& track, framepos_t start, framepos_t end,
        }
 
        /* tell redirects that care that we are about to use a much larger blocksize */
-        
+
        need_block_size_reset = true;
        track.set_block_size (chunk_size);
 
@@ -3750,13 +3750,13 @@ Session::write_one_track (AudioTrack& track, framepos_t start, framepos_t end,
                /* construct a region to represent the bounced material */
 
                PropertyList plist;
-               
+
                plist.add (Properties::start, 0);
                plist.add (Properties::length, srcs.front()->length(srcs.front()->timeline_position()));
                plist.add (Properties::name, region_name_from_path (srcs.front()->name(), true));
-               
+
                result = RegionFactory::create (srcs, plist);
-                          
+
        }
 
   out:
@@ -3784,7 +3784,7 @@ Session::write_one_track (AudioTrack& track, framepos_t start, framepos_t end,
        if (need_block_size_reset) {
                track.set_block_size (get_block_size());
        }
-        
+
        unblock_processing ();
 
        return result;
@@ -3900,7 +3900,7 @@ Session::update_have_rec_enabled_track ()
                if (tr && tr->record_enabled ()) {
                        break;
                }
-               
+
                ++i;
        }
 
@@ -3946,7 +3946,7 @@ vector<SyncSource>
 Session::get_available_sync_options () const
 {
        vector<SyncSource> ret;
-       
+
        ret.push_back (JACK);
        ret.push_back (MTC);
        ret.push_back (MIDIClock);
@@ -3965,12 +3965,12 @@ Session::get_routes_with_regions_at (framepos_t const p) const
                if (!tr) {
                        continue;
                }
-               
+
                boost::shared_ptr<Playlist> pl = tr->playlist ();
                if (!pl) {
                        continue;
                }
-               
+
                if (pl->has_region_at (p)) {
                        rl->push_back (*i);
                }
@@ -4050,7 +4050,7 @@ Session::step_edit_status_change (bool yn)
        }
 }
 
-        
+
 void
 Session::start_time_changed (framepos_t old)
 {
@@ -4062,7 +4062,7 @@ Session::start_time_changed (framepos_t old)
        if (s == 0) {
                return;
        }
-       
+
        Location* l = _locations->auto_loop_location ();
 
        if (l->start() == old) {
@@ -4081,7 +4081,7 @@ Session::end_time_changed (framepos_t old)
        if (s == 0) {
                return;
        }
-       
+
        Location* l = _locations->auto_loop_location ();
 
        if (l->end() == old) {
@@ -4108,7 +4108,7 @@ Session::source_search_path (DataType type) const
                        SessionDirectory sdir (i->path);
                        if (!search_path.empty()) {
                                search_path += ':';
-                       } 
+                       }
                        switch (type) {
                        case DataType::AUDIO:
                                search_path += sdir.sound_path().to_string();
@@ -4119,7 +4119,7 @@ Session::source_search_path (DataType type) const
                        }
                }
        }
-                
+
        /* now add user-specified locations
         */
 
@@ -4137,9 +4137,9 @@ Session::source_search_path (DataType type) const
        for (vector<string>::iterator i = dirs.begin(); i != dirs.end(); ++i) {
                search_path += ':';
                search_path += *i;
-                        
+
        }
-        
+
        return search_path;
 }
 
@@ -4175,7 +4175,7 @@ Session::ensure_search_path_includes (const string& path, DataType type)
        }
 
        search_path += path;
-        
+
        switch (type) {
        case DataType::AUDIO:
                config.set_audio_search_path (search_path);
@@ -4187,7 +4187,7 @@ Session::ensure_search_path_includes (const string& path, DataType type)
 }
 
 boost::shared_ptr<Speakers>
-Session::get_speakers() 
+Session::get_speakers()
 {
        return _speakers;
 }
@@ -4243,15 +4243,15 @@ Session::update_latency (bool playback)
         */
 
         DEBUG_TRACE (DEBUG::Latency, string_compose ("Set public port latencies to %1\n", max_latency));
-        
+
         for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
                 (*i)->set_public_port_latencies (max_latency, playback);
         }
-                
+
        if (playback) {
 
                post_playback_latency ();
+
        } else {
 
                post_capture_latency ();
@@ -4265,12 +4265,12 @@ Session::post_playback_latency ()
 {
        set_worst_playback_latency ();
 
-       boost::shared_ptr<RouteList> r = routes.reader (); 
+       boost::shared_ptr<RouteList> r = routes.reader ();
        for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
                if (!(*i)->is_hidden() && ((*i)->active())) {
                        _worst_track_latency = max (_worst_track_latency, (*i)->update_signal_latency ());
                }
-                
+
                for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
                        (*i)->set_latency_compensation (_worst_track_latency);
                }
@@ -4281,10 +4281,10 @@ void
 Session::post_capture_latency ()
 {
        set_worst_capture_latency ();
-        
+
        /* reflect any changes in capture latencies into capture offsets
         */
-        
+
        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);
@@ -4359,14 +4359,14 @@ Session::update_latency_compensation (bool force_whole_graph)
        _worst_track_latency = 0;
 
        boost::shared_ptr<RouteList> r = routes.reader ();
-        
+
        for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
                if (!(*i)->is_hidden() && ((*i)->active())) {
                        framecnt_t tl;
                        if ((*i)->signal_latency () != (tl = (*i)->update_signal_latency ())) {
                                some_track_latency_changed = true;
                        }
-                       _worst_track_latency = max (tl, _worst_track_latency); 
+                       _worst_track_latency = max (tl, _worst_track_latency);
                }
        }
 
@@ -4380,7 +4380,7 @@ Session::update_latency_compensation (bool force_whole_graph)
                */
                _engine.update_total_latencies ();
                return; // everything else will be done in the latency callback
-       } 
+       }
 
        DEBUG_TRACE(DEBUG::Latency, "---------------------------- DONE update latency compensation\n\n")
 }
index cd8ee5ce1e8ac18c27d25059e71ed1a209805ee7..8e57d7578c107bfe3c8078b60fbb5a2d690526a2 100644 (file)
@@ -147,7 +147,7 @@ Session::setup_click_sounds (Sample** data, Sample const * default_data, framecn
 
                SF_INFO info;
                SNDFILE* sndfile;
-               
+
                info.format = 0;
                if ((sndfile = sf_open (path.c_str(), SFM_READ, &info)) == 0) {
                        char errbuf[256];
@@ -158,7 +158,7 @@ Session::setup_click_sounds (Sample** data, Sample const * default_data, framecn
                }
 
                /* read the (possibly multi-channel) click data into a temporary buffer */
-               
+
                sf_count_t const samples = info.frames * info.channels;
 
                Sample* tmp = new Sample[samples];
@@ -168,14 +168,14 @@ Session::setup_click_sounds (Sample** data, Sample const * default_data, framecn
                        warning << _("cannot read data from click soundfile") << endmsg;
                        *data = 0;
                        _clicking = false;
-                       
+
                } else {
 
                        *data = new Sample[info.frames];
                        *length = info.frames;
-                       
+
                        /* mix down to mono */
-                       
+
                        for (int i = 0; i < info.frames; ++i) {
                                (*data)[i] = 0;
                                for (int j = 0; j < info.channels; ++j) {
index 17c7d559d4795bf25efbf1fc882c90700665318b..36ad0152775200df10465063ae06bebd0278e24f 100644 (file)
@@ -139,7 +139,7 @@ Session::memento_command_factory(XMLNode *n)
                            before, after
                            );
            }
-           
+
            cerr << "Alist not found\n";
 
     } else if (obj_T == "ARDOUR::Crossfade") {
@@ -182,10 +182,10 @@ Session::stateful_diff_command_factory (XMLNode* n)
         }
 
        /* we failed */
-       
+
        error << string_compose (
                _("could not reconstitute StatefulDiffCommand from XMLNode. object type = %1 id = %2"), obj_T, id.to_s())
              << endmsg;
-       
+
        return 0;
 }
index 83db1c94e7d9ec508f2bcbeb33df1566cd76b66e..421c81d42cac7828793f8e7068a1074570fa9f80 100644 (file)
@@ -57,7 +57,7 @@ SessionEvent::create_per_thread_pool (const std::string& name, uint32_t nitems)
 }
 
 void *
-SessionEvent::operator new (size_t) 
+SessionEvent::operator new (size_t)
 {
        CrossThreadPool* p = pool->per_thread_pool ();
        SessionEvent* ev = static_cast<SessionEvent*> (p->alloc ());
@@ -70,9 +70,9 @@ SessionEvent::operator new (size_t)
        ev->own_pool = p;
        return ev;
 }
-    
-void 
-SessionEvent::operator delete (void *ptr, size_t /*size*/) 
+
+void
+SessionEvent::operator delete (void *ptr, size_t /*size*/)
 {
        Pool* p = pool->per_thread_pool ();
        SessionEvent* ev = static_cast<SessionEvent*> (ptr);
@@ -87,7 +87,7 @@ SessionEvent::operator delete (void *ptr, size_t /*size*/)
                stacktrace (cerr, 40);
        }
 #endif
-       
+
        if (p == ev->own_pool) {
                p->release (ptr);
        } else {
index 2c4d8a1a22666e663b1556aa0f18840264e1a8c9..dffe6582f2c4becb17590666e7a1be8e517ea45d 100644 (file)
@@ -165,7 +165,7 @@ Session::process_export (pframes_t nframes)
 
                process_without_events (nframes);
        }
-       
+
        try {
                /* handle export - XXX what about error handling? */
 
index f36fff47850298b54a51a9f16c111d77dd809afa..98906e349305bf9e5038118c8998d55bcad01805 100644 (file)
@@ -31,12 +31,12 @@ using namespace ARDOUR;
 using namespace PBD;
 
 SessionHandlePtr::SessionHandlePtr (Session* s)
-       : _session (s) 
+       : _session (s)
 {
        if (_session) {
                _session->DropReferences.connect_same_thread (_session_connections, boost::bind (&SessionHandlePtr::session_going_away, this));
        }
-}      
+}
 
 void
 SessionHandlePtr::set_session (Session* s)
@@ -63,11 +63,11 @@ SessionHandlePtr::session_going_away ()
 
 
 SessionHandleRef::SessionHandleRef (Session& s)
-       : _session (s) 
+       : _session (s)
 {
        _session.DropReferences.connect_same_thread (*this, boost::bind (&SessionHandleRef::session_going_away, this));
        _session.Destroyed.connect_same_thread (*this, boost::bind (&SessionHandleRef::insanity_check, this));
-}      
+}
 
 SessionHandleRef::~SessionHandleRef ()
 {
index df1abba5ddbd1f70d9d4ecd384ba57240b341cb5..e5f4b9cd6e43ff25c52413e644fd4d6357d58463 100644 (file)
@@ -332,10 +332,10 @@ Session::mmc_record_enable (MIDI::MachineControl &mmc, size_t trk, bool enabled)
 
        RouteList::iterator i;
        boost::shared_ptr<RouteList> r = routes.reader();
-       
+
        for (i = r->begin(); i != r->end(); ++i) {
                AudioTrack *at;
-               
+
                if ((at = dynamic_cast<AudioTrack*>((*i).get())) != 0) {
                        if (trk == at->remote_control_id()) {
                                at->set_record_enabled (enabled, &mmc);
index b15771c986928985d6d4898795e372a2a25cabf7..5ff28b59d0fa57f0fa27e2e91e3adf0b0dda0bf2 100644 (file)
@@ -33,8 +33,8 @@ namespace ARDOUR {
        }
 }
 
-void 
-SessionObject::make_property_quarks () 
+void
+SessionObject::make_property_quarks ()
 {
        Properties::name.property_id = g_quark_from_static_string (X_("name"));
         DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for name = %1\n",       Properties::name.property_id));
index b4f85aa1a03cd71110fd5089266f6e0ec410cbe2..a5772c23e3b2b8f431bb65c17be218ea47a64b7e 100644 (file)
@@ -36,7 +36,7 @@ using namespace ARDOUR;
 SessionPlaylists::~SessionPlaylists ()
 {
        DEBUG_TRACE (DEBUG::Destruction, "delete playlists\n");
-       
+
        for (List::iterator i = playlists.begin(); i != playlists.end(); ) {
                SessionPlaylists::List::iterator tmp;
 
@@ -112,7 +112,7 @@ SessionPlaylists::remove (boost::shared_ptr<Playlist> playlist)
                unused_playlists.erase (i);
        }
 }
-       
+
 
 void
 SessionPlaylists::track (bool inuse, boost::weak_ptr<Playlist> wpl)
@@ -170,7 +170,7 @@ SessionPlaylists::by_name (string name)
                        return* i;
                }
        }
-       
+
        for (List::iterator i = unused_playlists.begin(); i != unused_playlists.end(); ++i) {
                if ((*i)->name() == name) {
                        return* i;
@@ -190,7 +190,7 @@ SessionPlaylists::by_id (const PBD::ID& id)
                        return* i;
                }
        }
-       
+
        for (List::iterator i = unused_playlists.begin(); i != unused_playlists.end(); ++i) {
                if ((*i)->id() == id) {
                        return* i;
@@ -210,7 +210,7 @@ SessionPlaylists::unassigned (std::list<boost::shared_ptr<Playlist> > & list)
                        list.push_back (*i);
                }
        }
-       
+
        for (List::iterator i = unused_playlists.begin(); i != unused_playlists.end(); ++i) {
                if (!(*i)->get_orig_diskstream_id().to_s().compare ("0")) {
                        list.push_back (*i);
@@ -226,7 +226,7 @@ SessionPlaylists::get (vector<boost::shared_ptr<Playlist> >& s)
        for (List::iterator i = playlists.begin(); i != playlists.end(); ++i) {
                s.push_back (*i);
        }
-       
+
        for (List::iterator i = unused_playlists.begin(); i != unused_playlists.end(); ++i) {
                s.push_back (*i);
        }
@@ -240,7 +240,7 @@ SessionPlaylists::destroy_region (boost::shared_ptr<Region> r)
        for (List::iterator i = playlists.begin(); i != playlists.end(); ++i) {
                 (*i)->destroy_region (r);
        }
-       
+
        for (List::iterator i = unused_playlists.begin(); i != unused_playlists.end(); ++i) {
                 (*i)->destroy_region (r);
        }
@@ -416,7 +416,7 @@ SessionPlaylists::find_crossfade (const PBD::ID& id)
        Glib::Mutex::Lock lm (lock);
 
        boost::shared_ptr<Crossfade> c;
-       
+
        for (List::iterator i = playlists.begin(); i != playlists.end(); ++i) {
                c = (*i)->find_crossfade (id);
                if (c) {
@@ -439,7 +439,7 @@ SessionPlaylists::region_use_count (boost::shared_ptr<Region> region) const
 {
        Glib::Mutex::Lock lm (lock);
         uint32_t cnt = 0;
-       
+
        for (List::iterator i = playlists.begin(); i != playlists.end(); ++i) {
                 cnt += (*i)->region_use_count (region);
        }
index 6911a5ec1810fdf67b104b051792bcd355f228fd..8a677105bd81509398a54829e2ad21c54a0be2f8 100644 (file)
@@ -1148,7 +1148,7 @@ framepos_t
 Session::compute_stop_limit () const
 {
        bool const punching = (config.get_punch_in () && _locations->auto_punch_location());
-               
+
        if (!actively_recording() && !punching && Config->get_stop_at_session_end()) {
                return current_end_frame ();
        }
index ff452137d9a8193b32c919af2e3c948875948d3b..ce40c5ce9e5b4f787f8c77521411ba682cf4a34b 100644 (file)
@@ -33,7 +33,7 @@ using namespace ARDOUR;
 using namespace Glib;
 
 SessionEvent*
-Session::get_rt_event (boost::shared_ptr<RouteList> rl, bool yn, SessionEvent::RTeventCallback after, bool group_override,  
+Session::get_rt_event (boost::shared_ptr<RouteList> rl, bool yn, SessionEvent::RTeventCallback after, bool group_override,
                       void (Session::*method) (boost::shared_ptr<RouteList>, bool, bool))
 {
        SessionEvent* ev = new SessionEvent (SessionEvent::RealTimeOperation, SessionEvent::Add, SessionEvent::Immediate, 0, 0.0);
@@ -65,7 +65,7 @@ Session::rt_set_solo (boost::shared_ptr<RouteList> rl, bool yn, bool /* group_ov
 void
 Session::set_just_one_solo (boost::shared_ptr<Route> r, bool yn, SessionEvent::RTeventCallback after)
 {
-       /* its a bit silly to have to do this, but it keeps the API for this public method sane (we're 
+       /* its a bit silly to have to do this, but it keeps the API for this public method sane (we're
           only going to solo one route) and keeps our ability to use get_rt_event() for the internal
           private method.
        */
@@ -87,9 +87,9 @@ Session::rt_set_just_one_solo (boost::shared_ptr<RouteList> just_one, bool yn, b
                        (*i)->set_solo (!yn, (*i)->route_group());
                }
        }
-       
+
        r->set_solo (yn, r->route_group());
-       
+
        set_dirty();
 }
 
@@ -125,7 +125,7 @@ Session::rt_set_mute (boost::shared_ptr<RouteList> rl, bool yn, bool /*group_ove
                        (*i)->set_mute (yn, this);
                }
        }
-       
+
        set_dirty();
 }
 
@@ -143,7 +143,7 @@ Session::rt_set_solo_isolated (boost::shared_ptr<RouteList> rl, bool yn, bool /*
                        (*i)->set_solo_isolated (yn, this);
                }
        }
-       
+
        set_dirty();
 }
 
@@ -153,7 +153,7 @@ Session::set_record_enabled (boost::shared_ptr<RouteList> rl, bool yn, SessionEv
        if (!writable()) {
                return;
        }
-       
+
        queue_event (get_rt_event (rl, yn, after, group_override, &Session::rt_set_record_enabled));
 }
 
index 2db17f1e58910dbcf73f30db5caf6e8f0f2c2e1c..182b399877115b3a68eccab7edf7c784395d67fc 100644 (file)
@@ -550,7 +550,7 @@ Session::create (const string& mix_template, BusProfile* bus_profile)
        /* set initial start + end point */
 
        _state_of_the_state = Clean;
-        
+
         /* set up Master Out and Control Out if necessary */
 
         if (bus_profile) {
@@ -590,7 +590,7 @@ Session::create (const string& mix_template, BusProfile* bus_profile)
                                        r->output()->ensure_io (count, false, this);
                                }
                                 r->set_remote_control_id (control_id);
-                                
+
                                 rl.push_back (r);
                         }
 
@@ -610,7 +610,7 @@ Session::create (const string& mix_template, BusProfile* bus_profile)
                         bus_profile->input_ac = AutoConnectOption (0);
                         bus_profile->output_ac = AutoConnectOption (0);
                 }
-                
+
                 Config->set_input_auto_connect (bus_profile->input_ac);
                 Config->set_output_auto_connect (bus_profile->output_ac);
         }
@@ -715,7 +715,7 @@ Session::jack_session_event (jack_session_event_t * event)
         if (event->type == JackSessionSaveTemplate)
         {
                 if (save_template( timebuf )) {
-                        event->flags = JackSessionSaveError; 
+                        event->flags = JackSessionSaveError;
                 } else {
                         string cmd ("ardour3 -P -U ");
                         cmd += event->client_uuid;
@@ -728,7 +728,7 @@ Session::jack_session_event (jack_session_event_t * event)
         else
         {
                 if (save_state (timebuf)) {
-                        event->flags = JackSessionSaveError; 
+                        event->flags = JackSessionSaveError;
                 } else {
                         sys::path xml_path (_session_dir->root_path());
                         xml_path /= legalize_for_path (timebuf) + statefile_suffix;
@@ -925,7 +925,7 @@ Session::load_state (string snapshot_name)
                sscanf (prop->value().c_str(), "%d.%d.%d", &major, &minor, &micro);
                Stateful::loading_state_version = (major * 1000) + minor;
        }
-               
+
        if (Stateful::loading_state_version < CURRENT_SESSION_FILE_VERSION) {
 
                sys::path backup_path(_session_dir->root_path());
@@ -1070,7 +1070,7 @@ Session::state(bool full_state)
                                                continue;
                                        }
                                }
-                               
+
                                child->add_child_nocopy (siter->second->get_state());
                        }
                }
@@ -1088,7 +1088,7 @@ Session::state(bool full_state)
                                 child->add_child_nocopy (r->state ());
                         }
                 }
-               
+
                RegionFactory::CompoundAssociations& cassocs (RegionFactory::compound_associations());
 
                if (!cassocs.empty()) {
@@ -1103,7 +1103,7 @@ Session::state(bool full_state)
                                can->add_property (X_("original"), buf);
                                ca->add_child_nocopy (*can);
                        }
-               }  
+               }
        }
 
        if (full_state) {
@@ -1333,13 +1333,13 @@ Session::set_state (const XMLNode& node, int version)
        } else if (playlists->load_unused (*this, *child)) {
                goto out;
        }
-       
+
        if ((child = find_named_node (node, "CompoundAssociations")) != 0) {
                if (load_compounds (*child)) {
                        goto out;
                }
        }
-       
+
        if ((child = find_named_node (node, "NamedSelections")) != 0) {
                if (load_named_selections (*child)) {
                        goto out;
@@ -1357,7 +1357,7 @@ Session::set_state (const XMLNode& node, int version)
                        _bundle_xml_node = new XMLNode (*child);
                }
        }
-       
+
        if (version < 3000) {
                if ((child = find_named_node (node, X_("DiskStreams"))) == 0) {
                        error << _("Session: XML state has no diskstreams section") << endmsg;
@@ -1378,16 +1378,16 @@ Session::set_state (const XMLNode& node, int version)
        _diskstreams_2X.clear ();
 
        if (version >= 3000) {
-               
+
                if ((child = find_named_node (node, "RouteGroups")) == 0) {
                        error << _("Session: XML state has no route groups section") << endmsg;
                        goto out;
                } else if (load_route_groups (*child, version)) {
                        goto out;
                }
-               
+
        } else if (version < 3000) {
-               
+
                if ((child = find_named_node (node, "EditGroups")) == 0) {
                        error << _("Session: XML state has no edit groups section") << endmsg;
                        goto out;
@@ -1442,7 +1442,7 @@ Session::load_routes (const XMLNode& node, int version)
                } else {
                        route = XMLRouteFactory (**niter, version);
                }
-               
+
                if (route == 0) {
                        error << _("Session: cannot create Route from XML description.") << endmsg;
                        return -1;
@@ -1481,26 +1481,26 @@ Session::XMLRouteFactory (const XMLNode& node, int version)
        if (ds_child) {
 
                boost::shared_ptr<Track> track;
-                
+
                 if (type == DataType::AUDIO) {
                         track.reset (new AudioTrack (*this, X_("toBeResetFroXML")));
                 } else {
                         track.reset (new MidiTrack (*this, X_("toBeResetFroXML")));
                 }
-                
+
                 if (track->init()) {
                         return ret;
                 }
-                
+
                 if (track->set_state (node, version)) {
                         return ret;
                 }
-                
+
 #ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
                 boost_debug_shared_ptr_mark_interesting (track.get(), "Track");
 #endif
                 ret = track;
-                
+
        } else {
                boost::shared_ptr<Route> r (new Route (*this, X_("toBeResetFroXML")));
 
@@ -1557,22 +1557,22 @@ Session::XMLRouteFactory_2X (const XMLNode& node, int version)
                 } else {
                         track.reset (new MidiTrack (*this, X_("toBeResetFroXML")));
                 }
-                
+
                 if (track->init()) {
                         return ret;
                 }
-                
+
                 if (track->set_state (node, version)) {
                         return ret;
                 }
 
                track->set_diskstream (*i);
-                
-#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS                
+
+#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
                 boost_debug_shared_ptr_mark_interesting (track.get(), "Track");
 #endif
                 ret = track;
-                
+
        } else {
                boost::shared_ptr<Route> r (new Route (*this, X_("toBeResetFroXML")));
 
@@ -1620,32 +1620,32 @@ Session::load_compounds (const XMLNode& node)
        XMLNodeList calist = node.children();
        XMLNodeConstIterator caiter;
        XMLProperty *caprop;
-       
+
        for (caiter = calist.begin(); caiter != calist.end(); ++caiter) {
                XMLNode* ca = *caiter;
                ID orig_id;
                ID copy_id;
-               
+
                if ((caprop = ca->property (X_("original"))) == 0) {
                        continue;
                }
                orig_id = caprop->value();
-               
+
                if ((caprop = ca->property (X_("copy"))) == 0) {
                        continue;
                }
                copy_id = caprop->value();
-               
+
                boost::shared_ptr<Region> orig = RegionFactory::region_by_id (orig_id);
                boost::shared_ptr<Region> copy = RegionFactory::region_by_id (copy_id);
-               
+
                if (!orig || !copy) {
                        warning << string_compose (_("Regions in compound description not found (ID's %1 and %2): ignored"),
-                                                  orig_id, copy_id) 
+                                                  orig_id, copy_id)
                                << endmsg;
                        continue;
                }
-               
+
                RegionFactory::add_compound_association (orig, copy);
        }
 
@@ -1664,7 +1664,7 @@ Session::load_nested_sources (const XMLNode& node)
                if ((*niter)->name() == "Source") {
                        try {
                                SourceFactory::create (*this, **niter, true);
-                       } 
+                       }
                        catch (failed_constructor& err) {
                                error << string_compose (_("Cannot reconstruct nested source for region %1"), name()) << endmsg;
                        }
@@ -1680,7 +1680,7 @@ Session::XMLRegionFactory (const XMLNode& node, bool full)
        try {
 
                const XMLNodeList& nlist = node.children();
-               
+
                for (XMLNodeConstIterator niter = nlist.begin(); niter != nlist.end(); ++niter) {
                        XMLNode *child = (*niter);
                        if (child->name() == "NestedSource") {
@@ -1961,8 +1961,8 @@ Session::load_sources (const XMLNode& node)
                         case 0:
                                 /* user added a new search location, so try again */
                                 goto retry;
-                                
-                                
+
+
                         case 1:
                                 /* user asked to quit the entire session load
                                  */
@@ -2287,7 +2287,7 @@ Session::load_route_groups (const XMLNode& node, int version)
        set_dirty ();
 
        if (version >= 3000) {
-               
+
                for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
                        if ((*niter)->name() == "RouteGroup") {
                                RouteGroup* rg = new RouteGroup (*this, "");
@@ -2374,7 +2374,7 @@ Session::add_route_group (RouteGroup* g)
 
        g->MembershipChanged.connect_same_thread (*this, boost::bind (&Session::route_group_changed, this));
        g->PropertyChanged.connect_same_thread (*this, boost::bind (&Session::route_group_changed, this));
-       
+
        set_dirty ();
 }
 
@@ -2448,14 +2448,14 @@ Session::begin_reversible_command (GQuark q)
           to hold all the commands that are committed.  This keeps the order of
           commands correct in the history.
        */
-       
+
        if (_current_trans == 0) {
                /* start a new transaction */
                assert (_current_trans_quarks.empty ());
                _current_trans = new UndoTransaction();
                _current_trans->set_name (g_quark_to_string (q));
        }
-       
+
        _current_trans_quarks.push_front (q);
 }
 
@@ -2464,7 +2464,7 @@ Session::commit_reversible_command (Command *cmd)
 {
        assert (_current_trans);
        assert (!_current_trans_quarks.empty ());
-       
+
        struct timeval now;
 
        if (cmd) {
@@ -2494,7 +2494,7 @@ Session::commit_reversible_command (Command *cmd)
 
 static bool
 accept_all_audio_files (const string& path, void */*arg*/)
-{ 
+{
         if (!Glib::file_test (path, Glib::FILE_TEST_IS_REGULAR)) {
                 return false;
         }
@@ -2645,11 +2645,11 @@ Session::cleanup_regions ()
        for (RegionFactory::RegionMap::const_iterator i = regions.begin(); i != regions.end(); ++i) {
 
                boost::shared_ptr<AudioRegion> audio_region = boost::dynamic_pointer_cast<AudioRegion>( i->second);
-               
+
                if (!audio_region) {
                        continue;
                }
-               
+
                uint32_t used = playlists->region_use_count (audio_region);
 
                if (used == 0 && !audio_region->automatic()) {
@@ -2685,7 +2685,7 @@ Session::cleanup_sources (CleanupReport& rep)
        _state_of_the_state = (StateOfTheState) (_state_of_the_state | InCleanup);
 
        /* consider deleting all unused playlists */
-       
+
        if (playlists->maybe_delete_unused (boost::bind (Session::ask_about_playlist_deletion, _1))) {
                ret = 0;
                goto out;
@@ -2790,13 +2790,13 @@ Session::cleanup_sources (CleanupReport& rep)
                         if (playlists->source_use_count (fs) != 0) {
                                 all_sources.insert (fs->path());
                         } else {
-                                
+
                                 /* we might not remove this source from disk, because it may be used
                                    by other snapshots, but its not being used in this version
                                    so lets get rid of it now, along with any representative regions
                                    in the region list.
                                 */
-                                
+
                                 RegionFactory::remove_regions_using_source (i->second);
                                 sources.erase (i);
                         }
@@ -2810,18 +2810,18 @@ Session::cleanup_sources (CleanupReport& rep)
 
         if (candidates) {
                 for (vector<string*>::iterator x = candidates->begin(); x != candidates->end(); ++x) {
-                        
+
                         used = false;
                         spath = **x;
-                        
+
                         for (set<string>::iterator i = all_sources.begin(); i != all_sources.end(); ++i) {
-                                
+
                                 if (realpath(spath.c_str(), tmppath1) == 0) {
                                         error << string_compose (_("Cannot expand path %1 (%2)"),
                                                                  spath, strerror (errno)) << endmsg;
                                         continue;
                                 }
-                                
+
                                 if (realpath((*i).c_str(),  tmppath2) == 0) {
                                         error << string_compose (_("Cannot expand path %1 (%2)"),
                                                                  (*i), strerror (errno)) << endmsg;
@@ -2833,7 +2833,7 @@ Session::cleanup_sources (CleanupReport& rep)
                                         break;
                                 }
                         }
-                        
+
                         if (!used) {
                                 unused.push_back (spath);
                         }
@@ -2881,7 +2881,7 @@ Session::cleanup_sources (CleanupReport& rep)
                }
 
                newpath = Glib::build_filename (newpath, Glib::path_get_basename ((*x)));
-                
+
                if (Glib::file_test (newpath, Glib::FILE_TEST_EXISTS)) {
 
                        /* the new path already exists, try versioning */
@@ -2925,12 +2925,12 @@ Session::cleanup_sources (CleanupReport& rep)
                 */
 
                 string base = basename_nosuffix (*x);
-                base += "%A"; /* this is what we add for the channel suffix of all native files, 
+                base += "%A"; /* this is what we add for the channel suffix of all native files,
                                  or for the first channel of embedded files. it will miss
                                  some peakfiles for other channels
                               */
                string peakpath = peak_path (base);
-                
+
                if (Glib::file_test (peakpath.c_str(), Glib::FILE_TEST_EXISTS)) {
                        if (::unlink (peakpath.c_str()) != 0) {
                                error << string_compose (_("cannot remove peakfile %1 for %2 (%3)"),
@@ -3092,7 +3092,7 @@ Session::controllable_by_descriptor (const ControllableDescriptor& desc)
                r = route_by_remote_id (desc.rid());
                break;
        }
-       
+
        if (!r) {
                return c;
        }
@@ -3113,7 +3113,7 @@ Session::controllable_by_descriptor (const ControllableDescriptor& desc)
        case ControllableDescriptor::Recenable:
        {
                boost::shared_ptr<Track> t = boost::dynamic_pointer_cast<Track>(r);
-               
+
                if (t) {
                        c = t->rec_enable_control ();
                }
@@ -3148,17 +3148,17 @@ Session::controllable_by_descriptor (const ControllableDescriptor& desc)
                uint32_t parameter_index = desc.target (1);
 
                /* revert to zero based counting */
-               
+
                if (plugin > 0) {
                        --plugin;
                }
-               
+
                if (parameter_index > 0) {
                        --parameter_index;
                }
 
                boost::shared_ptr<Processor> p = r->nth_plugin (plugin);
-               
+
                if (p) {
                        c = boost::dynamic_pointer_cast<ARDOUR::AutomationControl>(
                                p->control(Evoral::Parameter(PluginAutomation, 0, parameter_index)));
@@ -3166,18 +3166,18 @@ Session::controllable_by_descriptor (const ControllableDescriptor& desc)
                break;
        }
 
-       case ControllableDescriptor::SendGain: 
+       case ControllableDescriptor::SendGain:
        {
                uint32_t send = desc.target (0);
 
                /* revert to zero-based counting */
-               
+
                if (send > 0) {
                        --send;
                }
-               
+
                boost::shared_ptr<Processor> p = r->nth_send (send);
-               
+
                if (p) {
                        boost::shared_ptr<Send> s = boost::dynamic_pointer_cast<Send>(p);
                        boost::shared_ptr<Amp> a = s->amp();
@@ -3348,7 +3348,7 @@ Session::restore_history (string snapshot_name)
                                } else {
                                        error << _("Failed to downcast MidiSource for SysExDiffCommand") << endmsg;
                                }
-                               
+
                        } else if (n->name() == "PatchChangeDiffCommand") {
 
                                PBD::ID id (n->property("midi-source")->value());
@@ -3605,7 +3605,7 @@ void
 Session::setup_midi_machine_control ()
 {
        MIDI::MachineControl* mmc = MIDI::Manager::instance()->mmc ();
-       
+
        mmc->Play.connect_same_thread (*this, boost::bind (&Session::mmc_deferred_play, this, _1));
        mmc->DeferredPlay.connect_same_thread (*this, boost::bind (&Session::mmc_deferred_play, this, _1));
        mmc->Stop.connect_same_thread (*this, boost::bind (&Session::mmc_stop, this, _1));
@@ -3638,6 +3638,6 @@ Session::solo_cut_control() const
            it up as a Controllable. Changes to the Controllable will just map back to the RCConfiguration
            parameter.
         */
-        
+
         return _solo_cut_control;
 }
index 48b84c492c84ff50ffc1ecc65f3d8538a58cfdc5..56fa066deef11de91e134511799e510583c8612a 100644 (file)
@@ -483,7 +483,7 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
        }
 
        if (abort && did_record) {
-               _state_of_the_state = StateOfTheState (_state_of_the_state & ~InCleanup);                
+               _state_of_the_state = StateOfTheState (_state_of_the_state & ~InCleanup);
        }
 
        boost::shared_ptr<RouteList> r = routes.reader ();
@@ -528,7 +528,7 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
                        if (_requested_return_frame >= 0) {
 
                                /* explicit return request pre-queued in event list. overrides everything else */
-                               
+
                                cerr << "explicit auto-return to " << _requested_return_frame << endl;
 
                                _transport_frame = _requested_return_frame;
@@ -544,7 +544,7 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
                                                if (!synced_to_jack()) {
 
                                                        Location *location = _locations->auto_loop_location();
-                                                       
+
                                                        if (location != 0) {
                                                                _transport_frame = location->start();
                                                        } else {
@@ -563,21 +563,21 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
                                                }
 
                                        } else {
-                                               
+
                                                /* regular auto-return */
-                                               
+
                                                _transport_frame = _last_roll_location;
                                                do_locate = true;
                                        }
-                               } 
+                               }
                        }
 
-                       _requested_return_frame = -1;                   
+                       _requested_return_frame = -1;
 
                        if (do_locate) {
                                _engine.transport_locate (_transport_frame);
                        }
-               } 
+               }
 
        }
 
@@ -676,7 +676,7 @@ Session::unset_play_loop ()
 {
        play_loop = false;
        clear_events (SessionEvent::AutoLoop);
-       
+
        // set all tracks to NOT use internal looping
        boost::shared_ptr<RouteList> rl = routes.reader ();
        for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
@@ -698,7 +698,7 @@ Session::set_play_loop (bool yn)
                /* nothing to do, or can't change loop status while recording */
                return;
        }
-       
+
        if (yn && Config->get_seamless_loop() && synced_to_jack()) {
                warning << string_compose (
                        _("Seamless looping cannot be supported while %1 is using JACK transport.\n"
@@ -706,7 +706,7 @@ Session::set_play_loop (bool yn)
                        << endmsg;
                return;
        }
-       
+
        if (yn) {
 
                play_loop = true;
@@ -735,13 +735,13 @@ Session::set_play_loop (bool yn)
                                        }
                                }
                        }
-                       
+
                        /* put the loop event into the event list */
-                       
+
                        SessionEvent* event = new SessionEvent (SessionEvent::AutoLoop, SessionEvent::Replace, loc->end(), loc->start(), 0.0f);
                        merge_event (event);
 
-                       /* locate to start of loop and roll. If doing seamless loop, force a 
+                       /* locate to start of loop and roll. If doing seamless loop, force a
                           locate+buffer refill even if we are positioned there already.
                        */
 
@@ -860,7 +860,7 @@ Session::locate (framepos_t target_frame, bool with_roll, bool with_flush, bool
          *           !(playing a loop with JACK sync)
          *
         */
-                 
+
        if (transport_rolling() && (!auto_play_legal || !config.get_auto_play()) && !with_roll && !(synced_to_jack() && play_loop)) {
                realtime_stop (false, true); // XXX paul - check if the 2nd arg is really correct
        } else {
@@ -874,7 +874,7 @@ Session::locate (framepos_t target_frame, bool with_roll, bool with_flush, bool
 
                if (with_roll) {
                        todo = PostTransportWork (todo | PostTransportRoll);
-               } 
+               }
 
                add_post_transport_work (todo);
                _butler->schedule_transport_work ();
@@ -979,7 +979,7 @@ Session::set_transport_speed (double speed, bool abort, bool clear_state)
 
                if (synced_to_jack ()) {
                        if (clear_state) {
-                               /* do this here because our response to the slave won't 
+                               /* do this here because our response to the slave won't
                                   take care of it.
                                */
                                _play_range = false;
@@ -989,7 +989,7 @@ Session::set_transport_speed (double speed, bool abort, bool clear_state)
                } else {
                        stop_transport (abort);
                }
-               
+
                unset_play_loop ();
 
        } else if (transport_stopped() && speed == 1.0) {
@@ -1007,7 +1007,7 @@ Session::set_transport_speed (double speed, bool abort, bool clear_state)
                }
 
        } else {
-               
+
                /* not zero, not 1.0 ... varispeed */
 
                if ((synced_to_jack()) && speed != 0.0 && speed != 1.0) {
@@ -1035,7 +1035,7 @@ Session::set_transport_speed (double speed, bool abort, bool clear_state)
                /* if we are reversing relative to the current speed, or relative to the speed
                   before the last stop, then we have to do extra work.
                */
-               
+
                PostTransportWork todo = PostTransportWork (0);
 
                if ((_transport_speed && speed * _transport_speed < 0.0) || (_last_transport_speed * speed < 0.0) || (_last_transport_speed == 0.0f && speed < 0.0f)) {
@@ -1058,7 +1058,7 @@ Session::set_transport_speed (double speed, bool abort, bool clear_state)
                        add_post_transport_work (todo);
                        _butler->schedule_transport_work ();
                }
-               
+
                TransportStateChange (); /* EMIT SIGNAL */
        }
 }
@@ -1130,7 +1130,7 @@ Session::start_transport ()
 
        _last_roll_location = _transport_frame;
        _last_roll_or_reversal_location = _transport_frame;
-       
+
        have_looped = false;
 
        /* if record status is Enabled, move it to Recording. if its
@@ -1302,7 +1302,7 @@ Session::switch_to_sync_source (SyncSource src)
                try {
                        new_slave = new MIDIClock_Slave (*this, *MIDI::Manager::instance()->midi_clock_input_port(), 24);
                }
-               
+
                catch (failed_constructor& err) {
                        return;
                }
@@ -1319,7 +1319,7 @@ Session::switch_to_sync_source (SyncSource src)
 
                new_slave = new JACK_Slave (_engine.jack());
                break;
-               
+
        default:
                new_slave = 0;
                break;
@@ -1361,7 +1361,7 @@ Session::set_play_range (list<AudioRange>& range, bool leave_rolling)
        /* Called from event-processing context */
 
        unset_play_range ();
-       
+
        if (range.empty()) {
                /* _play_range set to false in unset_play_range()
                 */
@@ -1379,45 +1379,45 @@ Session::set_play_range (list<AudioRange>& range, bool leave_rolling)
        unset_play_loop ();
 
        list<AudioRange>::size_type sz = range.size();
-       
+
        if (sz > 1) {
-               
-               list<AudioRange>::iterator i = range.begin(); 
+
+               list<AudioRange>::iterator i = range.begin();
                list<AudioRange>::iterator next;
-               
+
                while (i != range.end()) {
-                       
+
                        next = i;
                        ++next;
-                       
+
                        /* locating/stopping is subject to delays for declicking.
                         */
-                       
+
                        framepos_t requested_frame = i->end;
-                       
+
                        if (requested_frame > current_block_size) {
                                requested_frame -= current_block_size;
                        } else {
                                requested_frame = 0;
                        }
-                       
+
                        if (next == range.end()) {
                                ev = new SessionEvent (SessionEvent::RangeStop, SessionEvent::Add, requested_frame, 0, 0.0f);
                        } else {
                                ev = new SessionEvent (SessionEvent::RangeLocate, SessionEvent::Add, requested_frame, (*next).start, 0.0f);
                        }
-                       
+
                        merge_event (ev);
-                       
+
                        i = next;
                }
-               
+
        } else if (sz == 1) {
 
                ev = new SessionEvent (SessionEvent::RangeStop, SessionEvent::Add, range.front().end, 0, 0.0f);
                merge_event (ev);
-               
-       } 
+
+       }
 
        /* save range so we can do auto-return etc. */
 
@@ -1427,7 +1427,7 @@ Session::set_play_range (list<AudioRange>& range, bool leave_rolling)
 
        ev = new SessionEvent (SessionEvent::LocateRoll, SessionEvent::Add, SessionEvent::Immediate, range.front().start, 0.0f, false);
        merge_event (ev);
-       
+
        TransportStateChange ();
 }
 
index 2a02e50da799ffaccb5548680cd823933457c5d5..35693bd6de25ada174319bfade0b2bc123f3be51 100644 (file)
@@ -65,7 +65,7 @@ SMFSource::SMFSource (Session& s, const string& path, Source::Flag flags)
        if (init(_path, false)) {
                throw failed_constructor ();
        }
-        
+
         /* file is not opened until write */
 }
 
@@ -106,7 +106,7 @@ SMFSource::open_for_write ()
 {
        if (create (_path)) {
                 return -1;
-        } 
+        }
         _open = true;
         return 0;
 }
@@ -295,7 +295,7 @@ SMFSource::append_event_unlocked_beats (const Evoral::Event<double>& ev)
        if (ev.size() == 0)  {
                return;
        }
-        
+
        /* printf("SMFSource: %s - append_event_unlocked_beats ID = %d time = %lf, size = %u, data = ",
                name().c_str(), ev.id(), ev.time(), ev.size());
            for (size_t i = 0; i < ev.size(); ++i) printf("%X ", ev.buffer()[i]); printf("\n");*/
@@ -359,12 +359,12 @@ SMFSource::append_event_unlocked_frames (const Evoral::Event<framepos_t>& ev, fr
        }
 
        if (_model) {
-               const Evoral::Event<double> beat_ev (ev.event_type(), 
-                                                    ev_time_beats, 
-                                                    ev.size(), 
+               const Evoral::Event<double> beat_ev (ev.event_type(),
+                                                    ev_time_beats,
+                                                    ev.size(),
                                                     (uint8_t*)ev.buffer());
                _model->append (beat_ev, event_id);
-       } 
+       }
 
        _length_beats = max(_length_beats, ev_time_beats);
 
@@ -413,7 +413,7 @@ SMFSource::mark_streaming_midi_write_started (NoteMode mode)
         if (!_open && open_for_write()) {
                 error << string_compose (_("cannot open MIDI file %1 for write"), _path) << endmsg;
                 /* XXX should probably throw or return something */
-                return; 
+                return;
         }
 
        MidiSource::mark_streaming_midi_write_started (mode);
@@ -435,12 +435,12 @@ SMFSource::mark_streaming_write_completed ()
        if (_model) {
                _model->set_edited(false);
        }
-       
+
        Evoral::SMF::end_write ();
 
        /* data in the file now, not removable */
 
-       mark_nonremovable (); 
+       mark_nonremovable ();
 }
 
 bool
@@ -492,7 +492,7 @@ SMFSource::load_model (bool lock, bool force_reload)
        while ((ret = read_event (&delta_t, &size, &buf, &event_id)) >= 0) {
 
                time += delta_t;
-                
+
                if (ret == 0) {
 
                        /* meta-event : did we get an event ID ?
@@ -503,9 +503,9 @@ SMFSource::load_model (bool lock, bool force_reload)
                        }
 
                        continue;
-               } 
-                        
-               if (ret > 0) { 
+               }
+
+               if (ret > 0) {
 
                        /* not a meta-event */
 
@@ -513,11 +513,11 @@ SMFSource::load_model (bool lock, bool force_reload)
                        ev.set_event_type(EventTypeMap::instance().midi_event_type(buf[0]));
 
                        if (!have_event_id) {
-                               event_id = Evoral::next_event_id();   
+                               event_id = Evoral::next_event_id();
                        }
 #ifndef NDEBUG
                        std::string ss;
-                        
+
                        for (uint32_t xx = 0; xx < size; ++xx) {
                                char b[8];
                                snprintf (b, sizeof (b), "0x%x ", buf[xx]);
@@ -527,21 +527,21 @@ SMFSource::load_model (bool lock, bool force_reload)
                        DEBUG_TRACE (DEBUG::MidiSourceIO, string_compose ("SMF %6 load model delta %1, time %2, size %3 buf %4, type %5\n",
                                                                          delta_t, time, size, ss , ev.event_type(), name()));
 #endif
-                        
+
                        _model->append (ev, event_id);
 
                        if (ev.size() > scratch_size) {
                                scratch_size = ev.size();
                        }
-                        
+
                        ev.size() = scratch_size; // ensure read_event only allocates if necessary
-                        
+
                        _length_beats = max(_length_beats, ev.time());
                }
 
                /* event ID's must immediately precede the event they are for
                 */
-                   
+
                have_event_id = false;
        }
 
@@ -569,7 +569,7 @@ SMFSource::flush_midi ()
 
        Evoral::SMF::end_write();
        /* data in the file means its no longer removable */
-       mark_nonremovable (); 
+       mark_nonremovable ();
 }
 
 void
index cab34349f15e885c432f050f5e343c6cd127e5e7..aa54f648a56c2a98c1647b9f009991dc718ac16c 100644 (file)
@@ -180,7 +180,7 @@ sndfile_major_format(int format)
                        m[format_info.format & SF_FORMAT_TYPEMASK] = format_info.name;
 
                         /* normalize a couple of names rather than use what libsndfile gives us */
-                        
+
                         if (strncasecmp (format_info.name, "OGG", 3) == 0) {
                                 m[format_info.format & SF_FORMAT_TYPEMASK] = "Ogg";
                         } else if (strncasecmp (format_info.name, "WAV", 3) == 0) {
index 8fad3b37059873a1c1d291ada94d4859d7ccb509..7006c6c7eb2464a37de125c92e51920dec1d0e7a 100644 (file)
@@ -143,7 +143,7 @@ SndFileSource::SndFileSource (Session& s, const string& path, const string& orig
        _info.channels = 1;
        _info.samplerate = rate;
        _info.format = fmt;
-        
+
         /* do not open the file here - do that in write_unlocked() as needed
          */
 }
@@ -183,7 +183,7 @@ SndFileSource::open ()
        _descriptor = new SndFileDescriptor (_path, writable(), &_info);
        _descriptor->Closed.connect_same_thread (file_manager_connection, boost::bind (&SndFileSource::file_closed, this));
        SNDFILE* sf = _descriptor->allocate ();
-       
+
        if (sf == 0) {
                char errbuf[256];
                sf_error_str (0, errbuf, sizeof (errbuf) - 1);
@@ -227,16 +227,16 @@ SndFileSource::open ()
 
        if (writable()) {
                sf_command (sf, SFC_SET_UPDATE_HEADER_AUTO, 0, SF_FALSE);
-                
+
                 if (_flags & Broadcast) {
-                        
+
                         if (!_broadcast_info) {
                                 _broadcast_info = new BroadcastInfo;
                         }
-                        
+
                         _broadcast_info->set_from_session (_session, header_position_offset);
                         _broadcast_info->set_description (string_compose ("BWF %1", _name));
-                        
+
                         if (!_broadcast_info->write_to_file (sf)) {
                                 error << string_compose (_("cannot set broadcast info for audio file %1 (%2); dropping broadcast info for this file"),
                                                          _path, _broadcast_info->get_error())
@@ -526,7 +526,7 @@ SndFileSource::flush_header ()
                error << string_compose (_("could not allocate file %1 to write header"), _path) << endmsg;
                return -1;
        }
-       
+
        int const r = sf_command (sf, SFC_UPDATE_HEADER_NOW, 0, 0) != SF_TRUE;
        _descriptor->release ();
 
@@ -582,7 +582,7 @@ SndFileSource::set_header_timeline_position ()
        _broadcast_info->set_time_reference (_timeline_position);
 
        SNDFILE* sf = _descriptor->allocate ();
-       
+
        if (sf == 0 || !_broadcast_info->write_to_file (sf)) {
                error << string_compose (_("cannot set broadcast info for audio file %1 (%2); dropping broadcast info for this file"),
                                           _path, _broadcast_info->get_error())
@@ -599,7 +599,7 @@ framecnt_t
 SndFileSource::write_float (Sample* data, framepos_t frame_pos, framecnt_t cnt)
 {
        SNDFILE* sf = _descriptor->allocate ();
-       
+
        if (sf == 0 || sf_seek (sf, frame_pos, SEEK_SET|SFM_WRITE) < 0) {
                char errbuf[256];
                sf_error_str (0, errbuf, sizeof (errbuf) - 1);
@@ -770,7 +770,7 @@ SndFileSource::crossfade (Sample* data, framecnt_t cnt, int fade_in)
                for (framecnt_t n = 0; n < xfade; ++n) {
                        xfade_buf[n] = (xfade_buf[n] * out[n]) + (fade_data[n] * in[n]);
                }
-               
+
        } else if (xfade) {
 
                /* long xfade length, has to be computed across several calls */
@@ -866,10 +866,10 @@ SndFileSource::get_soundfile_info (const string& path, SoundFileInfo& info, stri
        info.samplerate  = sf_info.samplerate;
        info.channels    = sf_info.channels;
        info.length      = sf_info.frames;
-        
+
         string major = sndfile_major_format(sf_info.format);
         string minor = sndfile_minor_format(sf_info.format);
-        
+
         if (major.length() + minor.length() < 16) { /* arbitrary */
                 info.format_name = string_compose("%1/%2", major, minor);
         } else {
@@ -906,7 +906,7 @@ SndFileSource::file_closed ()
           to make sure its time is as new as the audio
           file.
        */
-       
+
        touch_peakfile ();
 }
 
index 00b642b21be9e4e3b5b704d058fceb6aa2b33722..35e1417fb4c14e92abc5a8af7e7b31199b1653c3 100644 (file)
@@ -149,7 +149,7 @@ Source::set_state (const XMLNode& node, int version)
        }
 
        if (version < 3000) {
-               /* a source with an XML node must necessarily already exist, 
+               /* a source with an XML node must necessarily already exist,
                   and therefore cannot be removable/writable etc. etc.; 2.X
                   sometimes marks sources as removable which shouldn't be.
                */
@@ -254,10 +254,10 @@ Source::mark_for_remove ()
 {
        // This operation is not allowed for sources for destructive tracks or out-of-session files.
 
-       /* XXX need a way to detect _within_session() condition here - move it from FileSource? 
+       /* XXX need a way to detect _within_session() condition here - move it from FileSource?
         */
 
-       if ((_flags & Destructive)) { 
+       if ((_flags & Destructive)) {
                return;
        }
 
@@ -300,7 +300,7 @@ Source::dec_use_count ()
                 abort ();
         }
         assert (oldval > 0);
-#else 
+#else
         g_atomic_int_exchange_and_add (&_use_count, -1);
 #endif
 }
index 5ff2a6f4e4363cfa6ff0ccbd2a31d46c865143be..a2e93ee61b9711efb8bdedebdd63f212e7382136 100644 (file)
@@ -167,7 +167,7 @@ SourceFactory::create (Session& s, const XMLNode& node, bool defer_peaks)
                        } catch (failed_constructor&) {
                                /* oh well, so much for that then ... */
                        }
-                       
+
                } else {
 
 
@@ -186,21 +186,21 @@ SourceFactory::create (Session& s, const XMLNode& node, bool defer_peaks)
                        }
 
                        catch (failed_constructor& err) {
-                               
+
 #ifdef USE_COREAUDIO_FOR_FILES
-                               
+
                                /* this is allowed to throw */
-                               
+
                                Source *src = new CoreAudioSource (s, node);
 #ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
                                // boost_debug_shared_ptr_mark_interesting (src, "Source");
 #endif
                                boost::shared_ptr<Source> ret (src);
-                               
+
                                if (setup_peakfile (ret, defer_peaks)) {
                                        return boost::shared_ptr<Source>();
                                }
-                               
+
                                ret->check_for_analysis_data_on_disk ();
                                SourceCreated (ret);
                                return ret;
@@ -238,7 +238,7 @@ SourceFactory::createReadable (DataType type, Session& s, const string& path,
                                // boost_debug_shared_ptr_mark_interesting (src, "Source");
 #endif
                                boost::shared_ptr<Source> ret (src);
-                               
+
                                if (setup_peakfile (ret, defer_peaks)) {
                                        return boost::shared_ptr<Source>();
                                }
@@ -277,7 +277,7 @@ SourceFactory::createReadable (DataType type, Session& s, const string& path,
                }
 
        } else if (type == DataType::MIDI) {
-               
+
                SMFSource* src = new SMFSource (s, path, SMFSource::Flag(0));
                src->load_model (true, true);
 #ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
@@ -330,7 +330,7 @@ SourceFactory::createWritable (DataType type, Session& s, const std::string& pat
                 // XXX writable flags should belong to MidiSource too
                boost::shared_ptr<SMFSource> src (new SMFSource (s, path, SndFileSource::default_writable_flags));
                assert (src->writable ());
-               
+
                src->load_model (true, true);
 #ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
                // boost_debug_shared_ptr_mark_interesting (src, "Source");
@@ -356,21 +356,21 @@ SourceFactory::createFromPlaylist (DataType type, Session& s, boost::shared_ptr<
                try {
 
                        boost::shared_ptr<AudioPlaylist> ap = boost::dynamic_pointer_cast<AudioPlaylist>(p);
-                       
+
                        if (ap) {
-                               
+
                                if (copy) {
                                        ap.reset (new AudioPlaylist (ap, start, len, name, true));
                                        start = 0;
                                }
-                               
+
                                Source* src = new AudioPlaylistSource (s, orig, name, ap, chn, start, len, Source::Flag (0));
                                boost::shared_ptr<Source> ret (src);
-                               
+
                                if (setup_peakfile (ret, defer_peaks)) {
                                        return boost::shared_ptr<Source>();
                                }
-                               
+
                                ret->check_for_analysis_data_on_disk ();
                                SourceCreated (ret);
                                return ret;
@@ -382,21 +382,21 @@ SourceFactory::createFromPlaylist (DataType type, Session& s, boost::shared_ptr<
                }
 
        } else if (type == DataType::MIDI) {
-               
+
                try {
 
                        boost::shared_ptr<MidiPlaylist> ap = boost::dynamic_pointer_cast<MidiPlaylist>(p);
-                       
+
                        if (ap) {
-                               
+
                                if (copy) {
                                        ap.reset (new MidiPlaylist (ap, start, len, name, true));
                                        start = 0;
                                }
-                               
+
                                Source* src = new MidiPlaylistSource (s, orig, name, ap, chn, start, len, Source::Flag (0));
                                boost::shared_ptr<Source> ret (src);
-                               
+
                                SourceCreated (ret);
                                return ret;
                        }
index 4bb843021c7ef2d9478c6f2e54ed3103e08af211..71e524f49007c75573d3cdc3b382be20bf593d8a 100644 (file)
@@ -40,7 +40,7 @@ Speaker::Speaker (Speaker const & o)
        , _coords (o._coords)
        , _angles (o._angles)
 {
-       
+
 }
 
 Speaker &
@@ -92,7 +92,7 @@ void
 Speakers::dump_speakers (ostream& o)
 {
        for (vector<Speaker>::iterator i = _speakers.begin(); i != _speakers.end(); ++i) {
-               o << "Speaker " << (*i).id << " @ " 
+               o << "Speaker " << (*i).id << " @ "
                  << (*i).coords().x << ", " << (*i).coords().y << ", " << (*i).coords().z
                  << " azimuth " << (*i).angles().azi
                  << " elevation " << (*i).angles().ele
@@ -108,7 +108,7 @@ Speakers::clear_speakers ()
        update ();
 }
 
-int 
+int
 Speakers::add_speaker (const AngularVector& position)
 {
        int id = _speakers.size();
@@ -119,7 +119,7 @@ Speakers::add_speaker (const AngularVector& position)
        Changed ();
 
        return id;
-}        
+}
 
 void
 Speakers::remove_speaker (int id)
@@ -176,7 +176,7 @@ Speakers::setup_default_speakers (uint32_t n)
                 add_speaker (AngularVector (215.0, 0.0));
                break;
 
-       default: 
+       default:
        {
                double degree_step = 360.0 / n;
                double deg;
@@ -197,7 +197,7 @@ Speakers::setup_default_speakers (uint32_t n)
        }
         }
 }
-        
+
 XMLNode&
 Speakers::get_state ()
 {
@@ -217,7 +217,7 @@ Speakers::get_state ()
 
                 node->add_child_nocopy (*speaker);
         }
-        
+
         return *node;
 }
 
@@ -245,7 +245,7 @@ Speakers::set_state (const XMLNode& node, int /*version*/)
                                 continue;
                         }
                         e = atof (prop->value());
-                                            
+
                         if ((prop = (*i)->property (X_("distance"))) == 0) {
                                 warning << _("Speaker information is missing distance - speaker ignored") << endmsg;
                                 continue;
@@ -257,6 +257,6 @@ Speakers::set_state (const XMLNode& node, int /*version*/)
         }
 
         update ();
-        
+
         return 0;
 }
index ee6bfb7a5e46bea740a21802696a2a44caec7811..62b08cbb0a3114b1b4997e5d344e07cf3bf950f3 100644 (file)
@@ -49,7 +49,7 @@ StripSilence::run (boost::shared_ptr<Region> r, Progress* progress)
        results.clear ();
 
        /* we only operate on AudioRegions, for now, though this could be adapted to MIDI
-          as well I guess 
+          as well I guess
         */
        boost::shared_ptr<AudioRegion> region = boost::dynamic_pointer_cast<AudioRegion> (r);
         InterThreadInfo itt;
@@ -102,14 +102,14 @@ StripSilence::run (boost::shared_ptr<Region> r, Progress* progress)
        --last_silence;
 
        frameoffset_t const end_of_region = r->start() + r->length();
-       
+
        if (last_silence->second != end_of_region - 1) {
                audible.push_back (std::make_pair (last_silence->second, end_of_region - 1));
        }
 
        int n = 0;
        int const N = audible.size ();
-       
+
        for (AudioIntervalResult::const_iterator i = audible.begin(); i != audible.end(); ++i) {
 
                PBD::PropertyList plist;
@@ -117,20 +117,20 @@ StripSilence::run (boost::shared_ptr<Region> r, Progress* progress)
 
                plist.add (Properties::length, i->second - i->first);
                plist.add (Properties::position, r->position() + (i->first - r->start()));
-               
+
                copy = boost::dynamic_pointer_cast<AudioRegion> (
                        RegionFactory::create (region, (i->first - r->start()), plist)
                        );
-               
+
                copy->set_name (RegionFactory::new_region_name (region->name ()));
 
                framecnt_t const f = std::min (_fade_length, (i->second - i->first));
-               
+
                copy->set_fade_in_active (true);
                copy->set_fade_in (FadeLinear, f);
                copy->set_fade_out (FadeLinear, f);
                results.push_back (copy);
-       
+
                if (progress && (n <= N)) {
                        progress->set_progress (float (n) / N);
                }
index 48c1ae6ef006a932b8cdcb5cca09a8fd43212075..efda7aa1cdcbf33aaff2b4065b9d4afb2d9a3897 100644 (file)
@@ -1015,7 +1015,7 @@ TempoMap::bbt_duration_at_unlocked (const BBT_Time& when, const BBT_Time& bbt, i
                        beats_per_bar = metric.meter().beats_per_bar();
 
                }
-               
+
                /* We now counted the beats and landed in the target measure, now deal
                  with ticks this seems complicated, but we want to deal with the
                  corner case of a sequence of time signatures like 0.2/4-0.7/4 and
@@ -1175,7 +1175,7 @@ TempoMap::round_to_beat_subdivision (framepos_t fr, int sub_num, int dir)
                        difference = mod;
                }
 
-               try { 
+               try {
                        the_beat = bbt_subtract (the_beat, BBT_Time (0, 0, difference));
                } catch (...) {
                        /* can't go backwards from wherever pos is, so just return it */
@@ -1246,7 +1246,7 @@ TempoMap::round_to_type (framepos_t frame, int dir, BBTPointType type)
                        midbar_beats = metric.meter().beats_per_bar() / 2 + 1;
                        midbar_ticks = BBT_Time::ticks_per_beat * fmod (midbar_beats, 1.0f);
                        midbar_beats = floor (midbar_beats);
-                       
+
                        BBT_Time midbar (bbt.bars, lrintf (midbar_beats), lrintf (midbar_ticks));
 
                        if (bbt < midbar) {
@@ -1273,7 +1273,7 @@ TempoMap::round_to_type (framepos_t frame, int dir, BBTPointType type)
                        /* find beat position preceding frame */
 
                        try {
-                               bbt = bbt_subtract (bbt, one_beat); 
+                               bbt = bbt_subtract (bbt, one_beat);
                        }
 
                        catch (...) {
@@ -1709,30 +1709,30 @@ TempoMap::bbt_add (const BBT_Time& start, const BBT_Time& increment, const Tempo
        /* now comes the complicated part. we have to add one beat a time,
           checking for a new metric on every beat.
        */
-       
+
        /* grab all meter sections */
-       
+
        list<const MeterSection*> meter_sections;
-       
+
        for (Metrics::const_iterator x = metrics->begin(); x != metrics->end(); ++x) {
                const MeterSection* ms;
                if ((ms = dynamic_cast<const MeterSection*>(*x)) != 0) {
                        meter_sections.push_back (ms);
                }
        }
-       
+
        assert (!meter_sections.empty());
-       
+
        list<const MeterSection*>::const_iterator next_meter;
        const Meter* meter = 0;
-       
+
        /* go forwards through the meter sections till we get to the one
-          covering the current value of result. this positions i to point to 
+          covering the current value of result. this positions i to point to
           the next meter section too, or the end.
        */
-       
+
        for (next_meter = meter_sections.begin(); next_meter != meter_sections.end(); ++next_meter) {
-               
+
                if (result < (*next_meter)->start()) {
                        /* this metric is past the result time. stop looking, we have what we need */
                        break;
@@ -1746,21 +1746,21 @@ TempoMap::bbt_add (const BBT_Time& start, const BBT_Time& increment, const Tempo
                        ++next_meter;
                        break;
                }
-               
+
                meter = *next_meter;
        }
-       
+
        assert (meter != 0);
-               
-       /* OK, now have the meter for the bar start we are on, and i is an iterator 
-          that points to the metric after the one we are currently dealing with 
-          (or to metrics->end(), of course) 
+
+       /* OK, now have the meter for the bar start we are on, and i is an iterator
+          that points to the metric after the one we are currently dealing with
+          (or to metrics->end(), of course)
        */
-       
+
        while (op.beats) {
-               
+
                /* given the current meter, have we gone past the end of the bar ? */
-               
+
                if (result.beats >= meter->beats_per_bar()) {
                        /* move to next bar, first beat */
                        result.bars++;
@@ -1768,12 +1768,12 @@ TempoMap::bbt_add (const BBT_Time& start, const BBT_Time& increment, const Tempo
                } else {
                        result.beats++;
                }
-               
+
                /* one down ... */
-               
+
                op.beats--;
-               
-               /* check if we need to use a new meter section: has adding beats to result taken us 
+
+               /* check if we need to use a new meter section: has adding beats to result taken us
                   to or after the start of the next meter section? in which case, use it.
                */
 
@@ -1810,35 +1810,35 @@ TempoMap::bbt_subtract (const BBT_Time& start, const BBT_Time& decrement) const
        /* now comes the complicated part. we have to subtract one beat a time,
           checking for a new metric on every beat.
        */
-       
+
        /* grab all meter sections */
-       
+
        list<const MeterSection*> meter_sections;
-       
+
        for (Metrics::const_iterator x = metrics->begin(); x != metrics->end(); ++x) {
                const MeterSection* ms;
                if ((ms = dynamic_cast<const MeterSection*>(*x)) != 0) {
                        meter_sections.push_back (ms);
                }
                }
-       
+
        assert (!meter_sections.empty());
-       
+
        /* go backwards through the meter sections till we get to the one
-          covering the current value of result. this positions i to point to 
+          covering the current value of result. this positions i to point to
           the next (previous) meter section too, or the end.
        */
-       
+
        const MeterSection* meter = 0;
-       list<const MeterSection*>::reverse_iterator next_meter; // older versions of GCC don't 
+       list<const MeterSection*>::reverse_iterator next_meter; // older versions of GCC don't
                                                                // support const_reverse_iterator::operator!=()
-       
+
        for (next_meter = meter_sections.rbegin(); next_meter != meter_sections.rend(); ++next_meter) {
-               
+
                /* when we find the first meter section that is before or at result, use it,
-                  and set next_meter to the previous one 
+                  and set next_meter to the previous one
                */
-               
+
                if ((*next_meter)->start() < result || (*next_meter)->start() == result) {
                        meter = *next_meter;
                        ++next_meter;
@@ -1847,27 +1847,27 @@ TempoMap::bbt_subtract (const BBT_Time& start, const BBT_Time& decrement) const
        }
 
        assert (meter != 0);
-       
-       /* OK, now have the meter for the bar start we are on, and i is an iterator 
-          that points to the metric after the one we are currently dealing with 
-          (or to metrics->end(), of course) 
+
+       /* OK, now have the meter for the bar start we are on, and i is an iterator
+          that points to the metric after the one we are currently dealing with
+          (or to metrics->end(), of course)
        */
-       
+
        while (op.beats) {
 
                /* have we reached the start of the bar? if so, move to the last beat of the previous
                   bar. opwise, just step back 1 beat.
                */
-               
+
                if (result.beats == 1) {
-                       
+
                        /* move to previous bar, last beat */
-                       
+
                        if (result.bars <= 1) {
                                /* i'm sorry dave, i can't do that */
                                throw std::out_of_range ("illegal BBT subtraction");
                        }
-                       
+
                        result.bars--;
                        result.beats = meter->beats_per_bar();
                } else {
@@ -1876,11 +1876,11 @@ TempoMap::bbt_subtract (const BBT_Time& start, const BBT_Time& decrement) const
 
                        result.beats--;
                }
-               
+
                /* one down ... */
                op.beats--;
-               
-               /* check if we need to use a new meter section: has subtracting beats to result taken us 
+
+               /* check if we need to use a new meter section: has subtracting beats to result taken us
                   to before the start of the current meter section? in which case, use the prior one.
                */
 
@@ -1910,7 +1910,7 @@ TempoMap::framepos_plus_bbt (framepos_t pos, BBT_Time op) const
           frames_per_beat is rounded.  Other errors can be introduced
           by op.ticks' integer nature.
        */
-       
+
        Metrics::const_iterator i;
        const MeterSection* meter;
        const MeterSection* m;
@@ -1949,14 +1949,14 @@ TempoMap::framepos_plus_bbt (framepos_t pos, BBT_Time op) const
        /* now comes the complicated part. we have to add one beat a time,
           checking for a new metric on every beat.
        */
-       
+
        frames_per_beat = tempo->frames_per_beat (_frame_rate, *meter);
 
        while (op.bars) {
 
                pos += llrint (frames_per_beat * meter->beats_per_bar());
                op.bars--;
-               
+
                /* check if we need to use a new metric section: has adding frames moved us
                   to or after the start of the next metric section? in which case, use it.
                */
@@ -1978,12 +1978,12 @@ TempoMap::framepos_plus_bbt (framepos_t pos, BBT_Time op) const
        }
 
        while (op.beats) {
-               
+
                /* given the current meter, have we gone past the end of the bar ? */
 
                pos += frames_per_beat;
                op.beats--;
-               
+
                /* check if we need to use a new metric section: has adding frames moved us
                   to or after the start of the next metric section? in which case, use it.
                */
@@ -1997,7 +1997,7 @@ TempoMap::framepos_plus_bbt (framepos_t pos, BBT_Time op) const
                                        meter = m;
                                }
                                ++i;
-                               frames_per_beat = tempo->frames_per_beat (_frame_rate, *meter); 
+                               frames_per_beat = tempo->frames_per_beat (_frame_rate, *meter);
                        }
                }
        }
@@ -2060,7 +2060,7 @@ TempoMap::framewalk_to_beats (framepos_t pos, framecnt_t distance) const
        /* now comes the complicated part. we have to add one beat a time,
           checking for a new metric on every beat.
        */
-       
+
        frames_per_beat = tempo->frames_per_beat (_frame_rate, *meter);
 
        while (ddist > 0) {
index 5e48c60b2bbbc109d77373402b6508c5bf74e6a4..30472692bc6ccd9896abda13415cf3cd2b1c17b8 100644 (file)
@@ -29,7 +29,7 @@ Mantis3356Test::test ()
        AudioEngine engine ("test", "");
        MIDI::Manager::create (engine.jack ());
        CPPUNIT_ASSERT (engine.start () == 0);
-       
+
        Session session (engine, "../../libs/ardour/test/data/mantis_3356", "mantis_3356");
        engine.set_session (&session);
 
@@ -65,5 +65,5 @@ Mantis3356Test::test ()
                CPPUNIT_ASSERT (!result.eof ());
                CPPUNIT_ASSERT (!ref.eof ());
        }
-       
+
 }
index 66732f92b594b006a02408a9a6478b93ef15295a..00842c811ea6854d683e050c46c8d125cef6069e 100644 (file)
@@ -21,7 +21,7 @@ ResampledSourceTest::seekTest ()
        r.read (A, 64);
 
        r.seek (0);
-       
+
        Sample B[64];
        r.read (B, 64);
 
index 7cbaf066b54de98ae33f13e8c25fd03f06484176..a46bc56c2d27bb48931422e96b427c20606f163f 100644 (file)
@@ -53,8 +53,8 @@ void MidiClockTicker::set_session (Session* s)
 void
 MidiClockTicker::session_going_away ()
 {
-       SessionHandlePtr::session_going_away(); 
-       _midi_port = 0; 
+       SessionHandlePtr::session_going_away();
+       _midi_port = 0;
 }
 
 void MidiClockTicker::update_midi_clock_port()
@@ -75,7 +75,7 @@ void MidiClockTicker::transport_state_changed()
        DEBUG_TRACE (PBD::DEBUG::MidiClock,
                     string_compose ("Transport state change, speed: %1 position: %2 play loop: %3\n", speed, position, _session->get_play_loop())
                );
-       
+
        if (speed == 1.0f) {
                _last_tick = position;
 
@@ -185,7 +185,7 @@ void MidiClockTicker::send_start_event (pframes_t offset)
        if (!_midi_port) {
                return;
        }
-       
+
        static uint8_t _midi_clock_tick[1] = { MIDI_CMD_COMMON_START };
        _midi_port->write (_midi_clock_tick, 1, offset);
 }
@@ -195,7 +195,7 @@ void MidiClockTicker::send_continue_event (pframes_t offset)
        if (!_midi_port) {
                return;
        }
-       
+
        static uint8_t _midi_clock_tick[1] = { MIDI_CMD_COMMON_CONTINUE };
        _midi_port->write (_midi_clock_tick, 1, offset);
 }
@@ -205,7 +205,7 @@ void MidiClockTicker::send_stop_event (pframes_t offset)
        if (!_midi_port) {
                return;
        }
-       
+
        static uint8_t _midi_clock_tick[1] = { MIDI_CMD_COMMON_STOP };
        _midi_port->write (_midi_clock_tick, 1, offset);
 }
index 3316f1fc34272f28dfae2596678980fcdf2745c2..a45f37f422a50fec17f59f9c1447def9d2ceb2a1 100644 (file)
@@ -313,7 +313,7 @@ void
 Track::set_diskstream (boost::shared_ptr<Diskstream> ds)
 {
        _diskstream = ds;
-       
+
        ds->PlaylistChanged.connect_same_thread (*this, boost::bind (&Track::diskstream_playlist_changed, this));
        diskstream_playlist_changed ();
        ds->RecordEnableChanged.connect_same_thread (*this, boost::bind (&Track::diskstream_record_enable_changed, this));
@@ -375,7 +375,7 @@ Track::set_capture_offset ()
        _diskstream->set_capture_offset ();
 }
 
-list<boost::shared_ptr<Source> > 
+list<boost::shared_ptr<Source> >
 Track::steal_write_sources()
 {
         return _diskstream->steal_write_sources ();
@@ -616,7 +616,7 @@ Track::set_block_size (pframes_t n)
        _diskstream->set_block_size (n);
 }
 
-void 
+void
 Track::adjust_playback_buffering ()
 {
         if (_diskstream) {
@@ -624,7 +624,7 @@ Track::adjust_playback_buffering ()
         }
 }
 
-void 
+void
 Track::adjust_capture_buffering ()
 {
         if (_diskstream) {
@@ -676,8 +676,8 @@ Track::send_silence () const
 
 void
 Track::maybe_declick (BufferSet& bufs, framecnt_t nframes, int declick)
-{      
-        /* never declick if there is an internal generator - we just want it to 
+{
+        /* never declick if there is an internal generator - we just want it to
            keep generating sound without interruption.
         */
 
index 1fda65bde14659e8495e742c4cfe22f4c6ae3d1e..75e9b4c5e1ca407f8194c705b45405b2207bfe30 100644 (file)
@@ -23,7 +23,7 @@ TransientDetector::TransientDetector (float sr)
        // XXX this should load the above-named plugin and get the current version
 
        _op_id += ":2";
-       
+
        threshold = 0.00;
 }
 
@@ -126,18 +126,18 @@ void
 TransientDetector::update_positions (Readable* src, uint32_t channel, AnalysisFeatureList& positions)
 {
        Plugin::FeatureSet features;
-       
+
        Sample* data = 0;
        float* bufs[1] = { 0 };
-       
+
        int buff_size = 1024;
        int step_size = 64;
-       
+
        data = new Sample[buff_size];
        bufs[0] = data;
-       
+
        AnalysisFeatureList::iterator i = positions.begin();
-       
+
        while (i != positions.end()) {
 
                framecnt_t to_read;
@@ -148,7 +148,7 @@ TransientDetector::update_positions (Readable* src, uint32_t channel, AnalysisFe
                if (src->read (data, (*i) - buff_size, to_read, channel) != to_read) {
                        break;
                }
-               
+
                // Simple heuristic for locating approx correct cut position.
 
                for (int j = 0; j < buff_size;){
@@ -161,7 +161,7 @@ TransientDetector::update_positions (Readable* src, uint32_t channel, AnalysisFe
                                (*i) = (*i) - buff_size + (j + 24);
                                break;
                        }
-                       
+
                        j = j + step_size;
                }
 
index 9b5843a40e300e410ce25b65fa26a845a0e37def..a702ee3862d8b685694a1755edb157e791cdb1a0 100644 (file)
@@ -1,7 +1,7 @@
 /*
     Copyright (C) 2008-2010 Paul Davis
     Author: David Robillard
-    
+
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2 of the License, or
index 81d6ddcf71b649720e47f735f16f9d81e5bc1709..0e1b06b1a73a0f96024e398a307b0a5e1f7c2a01 100644 (file)
@@ -78,7 +78,7 @@ legalize_for_path (const string& str)
        return legal;
 }
 
-string 
+string
 bump_name_once (const std::string& name, char delimiter)
 {
        string::size_type delim;
@@ -134,7 +134,7 @@ could_be_a_valid_path (const string& path)
 
         posix_dirs.erase (--posix_dirs.end());
         dos_dirs.erase (--dos_dirs.end());
-        
+
         if (G_DIR_SEPARATOR == '/') {
                 for (vector<string>::iterator x = posix_dirs.begin(); x != posix_dirs.end(); ++x) {
                         testpath = Glib::build_filename (testpath, *x);
@@ -570,7 +570,7 @@ native_header_format_extension (HeaderFormat hf, const DataType& type)
         if (type == DataType::MIDI) {
                 return ".mid";
         }
-        
+
         switch (hf) {
         case BWF:
                 return ".wav";
@@ -606,28 +606,28 @@ matching_unsuffixed_filename_exists_in (const string& dir, const string& path)
                 error << string_compose (_("cannot open directory %1 (%2)"), dir, strerror (errno)) << endl;
                 return false;
         }
-        
+
         while ((dentry = ::readdir (dead)) != 0) {
-                
+
                 /* avoid '.' and '..' */
-                
+
                 if ((dentry->d_name[0] == '.' && dentry->d_name[1] == '\0') ||
                     (dentry->d_name[2] == '\0' && dentry->d_name[0] == '.' && dentry->d_name[1] == '.')) {
                         continue;
                 }
-        
+
                 string fullpath = Glib::build_filename (dir, dentry->d_name);
 
                 if (::stat (fullpath.c_str(), &statbuf)) {
                         continue;
                 }
-                
+
                 if (!S_ISREG (statbuf.st_mode)) {
                         continue;
                 }
 
                 string bws2 = basename_nosuffix (dentry->d_name);
-                
+
                 if (bws2 == bws) {
                         ret = true;
                         break;
@@ -657,15 +657,15 @@ how_many_dsp_threads ()
 
         } else if (pu == 0) {
 
-                /* use all available CPUs 
+                /* use all available CPUs
                  */
-                
+
                 num_threads = num_cpu;
 
         } else {
                 /* use "pu" cores, if available
                  */
-                
+
                 num_threads = min (num_cpu, pu);
         }
 
index 9d3f8d3fe2a11d8636ef58210931b4390428a6a1..869e5ad4f77c161f4227b7e77fa79e9d2cd79085 100644 (file)
@@ -106,7 +106,7 @@ VSTPlugin::~VSTPlugin ()
        fst_close (_fst);
 }
 
-int 
+int
 VSTPlugin::set_block_size (pframes_t nframes)
 {
        deactivate ();
@@ -162,7 +162,7 @@ VSTPlugin::get_chunk (bool single) const
        if (data_size == 0) {
                return 0;
        }
-       
+
        return g_base64_encode (data, data_size);
 }
 
@@ -399,34 +399,34 @@ VSTPlugin::load_user_preset (PresetRecord r)
        /* This is a user preset; we load it, and this code also knows about the
           non-direct-dispatch thing.
        */
-       
+
        boost::shared_ptr<XMLTree> t (presets_tree ());
        if (t == 0) {
                return false;
        }
-       
+
        XMLNode* root = t->root ();
-       
+
        for (XMLNodeList::const_iterator i = root->children().begin(); i != root->children().end(); ++i) {
-               
+
                XMLProperty* uri = (*i)->property (X_("uri"));
                XMLProperty* label = (*i)->property (X_("label"));
-               
+
                assert (uri);
                assert (label);
-               
+
                if (label->value() != r.label) {
                        continue;
                }
-                       
+
                if (_plugin->flags & 32 /* effFlagsProgramsChunks */) {
-                       
+
                        /* Load a user preset chunk from our XML file and send it via a circuitous route to the plugin */
-                       
+
                        if (_fst->wanted_chunk) {
                                g_free (_fst->wanted_chunk);
                        }
-                       
+
                        for (XMLNodeList::const_iterator j = (*i)->children().begin(); j != (*i)->children().end(); ++j) {
                                if ((*j)->is_content ()) {
                                        /* we can't dispatch directly here; too many plugins expect only one GUI thread */
@@ -438,28 +438,28 @@ VSTPlugin::load_user_preset (PresetRecord r)
                                        return true;
                                }
                        }
-                       
+
                        return false;
-                               
+
                } else {
-                       
+
                        for (XMLNodeList::const_iterator j = (*i)->children().begin(); j != (*i)->children().end(); ++j) {
                                if ((*j)->name() == X_("Parameter")) {
-                                       
+
                                                XMLProperty* index = (*j)->property (X_("index"));
                                                XMLProperty* value = (*j)->property (X_("value"));
-                                               
+
                                                assert (index);
                                                assert (value);
-                                               
+
                                                set_parameter (atoi (index->value().c_str()), atof (value->value().c_str ()));
                                }
                        }
-                       
+
                        return true;
                }
        }
-               
+
        return false;
 }
 
@@ -483,7 +483,7 @@ VSTPlugin::do_save_preset (string name)
                gchar* data = get_chunk (true);
                p->add_content (string (data));
                g_free (data);
-               
+
        } else {
 
                p = new XMLNode (X_("Preset"));
@@ -498,15 +498,15 @@ VSTPlugin::do_save_preset (string name)
                                p->add_child_nocopy (*c);
                        }
                }
-               
+
        }
 
        t->root()->add_child_nocopy (*p);
-       
+
        sys::path f = ARDOUR::user_config_directory ();
        f /= "presets";
        f /= presets_file ();
-       
+
        t->write (f.to_string ());
        return uri;
 }
@@ -518,13 +518,13 @@ VSTPlugin::do_remove_preset (string name)
        if (t == 0) {
                return;
        }
-       
+
        t->root()->remove_nodes_and_delete (X_("label"), name);
-       
+
        sys::path f = ARDOUR::user_config_directory ();
        f /= "presets";
        f /= presets_file ();
-       
+
        t->write (f.to_string ());
 }
 
@@ -568,7 +568,7 @@ VSTPlugin::connect_and_run (BufferSet& bufs,
                pframes_t nframes, framecnt_t offset)
 {
        Plugin::connect_and_run (bufs, in_map, out_map, nframes, offset);
-       
+
        float *ins[_plugin->numInputs];
        float *outs[_plugin->numOutputs];
        int32_t i;
@@ -718,11 +718,11 @@ void
 VSTPlugin::find_presets ()
 {
        /* Built-in presets */
-       
+
        int const vst_version = _plugin->dispatcher (_plugin, effGetVstVersion, 0, 0, NULL, 0);
        for (int i = 0; i < _plugin->numPrograms; ++i) {
                PresetRecord r (string_compose (X_("VST:%1:%2"), unique_id (), i), "", false);
-               
+
                if (vst_version >= 2) {
                        char buf[256];
                        if (_plugin->dispatcher (_plugin, 29, i, 0, buf, 0) == 1) {
@@ -779,7 +779,7 @@ VSTPlugin::presets_tree () const
                t->set_root (new XMLNode (X_("VSTPresets")));
                return t;
        }
-       
+
        t->set_filename (p.to_string ());
        if (!t->read ()) {
                delete t;
index f7fc7a7c07fa40ae0baa9c7423b5bba2cd839747..e2a59832451214d4c226405205801a2c2775a21a 100644 (file)
@@ -1,19 +1,19 @@
 /*
-    Copyright (C) 2011 Paul Davis
+  Copyright (C) 2011 Paul Davis
 
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
 
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
 
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 */
 
@@ -28,402 +28,402 @@ using std::map;
 using namespace Gtkmm2ext;
 
 CairoCell::CairoCell ()
-        : _visible (true)
-        , _xpad (5)
+       : _visible (true)
+       , _xpad (5)
 {
-        bbox.x = 0;
-        bbox.y = 0;
-        bbox.width = 0;
-        bbox.height = 0;
+       bbox.x = 0;
+       bbox.y = 0;
+       bbox.width = 0;
+       bbox.height = 0;
 }
 
 CairoTextCell::CairoTextCell (uint32_t wc)
-        : _width_chars (wc)
+       : _width_chars (wc)
 {
 }
 
 void
 CairoTextCell::render (Cairo::RefPtr<Cairo::Context>& context)
 {
-        if (!_visible || _width_chars == 0) {
-                return;
-        }
+       if (!_visible || _width_chars == 0) {
+               return;
+       }
 
-        context->move_to (bbox.x, bbox.y); 
-        pango_cairo_update_layout (context->cobj(), layout->gobj());
-        pango_cairo_show_layout (context->cobj(), layout->gobj());
+       context->move_to (bbox.x, bbox.y);
+       pango_cairo_update_layout (context->cobj(), layout->gobj());
+       pango_cairo_show_layout (context->cobj(), layout->gobj());
 }
 
 void
-CairoTextCell::set_size (Glib::RefPtr<Pango::Context>& context, const Pango::FontDescription& font) 
+CairoTextCell::set_size (Glib::RefPtr<Pango::Context>& context, const Pango::FontDescription& font)
 {
-        layout = Pango::Layout::create (context);
-        layout->set_font_description (font);
+       layout = Pango::Layout::create (context);
+       layout->set_font_description (font);
 
-        Pango::FontMetrics metrics = context->get_metrics (font);
+       Pango::FontMetrics metrics = context->get_metrics (font);
 
-        bbox.width = (_width_chars * metrics.get_approximate_digit_width ()) / PANGO_SCALE;
-        bbox.height = (metrics.get_ascent() + metrics.get_descent()) / PANGO_SCALE;
+       bbox.width = (_width_chars * metrics.get_approximate_digit_width ()) / PANGO_SCALE;
+       bbox.height = (metrics.get_ascent() + metrics.get_descent()) / PANGO_SCALE;
 }
 
 CairoCell*
-CairoEditableText::get_cell (uint32_t id) 
+CairoEditableText::get_cell (uint32_t id)
 {
-        CellMap::iterator i = cells.find (id);
-        if (i == cells.end()) {
-                return 0;
-        } 
-        return i->second;
+       CellMap::iterator i = cells.find (id);
+       if (i == cells.end()) {
+               return 0;
+       }
+       return i->second;
 }
 
 CairoEditableText::CairoEditableText ()
-        : editing_id (0)
-        , editing_pos (0)
-        , width (0)
-        , max_cell_height (0)
-        , height (0)
-        , corner_radius (24)
-        , xpad (10)
-        , ypad (5)
+       : editing_id (0)
+       , editing_pos (0)
+       , width (0)
+       , max_cell_height (0)
+       , height (0)
+       , corner_radius (24)
+       , xpad (10)
+       , ypad (5)
 {
-        add_events (Gdk::POINTER_MOTION_HINT_MASK | Gdk::SCROLL_MASK | Gdk::KEY_PRESS_MASK | Gdk::KEY_RELEASE_MASK |
-                    Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK);
-        set_flags (Gtk::CAN_FOCUS);
-        set_can_default (true);
-        set_receives_default (true);
+       add_events (Gdk::POINTER_MOTION_HINT_MASK | Gdk::SCROLL_MASK | Gdk::KEY_PRESS_MASK | Gdk::KEY_RELEASE_MASK |
+                   Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK);
+       set_flags (Gtk::CAN_FOCUS);
+       set_can_default (true);
+       set_receives_default (true);
 }
 
 bool
 CairoEditableText::on_focus_in_event (GdkEventFocus* ev)
 {
-        return false;
+       return false;
 }
 
 bool
 CairoEditableText::on_focus_out_event (GdkEventFocus* ev)
 {
-        if (editing_id) {
-                CairoCell* cell = get_cell (editing_id);
-                queue_draw_cell (cell);
-                editing_id = 0;
-                editing_pos = 0;
-        }
-
-        return false;
+       if (editing_id) {
+               CairoCell* cell = get_cell (editing_id);
+               queue_draw_cell (cell);
+               editing_id = 0;
+               editing_pos = 0;
+       }
+
+       return false;
 }
 
 void
 CairoEditableText::add_cell (uint32_t id, CairoCell* cell)
 {
-        if (id > 0) {
-                Glib::RefPtr<Pango::Context> context = get_pango_context ();
-                cell->set_size (context, font);
+       if (id > 0) {
+               Glib::RefPtr<Pango::Context> context = get_pango_context ();
+               cell->set_size (context, font);
 
-                cells[id] = cell; /* we own it */
-        }
+               cells[id] = cell; /* we own it */
+       }
 }
 
 void
 CairoEditableText::set_text (uint32_t id, const string& text)
 {
-        CellMap::iterator i = cells.find (id);
+       CellMap::iterator i = cells.find (id);
 
-        if (i == cells.end()) {
-                return;
-        }
+       if (i == cells.end()) {
+               return;
+       }
 
-        CairoTextCell* textcell = dynamic_cast<CairoTextCell*> (i->second);
+       CairoTextCell* textcell = dynamic_cast<CairoTextCell*> (i->second);
 
-        if (textcell) {
-                set_text (textcell, text);
-        }
-}            
+       if (textcell) {
+               set_text (textcell, text);
+       }
+}
 
 void
 CairoEditableText::set_text (CairoTextCell* cell, const string& text)
 {
-        cell->set_text (text);
-        queue_draw_cell (cell);
+       cell->set_text (text);
+       queue_draw_cell (cell);
 }
 
 bool
 CairoEditableText::on_expose_event (GdkEventExpose* ev)
 {
-        Cairo::RefPtr<Cairo::Context> context = get_window()->create_cairo_context();
+       Cairo::RefPtr<Cairo::Context> context = get_window()->create_cairo_context();
 
-        if (cells.empty()) {
-                return true;
-        }
+       if (cells.empty()) {
+               return true;
+       }
 
        context->rectangle (ev->area.x, ev->area.y, ev->area.width, ev->area.height);
        context->clip ();
 
-        context->set_source_rgba (bg_r, bg_g, bg_b, bg_a);
-        rounded_rectangle (context, 0, 0, width, height, corner_radius);
-        context->fill ();
-
-        for (CellMap::iterator i = cells.begin(); i != cells.end(); ++i) {
-
-                uint32_t id = i->first;
-                CairoCell* cell = i->second;
-                
-                /* is cell inside the expose area?
-                 */
-
-                if (cell->intersects (ev->area)) {
-
-                        if (id == editing_id) {
-                                context->set_source_rgba (edit_r, edit_b, edit_g, edit_a);
-                        } else {
-                                context->set_source_rgba (r, g, b, a);
-                        }
-                        
-                        cell->render (context);
-                } 
-        }
-        return true;
+       context->set_source_rgba (bg_r, bg_g, bg_b, bg_a);
+       rounded_rectangle (context, 0, 0, width, height, corner_radius);
+       context->fill ();
+
+       for (CellMap::iterator i = cells.begin(); i != cells.end(); ++i) {
+
+               uint32_t id = i->first;
+               CairoCell* cell = i->second;
+
+               /* is cell inside the expose area?
+                */
+
+               if (cell->intersects (ev->area)) {
+
+                       if (id == editing_id) {
+                               context->set_source_rgba (edit_r, edit_b, edit_g, edit_a);
+                       } else {
+                               context->set_source_rgba (r, g, b, a);
+                       }
+
+                       cell->render (context);
+               }
+       }
+       return true;
 }
 
 void
 CairoEditableText::queue_draw_cell (CairoCell* cell)
 {
-        Glib::RefPtr<Gdk::Window> win = get_window();
+       Glib::RefPtr<Gdk::Window> win = get_window();
 
-        if (!win) {
-                return;
-        }
+       if (!win) {
+               return;
+       }
 
-        Gdk::Rectangle r;
+       Gdk::Rectangle r;
 
-        r.set_x (cell->x());
-        r.set_y (cell->y());
-        r.set_width (cell->width());
-        r.set_height (cell->height());
+       r.set_x (cell->x());
+       r.set_y (cell->y());
+       r.set_width (cell->width());
+       r.set_height (cell->height());
 
-        Gdk::Region rg (r);
-        win->invalidate_region (rg, true);
+       Gdk::Region rg (r);
+       win->invalidate_region (rg, true);
 }
 
-CairoCell* 
+CairoCell*
 CairoEditableText::find_cell (uint32_t x, uint32_t y, uint32_t& id)
 {
-        for (CellMap::iterator i = cells.begin(); i != cells.end(); ++i) {
-                if (i->second->covers (x, y)) {
-                        id = i->first;
-                        return i->second;
-                }
-        }
-
-        return 0;
+       for (CellMap::iterator i = cells.begin(); i != cells.end(); ++i) {
+               if (i->second->covers (x, y)) {
+                       id = i->first;
+                       return i->second;
+               }
+       }
+
+       return 0;
 }
 
 bool
 CairoEditableText::on_button_press_event (GdkEventButton* ev)
 {
-        uint32_t id;         
-        CairoCell* cell;
-
-        if (editing_id) {
-                cell = get_cell (editing_id);
-                /* redraw the old cell */
-                queue_draw_cell (cell);
-        }
-                
-        cell = find_cell (ev->x, ev->y, id);
-        
-        if (!cell) {
-                editing_id = 0;
-                return false;
-        }
-
-        grab_focus ();
-        editing_id = id;
-        editing_pos = 0;
-
-        /* redraw the new cell (maybe the same as the old - no real cost) */
-        queue_draw_cell (cell);
-
-        return true;
+       uint32_t id;
+       CairoCell* cell;
+
+       if (editing_id) {
+               cell = get_cell (editing_id);
+               /* redraw the old cell */
+               queue_draw_cell (cell);
+       }
+
+       cell = find_cell (ev->x, ev->y, id);
+
+       if (!cell) {
+               editing_id = 0;
+               return false;
+       }
+
+       grab_focus ();
+       editing_id = id;
+       editing_pos = 0;
+
+       /* redraw the new cell (maybe the same as the old - no real cost) */
+       queue_draw_cell (cell);
+
+       return true;
 }
 
 bool
 CairoEditableText::on_button_release_event (GdkEventButton* ev)
 {
-        return true;
+       return true;
 }
 
 bool
 CairoEditableText::on_key_press_event (GdkEventKey* ev)
 {
-        if (!editing_id) {
-                return true;
-        } 
-
-        bool commit_change = false;
-
-        CairoCell* cell = get_cell (editing_id);
-
-        if (!cell) {
-                return true;
-        }
-
-        CairoTextCell* text_cell = dynamic_cast<CairoTextCell*> (cell);
-
-        if (!text_cell) {
-                return true;
-        }
-
-        string txt = text_cell->get_text ();
-
-        switch (ev->keyval) {
-        case GDK_Tab: 
-                queue_draw_cell (cell);
-                edit_next_cell ();
-                break;
-
-        case GDK_0:
-        case GDK_KP_0:
-                txt[editing_pos] = '0';
-                commit_change = true;
-                break;
-        case GDK_1:
-        case GDK_KP_1:
-                txt[editing_pos] = '1';
-                commit_change = true;
-                break;
-        case GDK_2:
-        case GDK_KP_2:
-                txt[editing_pos] = '2';
-                commit_change = true;
-                break;
-        case GDK_3:
-        case GDK_KP_3:
-                txt[editing_pos] = '3';
-                commit_change = true;
-                break;
-        case GDK_4:
-        case GDK_KP_4:
-                txt[editing_pos] = '4';
-                commit_change = true;
-                break;
-        case GDK_5:
-        case GDK_KP_5:
-                txt[editing_pos] = '5';
-                commit_change = true;
-                break;
-        case GDK_6:
-        case GDK_KP_6:
-                txt[editing_pos] = '6';
-                commit_change = true;
-                break;
-        case GDK_7:
-        case GDK_KP_7:
-                txt[editing_pos] = '7';
-                commit_change = true;
-                break;
-        case GDK_8:
-        case GDK_KP_8:
-                txt[editing_pos] = '8';
-                commit_change = true;
-                break;
-        case GDK_9:
-        case GDK_KP_9:
-                txt[editing_pos] = '9';
-                commit_change = true;
-                break;
-
-        case GDK_Right:
-                if (editing_pos < text_cell->width_chars() - 1) {
-                        editing_pos++;
-                }
-                break;
-
-        case GDK_Left:
-                if (editing_pos > 0) {
-                        editing_pos--;
-                }
-                break;
-
-        default:
-                break;
-        }
-        
-        if (commit_change) {
-                set_text (text_cell, txt);
-                
-                if (++editing_pos >= text_cell->width_chars()) {
-                        edit_next_cell ();
-                } 
-        }
-
-
-        return true;
+       if (!editing_id) {
+               return true;
+       }
+
+       bool commit_change = false;
+
+       CairoCell* cell = get_cell (editing_id);
+
+       if (!cell) {
+               return true;
+       }
+
+       CairoTextCell* text_cell = dynamic_cast<CairoTextCell*> (cell);
+
+       if (!text_cell) {
+               return true;
+       }
+
+       string txt = text_cell->get_text ();
+
+       switch (ev->keyval) {
+       case GDK_Tab:
+               queue_draw_cell (cell);
+               edit_next_cell ();
+               break;
+
+       case GDK_0:
+       case GDK_KP_0:
+               txt[editing_pos] = '0';
+               commit_change = true;
+               break;
+       case GDK_1:
+       case GDK_KP_1:
+               txt[editing_pos] = '1';
+               commit_change = true;
+               break;
+       case GDK_2:
+       case GDK_KP_2:
+               txt[editing_pos] = '2';
+               commit_change = true;
+               break;
+       case GDK_3:
+       case GDK_KP_3:
+               txt[editing_pos] = '3';
+               commit_change = true;
+               break;
+       case GDK_4:
+       case GDK_KP_4:
+               txt[editing_pos] = '4';
+               commit_change = true;
+               break;
+       case GDK_5:
+       case GDK_KP_5:
+               txt[editing_pos] = '5';
+               commit_change = true;
+               break;
+       case GDK_6:
+       case GDK_KP_6:
+               txt[editing_pos] = '6';
+               commit_change = true;
+               break;
+       case GDK_7:
+       case GDK_KP_7:
+               txt[editing_pos] = '7';
+               commit_change = true;
+               break;
+       case GDK_8:
+       case GDK_KP_8:
+               txt[editing_pos] = '8';
+               commit_change = true;
+               break;
+       case GDK_9:
+       case GDK_KP_9:
+               txt[editing_pos] = '9';
+               commit_change = true;
+               break;
+
+       case GDK_Right:
+               if (editing_pos < text_cell->width_chars() - 1) {
+                       editing_pos++;
+               }
+               break;
+
+       case GDK_Left:
+               if (editing_pos > 0) {
+                       editing_pos--;
+               }
+               break;
+
+       default:
+               break;
+       }
+
+       if (commit_change) {
+               set_text (text_cell, txt);
+
+               if (++editing_pos >= text_cell->width_chars()) {
+                       edit_next_cell ();
+               }
+       }
+
+
+       return true;
 }
 
 void
 CairoEditableText::edit_next_cell ()
 {
-        CairoCell* next;
-        CairoTextCell* next_text;
-        uint32_t next_id = editing_id + 1;
-        
-        while (true) {
-                next = get_cell (next_id);
-
-                if (!next || !next->visible() || (next_text = dynamic_cast<CairoTextCell*> (next)) != 0) {
-                        break;
-                }
-
-                next_id += 1;
-        }
-        
-        if (next) {
-                editing_id = next_id;
-                editing_pos = 0;
-                queue_draw_cell (next_text);
-        } else {
-                editing_id = 0;
-                editing_pos = 0;
-        }
+       CairoCell* next;
+       CairoTextCell* next_text;
+       uint32_t next_id = editing_id + 1;
+
+       while (true) {
+               next = get_cell (next_id);
+
+               if (!next || !next->visible() || (next_text = dynamic_cast<CairoTextCell*> (next)) != 0) {
+                       break;
+               }
+
+               next_id += 1;
+       }
+
+       if (next) {
+               editing_id = next_id;
+               editing_pos = 0;
+               queue_draw_cell (next_text);
+       } else {
+               editing_id = 0;
+               editing_pos = 0;
+       }
 }
 
 bool
 CairoEditableText::on_key_release_event (GdkEventKey* ev)
 {
-        return true;
+       return true;
 }
 
 void
 CairoEditableText::on_size_request (GtkRequisition* req)
 {
-        double x = 0;
+       double x = 0;
+
+       max_cell_height = 0;
 
-        max_cell_height = 0;
+       x = xpad;
 
-        x = xpad;
+       for (CellMap::iterator i = cells.begin(); i != cells.end(); ++i) {
+               CairoCell* cell = i->second;
 
-        for (CellMap::iterator i = cells.begin(); i != cells.end(); ++i) {
-                CairoCell* cell = i->second;
+               if (cell->visible()) {
+                       cell->set_position (x, ypad);
+               }
 
-                if (cell->visible()) {
-                        cell->set_position (x, ypad);
-                }
+               x += cell->width() + cell->xpad();
+               max_cell_height = std::max ((double) cell->height(), max_cell_height);
+       }
 
-                x += cell->width() + cell->xpad();
-                max_cell_height = std::max ((double) cell->height(), max_cell_height);
-        }
+       x += xpad;
 
-        x += xpad;
-        
-        req->width = x;
-        req->height = max_cell_height + (ypad * 2);
+       req->width = x;
+       req->height = max_cell_height + (ypad * 2);
 }
 
 void
 CairoEditableText::on_size_allocate (Gtk::Allocation& alloc)
 {
-        Misc::on_size_allocate (alloc);
+       Misc::on_size_allocate (alloc);
 
-        width = alloc.get_width();
-        height = alloc.get_height();
+       width = alloc.get_width();
+       height = alloc.get_height();
 }
index dde4e687f780b61b259366696800cc94d77aa294..c3c879fa26d61efad9e4cd345ca9167ebe860aad 100644 (file)
@@ -1,19 +1,19 @@
 /*
-    Copyright (C) 2011 Paul Davis
+  Copyright (C) 2011 Paul Davis
 
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
 
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
 
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 */
 
 #include <cairomm/cairomm.h>
 #include <gtkmm.h>
 
-class CairoCell 
+class CairoCell
 {
-  public:
-    CairoCell();
-    virtual ~CairoCell() {}
-
-    virtual void render (Cairo::RefPtr<Cairo::Context>&) = 0;
-
-    double x() const { return bbox.x; }
-    double y() const { return bbox.y; }
-    double width() const { return bbox.width; }
-    double height() const { return bbox.height; }
-
-    void set_position (double x, double y) {
-            bbox.x = x;
-            bbox.y = y;
-    }
-
-    bool intersects (GdkRectangle& r) const {
-            return gdk_rectangle_intersect (&r, &bbox, 0);
-    }
-
-    bool covers (double x, double y) const {
-            return bbox.x <= x && bbox.x + bbox.width > x &&
-                    bbox.y <= y && bbox.y + bbox.height > y;
-    }
-
-    double xpad() const { return _xpad; }
-    void   set_xpad (double x) { _xpad = x; }
-
-    void set_visible (bool yn) { _visible = yn; }
-    bool visible() const { return _visible; }
-    virtual void set_size (Glib::RefPtr<Pango::Context>&, const Pango::FontDescription&) {}
-
-  protected:
-    GdkRectangle bbox;
-    bool _visible;
-    uint32_t _xpad;
+public:
+       CairoCell();
+       virtual ~CairoCell() {}
+
+       virtual void render (Cairo::RefPtr<Cairo::Context>&) = 0;
+
+       double x() const { return bbox.x; }
+       double y() const { return bbox.y; }
+       double width() const { return bbox.width; }
+       double height() const { return bbox.height; }
+
+       void set_position (double x, double y) {
+               bbox.x = x;
+               bbox.y = y;
+       }
+
+       bool intersects (GdkRectangle& r) const {
+               return gdk_rectangle_intersect (&r, &bbox, 0);
+       }
+
+       bool covers (double x, double y) const {
+               return bbox.x <= x && bbox.x + bbox.width > x &&
+                       bbox.y <= y && bbox.y + bbox.height > y;
+       }
+
+       double xpad() const { return _xpad; }
+       void   set_xpad (double x) { _xpad = x; }
+
+       void set_visible (bool yn) { _visible = yn; }
+       bool visible() const { return _visible; }
+       virtual void set_size (Glib::RefPtr<Pango::Context>&, const Pango::FontDescription&) {}
+
+protected:
+       GdkRectangle bbox;
+       bool _visible;
+       uint32_t _xpad;
 };
 
-class CairoBarCell : public CairoCell 
+class CairoBarCell : public CairoCell
 {
-  public:
-    CairoBarCell() {};
-    
-    void render (Cairo::RefPtr<Cairo::Context>& context) {
-            context->move_to (bbox.x, bbox.y); 
-            context->set_line_width (bbox.width);
-            context->rel_line_to (0, bbox.height);
-            context->stroke ();
-    }
-
-    void set_size (Glib::RefPtr<Pango::Context>& context, const Pango::FontDescription& font) {
-        Pango::FontMetrics metrics = context->get_metrics (font);
-        bbox.width = 2;
-        bbox.height = (metrics.get_ascent() + metrics.get_descent()) / PANGO_SCALE;
-    }
-
-  private:
+public:
+       CairoBarCell() {};
+
+       void render (Cairo::RefPtr<Cairo::Context>& context) {
+               context->move_to (bbox.x, bbox.y);
+               context->set_line_width (bbox.width);
+               context->rel_line_to (0, bbox.height);
+               context->stroke ();
+       }
+
+       void set_size (Glib::RefPtr<Pango::Context>& context, const Pango::FontDescription& font) {
+               Pango::FontMetrics metrics = context->get_metrics (font);
+               bbox.width = 2;
+               bbox.height = (metrics.get_ascent() + metrics.get_descent()) / PANGO_SCALE;
+       }
+
+private:
 };
 
-class CairoColonCell : public CairoCell 
+class CairoColonCell : public CairoCell
 {
-  public:
-    CairoColonCell() {};
-    
-    void render (Cairo::RefPtr<Cairo::Context>& context) {
-            /* two very small circles, at 1/3 and 2/3 of the height */
-            context->arc (bbox.x, bbox.y + (bbox.height/3.0), 1.5, 0.0, M_PI*2.0);
-            context->fill ();
-            context->arc (bbox.x, bbox.y + (2.0 * bbox.height/3.0), 1.5, 0.0, M_PI*2.0);
-            context->fill ();
-    }
-
-    void set_size (Glib::RefPtr<Pango::Context>& context, const Pango::FontDescription& font) {
-        Pango::FontMetrics metrics = context->get_metrics (font);
-        bbox.width = 3.0;
-        bbox.height = (metrics.get_ascent() + metrics.get_descent()) / PANGO_SCALE;
-    }
-
-  private:
+public:
+       CairoColonCell() {};
+
+       void render (Cairo::RefPtr<Cairo::Context>& context) {
+               /* two very small circles, at 1/3 and 2/3 of the height */
+               context->arc (bbox.x, bbox.y + (bbox.height/3.0), 1.5, 0.0, M_PI*2.0);
+               context->fill ();
+               context->arc (bbox.x, bbox.y + (2.0 * bbox.height/3.0), 1.5, 0.0, M_PI*2.0);
+               context->fill ();
+       }
+
+       void set_size (Glib::RefPtr<Pango::Context>& context, const Pango::FontDescription& font) {
+               Pango::FontMetrics metrics = context->get_metrics (font);
+               bbox.width = 3.0;
+               bbox.height = (metrics.get_ascent() + metrics.get_descent()) / PANGO_SCALE;
+       }
+
+private:
 };
 
 class CairoTextCell : public CairoCell
 {
-  public:
-    CairoTextCell (uint32_t width_chars);
+public:
+       CairoTextCell (uint32_t width_chars);
 
-    void set_size (Glib::RefPtr<Pango::Context>&, const Pango::FontDescription&);
+       void set_size (Glib::RefPtr<Pango::Context>&, const Pango::FontDescription&);
 
-    void   set_text (const std::string& txt) {
-            layout->set_text (txt); 
-    }
-    std::string get_text() const {
-            return layout->get_text ();
-    }
-    uint32_t width_chars() const { return _width_chars; }
+       void   set_text (const std::string& txt) {
+               layout->set_text (txt);
+       }
+       std::string get_text() const {
+               return layout->get_text ();
+       }
+       uint32_t width_chars() const { return _width_chars; }
 
-    void render (Cairo::RefPtr<Cairo::Context>&);
+       void render (Cairo::RefPtr<Cairo::Context>&);
 
-  protected:
-    uint32_t _width_chars;
-    Glib::RefPtr<Pango::Layout> layout;
+protected:
+       uint32_t _width_chars;
+       Glib::RefPtr<Pango::Layout> layout;
 };
 
 class CairoEditableText : public Gtk::Misc
 {
-  public:
-    CairoEditableText ();
-    
-    void add_cell (uint32_t id, CairoCell*);
-    CairoCell* get_cell (uint32_t id);
-
-    void set_text (uint32_t id, const std::string& text);
-    
-    void set_colors (double cr, double cg, double cb, double ca) {
-            r = cr;
-            g = cg;
-            b = cb;
-            a = ca;
-            queue_draw ();
-    }
-
-    void set_edit_colors (double cr, double cg, double cb, double ca) {
-            edit_r = cr;
-            edit_g = cg;
-            edit_b = cb;
-            edit_a = ca;
-            queue_draw ();
-    }
-
-    void set_bg (double r, double g, double b, double a) {
-            bg_r = r;
-            bg_g = g;
-            bg_b = b;
-            bg_a = a;
-    }
-
-    bool on_expose_event (GdkEventExpose*);
-    bool on_key_press_event (GdkEventKey*);
-    bool on_key_release_event (GdkEventKey*);
-    bool on_button_press_event (GdkEventButton*);
-    bool on_button_release_event (GdkEventButton*);
-    void on_size_request (GtkRequisition*);
-    void on_size_allocate (Gtk::Allocation&);
-    bool on_focus_in_event (GdkEventFocus*);
-    bool on_focus_out_event (GdkEventFocus*);
-
-    void set_font (const std::string& str) {
-            font = Pango::FontDescription (str);
-    }
-
-  private:
-    typedef std::map<uint32_t,CairoCell*> CellMap;
-
-    CellMap cells;
-    Pango::FontDescription font;
-    uint32_t editing_id;
-    uint32_t editing_pos;
-    double width;
-    double max_cell_height;
-    double height;
-    double corner_radius;
-    double xpad;
-    double ypad;
-    double r;
-    double g;
-    double b;
-    double a;
-    double edit_r;
-    double edit_g;
-    double edit_b;
-    double edit_a;
-    double bg_r;
-    double bg_g;
-    double bg_b;
-    double bg_a;
-
-
-    CairoCell* find_cell (uint32_t x, uint32_t y, uint32_t& cell_id);
-    void edit_next_cell ();
-    void queue_draw_cell (CairoCell* target);
-    void set_text (CairoTextCell* cell, const std::string&);
+public:
+       CairoEditableText ();
+
+       void add_cell (uint32_t id, CairoCell*);
+       CairoCell* get_cell (uint32_t id);
+
+       void set_text (uint32_t id, const std::string& text);
+
+       void set_colors (double cr, double cg, double cb, double ca) {
+               r = cr;
+               g = cg;
+               b = cb;
+               a = ca;
+               queue_draw ();
+       }
+
+       void set_edit_colors (double cr, double cg, double cb, double ca) {
+               edit_r = cr;
+               edit_g = cg;
+               edit_b = cb;
+               edit_a = ca;
+               queue_draw ();
+       }
+
+       void set_bg (double r, double g, double b, double a) {
+               bg_r = r;
+               bg_g = g;
+               bg_b = b;
+               bg_a = a;
+       }
+
+       bool on_expose_event (GdkEventExpose*);
+       bool on_key_press_event (GdkEventKey*);
+       bool on_key_release_event (GdkEventKey*);
+       bool on_button_press_event (GdkEventButton*);
+       bool on_button_release_event (GdkEventButton*);
+       void on_size_request (GtkRequisition*);
+       void on_size_allocate (Gtk::Allocation&);
+       bool on_focus_in_event (GdkEventFocus*);
+       bool on_focus_out_event (GdkEventFocus*);
+
+       void set_font (const std::string& str) {
+               font = Pango::FontDescription (str);
+       }
+
+private:
+       typedef std::map<uint32_t,CairoCell*> CellMap;
+
+       CellMap cells;
+       Pango::FontDescription font;
+       uint32_t editing_id;
+       uint32_t editing_pos;
+       double width;
+       double max_cell_height;
+       double height;
+       double corner_radius;
+       double xpad;
+       double ypad;
+       double r;
+       double g;
+       double b;
+       double a;
+       double edit_r;
+       double edit_g;
+       double edit_b;
+       double edit_a;
+       double bg_r;
+       double bg_g;
+       double bg_b;
+       double bg_a;
+
+
+       CairoCell* find_cell (uint32_t x, uint32_t y, uint32_t& cell_id);
+       void edit_next_cell ();
+       void queue_draw_cell (CairoCell* target);
+       void set_text (CairoTextCell* cell, const std::string&);
 };
 
 #endif /* __libgtmm2ext_cairocell_h__ */