Fix a bunch of warnings.
Clean up. git-svn-id: svn://localhost/ardour2/branches/3.0@4668 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
3bc71af0ca
commit
03536cd399
|
@ -45,82 +45,81 @@
|
||||||
|
|
||||||
class AnalysisWindow : public Gtk::Window
|
class AnalysisWindow : public Gtk::Window
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AnalysisWindow ();
|
AnalysisWindow ();
|
||||||
~AnalysisWindow ();
|
~AnalysisWindow ();
|
||||||
|
|
||||||
void set_rangemode();
|
void set_rangemode();
|
||||||
void set_regionmode();
|
void set_regionmode();
|
||||||
|
|
||||||
void track_list_row_changed(const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter);
|
|
||||||
|
|
||||||
void analyze ();
|
void track_list_row_changed(const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter);
|
||||||
|
|
||||||
const void set_session(ARDOUR::Session *session) { _session = session; };
|
void analyze ();
|
||||||
|
|
||||||
private:
|
void set_session(ARDOUR::Session *session) { _session = session; };
|
||||||
|
|
||||||
ARDOUR::Session *_session;
|
|
||||||
|
|
||||||
void clear_tracklist();
|
private:
|
||||||
|
|
||||||
void source_selection_changed (Gtk::RadioButton *);
|
ARDOUR::Session *_session;
|
||||||
void display_model_changed (Gtk::RadioButton *);
|
|
||||||
void show_minmax_changed ();
|
|
||||||
void show_normalized_changed ();
|
|
||||||
|
|
||||||
void analyze_data (Gtk::Button *);
|
void clear_tracklist();
|
||||||
|
|
||||||
struct TrackListColumns : public Gtk::TreeModel::ColumnRecord {
|
void source_selection_changed (Gtk::RadioButton *);
|
||||||
public:
|
void display_model_changed (Gtk::RadioButton *);
|
||||||
TrackListColumns () {
|
void show_minmax_changed ();
|
||||||
add (trackname);
|
void show_normalized_changed ();
|
||||||
|
|
||||||
|
void analyze_data (Gtk::Button *);
|
||||||
|
|
||||||
|
struct TrackListColumns : public Gtk::TreeModel::ColumnRecord {
|
||||||
|
public:
|
||||||
|
TrackListColumns () {
|
||||||
|
add (trackname);
|
||||||
add (visible);
|
add (visible);
|
||||||
add (color);
|
add (color);
|
||||||
add (graph);
|
add (graph);
|
||||||
}
|
}
|
||||||
Gtk::TreeModelColumn<std::string> trackname;
|
Gtk::TreeModelColumn<std::string> trackname;
|
||||||
Gtk::TreeModelColumn<bool> visible;
|
Gtk::TreeModelColumn<bool> visible;
|
||||||
Gtk::TreeModelColumn<Gdk::Color> color;
|
Gtk::TreeModelColumn<Gdk::Color> color;
|
||||||
Gtk::TreeModelColumn<FFTResult *> graph;
|
Gtk::TreeModelColumn<FFTResult *> graph;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Packing essentials
|
// Packing essentials
|
||||||
Gtk::HBox hbox;
|
Gtk::HBox hbox;
|
||||||
Gtk::VBox vbox;
|
Gtk::VBox vbox;
|
||||||
|
|
||||||
// Left side
|
// Left side
|
||||||
Glib::RefPtr<Gtk::ListStore> tlmodel;
|
Glib::RefPtr<Gtk::ListStore> tlmodel;
|
||||||
TrackListColumns tlcols;
|
TrackListColumns tlcols;
|
||||||
Gtk::TreeView track_list;
|
Gtk::TreeView track_list;
|
||||||
|
|
||||||
Gtk::Label source_selection_label;
|
Gtk::Label source_selection_label;
|
||||||
|
|
||||||
|
|
||||||
Gtk::RadioButton source_selection_ranges_rb;
|
Gtk::RadioButton source_selection_ranges_rb;
|
||||||
Gtk::RadioButton source_selection_regions_rb;
|
Gtk::RadioButton source_selection_regions_rb;
|
||||||
|
|
||||||
Gtk::HSeparator hseparator1;
|
Gtk::HSeparator hseparator1;
|
||||||
|
|
||||||
Gtk::Label display_model_label;
|
Gtk::Label display_model_label;
|
||||||
Gtk::RadioButton display_model_composite_separate_rb;
|
Gtk::RadioButton display_model_composite_separate_rb;
|
||||||
Gtk::RadioButton display_model_composite_all_tracks_rb;
|
Gtk::RadioButton display_model_composite_all_tracks_rb;
|
||||||
|
|
||||||
Gtk::Button refresh_button;
|
Gtk::Button refresh_button;
|
||||||
|
|
||||||
|
|
||||||
Gtk::CheckButton show_minmax_button;
|
Gtk::CheckButton show_minmax_button;
|
||||||
Gtk::CheckButton show_normalized_button;
|
Gtk::CheckButton show_normalized_button;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// The graph
|
|
||||||
FFTGraph fft_graph;
|
|
||||||
|
|
||||||
bool track_list_ready;
|
// The graph
|
||||||
Glib::Mutex track_list_lock;
|
FFTGraph fft_graph;
|
||||||
|
|
||||||
friend class FFTGraph;
|
bool track_list_ready;
|
||||||
|
Glib::Mutex track_list_lock;
|
||||||
|
|
||||||
|
friend class FFTGraph;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __ardour_analysis_window_h
|
#endif // __ardour_analysis_window_h
|
||||||
|
|
|
@ -99,7 +99,8 @@ AudioRegionView::AudioRegionView (ArdourCanvas::Group *parent, RouteTimeAxisView
|
||||||
|
|
||||||
|
|
||||||
AudioRegionView::AudioRegionView (const AudioRegionView& other)
|
AudioRegionView::AudioRegionView (const AudioRegionView& other)
|
||||||
: RegionView (other)
|
: sigc::trackable(other)
|
||||||
|
, RegionView (other)
|
||||||
, zero_line(0)
|
, zero_line(0)
|
||||||
, fade_in_shape(0)
|
, fade_in_shape(0)
|
||||||
, fade_out_shape(0)
|
, fade_out_shape(0)
|
||||||
|
|
|
@ -733,7 +733,7 @@ AutomationTimeAxisView::paste_one (AutomationLine& line, nframes_t pos, float ti
|
||||||
AutomationSelection::iterator p;
|
AutomationSelection::iterator p;
|
||||||
boost::shared_ptr<AutomationList> alist(line.the_list());
|
boost::shared_ptr<AutomationList> alist(line.the_list());
|
||||||
|
|
||||||
for (p = selection.lines.begin(); p != selection.lines.end() && nth; ++p, --nth);
|
for (p = selection.lines.begin(); p != selection.lines.end() && nth; ++p, --nth) {}
|
||||||
|
|
||||||
if (p == selection.lines.end()) {
|
if (p == selection.lines.end()) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -49,7 +49,7 @@ namespace Canvas {
|
||||||
*
|
*
|
||||||
* A newer, better canvas should remove the need for all the ugly here.
|
* A newer, better canvas should remove the need for all the ugly here.
|
||||||
*/
|
*/
|
||||||
class CanvasNoteEvent : public sigc::trackable, public InteractiveItem {
|
class CanvasNoteEvent : virtual public sigc::trackable, public InteractiveItem {
|
||||||
public:
|
public:
|
||||||
typedef Evoral::Note<double> NoteType;
|
typedef Evoral::Note<double> NoteType;
|
||||||
CanvasNoteEvent(
|
CanvasNoteEvent(
|
||||||
|
|
|
@ -919,61 +919,62 @@ gnome_canvas_waveview_set_property (GObject *object,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gnome_canvas_waveview_get_property (GObject *object,
|
gnome_canvas_waveview_get_property (
|
||||||
guint prop_id,
|
GObject *object,
|
||||||
GValue *value,
|
guint prop_id,
|
||||||
GParamSpec *pspec)
|
GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
g_return_if_fail (object != NULL);
|
g_return_if_fail (object != NULL);
|
||||||
g_return_if_fail (GNOME_IS_CANVAS_WAVEVIEW (object));
|
g_return_if_fail (GNOME_IS_CANVAS_WAVEVIEW (object));
|
||||||
|
|
||||||
GnomeCanvasWaveView *waveview = GNOME_CANVAS_WAVEVIEW (object);
|
GnomeCanvasWaveView *waveview = GNOME_CANVAS_WAVEVIEW (object);
|
||||||
|
|
||||||
switch (prop_id) {
|
switch (prop_id) {
|
||||||
case PROP_DATA_SRC:
|
case PROP_DATA_SRC:
|
||||||
g_value_set_pointer(value, waveview->data_src);
|
g_value_set_pointer(value, waveview->data_src);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_CHANNEL:
|
case PROP_CHANNEL:
|
||||||
g_value_set_uint(value, waveview->channel);
|
g_value_set_uint(value, waveview->channel);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_LENGTH_FUNCTION:
|
case PROP_LENGTH_FUNCTION:
|
||||||
g_value_set_pointer(value, waveview->length_function);
|
g_value_set_pointer(value, waveview->length_function);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_SOURCEFILE_LENGTH_FUNCTION:
|
case PROP_SOURCEFILE_LENGTH_FUNCTION:
|
||||||
g_value_set_pointer(value, waveview->sourcefile_length_function);
|
g_value_set_pointer(value, waveview->sourcefile_length_function);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_PEAK_FUNCTION:
|
case PROP_PEAK_FUNCTION:
|
||||||
g_value_set_pointer(value, waveview->peak_function);
|
g_value_set_pointer(value, waveview->peak_function);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_GAIN_FUNCTION:
|
case PROP_GAIN_FUNCTION:
|
||||||
g_value_set_pointer(value, waveview->gain_curve_function);
|
g_value_set_pointer(value, waveview->gain_curve_function);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_GAIN_SRC:
|
case PROP_GAIN_SRC:
|
||||||
g_value_set_pointer(value, waveview->gain_src);
|
g_value_set_pointer(value, waveview->gain_src);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_CACHE:
|
case PROP_CACHE:
|
||||||
g_value_set_pointer(value, waveview->cache);
|
g_value_set_pointer(value, waveview->cache);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_CACHE_UPDATER:
|
case PROP_CACHE_UPDATER:
|
||||||
g_value_set_boolean(value, waveview->cache_updater);
|
g_value_set_boolean(value, waveview->cache_updater);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_SAMPLES_PER_UNIT:
|
case PROP_SAMPLES_PER_UNIT:
|
||||||
g_value_set_double(value, waveview->samples_per_unit);
|
g_value_set_double(value, waveview->samples_per_unit);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_AMPLITUDE_ABOVE_AXIS:
|
case PROP_AMPLITUDE_ABOVE_AXIS:
|
||||||
g_value_set_double(value, waveview->amplitude_above_axis);
|
g_value_set_double(value, waveview->amplitude_above_axis);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_X:
|
case PROP_X:
|
||||||
|
|
|
@ -54,8 +54,8 @@ class FFTGraph : public Gtk::DrawingArea
|
||||||
void on_size_allocate(Gtk::Allocation & alloc);
|
void on_size_allocate(Gtk::Allocation & alloc);
|
||||||
FFTResult *prepareResult(Gdk::Color color, std::string trackname);
|
FFTResult *prepareResult(Gdk::Color color, std::string trackname);
|
||||||
|
|
||||||
const void set_show_minmax (bool v) { _show_minmax = v; redraw(); };
|
void set_show_minmax (bool v) { _show_minmax = v; redraw(); }
|
||||||
const void set_show_normalized (bool v) { _show_normalized = v; redraw(); };
|
void set_show_normalized (bool v) { _show_normalized = v; redraw(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -39,16 +39,16 @@ class FFTResult
|
||||||
void analyzeWindow(float *window);
|
void analyzeWindow(float *window);
|
||||||
void finalize();
|
void finalize();
|
||||||
|
|
||||||
const int length() { return _dataSize; }
|
int length() const { return _dataSize; }
|
||||||
|
|
||||||
float avgAt(int x);
|
float avgAt(int x);
|
||||||
float maxAt(int x);
|
float maxAt(int x);
|
||||||
float minAt(int x);
|
float minAt(int x);
|
||||||
|
|
||||||
const float minimum() { return _minimum; }
|
float minimum() const { return _minimum; }
|
||||||
const float maximum() { return _maximum; }
|
float maximum() const { return _maximum; }
|
||||||
|
|
||||||
const Gdk::Color get_color() { return _color; }
|
Gdk::Color get_color() const { return _color; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FFTResult(FFTGraph *graph, Gdk::Color color, std::string trackname);
|
FFTResult(FFTGraph *graph, Gdk::Color color, std::string trackname);
|
||||||
|
|
|
@ -48,8 +48,7 @@ GType gtk_custom_hruler_get_type (void)
|
||||||
{
|
{
|
||||||
static GType hruler_type = 0;
|
static GType hruler_type = 0;
|
||||||
|
|
||||||
if (!hruler_type)
|
if (!hruler_type) {
|
||||||
{
|
|
||||||
static const GTypeInfo hruler_info =
|
static const GTypeInfo hruler_info =
|
||||||
{
|
{
|
||||||
sizeof (GtkCustomHRulerClass),
|
sizeof (GtkCustomHRulerClass),
|
||||||
|
@ -61,6 +60,7 @@ GType gtk_custom_hruler_get_type (void)
|
||||||
sizeof (GtkCustomHRuler),
|
sizeof (GtkCustomHRuler),
|
||||||
0, /* n_preallocs */
|
0, /* n_preallocs */
|
||||||
(GInstanceInitFunc) gtk_custom_hruler_init,
|
(GInstanceInitFunc) gtk_custom_hruler_init,
|
||||||
|
NULL /* value_table */
|
||||||
};
|
};
|
||||||
|
|
||||||
hruler_type = g_type_register_static (gtk_custom_ruler_get_type(), "GtkCustomHRuler",
|
hruler_type = g_type_register_static (gtk_custom_ruler_get_type(), "GtkCustomHRuler",
|
||||||
|
|
|
@ -89,6 +89,7 @@ GType gtk_custom_ruler_get_type (void)
|
||||||
sizeof (GtkCustomRuler),
|
sizeof (GtkCustomRuler),
|
||||||
0, /* n_preallocs */
|
0, /* n_preallocs */
|
||||||
(GInstanceInitFunc) gtk_custom_ruler_init,
|
(GInstanceInitFunc) gtk_custom_ruler_init,
|
||||||
|
NULL /* value_table */
|
||||||
};
|
};
|
||||||
|
|
||||||
ruler_type = g_type_register_static (GTK_TYPE_WIDGET, "GtkCustomRuler",
|
ruler_type = g_type_register_static (GTK_TYPE_WIDGET, "GtkCustomRuler",
|
||||||
|
|
|
@ -181,7 +181,7 @@ MidiMultipleChannelSelector::set_channel_mode(ChannelMode mode, uint16_t mask)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint16_t
|
uint16_t
|
||||||
MidiMultipleChannelSelector::get_selected_channels() const
|
MidiMultipleChannelSelector::get_selected_channels() const
|
||||||
{
|
{
|
||||||
uint16_t selected_channels = 0;
|
uint16_t selected_channels = 0;
|
||||||
|
|
|
@ -53,7 +53,7 @@ class SingleMidiChannelSelector : public MidiChannelSelector
|
||||||
public:
|
public:
|
||||||
SingleMidiChannelSelector(uint8_t active_channel = 0);
|
SingleMidiChannelSelector(uint8_t active_channel = 0);
|
||||||
|
|
||||||
const uint8_t get_active_channel() const { return _active_channel; }
|
uint8_t get_active_channel() const { return _active_channel; }
|
||||||
|
|
||||||
sigc::signal<void, uint8_t> channel_selected;
|
sigc::signal<void, uint8_t> channel_selected;
|
||||||
|
|
||||||
|
@ -79,8 +79,8 @@ public:
|
||||||
* bit 0 represents channel 0 and bit 15 represents channel 15
|
* bit 0 represents channel 0 and bit 15 represents channel 15
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const uint16_t get_selected_channels() const;
|
uint16_t get_selected_channels() const;
|
||||||
void set_selected_channels(uint16_t selected_channels);
|
void set_selected_channels(uint16_t selected_channels);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ARDOUR::ChannelMode _channel_mode;
|
ARDOUR::ChannelMode _channel_mode;
|
||||||
|
|
|
@ -105,7 +105,8 @@ MidiRegionView::MidiRegionView (ArdourCanvas::Group *parent, RouteTimeAxisView &
|
||||||
|
|
||||||
|
|
||||||
MidiRegionView::MidiRegionView (const MidiRegionView& other)
|
MidiRegionView::MidiRegionView (const MidiRegionView& other)
|
||||||
: RegionView (other)
|
: sigc::trackable(other)
|
||||||
|
, RegionView (other)
|
||||||
, _force_channel(-1)
|
, _force_channel(-1)
|
||||||
, _last_channel_selection(0xFFFF)
|
, _last_channel_selection(0xFFFF)
|
||||||
, _default_note_length(1.0)
|
, _default_note_length(1.0)
|
||||||
|
|
|
@ -118,6 +118,8 @@ Panner2d::reset (uint32_t n_inputs)
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
pucks[0]->set_text ("R");
|
pucks[0]->set_text ("R");
|
||||||
|
assert(existing_pucks >= 0);
|
||||||
|
// FIXME: Impossible (unsigned)
|
||||||
if (existing_pucks < 0) {
|
if (existing_pucks < 0) {
|
||||||
pucks[0]->x.set_value (0.5f);
|
pucks[0]->x.set_value (0.5f);
|
||||||
pucks[1]->y.set_value (0.25f);
|
pucks[1]->y.set_value (0.25f);
|
||||||
|
|
|
@ -281,7 +281,7 @@ PluginSelector::refiller (const PluginInfoList& plugs, const::std::string& filte
|
||||||
|
|
||||||
newrow[plugin_columns.creator] = creator;
|
newrow[plugin_columns.creator] = creator;
|
||||||
|
|
||||||
if ((*i)->n_inputs.n_total() < 0) {
|
if ((*i)->n_inputs.n_total() < 0) { // FIXME: Impossible (unsigned)
|
||||||
newrow[plugin_columns.audio_ins] = "various";
|
newrow[plugin_columns.audio_ins] = "various";
|
||||||
newrow[plugin_columns.midi_ins] = "various";
|
newrow[plugin_columns.midi_ins] = "various";
|
||||||
} else {
|
} else {
|
||||||
|
@ -290,7 +290,8 @@ PluginSelector::refiller (const PluginInfoList& plugs, const::std::string& filte
|
||||||
snprintf (buf, sizeof(buf), "%d", (*i)->n_inputs.n_midi());
|
snprintf (buf, sizeof(buf), "%d", (*i)->n_inputs.n_midi());
|
||||||
newrow[plugin_columns.midi_ins] = buf;
|
newrow[plugin_columns.midi_ins] = buf;
|
||||||
}
|
}
|
||||||
if ((*i)->n_outputs.n_total() < 0) {
|
|
||||||
|
if ((*i)->n_outputs.n_total() < 0) { // FIXME: Impossible (unsigned)
|
||||||
newrow[plugin_columns.audio_outs] = "various";
|
newrow[plugin_columns.audio_outs] = "various";
|
||||||
newrow[plugin_columns.midi_outs] = "various";
|
newrow[plugin_columns.midi_outs] = "various";
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -28,10 +28,8 @@ using namespace ARDOUR;
|
||||||
using namespace PBD;
|
using namespace PBD;
|
||||||
using namespace sigc;
|
using namespace sigc;
|
||||||
|
|
||||||
/**
|
/** Construct an empty RegionSelection.
|
||||||
* Construct an empty RegionSelection.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
RegionSelection::RegionSelection ()
|
RegionSelection::RegionSelection ()
|
||||||
{
|
{
|
||||||
RegionView::RegionViewGoingAway.connect (mem_fun(*this, &RegionSelection::remove_it));
|
RegionView::RegionViewGoingAway.connect (mem_fun(*this, &RegionSelection::remove_it));
|
||||||
|
@ -40,12 +38,12 @@ RegionSelection::RegionSelection ()
|
||||||
_current_end = 0;
|
_current_end = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** Copy constructor.
|
||||||
* Copy constructor.
|
|
||||||
* @param other RegionSelection to copy.
|
* @param other RegionSelection to copy.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
RegionSelection::RegionSelection (const RegionSelection& other)
|
RegionSelection::RegionSelection (const RegionSelection& other)
|
||||||
|
: std::list<RegionView*>()
|
||||||
|
, sigc::trackable(other)
|
||||||
{
|
{
|
||||||
RegionView::RegionViewGoingAway.connect (mem_fun(*this, &RegionSelection::remove_it));
|
RegionView::RegionViewGoingAway.connect (mem_fun(*this, &RegionSelection::remove_it));
|
||||||
|
|
||||||
|
@ -56,11 +54,9 @@ RegionSelection::RegionSelection (const RegionSelection& other)
|
||||||
_current_end = other._current_end;
|
_current_end = other._current_end;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** operator= to set a RegionSelection to be the same as another.
|
||||||
* operator= to set a RegionSelection to be the same as another.
|
|
||||||
* @param other Other RegionSelection.
|
* @param other Other RegionSelection.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
RegionSelection&
|
RegionSelection&
|
||||||
RegionSelection::operator= (const RegionSelection& other)
|
RegionSelection::operator= (const RegionSelection& other)
|
||||||
{
|
{
|
||||||
|
@ -79,10 +75,8 @@ RegionSelection::operator= (const RegionSelection& other)
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** Empty this RegionSelection.
|
||||||
* Empty this RegionSelection.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
RegionSelection::clear_all()
|
RegionSelection::clear_all()
|
||||||
{
|
{
|
||||||
|
@ -96,18 +90,15 @@ RegionSelection::clear_all()
|
||||||
* @param rv RegionView.
|
* @param rv RegionView.
|
||||||
* @return true if this selection contains rv.
|
* @return true if this selection contains rv.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool RegionSelection::contains (RegionView* rv) const
|
bool RegionSelection::contains (RegionView* rv) const
|
||||||
{
|
{
|
||||||
return find (begin(), end(), rv) != end();
|
return find (begin(), end(), rv) != end();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** Add a region to the selection.
|
||||||
* Add a region to the selection.
|
|
||||||
* @param rv Region to add.
|
* @param rv Region to add.
|
||||||
* @return false if we already had the region, otherwise true.
|
* @return false if we already had the region, otherwise true.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool
|
bool
|
||||||
RegionSelection::add (RegionView* rv)
|
RegionSelection::add (RegionView* rv)
|
||||||
{
|
{
|
||||||
|
@ -133,23 +124,19 @@ RegionSelection::add (RegionView* rv)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** Remove a region from the selection.
|
||||||
* Remove a region from the selection.
|
|
||||||
* @param rv Region to remove.
|
* @param rv Region to remove.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
RegionSelection::remove_it (RegionView *rv)
|
RegionSelection::remove_it (RegionView *rv)
|
||||||
{
|
{
|
||||||
remove (rv);
|
remove (rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** Remove a region from the selection.
|
||||||
* Remove a region from the selection.
|
|
||||||
* @param rv Region to remove.
|
* @param rv Region to remove.
|
||||||
* @return true if the region was in the selection, false if not.
|
* @return true if the region was in the selection, false if not.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool
|
bool
|
||||||
RegionSelection::remove (RegionView* rv)
|
RegionSelection::remove (RegionView* rv)
|
||||||
{
|
{
|
||||||
|
@ -213,11 +200,9 @@ RegionSelection::remove (RegionView* rv)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** Add a region to the list sorted by layer.
|
||||||
* Add a region to the list sorted by layer.
|
|
||||||
* @param rv Region to add.
|
* @param rv Region to add.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
RegionSelection::add_to_layer (RegionView * rv)
|
RegionSelection::add_to_layer (RegionView * rv)
|
||||||
{
|
{
|
||||||
|
@ -248,7 +233,6 @@ struct RegionSortByTime {
|
||||||
* @param foo List which will be filled with the selection's regions
|
* @param foo List which will be filled with the selection's regions
|
||||||
* sorted by position.
|
* sorted by position.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
RegionSelection::by_position (list<RegionView*>& foo) const
|
RegionSelection::by_position (list<RegionView*>& foo) const
|
||||||
{
|
{
|
||||||
|
@ -281,7 +265,6 @@ struct RegionSortByTrack {
|
||||||
* @param List which will be filled with the selection's regions
|
* @param List which will be filled with the selection's regions
|
||||||
* sorted by track and position.
|
* sorted by track and position.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
RegionSelection::by_track (list<RegionView*>& foo) const
|
RegionSelection::by_track (list<RegionView*>& foo) const
|
||||||
{
|
{
|
||||||
|
@ -299,7 +282,6 @@ RegionSelection::by_track (list<RegionView*>& foo) const
|
||||||
/**
|
/**
|
||||||
* @param Sort the selection by position and track.
|
* @param Sort the selection by position and track.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
RegionSelection::sort_by_position_and_track ()
|
RegionSelection::sort_by_position_and_track ()
|
||||||
{
|
{
|
||||||
|
@ -311,7 +293,6 @@ RegionSelection::sort_by_position_and_track ()
|
||||||
* @param tv Track.
|
* @param tv Track.
|
||||||
* @return true if any of the selection's regions are on tv.
|
* @return true if any of the selection's regions are on tv.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool
|
bool
|
||||||
RegionSelection::involves (const TimeAxisView& tv) const
|
RegionSelection::involves (const TimeAxisView& tv) const
|
||||||
{
|
{
|
||||||
|
@ -322,4 +303,4 @@ RegionSelection::involves (const TimeAxisView& tv) const
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,8 @@ RegionView::RegionView (ArdourCanvas::Group* parent,
|
||||||
}
|
}
|
||||||
|
|
||||||
RegionView::RegionView (const RegionView& other)
|
RegionView::RegionView (const RegionView& other)
|
||||||
: TimeAxisViewItem (other)
|
: sigc::trackable(other)
|
||||||
|
, TimeAxisViewItem (other)
|
||||||
, _time_converter(other._time_converter)
|
, _time_converter(other._time_converter)
|
||||||
{
|
{
|
||||||
/* derived concrete type will call init () */
|
/* derived concrete type will call init () */
|
||||||
|
@ -95,7 +96,8 @@ RegionView::RegionView (const RegionView& other)
|
||||||
}
|
}
|
||||||
|
|
||||||
RegionView::RegionView (const RegionView& other, boost::shared_ptr<Region> other_region)
|
RegionView::RegionView (const RegionView& other, boost::shared_ptr<Region> other_region)
|
||||||
: TimeAxisViewItem (other)
|
: sigc::trackable(other)
|
||||||
|
, TimeAxisViewItem (other)
|
||||||
, _time_converter(other._time_converter)
|
, _time_converter(other._time_converter)
|
||||||
{
|
{
|
||||||
/* this is a pseudo-copy constructor used when dragging regions
|
/* this is a pseudo-copy constructor used when dragging regions
|
||||||
|
|
|
@ -1435,7 +1435,7 @@ RouteTimeAxisView::paste (nframes_t pos, float times, Selection& selection, size
|
||||||
boost::shared_ptr<Playlist> playlist = get_diskstream()->playlist();
|
boost::shared_ptr<Playlist> playlist = get_diskstream()->playlist();
|
||||||
PlaylistSelection::iterator p;
|
PlaylistSelection::iterator p;
|
||||||
|
|
||||||
for (p = selection.playlists.begin(); p != selection.playlists.end() && nth; ++p, --nth);
|
for (p = selection.playlists.begin(); p != selection.playlists.end() && nth; ++p, --nth) {}
|
||||||
|
|
||||||
if (p == selection.playlists.end()) {
|
if (p == selection.playlists.end()) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -105,7 +105,8 @@ TimeAxisViewItem::TimeAxisViewItem(const string & it_name, ArdourCanvas::Group&
|
||||||
}
|
}
|
||||||
|
|
||||||
TimeAxisViewItem::TimeAxisViewItem (const TimeAxisViewItem& other)
|
TimeAxisViewItem::TimeAxisViewItem (const TimeAxisViewItem& other)
|
||||||
: trackview (other.trackview)
|
: sigc::trackable(other)
|
||||||
|
, trackview (other.trackview)
|
||||||
{
|
{
|
||||||
|
|
||||||
Gdk::Color c;
|
Gdk::Color c;
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
#define __ardour_plugin_h__
|
#define __ardour_plugin_h__
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <boost/utility.hpp>
|
|
||||||
#include <sigc++/signal.h>
|
#include <sigc++/signal.h>
|
||||||
#include <glibmm/ustring.h>
|
#include <glibmm/ustring.h>
|
||||||
|
|
||||||
|
@ -88,7 +87,7 @@ class PluginInfo {
|
||||||
typedef boost::shared_ptr<PluginInfo> PluginInfoPtr;
|
typedef boost::shared_ptr<PluginInfo> PluginInfoPtr;
|
||||||
typedef std::list<PluginInfoPtr> PluginInfoList;
|
typedef std::list<PluginInfoPtr> PluginInfoList;
|
||||||
|
|
||||||
class Plugin : public PBD::StatefulDestructible, public Latent, public boost::noncopyable
|
class Plugin : public PBD::StatefulDestructible, public Latent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Plugin (ARDOUR::AudioEngine&, ARDOUR::Session&);
|
Plugin (ARDOUR::AudioEngine&, ARDOUR::Session&);
|
||||||
|
@ -194,14 +193,16 @@ class Plugin : public PBD::StatefulDestructible, public Latent, public boost::no
|
||||||
protected:
|
protected:
|
||||||
friend class PluginInsert;
|
friend class PluginInsert;
|
||||||
friend struct PluginInsert::PluginControl;
|
friend struct PluginInsert::PluginControl;
|
||||||
|
|
||||||
virtual void set_parameter (uint32_t which, float val) = 0;
|
virtual void set_parameter (uint32_t which, float val) = 0;
|
||||||
|
|
||||||
|
bool save_preset (string uri, string domain /* vst, ladspa etc. */);
|
||||||
|
|
||||||
ARDOUR::AudioEngine& _engine;
|
ARDOUR::AudioEngine& _engine;
|
||||||
ARDOUR::Session& _session;
|
ARDOUR::Session& _session;
|
||||||
PluginInfoPtr _info;
|
PluginInfoPtr _info;
|
||||||
uint32_t _cycles;
|
uint32_t _cycles;
|
||||||
map<string,PresetRecord> presets;
|
map<string,PresetRecord> presets;
|
||||||
bool save_preset(string uri, string domain /* vst, ladspa etc. */);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
PluginPtr find_plugin(ARDOUR::Session&, string unique_id, ARDOUR::PluginType);
|
PluginPtr find_plugin(ARDOUR::Session&, string unique_id, ARDOUR::PluginType);
|
||||||
|
|
|
@ -90,7 +90,7 @@ class MetricSection {
|
||||||
virtual ~MetricSection() {}
|
virtual ~MetricSection() {}
|
||||||
|
|
||||||
const BBT_Time& start() const { return _start; }
|
const BBT_Time& start() const { return _start; }
|
||||||
const nframes_t frame() const { return _frame; }
|
nframes_t frame() const { return _frame; }
|
||||||
|
|
||||||
void set_movable (bool yn) { _movable = yn; }
|
void set_movable (bool yn) { _movable = yn; }
|
||||||
bool movable() const { return _movable; }
|
bool movable() const { return _movable; }
|
||||||
|
|
|
@ -160,24 +160,24 @@ ExportFormatSpecification::Time::set_state (const XMLNode & node)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ExportFormatSpecification::ExportFormatSpecification (Session & s) :
|
ExportFormatSpecification::ExportFormatSpecification (Session & s)
|
||||||
session (s),
|
: session (s)
|
||||||
|
|
||||||
has_sample_format (false),
|
, has_sample_format (false)
|
||||||
supports_tagging (false),
|
, supports_tagging (false)
|
||||||
_has_broadcast_info (false),
|
, _has_broadcast_info (false)
|
||||||
_channel_limit (0),
|
, _channel_limit (0)
|
||||||
_dither_type (D_None),
|
, _dither_type (D_None)
|
||||||
_src_quality (SRC_SincBest),
|
, _src_quality (SRC_SincBest)
|
||||||
_tag (true),
|
, _tag (true)
|
||||||
|
|
||||||
_trim_beginning (false),
|
, _trim_beginning (false)
|
||||||
_silence_beginning (s),
|
, _silence_beginning (s)
|
||||||
_trim_end (false),
|
, _trim_end (false)
|
||||||
_silence_end (s),
|
, _silence_end (s)
|
||||||
|
|
||||||
_normalize (false),
|
, _normalize (false)
|
||||||
_normalize_target (1.0)
|
, _normalize_target (1.0)
|
||||||
{
|
{
|
||||||
format_ids.insert (F_None);
|
format_ids.insert (F_None);
|
||||||
endiannesses.insert (E_FileDefault);
|
endiannesses.insert (E_FileDefault);
|
||||||
|
@ -186,10 +186,10 @@ ExportFormatSpecification::ExportFormatSpecification (Session & s) :
|
||||||
qualities.insert (Q_None);
|
qualities.insert (Q_None);
|
||||||
}
|
}
|
||||||
|
|
||||||
ExportFormatSpecification::ExportFormatSpecification (Session & s, XMLNode const & state) :
|
ExportFormatSpecification::ExportFormatSpecification (Session & s, XMLNode const & state)
|
||||||
session (s),
|
: session (s)
|
||||||
_silence_beginning (s),
|
, _silence_beginning (s)
|
||||||
_silence_end (s)
|
, _silence_end (s)
|
||||||
{
|
{
|
||||||
_silence_beginning.type = Time::SMPTE;
|
_silence_beginning.type = Time::SMPTE;
|
||||||
_silence_end.type = Time::SMPTE;
|
_silence_end.type = Time::SMPTE;
|
||||||
|
@ -197,10 +197,11 @@ ExportFormatSpecification::ExportFormatSpecification (Session & s, XMLNode const
|
||||||
set_state (state);
|
set_state (state);
|
||||||
}
|
}
|
||||||
|
|
||||||
ExportFormatSpecification::ExportFormatSpecification (ExportFormatSpecification const & other) :
|
ExportFormatSpecification::ExportFormatSpecification (ExportFormatSpecification const & other)
|
||||||
session (other.session),
|
: ExportFormatBase(other)
|
||||||
_silence_beginning (other.session),
|
, session (other.session)
|
||||||
_silence_end (other.session)
|
, _silence_beginning (other.session)
|
||||||
|
, _silence_end (other.session)
|
||||||
{
|
{
|
||||||
set_name (other.name() + " (copy)");
|
set_name (other.name() + " (copy)");
|
||||||
|
|
||||||
|
|
|
@ -182,11 +182,7 @@ SampleRateConverter::process (float * data, nframes_t frames)
|
||||||
|
|
||||||
|
|
||||||
nframes_t frames_written = piped_to->write (data_out, frames_out);
|
nframes_t frames_written = piped_to->write (data_out, frames_out);
|
||||||
if (frames_written < 0) {
|
frames_out_total += frames_written;
|
||||||
return frames_written;
|
|
||||||
} else {
|
|
||||||
frames_out_total += frames_written;
|
|
||||||
}
|
|
||||||
|
|
||||||
} while (leftover_frames > frames_in);
|
} while (leftover_frames > frames_in);
|
||||||
|
|
||||||
|
|
|
@ -1633,7 +1633,7 @@ IO::find_possible_bundle (const string &desired_name, const string &default_name
|
||||||
|
|
||||||
// find highest set bit
|
// find highest set bit
|
||||||
mask = 1;
|
mask = 1;
|
||||||
while ((mask <= bundle_number) && (mask <<= 1));
|
while ((mask <= bundle_number) && (mask <<= 1)) {}
|
||||||
|
|
||||||
// "wrap" bundle number into largest possible power of 2
|
// "wrap" bundle number into largest possible power of 2
|
||||||
// that works...
|
// that works...
|
||||||
|
|
|
@ -131,8 +131,7 @@ MidiPort::flush_buffers (nframes_t nframes, nframes_t offset)
|
||||||
|
|
||||||
for (MidiBuffer::iterator i = _buffer->begin(); i != _buffer->end(); ++i) {
|
for (MidiBuffer::iterator i = _buffer->begin(); i != _buffer->end(); ++i) {
|
||||||
const Evoral::Event<nframes_t>& ev = *i;
|
const Evoral::Event<nframes_t>& ev = *i;
|
||||||
// event times should be frames, relative to cycle start
|
// event times are in frames, relative to cycle start
|
||||||
assert(ev.time() >= 0);
|
|
||||||
assert(ev.time() < (nframes+offset));
|
assert(ev.time() < (nframes+offset));
|
||||||
if (ev.time() >= offset) {
|
if (ev.time() >= offset) {
|
||||||
jack_midi_event_write (jack_buffer, (jack_nframes_t) ev.time(), ev.buffer(), ev.size());
|
jack_midi_event_write (jack_buffer, (jack_nframes_t) ev.time(), ev.buffer(), ev.size());
|
||||||
|
|
|
@ -897,7 +897,7 @@ void
|
||||||
Panner::remove (uint32_t which)
|
Panner::remove (uint32_t which)
|
||||||
{
|
{
|
||||||
vector<StreamPanner*>::iterator i;
|
vector<StreamPanner*>::iterator i;
|
||||||
for (i = _streampanners.begin(); i != _streampanners.end() && which; ++i, --which);
|
for (i = _streampanners.begin(); i != _streampanners.end() && which; ++i, --which) {}
|
||||||
|
|
||||||
if (i != _streampanners.end()) {
|
if (i != _streampanners.end()) {
|
||||||
delete *i;
|
delete *i;
|
||||||
|
|
|
@ -58,12 +58,18 @@ using namespace ARDOUR;
|
||||||
using namespace PBD;
|
using namespace PBD;
|
||||||
|
|
||||||
Plugin::Plugin (AudioEngine& e, Session& s)
|
Plugin::Plugin (AudioEngine& e, Session& s)
|
||||||
: _engine (e), _session (s)
|
: _engine (e)
|
||||||
|
, _session (s)
|
||||||
|
, _cycles (0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Plugin::Plugin (const Plugin& other)
|
Plugin::Plugin (const Plugin& other)
|
||||||
: _engine (other._engine), _session (other._session), _info (other._info)
|
: _engine (other._engine)
|
||||||
|
, _session (other._session)
|
||||||
|
, _info (other._info)
|
||||||
|
, _cycles (0)
|
||||||
|
, presets (other.presets)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -279,7 +279,6 @@ SMFSource::append_event_unlocked_frames (const Evoral::Event<nframes_t>& ev, sfr
|
||||||
name().c_str(), ev.time(), ev.size());
|
name().c_str(), ev.time(), ev.size());
|
||||||
for (size_t i=0; i < ev.size(); ++i) printf("%X ", ev.buffer()[i]); printf("\n");*/
|
for (size_t i=0; i < ev.size(); ++i) printf("%X ", ev.buffer()[i]); printf("\n");*/
|
||||||
|
|
||||||
assert(ev.time() >= 0);
|
|
||||||
if (ev.time() < _last_ev_time_frames) {
|
if (ev.time() < _last_ev_time_frames) {
|
||||||
cerr << "SMFSource: Warning: Skipping event with non-monotonic time" << endl;
|
cerr << "SMFSource: Warning: Skipping event with non-monotonic time" << endl;
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -341,7 +341,7 @@ UI::signal_pipe_callback (void *arg, int fd, GdkInputCondition cond)
|
||||||
|
|
||||||
/* flush (nonblocking) pipe */
|
/* flush (nonblocking) pipe */
|
||||||
|
|
||||||
while (read (fd, buf, 256) > 0);
|
while (read (fd, buf, 256) > 0) {}
|
||||||
|
|
||||||
((UI *) arg)->handle_ui_requests ();
|
((UI *) arg)->handle_ui_requests ();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user