diff --git a/gtk2_ardour/analysis_window.cc b/gtk2_ardour/analysis_window.cc index e93fad887c..998ab8ab12 100644 --- a/gtk2_ardour/analysis_window.cc +++ b/gtk2_ardour/analysis_window.cc @@ -235,7 +235,7 @@ AnalysisWindow::analyze() } void -AnalysisWindow::analyze_data (Gtk::Button */*button*/) +AnalysisWindow::analyze_data (Gtk::Button * /*button*/) { track_list_ready = false; { @@ -251,29 +251,29 @@ AnalysisWindow::analyze_data (Gtk::Button */*button*/) float *gain = (float *) malloc(sizeof(float) * fft_graph.windowSize()); Selection& s (PublicEditor::instance().get_selection()); - TimeSelection ts = s.time; - RegionSelection ars = s.regions; - for (TrackSelection::iterator i = s.tracks.begin(); i != s.tracks.end(); ++i) { - boost::shared_ptr pl - = boost::dynamic_pointer_cast((*i)->playlist()); - if (!pl) - continue; + // if timeSelection + if (source_selection_ranges_rb.get_active()) { + TimeSelection ts = s.time; - RouteUI *rui = dynamic_cast(*i); - int n_inputs = rui->route()->n_inputs().n_audio(); // FFT is audio only + for (TrackSelection::iterator i = s.tracks.begin(); i != s.tracks.end(); ++i) { + boost::shared_ptr pl + = boost::dynamic_pointer_cast((*i)->playlist()); - // Busses don't have playlists, so we need to check that we actually are working with a playlist - if (!pl || !rui) - continue; + if (!pl) + continue; - FFTResult *res = fft_graph.prepareResult(rui->color(), rui->route()->name()); + RouteUI *rui = dynamic_cast(*i); + int n_inputs = rui->route()->n_inputs().n_audio(); // FFT is audio only - // if timeSelection - if (source_selection_ranges_rb.get_active()) { -// cerr << "Analyzing ranges on track " << *&rui->route().name() << endl; + // Busses don't have playlists, so we need to check that we actually are working with a playlist + if (!pl || !rui) + continue; + // std::cerr << "Analyzing ranges on track " << rui->route()->name() << std::endl; + + FFTResult *res = fft_graph.prepareResult(rui->color(), rui->route()->name()); for (std::list::iterator j = ts.begin(); j != ts.end(); ++j) { int n; @@ -303,67 +303,72 @@ AnalysisWindow::analyze_data (Gtk::Button */*button*/) } } } - } else if (source_selection_regions_rb.get_active()) { -// cerr << "Analyzing selected regions on track " << *&rui->route().name() << endl; + res->finalize(); - TimeAxisView *current_axis = (*i); + Gtk::TreeModel::Row newrow = *(tlmodel)->append(); + newrow[tlcols.trackname] = rui->route()->name(); + newrow[tlcols.visible] = true; + newrow[tlcols.color] = rui->color(); + newrow[tlcols.graph] = res; + } + } else if (source_selection_regions_rb.get_active()) { + RegionSelection ars = s.regions; + // std::cerr << "Analyzing selected regions" << std::endl; - for (RegionSelection::iterator j = ars.begin(); j != ars.end(); ++j) { - // Check that the region is actually audio (so we can analyze it) - AudioRegionView* arv = dynamic_cast(*j); - if (!arv) - continue; - - // Check that the region really is selected on _this_ track/solo - if ( &arv->get_time_axis_view() != current_axis) - continue; - -// cerr << " - " << (*j)->region().name() << ": " << (*j)->region().length() << " samples starting at " << (*j)->region().position() << endl; - int n; - for (int channel = 0; channel < n_inputs; channel++) { - - framecnt_t x = 0; - - framecnt_t length = arv->region()->length(); - - while (x < length) { - // TODO: What about stereo+ channels? composite all to one, I guess - - n = fft_graph.windowSize(); - if (x + n >= length ) { - n = length - x; - } - - memset (buf, 0, n * sizeof (Sample)); - n = arv->audio_region()->read_at(buf, mixbuf, gain, arv->region()->position() + x, n, channel); - - if (n == 0) - break; - - if ( n < fft_graph.windowSize()) { - for (int j = n; j < fft_graph.windowSize(); j++) { - buf[j] = 0.0; - } - } - - res->analyzeWindow(buf); - - x += n; - } - } -// cerr << "Found: " << (*j)->get_item_name() << endl; + for (RegionSelection::iterator j = ars.begin(); j != ars.end(); ++j) { + // Check that the region is actually audio (so we can analyze it) + AudioRegionView* arv = dynamic_cast(*j); + if (!arv) + continue; + // std::cerr << " - " << (*j)->region().name() << ": " << (*j)->region().length() << " samples starting at " << (*j)->region().position() << std::endl; + RouteTimeAxisView *rtav = dynamic_cast(&arv->get_time_axis_view()); + if (!rtav) { + /* shouldn't happen... */ + continue; } + FFTResult *res = fft_graph.prepareResult(rtav->color(), arv->get_item_name()); + int n; + for (unsigned int channel = 0; channel < arv->region()->n_channels(); channel++) { + + framecnt_t x = 0; + framecnt_t length = arv->region()->length(); + + while (x < length) { + // TODO: What about stereo+ channels? composite all to one, I guess + + n = fft_graph.windowSize(); + if (x + n >= length ) { + n = length - x; + } + + memset (buf, 0, n * sizeof (Sample)); + n = arv->audio_region()->read_at(buf, mixbuf, gain, arv->region()->position() + x, n, channel); + + if (n == 0) + break; + + if ( n < fft_graph.windowSize()) { + for (int j = n; j < fft_graph.windowSize(); j++) { + buf[j] = 0.0; + } + } + + res->analyzeWindow(buf); + x += n; + } + } + // std::cerr << "Found: " << (*j)->get_item_name() << std::endl; + res->finalize(); + + Gtk::TreeModel::Row newrow = *(tlmodel)->append(); + newrow[tlcols.trackname] = arv->get_item_name(); + newrow[tlcols.visible] = true; + newrow[tlcols.color] = rtav->color(); + newrow[tlcols.graph] = res; } - res->finalize(); - - Gtk::TreeModel::Row newrow = *(tlmodel)->append(); - newrow[tlcols.trackname] = rui->route()->name(); - newrow[tlcols.visible] = true; - newrow[tlcols.color] = rui->color(); - newrow[tlcols.graph] = res; } diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 1022acee2d..8484ffff36 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -689,7 +689,6 @@ ARDOUR_UI::startup () // nsm requires these actions disabled vector action_names; - action_names.push_back("Snapshot"); action_names.push_back("SaveAs"); action_names.push_back("Rename"); action_names.push_back("New"); diff --git a/gtk2_ardour/canvas-waveview.c b/gtk2_ardour/canvas-waveview.c index 108952454a..2080b208d8 100644 --- a/gtk2_ardour/canvas-waveview.c +++ b/gtk2_ardour/canvas-waveview.c @@ -39,7 +39,7 @@ #define POSIX_FUNC_PTR_CAST(type, object) *((type*) &(object)) #endif // _POSIX_VERSION -extern void c_stacktrace(); +extern void c_stacktrace(void); enum { PROP_0, @@ -338,7 +338,7 @@ gnome_canvas_waveview_set_gradient_waveforms (int yn) } GnomeCanvasWaveViewCache* -gnome_canvas_waveview_cache_new () +gnome_canvas_waveview_cache_new (void) { GnomeCanvasWaveViewCache *c; diff --git a/gtk2_ardour/canvas-waveview.h b/gtk2_ardour/canvas-waveview.h new file mode 100644 index 0000000000..daa907e110 --- /dev/null +++ b/gtk2_ardour/canvas-waveview.h @@ -0,0 +1,143 @@ +/* libgnomecanvas/gnome-canvas-waveview.h: GnomeCanvas item for displaying wave data + * + * Copyright (C) 2001 Paul Davis + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + */ + +#ifndef __GNOME_CANVAS_WAVEVIEW_H__ +#define __GNOME_CANVAS_WAVEVIEW_H__ + +#include + +#include + +G_BEGIN_DECLS + +/* Wave viewer item for canvas. + */ + +#define GNOME_TYPE_CANVAS_WAVEVIEW (gnome_canvas_waveview_get_type ()) +#define GNOME_CANVAS_WAVEVIEW(obj) (GTK_CHECK_CAST ((obj), GNOME_TYPE_CANVAS_WAVEVIEW, GnomeCanvasWaveView)) +#define GNOME_CANVAS_WAVEVIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GNOME_TYPE_CANVAS_WAVEVIEW, GnomeCanvasWaveViewClass)) +#define GNOME_IS_CANVAS_WAVEVIEW(obj) (GTK_CHECK_TYPE ((obj), GNOME_TYPE_CANVAS_WAVEVIEW)) +#define GNOME_IS_CANVAS_WAVEVIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_CANVAS_WAVEVIEW)) +#define GNOME_CANVAS_WAVEVIEW_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GNOME_TYPE_CANVAS_WAVEVIEW, GnomeCanvasWaveViewClass)) + +typedef struct _GnomeCanvasWaveView GnomeCanvasWaveView; +typedef struct _GnomeCanvasWaveViewClass GnomeCanvasWaveViewClass; +typedef struct _GnomeCanvasWaveViewChannelInfo GnomeCanvasWaveViewChannelInfo; +typedef struct _GnomeCanvasWaveViewCacheEntry GnomeCanvasWaveViewCacheEntry; +typedef struct _GnomeCanvasWaveViewCache GnomeCanvasWaveViewCache; + +/* XXX this needs to be synced with ardour/source.h PeakData */ + +struct _GnomeCanvasWaveViewCacheEntry +{ + float min; + float max; +}; + +struct _GnomeCanvasWaveViewCache +{ + GnomeCanvasWaveViewCacheEntry* data; + guint32 allocated; + guint64 data_size; + gulong start; + gulong end; +}; + +GnomeCanvasWaveViewCache* gnome_canvas_waveview_cache_new (void); +void gnome_canvas_waveview_cache_destroy (GnomeCanvasWaveViewCache*); + +void gnome_canvas_waveview_set_gradient_waveforms (int); + +typedef gulong (*waveview_length_function_t)(void*); +typedef gulong (*waveview_sourcefile_length_function_t)(void*, double); +typedef void (*waveview_gain_curve_function_t)(void *arg, double start, double end, float* vector, gint64 veclen); +typedef void (*waveview_peak_function_t)(void*,gulong,gulong,gulong,gpointer,guint32,double); + +struct _GnomeCanvasWaveView +{ + GnomeCanvasItem item; + + GnomeCanvasWaveViewCache *cache; + gboolean cache_updater; + gint screen_width; + + void *data_src; + guint32 channel; + waveview_peak_function_t peak_function; + waveview_length_function_t length_function; + waveview_sourcefile_length_function_t sourcefile_length_function; + waveview_gain_curve_function_t gain_curve_function; + void *gain_src; + + /** x-axis: samples per canvas unit. */ + double samples_per_unit; + + /** y-axis: amplitude_above_axis. + * + * the default is that an (scaled, normalized -1.0 ... +1.0) amplitude of 1.0 + * corresponds to the top of the area assigned to the waveview. + * + * larger values will expand the vertical scale, cutting off the peaks/troughs. + * smaller values will decrease the vertical scale, moving peaks/troughs toward + * the middle of the area assigned to the waveview. + */ + double amplitude_above_axis; + + double x; + double y; + double height; + double half_height; + uint32_t wave_color; + uint32_t clip_color; + uint32_t zero_color; + uint32_t fill_color; + + char filled; + char rectified; + char zero_line; + char logscaled; + + /* These are updated by the update() routine + to optimize the render() routine, which may + be called several times after a single update(). + */ + + int32_t bbox_ulx; + int32_t bbox_uly; + int32_t bbox_lrx; + int32_t bbox_lry; + unsigned char wave_r, wave_g, wave_b, wave_a; + unsigned char clip_r, clip_g, clip_b, clip_a; + unsigned char fill_r, fill_g, fill_b, fill_a; + uint32_t samples; + uint32_t region_start; + int32_t reload_cache_in_render; +}; + +struct _GnomeCanvasWaveViewClass { + GnomeCanvasItemClass parent_class; +}; + +GType gnome_canvas_waveview_get_type (void) G_GNUC_CONST; + +G_END_DECLS + +#endif /* __GNOME_CANVAS_WAVEVIEW_H__ */ diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 194c344241..7f49c56d7b 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -4871,7 +4871,7 @@ Editor::add_routes (RouteList& routes) for (RouteList::iterator x = routes.begin(); x != routes.end(); ++x) { boost::shared_ptr route = (*x); - if (route->is_hidden() || route->is_monitor()) { + if (route->is_auditioner() || route->is_monitor()) { continue; } diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc index 6c241ac4a5..73d2ce648b 100644 --- a/gtk2_ardour/gain_meter.cc +++ b/gtk2_ardour/gain_meter.cc @@ -186,7 +186,7 @@ GainMeterBase::set_controls (boost::shared_ptr r, setup_gain_adjustment (); - if (!_route || !_route->is_hidden()) { + if (!_route || !_route->is_auditioner()) { using namespace Menu_Helpers; @@ -926,7 +926,7 @@ GainMeter::set_controls (boost::shared_ptr r, hbox.pack_start (meter_alignment, true, true); -// if (r && !r->is_hidden()) { +// if (r && !r->is_auditioner()) { // fader_vbox->pack_start (gain_automation_state_button, false, false, 0); // } diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index 10345428b1..74556c8eda 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -321,7 +321,7 @@ Mixer_UI::add_strips (RouteList& routes) for (RouteList::iterator x = routes.begin(); x != routes.end(); ++x) { boost::shared_ptr route = (*x); - if (route->is_hidden()) { + if (route->is_auditioner()) { continue; } diff --git a/gtk2_ardour/nsm.cc b/gtk2_ardour/nsm.cc index 7c5fcfbf6e..08c1636025 100644 --- a/gtk2_ardour/nsm.cc +++ b/gtk2_ardour/nsm.cc @@ -51,7 +51,6 @@ NSM_Client::command_open(const char *name, ARDOUR_COMMAND_LINE::session_name = name; ARDOUR_COMMAND_LINE::jack_client_name = client_id; - ARDOUR_COMMAND_LINE::no_connect_ports = true; if (ARDOUR_UI::instance()->get_session_parameters(true, false, "")) { return ERR_GENERAL; diff --git a/gtk2_ardour/route_params_ui.cc b/gtk2_ardour/route_params_ui.cc index 5f06555f28..56ed380404 100644 --- a/gtk2_ardour/route_params_ui.cc +++ b/gtk2_ardour/route_params_ui.cc @@ -165,7 +165,7 @@ RouteParams_UI::add_routes (RouteList& routes) for (RouteList::iterator x = routes.begin(); x != routes.end(); ++x) { boost::shared_ptr route = (*x); - if (route->is_hidden()) { + if (route->is_auditioner()) { return; } diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index 2d83dbd4e7..d9b96066d3 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -122,7 +122,7 @@ RouteTimeAxisView::set_route (boost::shared_ptr rt) set_height (preset_height (HeightNormal)); } - if (!_route->is_hidden()) { + if (!_route->is_auditioner()) { if (gui_property ("visible").empty()) { set_gui_property ("visible", true); } diff --git a/gtk2_ardour/step_entry.cc b/gtk2_ardour/step_entry.cc index fd53fd55ff..927c6f0324 100644 --- a/gtk2_ardour/step_entry.cc +++ b/gtk2_ardour/step_entry.cc @@ -470,6 +470,8 @@ StepEntry::StepEntry (StepEditor& seditor) r = RefPtr::cast_dynamic (act); assert (r); r->set_active (true); + + set_type_hint (Gdk::WINDOW_TYPE_HINT_DIALOG); } StepEntry::~StepEntry() diff --git a/gtk2_ardour/tempo_lines.cc b/gtk2_ardour/tempo_lines.cc index 208ba4af13..9a9619c826 100644 --- a/gtk2_ardour/tempo_lines.cc +++ b/gtk2_ardour/tempo_lines.cc @@ -129,7 +129,6 @@ TempoLines::draw (const ARDOUR::TempoMap::BBTPointList::const_iterator& begin, //cout << endl << "*** LINE CACHE MISS" << endl; - bool inserted_last_time = true; bool invalidated = false; for (i = begin; i != end; ++i) { @@ -162,7 +161,7 @@ TempoLines::draw (const ARDOUR::TempoMap::BBTPointList::const_iterator& begin, ++li; line->set_outline_color (color); - inserted_last_time = false; // don't search next time + // Use existing line, moving if necessary } else if (!exhausted) { Lines::iterator steal = _lines.end(); @@ -178,7 +177,6 @@ TempoLines::draw (const ARDOUR::TempoMap::BBTPointList::const_iterator& begin, line->set_x1 (xpos); line->set_outline_color (color); _lines.insert(make_pair(xpos, line)); - inserted_last_time = true; // search next time invalidated = true; // Shift clean range left @@ -192,7 +190,6 @@ TempoLines::draw (const ARDOUR::TempoMap::BBTPointList::const_iterator& begin, //cout << "*** EXISTING LINE" << endl; li = existing; li->second->set_outline_color (color); - inserted_last_time = false; // don't search next time } else { //cout << "*** MOVING LINE" << endl; const double x1 = line->x0(); @@ -206,7 +203,6 @@ TempoLines::draw (const ARDOUR::TempoMap::BBTPointList::const_iterator& begin, line->set_x0 (xpos); line->set_x1 (xpos); _lines.insert(make_pair(xpos, line)); - inserted_last_time = true; // search next time } } @@ -222,7 +218,6 @@ TempoLines::draw (const ARDOUR::TempoMap::BBTPointList::const_iterator& begin, line->set_y1 (_height); line->set_outline_color (color); _lines.insert(make_pair(xpos, line)); - inserted_last_time = true; } // Steal from the left @@ -237,7 +232,6 @@ TempoLines::draw (const ARDOUR::TempoMap::BBTPointList::const_iterator& begin, line->set_x0 (xpos); line->set_x1 (xpos); _lines.insert(make_pair(xpos, line)); - inserted_last_time = true; // search next time invalidated = true; // Shift clean range right diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index c25b6be950..0bd3b07ea4 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -74,7 +74,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember, typedef std::list > ProcessorList; enum Flag { - Hidden = 0x1, + Auditioner = 0x1, MasterOut = 0x2, MonitorOut = 0x4 }; @@ -106,7 +106,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember, void set_order_key (RouteSortOrderKey, uint32_t); void sync_order_keys (RouteSortOrderKey); - bool is_hidden() const { return _flags & Hidden; } + bool is_auditioner() const { return _flags & Auditioner; } bool is_master() const { return _flags & MasterOut; } bool is_monitor() const { return _flags & MonitorOut; } diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc index 070a7453fb..b4ca9e2df8 100644 --- a/libs/ardour/audio_track.cc +++ b/libs/ardour/audio_track.cc @@ -62,7 +62,7 @@ AudioTrack::create_diskstream () { AudioDiskstream::Flag dflags = AudioDiskstream::Flag (0); - if (_flags & Hidden) { + if (_flags & Auditioner) { dflags = AudioDiskstream::Flag (dflags | AudioDiskstream::Hidden); } else { dflags = AudioDiskstream::Flag (dflags | AudioDiskstream::Recordable); diff --git a/libs/ardour/auditioner.cc b/libs/ardour/auditioner.cc index 7c1a2e1e2b..9f7dd85b52 100644 --- a/libs/ardour/auditioner.cc +++ b/libs/ardour/auditioner.cc @@ -40,7 +40,7 @@ using namespace PBD; #include "i18n.h" Auditioner::Auditioner (Session& s) - : AudioTrack (s, "auditioner", Route::Hidden) + : AudioTrack (s, "auditioner", Route::Auditioner) , current_frame (0) , _auditioning (0) , length (0) @@ -61,7 +61,7 @@ Auditioner::init () vector outputs; _session.engine().get_physical_outputs (DataType::AUDIO, outputs); - if (left == "default") { + if (left.empty() || left == "default") { if (_session.monitor_out()) { left = _session.monitor_out()->input()->audio (0)->name(); via_monitor = true; @@ -72,7 +72,7 @@ Auditioner::init () } } - if (right == "default") { + if (right.empty() || right == "default") { if (_session.monitor_out()) { right = _session.monitor_out()->input()->audio (1)->name(); via_monitor = true; diff --git a/libs/ardour/enums.cc b/libs/ardour/enums.cc index 6c82792328..b96394d16f 100644 --- a/libs/ardour/enums.cc +++ b/libs/ardour/enums.cc @@ -398,7 +398,7 @@ setup_enum_writer () REGISTER_CLASS_ENUM (Session, pullup_Minus4Minus1); REGISTER (_Session_PullupFormat); - REGISTER_CLASS_ENUM (Route, Hidden); + REGISTER_CLASS_ENUM (Route, Auditioner); REGISTER_CLASS_ENUM (Route, MasterOut); REGISTER_CLASS_ENUM (Route, MonitorOut); REGISTER_BITS (_Route_Flag); diff --git a/libs/ardour/export_formats_search_path.cc b/libs/ardour/export_formats_search_path.cc index ed87a56e1a..cf18b14a18 100644 --- a/libs/ardour/export_formats_search_path.cc +++ b/libs/ardour/export_formats_search_path.cc @@ -35,9 +35,16 @@ namespace ARDOUR { SearchPath export_formats_search_path () { - SearchPath spath; - spath += Glib::build_filename (user_config_directory (), export_formats_dir_name); - spath += SearchPath(Glib::getenv (export_env_variable_name)); + SearchPath spath (ardour_data_search_path()); + spath.add_subdirectory_to_paths (export_formats_dir_name); + + bool export_formats_path_defined = false; + SearchPath spath_env (Glib::getenv(export_env_variable_name, export_formats_path_defined)); + + if (export_formats_path_defined) { + spath += spath_env; + } + return spath; } diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc index 29af02c696..c900a21176 100644 --- a/libs/ardour/lv2_plugin.cc +++ b/libs/ardour/lv2_plugin.cc @@ -1570,7 +1570,6 @@ LV2Plugin::connect_and_run(BufferSet& bufs, : m; // Now merge MIDI and any transport events into the buffer - LV2_Evbuf_Iterator i = lv2_evbuf_end(_ev_buffers[port_index]); const uint32_t type = LV2Plugin::urids.midi_MidiEvent; const framepos_t tend = _session.transport_frame() + nframes; ++metric_i; diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc index 1a618a01dd..f7f9ff7a59 100644 --- a/libs/ardour/midi_track.cc +++ b/libs/ardour/midi_track.cc @@ -83,7 +83,7 @@ MidiTrack::create_diskstream () { MidiDiskstream::Flag dflags = MidiDiskstream::Flag (0); - if (_flags & Hidden) { + if (_flags & Auditioner) { dflags = MidiDiskstream::Flag (dflags | MidiDiskstream::Hidden); } else { dflags = MidiDiskstream::Flag (dflags | MidiDiskstream::Recordable); diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 9f933e0a4a..29e778e415 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -161,7 +161,7 @@ Route::init () _monitor_control->activate (); } - if (is_master() || is_monitor() || is_hidden()) { + if (is_master() || is_monitor() || is_auditioner()) { _mute_master->set_solo_ignore (true); } @@ -308,7 +308,7 @@ Route::sync_order_keys (RouteSortOrderKey base) void Route::set_remote_control_id_from_order_key (RouteSortOrderKey /*key*/, uint32_t rid) { - if (is_master() || is_monitor() || is_hidden()) { + if (is_master() || is_monitor() || is_auditioner()) { /* hard-coded remote IDs, or no remote ID */ return; } @@ -779,7 +779,7 @@ Route::set_mute_master_solo () void Route::set_solo_isolated (bool yn, void *src) { - if (is_master() || is_monitor() || is_hidden()) { + if (is_master() || is_monitor() || is_auditioner()) { return; } @@ -793,7 +793,7 @@ Route::set_solo_isolated (bool yn, void *src) boost::shared_ptr routes = _session.get_routes (); for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) { - if ((*i).get() == this || (*i)->is_master() || (*i)->is_monitor() || (*i)->is_hidden()) { + if ((*i).get() == this || (*i)->is_master() || (*i)->is_monitor() || (*i)->is_auditioner()) { continue; } @@ -1996,7 +1996,7 @@ Route::set_state (const XMLNode& node, int version) _flags = Flag (0); } - if (is_master() || is_monitor() || is_hidden()) { + if (is_master() || is_monitor() || is_auditioner()) { _mute_master->set_solo_ignore (true); } @@ -2212,7 +2212,7 @@ Route::set_state_2X (const XMLNode& node, int version) _flags = Flag (0); } - if (is_master() || is_monitor() || is_hidden()) { + if (is_master() || is_monitor() || is_auditioner()) { _mute_master->set_solo_ignore (true); } @@ -4238,8 +4238,11 @@ Route::fill_buffers_with_input (BufferSet& bufs, boost::shared_ptr io, pfram } /* establish the initial setup of the buffer set, reflecting what was - copied into it. + copied into it. unless, of course, we are the auditioner, in which + case nothing was fed into it from the inputs at all. */ - bufs.set_count (io->n_ports()); + if (!is_auditioner()) { + bufs.set_count (io->n_ports()); + } } diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index da1f9e9115..6fe51961d2 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -1615,7 +1615,7 @@ Session::count_existing_track_channels (ChanCount& in, ChanCount& out) for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { boost::shared_ptr tr = boost::dynamic_pointer_cast (*i); - if (tr && !tr->is_hidden()) { + if (tr && !tr->is_auditioner()) { in += tr->n_inputs(); out += tr->n_outputs(); } @@ -2246,7 +2246,7 @@ Session::add_routes_inner (RouteList& new_routes, bool input_auto_connect, bool */ if (!r->has_order_key (EditorSort)) { - if (r->is_hidden()) { + if (r->is_auditioner()) { /* use an arbitrarily high value */ r->set_order_key (EditorSort, UINT_MAX); r->set_order_key (MixerSort, UINT_MAX); @@ -2471,7 +2471,7 @@ Session::route_listen_changed (void* /*src*/, boost::weak_ptr wpr) /* new listen: disable all other listen */ boost::shared_ptr r = routes.reader (); 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()) { + if ((*i) == route || (*i)->solo_isolated() || (*i)->is_master() || (*i)->is_monitor() || (*i)->is_auditioner()) { continue; } (*i)->set_listen (false, this); @@ -2553,7 +2553,7 @@ Session::route_solo_changed (bool self_solo_change, void* /*src*/, boost::weak_p /* new solo: disable all other solos, but not the group if its solo-enabled */ 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() || + if ((*i) == route || (*i)->solo_isolated() || (*i)->is_master() || (*i)->is_monitor() || (*i)->is_auditioner() || (leave_group_alone && ((*i)->route_group() == rg))) { continue; } @@ -2573,7 +2573,7 @@ Session::route_solo_changed (bool self_solo_change, void* /*src*/, boost::weak_p bool via_sends_only; bool in_signal_flow; - if ((*i) == route || (*i)->solo_isolated() || (*i)->is_master() || (*i)->is_monitor() || (*i)->is_hidden() || + if ((*i) == route || (*i)->solo_isolated() || (*i)->is_master() || (*i)->is_monitor() || (*i)->is_auditioner() || (leave_group_alone && ((*i)->route_group() == rg))) { continue; } @@ -2662,11 +2662,11 @@ Session::update_route_solo_state (boost::shared_ptr r) } for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if (!(*i)->is_master() && !(*i)->is_monitor() && !(*i)->is_hidden() && (*i)->self_soloed()) { + if (!(*i)->is_master() && !(*i)->is_monitor() && !(*i)->is_auditioner() && (*i)->self_soloed()) { something_soloed = true; } - if (!(*i)->is_hidden() && (*i)->listening_via_monitor()) { + if (!(*i)->is_auditioner() && (*i)->listening_via_monitor()) { if (Config->get_solo_control_is_listen_control()) { listeners++; } else { @@ -4621,7 +4621,7 @@ Session::post_playback_latency () boost::shared_ptr r = routes.reader (); for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if (!(*i)->is_hidden() && ((*i)->active())) { + if (!(*i)->is_auditioner() && ((*i)->active())) { _worst_track_latency = max (_worst_track_latency, (*i)->update_signal_latency ()); } } @@ -4727,7 +4727,7 @@ Session::update_latency_compensation (bool force_whole_graph) boost::shared_ptr r = routes.reader (); for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if (!(*i)->is_hidden() && ((*i)->active())) { + if (!(*i)->is_auditioner() && ((*i)->active())) { framecnt_t tl; if ((*i)->signal_latency () != (tl = (*i)->update_signal_latency ())) { some_track_latency_changed = true; diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index 7ed8030e6b..067a91da48 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -125,7 +125,7 @@ Session::no_roll (pframes_t nframes) PT_TIMING_CHECK (10); for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if ((*i)->is_hidden()) { + if ((*i)->is_auditioner()) { continue; } @@ -170,7 +170,7 @@ Session::process_routes (pframes_t nframes, bool& need_butler) int ret; - if ((*i)->is_hidden()) { + if ((*i)->is_auditioner()) { continue; } @@ -210,7 +210,7 @@ Session::silent_process_routes (pframes_t nframes, bool& need_butler) int ret; - if ((*i)->is_hidden()) { + if ((*i)->is_auditioner()) { continue; } @@ -863,7 +863,7 @@ Session::process_audition (pframes_t nframes) boost::shared_ptr r = routes.reader (); for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if (!(*i)->is_hidden()) { + if (!(*i)->is_auditioner()) { (*i)->silence (nframes); } } diff --git a/libs/ardour/session_rtevents.cc b/libs/ardour/session_rtevents.cc index 2b52b3b28a..6328607eec 100644 --- a/libs/ardour/session_rtevents.cc +++ b/libs/ardour/session_rtevents.cc @@ -42,7 +42,7 @@ void Session::rt_set_monitoring (boost::shared_ptr rl, MonitorChoice mc, bool /* group_override */) { for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) { - if (!(*i)->is_hidden()) { + if (!(*i)->is_auditioner()) { boost::shared_ptr t = boost::dynamic_pointer_cast (*i); if (t) { t->set_monitoring (mc); @@ -63,7 +63,7 @@ void Session::rt_set_solo (boost::shared_ptr rl, bool yn, bool /* group_override */) { for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) { - if (!(*i)->is_hidden()) { + if (!(*i)->is_auditioner()) { (*i)->set_solo (yn, this); } } @@ -84,7 +84,7 @@ void Session::rt_cancel_solo_after_disconnect (boost::shared_ptr rl, bool upstream, bool /* group_override */) { for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) { - if (!(*i)->is_hidden()) { + if (!(*i)->is_auditioner()) { (*i)->cancel_solo_after_disconnect (upstream); } } @@ -112,7 +112,7 @@ Session::rt_set_just_one_solo (boost::shared_ptr just_one, bool yn, b boost::shared_ptr r = just_one->front(); for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) { - if (!(*i)->is_hidden() && r != *i) { + if (!(*i)->is_auditioner() && r != *i) { (*i)->set_solo (!yn, (*i)->route_group()); } } @@ -132,7 +132,7 @@ void Session::rt_set_listen (boost::shared_ptr rl, bool yn, bool /*group_override*/ ) { for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) { - if (!(*i)->is_hidden()) { + if (!(*i)->is_auditioner()) { (*i)->set_listen (yn, this); } } @@ -150,7 +150,7 @@ void Session::rt_set_mute (boost::shared_ptr rl, bool yn, bool /*group_override*/) { for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) { - if (!(*i)->is_monitor() && !(*i)->is_hidden()) { + if (!(*i)->is_monitor() && !(*i)->is_auditioner()) { (*i)->set_mute (yn, this); } } @@ -168,7 +168,7 @@ void Session::rt_set_solo_isolated (boost::shared_ptr rl, bool yn, bool /*group_override*/) { for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) { - if (!(*i)->is_master() && !(*i)->is_monitor() && !(*i)->is_hidden()) { + if (!(*i)->is_master() && !(*i)->is_monitor() && !(*i)->is_auditioner()) { (*i)->set_solo_isolated (yn, this); } } @@ -191,7 +191,7 @@ Session::set_record_enabled (boost::shared_ptr rl, bool yn, SessionEv */ for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) { - if ((*i)->is_hidden()) { + if ((*i)->is_auditioner()) { continue; } @@ -209,7 +209,7 @@ void Session::rt_set_record_enabled (boost::shared_ptr rl, bool yn, bool group_override) { for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) { - if ((*i)->is_hidden()) { + if ((*i)->is_auditioner()) { continue; } diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 9885c15ffa..a713375755 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -1139,7 +1139,7 @@ Session::state (bool full_state) } for (RouteList::iterator i = public_order.begin(); i != public_order.end(); ++i) { - if (!(*i)->is_hidden()) { + if (!(*i)->is_auditioner()) { if (full_state) { child->add_child_nocopy ((*i)->get_state()); } else { diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index 31a4c14800..b98a044d89 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -491,7 +491,7 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished) boost::shared_ptr r = routes.reader (); for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if (!(*i)->is_hidden()) { + if (!(*i)->is_auditioner()) { (*i)->set_pending_declick (0); } } diff --git a/libs/ardour/test/load_session.cc b/libs/ardour/test/load_session.cc index 3c6bd9bb10..3f56e63577 100644 --- a/libs/ardour/test/load_session.cc +++ b/libs/ardour/test/load_session.cc @@ -10,6 +10,8 @@ using namespace std; using namespace ARDOUR; +static const char* localedir = LOCALEDIR; + int main (int argc, char* argv[]) { if (argc != 3) { @@ -17,7 +19,7 @@ int main (int argc, char* argv[]) exit (EXIT_FAILURE); } - ARDOUR::init (false, true); + ARDOUR::init (false, true, localedir); Session* s = 0; diff --git a/libs/ardour/test/profiling/load_session.cc b/libs/ardour/test/profiling/load_session.cc index 3c6bd9bb10..3f56e63577 100644 --- a/libs/ardour/test/profiling/load_session.cc +++ b/libs/ardour/test/profiling/load_session.cc @@ -10,6 +10,8 @@ using namespace std; using namespace ARDOUR; +static const char* localedir = LOCALEDIR; + int main (int argc, char* argv[]) { if (argc != 3) { @@ -17,7 +19,7 @@ int main (int argc, char* argv[]) exit (EXIT_FAILURE); } - ARDOUR::init (false, true); + ARDOUR::init (false, true, localedir); Session* s = 0; diff --git a/libs/ardour/test/profiling/lots_of_regions.cc b/libs/ardour/test/profiling/lots_of_regions.cc index 5c27e8425a..3a45d77067 100644 --- a/libs/ardour/test/profiling/lots_of_regions.cc +++ b/libs/ardour/test/profiling/lots_of_regions.cc @@ -10,10 +10,12 @@ using namespace std; using namespace ARDOUR; using namespace PBD; +static const char* localedir = LOCALEDIR; + int main (int argc, char* argv[]) { - ARDOUR::init (false, true); + ARDOUR::init (false, true, localedir); Session* session = load_session ("../libs/ardour/test/profiling/sessions/1region", "1region"); assert (session->get_routes()->size() == 2); diff --git a/libs/ardour/test/profiling/runpc.cc b/libs/ardour/test/profiling/runpc.cc index ef5d322df2..ddbd463234 100644 --- a/libs/ardour/test/profiling/runpc.cc +++ b/libs/ardour/test/profiling/runpc.cc @@ -11,6 +11,8 @@ using namespace std; using namespace PBD; using namespace ARDOUR; +static const char* localedir = LOCALEDIR; + int main (int argc, char* argv[]) { @@ -19,7 +21,7 @@ main (int argc, char* argv[]) exit (EXIT_FAILURE); } - ARDOUR::init (false, true); + ARDOUR::init (false, true, localedir); Session* session = load_session ( string_compose ("../libs/ardour/test/profiling/sessions/%1", argv[1]), diff --git a/libs/ardour/test/testrunner.cc b/libs/ardour/test/testrunner.cc index 2f932c62da..e72cb5c4fd 100644 --- a/libs/ardour/test/testrunner.cc +++ b/libs/ardour/test/testrunner.cc @@ -11,6 +11,8 @@ #include "pbd/debug.h" #include "ardour/ardour.h" +static const char* localedir = LOCALEDIR; + int main(int argc, char* argv[]) { @@ -45,7 +47,7 @@ main(int argc, char* argv[]) } } - ARDOUR::init (false, true); + ARDOUR::init (false, true, localedir); CppUnit::TestResult testresult; diff --git a/libs/ardour/wscript b/libs/ardour/wscript index b575dfd53f..c9c5089d46 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -475,10 +475,10 @@ def build(bld): # Tests that don't work # test/mantis_3356_test.cc - testobj.includes = obj.includes + ['test', '../pbd'] + testobj.includes = obj.includes + ['test', '../pbd', '../libltc', '../audiographer'] testobj.uselib = ['CPPUNIT','SIGCPP','JACK','GLIBMM','GTHREAD', 'SAMPLERATE','XML','LRDF','COREAUDIO'] - testobj.use = ['libpbd','libmidipp','libardour'] + testobj.use = ['libpbd','libmidipp','ardour','libltc','libaudiographer'] testobj.name = 'libardour-tests' testobj.target = 'run-tests' testobj.install_path = '' @@ -511,7 +511,7 @@ def build(bld): session_load_tester.includes.append ('test') session_load_tester.uselib = ['CPPUNIT','SIGCPP','JACK','GLIBMM','GTHREAD', 'SAMPLERATE','XML','LRDF','COREAUDIO'] - session_load_tester.use = ['libpbd','libmidipp','libardour'] + session_load_tester.use = ['libpbd','libmidipp','ardour'] session_load_tester.name = 'libardour-session-load-tester' session_load_tester.target = 'load-session' session_load_tester.install_path = '' @@ -546,7 +546,7 @@ def build(bld): profilingobj.includes.append ('test') profilingobj.uselib = ['CPPUNIT','SIGCPP','JACK','GLIBMM','GTHREAD', 'SAMPLERATE','XML','LRDF','COREAUDIO'] - profilingobj.use = ['libpbd','libmidipp','libardour'] + profilingobj.use = ['libpbd','libmidipp','ardour'] profilingobj.name = 'libardour-profiling' profilingobj.target = p profilingobj.install_path = '' diff --git a/libs/clearlooks-newer/animation.c b/libs/clearlooks-newer/animation.c index 24766aa907..2c6a6fdc42 100644 --- a/libs/clearlooks-newer/animation.c +++ b/libs/clearlooks-newer/animation.c @@ -63,7 +63,7 @@ force_widget_redraw (GtkWidget *widget) /* ensures that the timer is running */ static void -start_timer () +start_timer (void) { if (animation_timer_id == 0) animation_timer_id = g_timeout_add (ANIMATION_DELAY, animation_timeout_handler, NULL); @@ -71,7 +71,7 @@ start_timer () /* ensures that the timer is stopped */ static void -stop_timer () +stop_timer (void) { if (animation_timer_id != 0) { @@ -243,7 +243,7 @@ on_connected_widget_destruction (gpointer data, GObject *widget) } static void -disconnect_all_signals () +disconnect_all_signals (void) { GSList * item = connected_widgets; while (item != NULL) @@ -265,7 +265,7 @@ disconnect_all_signals () static gint find_signal_info (gconstpointer signal_info, gconstpointer widget) { - if (((SignalInfo*)signal_info)->widget == widget) + if (((const SignalInfo*)signal_info)->widget == widget) return 0; else return 1; @@ -325,7 +325,7 @@ clearlooks_animation_elapsed (gpointer data) /* cleans up all resources of the animation system */ void -clearlooks_animation_cleanup () +clearlooks_animation_cleanup (void) { disconnect_all_signals (); diff --git a/libs/clearlooks-newer/animation.h b/libs/clearlooks-newer/animation.h index da70b6ce66..dca70bc9a4 100644 --- a/libs/clearlooks-newer/animation.h +++ b/libs/clearlooks-newer/animation.h @@ -30,5 +30,5 @@ GE_INTERNAL void clearlooks_animation_progressbar_add (GtkWidget *progressba GE_INTERNAL void clearlooks_animation_connect_checkbox (GtkWidget *widget); GE_INTERNAL gboolean clearlooks_animation_is_animated (GtkWidget *widget); GE_INTERNAL gdouble clearlooks_animation_elapsed (gpointer data); -GE_INTERNAL void clearlooks_animation_cleanup (); +GE_INTERNAL void clearlooks_animation_cleanup (void); #endif /* HAVE_ANIMATION */ diff --git a/libs/clearlooks-newer/clearlooks_draw.c b/libs/clearlooks-newer/clearlooks_draw.c index 167c458dd9..e44610b4ee 100644 --- a/libs/clearlooks-newer/clearlooks_draw.c +++ b/libs/clearlooks-newer/clearlooks_draw.c @@ -1088,7 +1088,7 @@ clearlooks_draw_frame (cairo_t *cr, int x, int y, int width, int height) { const CairoColor *border = frame->border; - const CairoColor *dark = (CairoColor*)&colors->shade[4]; + const CairoColor *dark = (const CairoColor*)&colors->shade[4]; ClearlooksRectangle bevel_clip = {0, 0, 0, 0}; ClearlooksRectangle frame_clip = {0, 0, 0, 0}; double radius = MIN (params->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); @@ -1623,7 +1623,6 @@ clearlooks_draw_scrollbar_stepper (cairo_t *cr, CairoColor border; CairoColor s1, s2, s3, s4; cairo_pattern_t *pattern; - ShadowParameters shadow; double radius = MIN (widget->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); ge_shade_color(&colors->shade[6], 1.05, &border); @@ -1675,12 +1674,6 @@ clearlooks_draw_scrollbar_stepper (cairo_t *cr, cairo_stroke (cr); cairo_translate (cr, 0.5, 0.5); - shadow.shadow = CL_SHADOW_OUT; - shadow.corners = corners; - /* - clearlooks_draw_highlight_and_shade (cr, &shadow, - width, - height, params->radius);*/ } static void @@ -1892,17 +1885,14 @@ clearlooks_draw_handle (cairo_t *cr, { const CairoColor *fill = &colors->bg[params->state_type]; int num_bars = 6; /* shut up gcc warnings */ - int bar_spacing; switch (handle->type) { case CL_HANDLE_TOOLBAR: num_bars = 6; - bar_spacing = 3; break; case CL_HANDLE_SPLITTER: num_bars = 16; - bar_spacing = 3; break; } diff --git a/libs/clearlooks-newer/clearlooks_draw_glossy.c b/libs/clearlooks-newer/clearlooks_draw_glossy.c index 400851dfa1..62f17f3f95 100644 --- a/libs/clearlooks-newer/clearlooks_draw_glossy.c +++ b/libs/clearlooks-newer/clearlooks_draw_glossy.c @@ -688,7 +688,6 @@ clearlooks_glossy_draw_tab (cairo_t *cr, cairo_pattern_t *pattern; double radius; - double strip_size; radius = MIN (params->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); @@ -707,7 +706,6 @@ clearlooks_glossy_draw_tab (cairo_t *cr, if (tab->gap_side == CL_GAP_TOP || tab->gap_side == CL_GAP_BOTTOM) { height += 3.0; - strip_size = 2.0/height; /* 2 pixel high strip */ if (tab->gap_side == CL_GAP_TOP) cairo_translate (cr, 0.0, -3.0); /* gap at the other side */ @@ -715,7 +713,6 @@ clearlooks_glossy_draw_tab (cairo_t *cr, else { width += 3.0; - strip_size = 2.0/width; if (tab->gap_side == CL_GAP_LEFT) cairo_translate (cr, -3.0, 0.0); /* gap at the other side */ @@ -893,7 +890,6 @@ clearlooks_glossy_draw_scrollbar_stepper (cairo_t *cr, const CairoColor *border = &colors->shade[7]; CairoColor fill, s1, s2, s4; cairo_pattern_t *pattern; - ShadowParameters shadow; double radius = MIN (widget->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); if (scrollbar->horizontal) @@ -944,8 +940,6 @@ clearlooks_glossy_draw_scrollbar_stepper (cairo_t *cr, cairo_stroke (cr); cairo_translate (cr, 0.5, 0.5); - shadow.shadow = CL_SHADOW_OUT; - shadow.corners = corners; } static void diff --git a/libs/clearlooks-newer/clearlooks_draw_gummy.c b/libs/clearlooks-newer/clearlooks_draw_gummy.c index b57cf24fdf..0d736b5acc 100644 --- a/libs/clearlooks-newer/clearlooks_draw_gummy.c +++ b/libs/clearlooks-newer/clearlooks_draw_gummy.c @@ -665,7 +665,6 @@ clearlooks_gummy_draw_tab (cairo_t *cr, cairo_pattern_t *pattern; double radius; - double strip_size; radius = MIN (params->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); @@ -683,7 +682,6 @@ clearlooks_gummy_draw_tab (cairo_t *cr, if (tab->gap_side == CL_GAP_TOP || tab->gap_side == CL_GAP_BOTTOM) { height += 3.0; - strip_size = 2.0/height; /* 2 pixel high strip */ if (tab->gap_side == CL_GAP_TOP) cairo_translate (cr, 0.0, -3.0); /* gap at the other side */ @@ -691,7 +689,6 @@ clearlooks_gummy_draw_tab (cairo_t *cr, else { width += 3.0; - strip_size = 2.0/width; if (tab->gap_side == CL_GAP_LEFT) cairo_translate (cr, -3.0, 0.0); /* gap at the other side */ @@ -927,7 +924,6 @@ clearlooks_gummy_draw_scrollbar_stepper (cairo_t *cr, CairoColor fill; CairoColor shade1, shade2, shade3; cairo_pattern_t *pattern; - ShadowParameters shadow; double radius = MIN (widget->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); if (scrollbar->horizontal) @@ -977,8 +973,6 @@ clearlooks_gummy_draw_scrollbar_stepper (cairo_t *cr, cairo_stroke (cr); cairo_translate (cr, 0.5, 0.5); - shadow.shadow = CL_SHADOW_OUT; - shadow.corners = corners; } static void diff --git a/libs/clearlooks-newer/clearlooks_draw_inverted.c b/libs/clearlooks-newer/clearlooks_draw_inverted.c index 2e8ee3bcd7..017c39d714 100644 --- a/libs/clearlooks-newer/clearlooks_draw_inverted.c +++ b/libs/clearlooks-newer/clearlooks_draw_inverted.c @@ -394,7 +394,7 @@ clearlooks_inverted_draw_menubaritem (cairo_t *cr, const WidgetParameters *widget, int x, int y, int width, int height) { - CairoColor *fill = (CairoColor*)&colors->spot[1]; + const CairoColor *fill = &colors->spot[1]; CairoColor fill_shade; CairoColor border = colors->spot[2]; cairo_pattern_t *pattern; @@ -481,19 +481,6 @@ clearlooks_inverted_draw_tab (cairo_t *cr, ge_shade_color (fill, 1.3, &hilight); - /* Draw highlight */ - if (!params->active) - { - ShadowParameters shadow; - - shadow.shadow = CL_SHADOW_OUT; - shadow.corners = params->corners; - /* - clearlooks_draw_highlight_and_shade (cr, colors, &shadow, - width, - height, radius);*/ - } - if (params->active) { pattern = cairo_pattern_create_linear ( tab->gap_side == CL_GAP_LEFT ? width-1 : 0, @@ -761,7 +748,6 @@ clearlooks_inverted_draw_scrollbar_stepper (cairo_t *cr, CairoColor border; CairoColor s1, s2, s3; cairo_pattern_t *pattern; - ShadowParameters shadow; double radius = MIN (widget->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0)); ge_shade_color(&colors->shade[6], 1.05, &border); @@ -808,12 +794,6 @@ clearlooks_inverted_draw_scrollbar_stepper (cairo_t *cr, cairo_stroke (cr); cairo_translate (cr, 0.5, 0.5); - shadow.shadow = CL_SHADOW_OUT; - shadow.corners = corners; - /* - clearlooks_draw_highlight_and_shade (cr, &shadow, - width, - height, params->radius);*/ } static void diff --git a/libs/clearlooks-newer/clearlooks_style.c b/libs/clearlooks-newer/clearlooks_style.c index eafb2d2ec1..f1b46a5426 100644 --- a/libs/clearlooks-newer/clearlooks_style.c +++ b/libs/clearlooks-newer/clearlooks_style.c @@ -536,7 +536,6 @@ clearlooks_style_draw_box (DRAW_ARGS) else if (DETAIL ("button") || DETAIL ("buttondefault")) { WidgetParameters params; - ShadowParameters shadow = { CR_CORNER_ALL, CL_SHADOW_NONE } ; clearlooks_set_widget_parameters (widget, style, state_type, ¶ms); if (ge_is_in_combo_box(widget)) @@ -545,23 +544,21 @@ clearlooks_style_draw_box (DRAW_ARGS) params.corners = CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT; else params.corners = CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT; - - shadow.shadow = CL_SHADOW_IN; if (params.xthickness > 2) { if (params.ltr) x--; width++; - } + } } else { params.corners = CR_CORNER_ALL; /* if (!(ge_is_combo_box (widget, FALSE))) */ params.enable_glow = TRUE; - } - + } + if (GE_IS_TOGGLE_BUTTON (widget) && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) params.active = TRUE; diff --git a/libs/gtkmm2ext/barcontroller.cc b/libs/gtkmm2ext/barcontroller.cc index 3afd0a98b9..50c21e57e7 100644 --- a/libs/gtkmm2ext/barcontroller.cc +++ b/libs/gtkmm2ext/barcontroller.cc @@ -313,7 +313,7 @@ BarController::expose (GdkEventExpose* /*event*/) Gdk::Color c; Widget* parent; - gint x1=0, x2=0, y1=0, y2=0; + gint x1=0, x2=0, y2=0; gint w, h; double fract, radius; float r, g, b; @@ -327,7 +327,6 @@ BarController::expose (GdkEventExpose* /*event*/) h = darea.get_height(); x1 = (gint) floor (w * fract); x2 = x1; - y1 = 0; y2 = h - 1; if (use_parent) { diff --git a/libs/gtkmm2ext/gtkapplication_x11.c b/libs/gtkmm2ext/gtkapplication_x11.c index 8ab590fb54..78d538b334 100644 --- a/libs/gtkmm2ext/gtkapplication_x11.c +++ b/libs/gtkmm2ext/gtkapplication_x11.c @@ -24,12 +24,12 @@ #include int -gtk_application_init () +gtk_application_init (void) { return 0; } -void gtk_application_cleanup () +void gtk_application_cleanup (void) { } @@ -44,6 +44,6 @@ gtk_application_add_app_menu_item (GtkApplicationMenuGroup* group, GtkMenuItem* } void -gtk_application_ready () +gtk_application_ready (void) { } diff --git a/libs/gtkmm2ext/gtkmm2ext/gtkapplication.h b/libs/gtkmm2ext/gtkmm2ext/gtkapplication.h index 68b7bd7a9f..d0d5b55557 100644 --- a/libs/gtkmm2ext/gtkmm2ext/gtkapplication.h +++ b/libs/gtkmm2ext/gtkmm2ext/gtkapplication.h @@ -30,9 +30,9 @@ G_BEGIN_DECLS typedef struct _GtkApplicationMenuGroup GtkApplicationMenuGroup; -int gtk_application_init (); -void gtk_application_ready (); -void gtk_application_cleanup (); +int gtk_application_init (void); +void gtk_application_ready (void); +void gtk_application_cleanup (void); void gtk_application_set_menu_bar (GtkMenuShell *menu_shell); GtkApplicationMenuGroup * gtk_application_add_app_menu_group (void); diff --git a/libs/gtkmm2ext/prolooks_helpers.c b/libs/gtkmm2ext/prolooks_helpers.c index 511c15eee3..d93be2d158 100644 --- a/libs/gtkmm2ext/prolooks_helpers.c +++ b/libs/gtkmm2ext/prolooks_helpers.c @@ -534,12 +534,8 @@ CairoColor* prolooks_hsl_to_cairo_color (ProlooksHSL* self) { CairoColor* result = NULL; gint i = 0; double* _tmp0_; - gint _hue_shift_size_; - gint hue_shift_length1; double* hue_shift; double* _tmp1_; - gint _color_shift_size_; - gint color_shift_length1; double* color_shift; double m1 = 0.0; double m2 = 0.0; @@ -547,8 +543,8 @@ CairoColor* prolooks_hsl_to_cairo_color (ProlooksHSL* self) { gint _tmp2_ = 0; CairoColor* color; g_return_val_if_fail (self != NULL, NULL); - hue_shift = (_tmp0_ = g_new0 (double, 3), hue_shift_length1 = 3, _hue_shift_size_ = hue_shift_length1, _tmp0_); - color_shift = (_tmp1_ = g_new0 (double, 3), color_shift_length1 = 3, _color_shift_size_ = color_shift_length1, _tmp1_); + hue_shift = (_tmp0_ = g_new0 (double, 3), _tmp0_); + color_shift = (_tmp1_ = g_new0 (double, 3), _tmp1_); if (self->priv->_lightness <= 0.5) { m2 = self->priv->_lightness * (1 + self->priv->_saturation); } else { @@ -944,7 +940,6 @@ CairoColor* prolooks_hsv_to_cairo_color (ProlooksHSV* self) { double r; double g; double b; - double v; gint hi = 0; double f = 0.0; double p = 0.0; @@ -955,7 +950,6 @@ CairoColor* prolooks_hsv_to_cairo_color (ProlooksHSV* self) { r = 0.0; g = 0.0; b = 0.0; - v = self->priv->_value; hi = (gint) prolooks_modula (floor (self->priv->_hue / 60.0), (double) 6); f = (self->priv->_hue / 60.0) - floor (self->priv->_hue / 60.0); p = self->priv->_value * (1.0 - self->priv->_saturation); @@ -1330,15 +1324,13 @@ void prolooks_shade_color (const GdkColor* orig, double shade_ratio, GdkColor* r GdkPixbuf* prolooks_cairo_image_surface_to_pixbuf (cairo_surface_t* surface) { GdkPixbuf* result = NULL; guchar* _tmp0_; - gint _knob_data_size_; - gint knob_data_length1; guchar* knob_data; g_return_val_if_fail (surface != NULL, NULL); if (cairo_image_surface_get_format (surface) != CAIRO_FORMAT_ARGB32) { result = NULL; return result; } - knob_data = (_tmp0_ = cairo_image_surface_get_data (surface), knob_data_length1 = -1, _knob_data_size_ = knob_data_length1, _tmp0_); + knob_data = (_tmp0_ = cairo_image_surface_get_data (surface), _tmp0_); { gint i; i = 0; diff --git a/libs/pbd/file_utils.cc b/libs/pbd/file_utils.cc index 7c3dffe71f..bb290fa6aa 100644 --- a/libs/pbd/file_utils.cc +++ b/libs/pbd/file_utils.cc @@ -18,6 +18,7 @@ */ #include +#include #include #include @@ -32,6 +33,7 @@ #include "pbd/file_utils.h" #include "pbd/error.h" #include "pbd/pathscanner.h" +#include "pbd/stl_delete.h" #include "i18n.h" @@ -165,10 +167,14 @@ copy_files(const std::string & from_path, const std::string & to_dir) { PathScanner scanner; vector* files = scanner (from_path, accept_all_files, 0, true, false); - for (vector::iterator i = files->begin(); i != files->end(); ++i) { - std::string from = Glib::build_filename (from_path, **i); - std::string to = Glib::build_filename (to_dir, **i); - copy_file (from, to); + + if (files) { + for (vector::iterator i = files->begin(); i != files->end(); ++i) { + std::string from = Glib::build_filename (from_path, **i); + std::string to = Glib::build_filename (to_dir, **i); + copy_file (from, to); + } + vector_delete (files); } } diff --git a/libs/pbd/pbd/fastlog.h b/libs/pbd/pbd/fastlog.h index 4269705a44..9897da773a 100644 --- a/libs/pbd/pbd/fastlog.h +++ b/libs/pbd/pbd/fastlog.h @@ -35,6 +35,6 @@ static inline float fast_log10 (const float val) return fast_log2(val) / 3.312500f; } -static inline float minus_infinity() { return -HUGE_VAL; } +static inline float minus_infinity(void) { return -HUGE_VAL; } #endif /* __pbd_fastlog_h__ */ diff --git a/libs/pbd/xml++.cc b/libs/pbd/xml++.cc index 6554bed9ee..a1fa77db66 100644 --- a/libs/pbd/xml++.cc +++ b/libs/pbd/xml++.cc @@ -11,7 +11,7 @@ #include #include -#define XML_VERSION "1.0" +xmlChar* xml_version = xmlCharStrdup("1.0"); using namespace std; @@ -151,7 +151,7 @@ XMLTree::write() const int result; xmlKeepBlanksDefault(0); - doc = xmlNewDoc((xmlChar*) XML_VERSION); + doc = xmlNewDoc(xml_version); xmlSetDocCompressMode(doc, _compression); writenode(doc, _root, doc->children, 1); result = xmlSaveFormatFileEnc(_filename.c_str(), doc, "UTF-8", 1); @@ -171,7 +171,7 @@ XMLTree::debug(FILE* out) const XMLNodeList children; xmlKeepBlanksDefault(0); - doc = xmlNewDoc((xmlChar*) XML_VERSION); + doc = xmlNewDoc(xml_version); xmlSetDocCompressMode(doc, _compression); writenode(doc, _root, doc->children, 1); xmlDebugDumpDocument (out, doc); @@ -188,7 +188,7 @@ XMLTree::write_buffer() const XMLNodeList children; xmlKeepBlanksDefault(0); - doc = xmlNewDoc((xmlChar*) XML_VERSION); + doc = xmlNewDoc(xml_version); xmlSetDocCompressMode(doc, _compression); writenode(doc, _root, doc->children, 1); xmlDocDumpMemory(doc, (xmlChar **) & ptr, &len); @@ -358,7 +358,7 @@ XMLTree::find(const string xpath, XMLNode* node) const xmlDocPtr doc = 0; if (node) { - doc = xmlNewDoc((xmlChar*) XML_VERSION); + doc = xmlNewDoc(xml_version); writenode(doc, node, doc->children, 1); ctxt = xmlXPathNewContext(doc); } else { @@ -556,7 +556,7 @@ readnode(xmlNodePtr node) xmlAttrPtr attr; if (node->name) { - name = (char*)node->name; + name = (const char*)node->name; } tmp = new XMLNode(name); @@ -566,7 +566,7 @@ readnode(xmlNodePtr node) if (attr->children) { content = (char*)attr->children->content; } - tmp->add_property((char*)attr->name, content); + tmp->add_property((const char*)attr->name, content); } if (node->content) { @@ -592,9 +592,9 @@ writenode(xmlDocPtr doc, XMLNode* n, xmlNodePtr p, int root = 0) xmlNodePtr node; if (root) { - node = doc->children = xmlNewDocNode(doc, 0, (xmlChar*) n->name().c_str(), 0); + node = doc->children = xmlNewDocNode(doc, 0, (const xmlChar*) n->name().c_str(), 0); } else { - node = xmlNewChild(p, 0, (xmlChar*) n->name().c_str(), 0); + node = xmlNewChild(p, 0, (const xmlChar*) n->name().c_str(), 0); } if (n->is_content()) { @@ -604,7 +604,7 @@ writenode(xmlDocPtr doc, XMLNode* n, xmlNodePtr p, int root = 0) props = n->properties(); for (curprop = props.begin(); curprop != props.end(); ++curprop) { - xmlSetProp(node, (xmlChar*) (*curprop)->name().c_str(), (xmlChar*) (*curprop)->value().c_str()); + xmlSetProp(node, (const xmlChar*) (*curprop)->name().c_str(), (const xmlChar*) (*curprop)->value().c_str()); } children = n->children(); diff --git a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc index deb19e0103..b524e2f2a0 100644 --- a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc +++ b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc @@ -528,41 +528,39 @@ GenericMidiControlProtocol::set_state (const XMLNode& node, int version) pending_controllables.clear (); } + /* Load up specific bindings from the + * ... section + */ + { Glib::Threads::Mutex::Lock lm2 (controllables_lock); controllables.clear (); nlist = node.children(); // "Controls" - if (nlist.empty()) { - return 0; - } + if (!nlist.empty()) { + nlist = nlist.front()->children(); // "MIDIControllable" ... - nlist = nlist.front()->children(); // "MIDIControllable" ... - - if (nlist.empty()) { - return 0; - } - - for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - - - - if ((prop = (*niter)->property ("id")) != 0) { - - ID id = prop->value (); - Controllable* c = Controllable::by_id (id); - - if (c) { - MIDIControllable* mc = new MIDIControllable (this, *_input_port, *c, false); - - if (mc->set_state (**niter, version) == 0) { - controllables.push_back (mc); - } + if (!nlist.empty()) { + for (niter = nlist.begin(); niter != nlist.end(); ++niter) { - } else { - warning << string_compose ( - _("Generic MIDI control: controllable %1 not found in session (ignored)"), - id) << endmsg; + if ((prop = (*niter)->property ("id")) != 0) { + + ID id = prop->value (); + Controllable* c = Controllable::by_id (id); + + if (c) { + MIDIControllable* mc = new MIDIControllable (this, *_input_port, *c, false); + + if (mc->set_state (**niter, version) == 0) { + controllables.push_back (mc); + } + + } else { + warning << string_compose ( + _("Generic MIDI control: controllable %1 not found in session (ignored)"), + id) << endmsg; + } + } } } } diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index 9749383ab6..cfa6524f70 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -261,7 +261,7 @@ MackieControlProtocol::get_sorted_routes() continue; } - if (route->is_hidden() || route->is_master() || route->is_monitor()) { + if (route->is_auditioner() || route->is_master() || route->is_monitor()) { continue; } diff --git a/libs/surfaces/mackie/strip.h b/libs/surfaces/mackie/strip.h index d5fdc6c17c..225783d0fe 100644 --- a/libs/surfaces/mackie/strip.h +++ b/libs/surfaces/mackie/strip.h @@ -33,15 +33,9 @@ class Fader; class Meter; class SurfacePort; -struct StripControlDefinition { - const char* name; - uint32_t base_id; - Control* (*factory)(Surface&, int index, const char* name, Group&); -}; - struct GlobalControlDefinition { const char* name; - uint32_t id; + int id; Control* (*factory)(Surface&, int index, const char* name, Group&); const char* group_name; }; diff --git a/templates/16 Tracks/16 Tracks.template.in b/templates/16 Tracks/16 Tracks.template.in deleted file mode 100644 index 2b157dcb42..0000000000 --- a/templates/16 Tracks/16 Tracks.template.in +++ /dev/null @@ -1,617 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/2 Track/2 Track.template.in b/templates/2 Track/2 Track.template.in deleted file mode 100644 index bdf60c7f35..0000000000 --- a/templates/2 Track/2 Track.template.in +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/32 Tracks/32 Tracks.template.in b/templates/32 Tracks/32 Tracks.template.in deleted file mode 100644 index 5d7740bcd9..0000000000 --- a/templates/32 Tracks/32 Tracks.template.in +++ /dev/null @@ -1,881 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/4 Tracks/4 Tracks.template.in b/templates/4 Tracks/4 Tracks.template.in deleted file mode 100644 index c64d098ed9..0000000000 --- a/templates/4 Tracks/4 Tracks.template.in +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/8 Tracks/8 Tracks.template.in b/templates/8 Tracks/8 Tracks.template.in deleted file mode 100644 index fe0dd6f009..0000000000 --- a/templates/8 Tracks/8 Tracks.template.in +++ /dev/null @@ -1,353 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/wscript b/templates/wscript index dd60d401a5..8dff100d1a 100644 --- a/templates/wscript +++ b/templates/wscript @@ -1,5 +1,22 @@ #!/usr/bin/python +# +# Paul notes (April 2013) +# +# There seems to be little point in including templates with Ardour +# until or as long as the input connections of tracks depends on +# the user's hardware configuration. This makes any pre-existing +# templates potentially wrong/useless/annoying for anyone who +# uses a different hardware input configuration than was used +# to create the templates. +# +# Templates should be created by the user, not by us. +# +# I modified the code below, but have not tested it. For now +# this directory will be removed from the top level wscript's +# list of children. +# + import os top = '.' @@ -10,21 +27,15 @@ def configure(conf): def build(bld): - if bld.is_defined('COREAUDIO_SUPPORT'): - subst_dict = {'JACK_INPUT': 'coreaudio:Built-in Audio:in', 'JACK_OUTPUT': 'coreaudio:Built-in Audio:out'} - else: - subst_dict = {'JACK_INPUT': 'system:playback_','JACK_OUTPUT': 'system:capture_'} - - templates = bld.path.ant_glob('*/*.template.in') + templates = bld.path.ant_glob('*/*.template') for t in templates: - dir_name = os.path.basename(t.srcpath()).replace('.template.in', '') - file_name = os.path.basename(t.srcpath()).replace('.in', '') + file_name = os.path.basename(t.srcpath()) + dir_name = os.path.dirname(t.srcpath()) obj = bld(features = 'subst', name = 'template', source = [ t ], target = [ os.path.join(dir_name, file_name) ], install_path = os.path.join(bld.env['DATADIR'], 'ardour3', os.path.join('templates', dir_name))) - obj.__dict__.update(subst_dict) def options(opt): pass diff --git a/tools/linux_packaging/build b/tools/linux_packaging/build index 3962ce65cd..1928fadd8f 100755 --- a/tools/linux_packaging/build +++ b/tools/linux_packaging/build @@ -16,7 +16,7 @@ BUILD_ROOT=../../build MIXBUS= WITH_LADSPA=0 -WITH_HARVID=0 +WITH_HARVID= STRIP=all PRINT_SYSDEPS= WITH_NLS= @@ -192,7 +192,6 @@ mkdir -p $MackieControl mkdir -p $ExportFormats mkdir -p $Panners mkdir -p $Templates -mkdir -p $Shared/templates mkdir -p $Shared/doc # maybe set variables @@ -363,11 +362,11 @@ for x in $BUILD_ROOT/../mcp/*.device $BUILD_ROOT/../mcp/*.profile ; do done # Templates -for f in $BUILD_ROOT/../templates/* ; do - if [ -d "$f" ] ; then - echo Template: $f ; cp -r "$f" $Templates ; - fi -done +#for f in $BUILD_ROOT/../templates/* ; do +# if [ -d "$f" ] ; then +# echo Template: $f ; cp -r "$f" $Templates ; +# fi +#done # ExportFormats # got to be careful with names here @@ -532,7 +531,7 @@ done if test x$WITH_HARVID != x ; then cd $APPBIN HARVID_VERSION="v0.7.0" # todo make 'latest' symlink on github work somehow. - curl http://x42.github.com/harvid/releases/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz \ + curl -L http://x42.github.com/harvid/releases/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz \ | tar -x -z --exclude=README --exclude=harvid.1 --strip-components=1 || exit 1 cd - fi diff --git a/tools/osx_packaging/osx_build b/tools/osx_packaging/osx_build index bd504a5579..d750674d36 100755 --- a/tools/osx_packaging/osx_build +++ b/tools/osx_packaging/osx_build @@ -126,7 +126,6 @@ mkdir -p $MidiMaps mkdir -p $ExportFormats mkdir -p $Templates mkdir -p $Frameworks/modules -mkdir -p $Shared/templates mkdir -p $Etc mkdir -p $MackieControl @@ -306,11 +305,11 @@ for f in $BUILD_ROOT/../export/*.preset $BUILD_ROOT/../export/*.format ; do done # Session and Route templates -for f in $BUILD_ROOT/../templates/* ; do - if [ -d "$f" ] ; then - cp -r "$f" $Templates ; - fi -done +#for f in $BUILD_ROOT/../templates/* ; do +# if [ -d "$f" ] ; then +# cp -r "$f" $Templates ; +# fi +#done # MidiMaps # got to be careful with names here diff --git a/wscript b/wscript index a8c2bb753c..f49ce3a11f 100644 --- a/wscript +++ b/wscript @@ -43,7 +43,6 @@ children = [ 'libs/audiographer', 'libs/canvas', 'gtk2_ardour', - 'templates', 'export', 'midi_maps', 'mcp', @@ -610,6 +609,7 @@ def configure(conf): autowaf.check_pkg(conf, 'sndfile', uselib_store='SNDFILE', atleast_version='1.0.18') autowaf.check_pkg(conf, 'giomm-2.4', uselib_store='GIOMM', atleast_version='2.2') autowaf.check_pkg(conf, 'libcurl', uselib_store='CURL', atleast_version='7.0.0') + autowaf.check_pkg(conf, 'liblo', uselib_store='LO', atleast_version='0.26') conf.check_cc(function_name='dlopen', header_name='dlfcn.h', lib='dl', uselib_store='DL')