NO-OP: whitespace
This fixes mostly <tab> after <space> and similar <tab> not used for indenting as well as some related code alignment issues.
This commit is contained in:
parent
90a7bef656
commit
31815b5f26
|
@ -772,7 +772,7 @@ ARDOUR_UI::post_engine ()
|
|||
vector<string>::iterator l;
|
||||
|
||||
for (p = paths.begin(), l = labels.begin(); p != paths.end(); ++p, ++l) {
|
||||
output << " <tr><th><kbd class=\"osc\">" << *p << "</kbd></th><td>" << *l << "</td></tr>" << endl;
|
||||
output << " <tr><th><kbd class=\"osc\">" << *p << "</kbd></th><td>" << *l << "</td></tr>" << endl;
|
||||
}
|
||||
output << " </tbody>\n </table>" << endl;
|
||||
|
||||
|
@ -5557,16 +5557,16 @@ ARDOUR_UI::transport_numpad_event (int num)
|
|||
_pending_locate_num = _pending_locate_num*10 + num;
|
||||
} else {
|
||||
switch (num) {
|
||||
case 0: toggle_roll(false, false); break;
|
||||
case 1: transport_rewind(1); break;
|
||||
case 2: transport_forward(1); break;
|
||||
case 3: transport_record(true); break;
|
||||
case 4: toggle_session_auto_loop(); break;
|
||||
case 5: transport_record(false); toggle_session_auto_loop(); break;
|
||||
case 6: toggle_punch(); break;
|
||||
case 7: toggle_click(); break;
|
||||
case 8: toggle_auto_return(); break;
|
||||
case 9: toggle_follow_edits(); break;
|
||||
case 0: toggle_roll(false, false); break;
|
||||
case 1: transport_rewind(1); break;
|
||||
case 2: transport_forward(1); break;
|
||||
case 3: transport_record(true); break;
|
||||
case 4: toggle_session_auto_loop(); break;
|
||||
case 5: transport_record(false); toggle_session_auto_loop(); break;
|
||||
case 6: toggle_punch(); break;
|
||||
case 7: toggle_click(); break;
|
||||
case 8: toggle_auto_return(); break;
|
||||
case 9: toggle_follow_edits(); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1362,11 +1362,11 @@ Editor::parameter_changed (std::string p)
|
|||
} else if (p == "show-summary") {
|
||||
|
||||
bool const s = _session->config.get_show_summary ();
|
||||
if (s) {
|
||||
_summary_hbox.show ();
|
||||
} else {
|
||||
_summary_hbox.hide ();
|
||||
}
|
||||
if (s) {
|
||||
_summary_hbox.show ();
|
||||
} else {
|
||||
_summary_hbox.hide ();
|
||||
}
|
||||
|
||||
Glib::RefPtr<ToggleAction> tact = ActionManager::get_toggle_action (X_("Editor"), X_("ToggleSummary"));
|
||||
if (tact->get_active () != s) {
|
||||
|
|
|
@ -525,7 +525,7 @@ Editor::maybe_autoscroll (bool allow_horiz, bool allow_vert, bool from_headers)
|
|||
|
||||
controls_layout.get_parent()->translate_coordinates (*toplevel,
|
||||
alloc.get_x(), alloc.get_y(),
|
||||
wx, wy);
|
||||
wx, wy);
|
||||
|
||||
scrolling_boundary = ArdourCanvas::Rect (wx, wy, wx + alloc.get_width(), wy + alloc.get_height());
|
||||
|
||||
|
|
|
@ -2198,7 +2198,7 @@ RegionRippleDrag::remove_unselected_from_views(samplecnt_t amount, bool move_reg
|
|||
rv->region()->set_position (rv->region()->position() + amount);
|
||||
} else {
|
||||
// restore the view to match the underlying region's original position
|
||||
rv->move(-amount, 0); // second parameter is y delta - seems 0 is OK
|
||||
rv->move(-amount, 0); // second parameter is y delta - seems 0 is OK
|
||||
}
|
||||
|
||||
rv->set_height (rtv->view()->child_height ());
|
||||
|
@ -4567,7 +4567,7 @@ MarkerDrag::motion (GdkEvent* event, bool)
|
|||
if (move_both || (*x).move_both) {
|
||||
copy_location->set_start (new_start, false, true, divisions);
|
||||
copy_location->set_end (new_end, false, true, divisions);
|
||||
} else if (new_start < copy_location->end()) {
|
||||
} else if (new_start < copy_location->end()) {
|
||||
copy_location->set_start (new_start, false, true, divisions);
|
||||
} else if (newframe > 0) {
|
||||
//_editor->snap_to (next, RoundUpAlways, true);
|
||||
|
|
|
@ -486,8 +486,8 @@ protected:
|
|||
bool y_movement_allowed (int delta_track, double delta_layer, int skip_invisible = 0) const;
|
||||
|
||||
private:
|
||||
TimeAxisView *prev_tav; // where regions were most recently dragged from
|
||||
TimeAxisView *orig_tav; // where drag started
|
||||
TimeAxisView *prev_tav; // where regions were most recently dragged from
|
||||
TimeAxisView *orig_tav; // where drag started
|
||||
ARDOUR::samplecnt_t prev_amount;
|
||||
ARDOUR::samplepos_t prev_position;
|
||||
ARDOUR::samplecnt_t selection_length;
|
||||
|
|
|
@ -2162,7 +2162,7 @@ Editor::motion_handler (ArdourCanvas::Item* /*item*/, GdkEvent* event, bool from
|
|||
|
||||
if (_drags->active ()) {
|
||||
//drags change the snapped_cursor location, because we are snapping the thing being dragged, not the actual mouse cursor
|
||||
return _drags->motion_handler (event, from_autoscroll);
|
||||
return _drags->motion_handler (event, from_autoscroll);
|
||||
} else {
|
||||
//the snapped_cursor shows where an operation (like Split) is going to occur
|
||||
bool ignored;
|
||||
|
|
|
@ -3209,7 +3209,7 @@ Editor::separate_regions_between (const TimeSelection& ts)
|
|||
}
|
||||
}
|
||||
|
||||
if (in_command) {
|
||||
if (in_command) {
|
||||
|
||||
RangeSelectionAfterSplit rsas = Config->get_range_selection_after_split();
|
||||
|
||||
|
@ -6557,7 +6557,7 @@ Editor::set_auto_punch_range ()
|
|||
set_punch_range (tpl->start(), now, _("Auto Punch In/Out"));
|
||||
_session->config.set_punch_out(true);
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
if (_session->config.get_punch_out()) {
|
||||
_session->config.set_punch_out(false);
|
||||
}
|
||||
|
|
|
@ -160,7 +160,7 @@ EditorSummary::render_background_image ()
|
|||
/* calculate x scale */
|
||||
if (_end != _start) {
|
||||
_x_scale = static_cast<double> (get_width()) / (_end - _start);
|
||||
} else {
|
||||
} else {
|
||||
_x_scale = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -86,9 +86,6 @@ PortExportChannelSelector::PortExportChannelSelector (ARDOUR::Session * session,
|
|||
|
||||
PortExportChannelSelector::~PortExportChannelSelector ()
|
||||
{
|
||||
// if (session) {
|
||||
// session->add_instant_xml (get_state(), false);
|
||||
// }
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -246,17 +246,9 @@ ExportTimespanSelector::construct_label (ARDOUR::Location const * location) cons
|
|||
break;
|
||||
}
|
||||
|
||||
// label += _("from ");
|
||||
|
||||
// label += "<span color=\"#7fff7f\">";
|
||||
label += start;
|
||||
// label += "</span>";
|
||||
|
||||
label += _(" to ");
|
||||
|
||||
// label += "<span color=\"#7fff7f\">";
|
||||
label += end;
|
||||
// label += "</span>";
|
||||
|
||||
return label;
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ void
|
|||
FFT::calculate ()
|
||||
{
|
||||
if (_iterations > 1) {
|
||||
for (uint32_t i=0; i < _data_size - 1; i++) {
|
||||
for (uint32_t i=0; i < _data_size - 1; i++) {
|
||||
_power_at_bin[i] /= (float)_iterations;
|
||||
_phase_at_bin[i] /= (float)_iterations;
|
||||
}
|
||||
|
|
|
@ -685,8 +685,8 @@ GainMeterBase::meter_press(GdkEventButton* ev)
|
|||
meter_point_change_target = MeterPointChangeSingle;
|
||||
}
|
||||
Gtkmm2ext::anchored_menu_popup(&meter_point_menu,
|
||||
&meter_point_button,
|
||||
"", 1, ev->time);
|
||||
&meter_point_button,
|
||||
"", 1, ev->time);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -305,8 +305,9 @@ std::size_t s1pos, s2pos, n = 0;
|
|||
s1pos = s1.length();
|
||||
s2pos = s2.length();
|
||||
while (s1pos-- > 0 && s2pos-- > 0) {
|
||||
if (!match_or_digit(s1[s1pos], s2[s2pos]) )
|
||||
if (!match_or_digit(s1[s1pos], s2[s2pos])) {
|
||||
break;
|
||||
}
|
||||
n++;
|
||||
}
|
||||
return n;
|
||||
|
|
|
@ -44,14 +44,14 @@ using namespace Editing;
|
|||
using namespace ARDOUR;
|
||||
using ArdourCanvas::Duple;
|
||||
|
||||
GhostRegion::GhostRegion(RegionView& rv,
|
||||
ArdourCanvas::Container* parent,
|
||||
TimeAxisView& tv,
|
||||
TimeAxisView& source_tv,
|
||||
double initial_pos)
|
||||
: parent_rv(rv)
|
||||
, trackview(tv)
|
||||
, source_trackview(source_tv)
|
||||
GhostRegion::GhostRegion (RegionView& rv,
|
||||
ArdourCanvas::Container* parent,
|
||||
TimeAxisView& tv,
|
||||
TimeAxisView& source_tv,
|
||||
double initial_pos)
|
||||
: parent_rv(rv)
|
||||
, trackview(tv)
|
||||
, source_trackview(source_tv)
|
||||
{
|
||||
group = new ArdourCanvas::Container (parent);
|
||||
CANVAS_DEBUG_NAME (group, "ghost region");
|
||||
|
@ -116,11 +116,11 @@ GhostRegion::is_automation_ghost()
|
|||
return (dynamic_cast<AutomationTimeAxisView*>(&trackview)) != 0;
|
||||
}
|
||||
|
||||
AudioGhostRegion::AudioGhostRegion(RegionView& rv,
|
||||
TimeAxisView& tv,
|
||||
TimeAxisView& source_tv,
|
||||
double initial_unit_pos)
|
||||
: GhostRegion(rv, tv.ghost_group(), tv, source_tv, initial_unit_pos)
|
||||
AudioGhostRegion::AudioGhostRegion (RegionView& rv,
|
||||
TimeAxisView& tv,
|
||||
TimeAxisView& source_tv,
|
||||
double initial_unit_pos)
|
||||
: GhostRegion(rv, tv.ghost_group(), tv, source_tv, initial_unit_pos)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -181,10 +181,10 @@ MidiGhostRegion::MidiGhostRegion(MidiRegionView& rv,
|
|||
TimeAxisView& tv,
|
||||
TimeAxisView& source_tv,
|
||||
double initial_unit_pos)
|
||||
: GhostRegion(rv, tv.ghost_group(), tv, source_tv, initial_unit_pos)
|
||||
, _note_group (new ArdourCanvas::Container (group))
|
||||
, parent_mrv (rv)
|
||||
, _optimization_iterator(events.end())
|
||||
: GhostRegion(rv, tv.ghost_group(), tv, source_tv, initial_unit_pos)
|
||||
, _note_group (new ArdourCanvas::Container (group))
|
||||
, parent_mrv (rv)
|
||||
, _optimization_iterator(events.end())
|
||||
{
|
||||
_outline = UIConfiguration::instance().color ("ghost track midi outline");
|
||||
|
||||
|
@ -200,14 +200,14 @@ MidiGhostRegion::MidiGhostRegion(MidiRegionView& rv,
|
|||
MidiStreamView& msv,
|
||||
TimeAxisView& source_tv,
|
||||
double initial_unit_pos)
|
||||
: GhostRegion(rv,
|
||||
msv.midi_underlay_group,
|
||||
msv.trackview(),
|
||||
source_tv,
|
||||
initial_unit_pos)
|
||||
, _note_group (new ArdourCanvas::Container (group))
|
||||
, parent_mrv (rv)
|
||||
, _optimization_iterator(events.end())
|
||||
: GhostRegion (rv,
|
||||
msv.midi_underlay_group,
|
||||
msv.trackview(),
|
||||
source_tv,
|
||||
initial_unit_pos)
|
||||
, _note_group (new ArdourCanvas::Container (group))
|
||||
, parent_mrv (rv)
|
||||
, _optimization_iterator(events.end())
|
||||
{
|
||||
_outline = UIConfiguration::instance().color ("ghost track midi outline");
|
||||
|
||||
|
@ -465,7 +465,6 @@ MidiGhostRegion::redisplay_model ()
|
|||
* representation of it.
|
||||
* @return Our Event, or 0 if not found.
|
||||
*/
|
||||
|
||||
MidiGhostRegion::GhostEvent *
|
||||
MidiGhostRegion::find_event (boost::shared_ptr<NoteType> parent)
|
||||
{
|
||||
|
|
|
@ -25,64 +25,65 @@
|
|||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define TYPE_PIANO_KEYBOARD (piano_keyboard_get_type ())
|
||||
#define PIANO_KEYBOARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PIANO_KEYBOARD, PianoKeyboard))
|
||||
#define PIANO_KEYBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PIANO_KEYBOARD, PianoKeyboardClass))
|
||||
#define IS_PIANO_KEYBOARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PIANO_KEYBOARD))
|
||||
#define IS_PIANO_KEYBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PIANO_KEYBOARD))
|
||||
#define PIANO_KEYBOARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PIANO_KEYBOARD, PianoKeyboardClass))
|
||||
#define TYPE_PIANO_KEYBOARD (piano_keyboard_get_type ())
|
||||
#define PIANO_KEYBOARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PIANO_KEYBOARD, PianoKeyboard))
|
||||
#define PIANO_KEYBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PIANO_KEYBOARD, PianoKeyboardClass))
|
||||
#define IS_PIANO_KEYBOARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PIANO_KEYBOARD))
|
||||
#define IS_PIANO_KEYBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PIANO_KEYBOARD))
|
||||
#define PIANO_KEYBOARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PIANO_KEYBOARD, PianoKeyboardClass))
|
||||
|
||||
typedef struct _PianoKeyboard PianoKeyboard;
|
||||
typedef struct _PianoKeyboardClass PianoKeyboardClass;
|
||||
typedef struct _PianoKeyboard PianoKeyboard;
|
||||
typedef struct _PianoKeyboardClass PianoKeyboardClass;
|
||||
|
||||
#define NNOTES 127
|
||||
#define NNOTES (127)
|
||||
|
||||
#define OCTAVE_MIN -1
|
||||
#define OCTAVE_MAX 7
|
||||
#define OCTAVE_MIN (-1)
|
||||
#define OCTAVE_MAX (7)
|
||||
|
||||
struct PKNote {
|
||||
int pressed; /* 1 if key is in pressed down state. */
|
||||
int sustained; /* 1 if note is sustained. */
|
||||
int x; /* Distance between the left edge of the key
|
||||
* and the left edge of the widget, in pixels. */
|
||||
int w; /* Width of the key, in pixels. */
|
||||
int h; /* Height of the key, in pixels. */
|
||||
int white; /* 1 if key is white; 0 otherwise. */
|
||||
int pressed; /* 1 if key is in pressed down state. */
|
||||
int sustained; /* 1 if note is sustained. */
|
||||
int x; /* Distance between the left edge of the key
|
||||
* and the left edge of the widget, in pixels. */
|
||||
int w; /* Width of the key, in pixels. */
|
||||
int h; /* Height of the key, in pixels. */
|
||||
int white; /* 1 if key is white; 0 otherwise. */
|
||||
};
|
||||
|
||||
struct _PianoKeyboard
|
||||
{
|
||||
GtkDrawingArea da;
|
||||
int maybe_stop_sustained_notes;
|
||||
int sustain_new_notes;
|
||||
int enable_keyboard_cue;
|
||||
int octave;
|
||||
int widget_margin;
|
||||
int note_being_pressed_using_mouse;
|
||||
int last_key;
|
||||
gboolean monophonic;
|
||||
struct PKNote notes[NNOTES];
|
||||
GtkDrawingArea da;
|
||||
int maybe_stop_sustained_notes;
|
||||
int sustain_new_notes;
|
||||
int enable_keyboard_cue;
|
||||
int octave;
|
||||
int widget_margin;
|
||||
int note_being_pressed_using_mouse;
|
||||
int last_key;
|
||||
gboolean monophonic;
|
||||
struct PKNote notes[NNOTES];
|
||||
/* Table used to translate from PC keyboard character to MIDI note number. */
|
||||
GHashTable *key_bindings;
|
||||
GHashTable* key_bindings;
|
||||
};
|
||||
|
||||
struct _PianoKeyboardClass
|
||||
{
|
||||
GtkDrawingAreaClass parent_class;
|
||||
GtkDrawingAreaClass parent_class;
|
||||
};
|
||||
|
||||
GType piano_keyboard_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget* piano_keyboard_new (void);
|
||||
void piano_keyboard_sustain_press (PianoKeyboard *pk);
|
||||
void piano_keyboard_sustain_release (PianoKeyboard *pk);
|
||||
void piano_keyboard_set_note_on (PianoKeyboard *pk, int note);
|
||||
void piano_keyboard_set_note_off (PianoKeyboard *pk, int note);
|
||||
void piano_keyboard_set_keyboard_cue (PianoKeyboard *pk, int enabled);
|
||||
void piano_keyboard_set_monophonic (PianoKeyboard *pk, gboolean monophonic);
|
||||
void piano_keyboard_set_octave (PianoKeyboard *pk, int octave);
|
||||
gboolean piano_keyboard_set_keyboard_layout (PianoKeyboard *pk, const char *layout);
|
||||
GType piano_keyboard_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget* piano_keyboard_new (void);
|
||||
|
||||
void piano_keyboard_sustain_press (PianoKeyboard *pk);
|
||||
void piano_keyboard_sustain_release (PianoKeyboard *pk);
|
||||
void piano_keyboard_set_note_on (PianoKeyboard *pk, int note);
|
||||
void piano_keyboard_set_note_off (PianoKeyboard *pk, int note);
|
||||
void piano_keyboard_set_keyboard_cue (PianoKeyboard *pk, int enabled);
|
||||
void piano_keyboard_set_monophonic (PianoKeyboard *pk, gboolean monophonic);
|
||||
void piano_keyboard_set_octave (PianoKeyboard *pk, int octave);
|
||||
|
||||
gboolean piano_keyboard_set_keyboard_layout (PianoKeyboard *pk, const char *layout);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __PIANO_KEYBOARD_H__ */
|
||||
|
||||
|
|
|
@ -250,10 +250,10 @@ void
|
|||
LevelMeterBase::setup_meters (int len, int initial_width, int thin_width)
|
||||
{
|
||||
|
||||
if (!_meter) {
|
||||
if (!_meter) {
|
||||
hide_all_meters ();
|
||||
return; /* do it later or never */
|
||||
}
|
||||
return; /* do it later or never */
|
||||
}
|
||||
|
||||
uint32_t nmidi = _meter->input_streams().n_midi();
|
||||
uint32_t nmeters = _meter->input_streams().n_total();
|
||||
|
|
|
@ -71,7 +71,7 @@ static pthread_t LXVST_gui_event_thread;
|
|||
|
||||
static bool LXVST_xerror;
|
||||
|
||||
int TempErrorHandler(Display *display, XErrorEvent *e)
|
||||
int TempErrorHandler (Display *display, XErrorEvent *e)
|
||||
{
|
||||
LXVST_xerror = true;
|
||||
|
||||
|
@ -80,14 +80,14 @@ int TempErrorHandler(Display *display, XErrorEvent *e)
|
|||
|
||||
#ifdef LXVST_32BIT
|
||||
|
||||
int getXWindowProperty(Window window, Atom atom)
|
||||
int getXWindowProperty (Window window, Atom atom)
|
||||
{
|
||||
int result = 0;
|
||||
int userSize;
|
||||
unsigned long bytes;
|
||||
unsigned long userCount;
|
||||
unsigned char *data;
|
||||
Atom userType;
|
||||
Atom userType;
|
||||
LXVST_xerror = false;
|
||||
|
||||
/*Use our own Xerror handler while we're in here - in an
|
||||
|
@ -95,25 +95,26 @@ int getXWindowProperty(Window window, Atom atom)
|
|||
qutting the entire application because of e.g. an invalid
|
||||
window ID*/
|
||||
|
||||
XErrorHandler olderrorhandler = XSetErrorHandler(TempErrorHandler);
|
||||
XErrorHandler olderrorhandler = XSetErrorHandler (TempErrorHandler);
|
||||
|
||||
XGetWindowProperty( LXVST_XDisplay, //The display
|
||||
window, //The Window
|
||||
atom, //The property
|
||||
0, //Offset into the data
|
||||
1, //Number of 32Bit chunks of data
|
||||
false, //false = don't delete the property
|
||||
AnyPropertyType, //Required property type mask
|
||||
&userType, //Actual type returned
|
||||
&userSize, //Actual format returned
|
||||
&userCount, //Actual number of items stored in the returned data
|
||||
&bytes, //Number of bytes remaining if a partial read
|
||||
&data); //The actual data read
|
||||
XGetWindowProperty (LXVST_XDisplay, // The display
|
||||
window, // The Window
|
||||
atom, // The property
|
||||
0, // Offset into the data
|
||||
1, // Number of 32Bit chunks of data
|
||||
false, // false = don't delete the property
|
||||
AnyPropertyType, // Required property type mask
|
||||
&userType, // Actual type returned
|
||||
&userSize, // Actual format returned
|
||||
&userCount, // Actual number of items stored in the returned data
|
||||
&bytes, // Number of bytes remaining if a partial read
|
||||
&data); // The actual data read
|
||||
|
||||
if(LXVST_xerror == false && userCount == 1)
|
||||
result = *(int*)data;
|
||||
if (LXVST_xerror == false && userCount == 1) {
|
||||
result = *(int*)data;
|
||||
}
|
||||
|
||||
XSetErrorHandler(olderrorhandler);
|
||||
XSetErrorHandler (olderrorhandler);
|
||||
|
||||
/*Hopefully this will return zero if the property is not set*/
|
||||
|
||||
|
@ -129,40 +130,42 @@ int getXWindowProperty(Window window, Atom atom)
|
|||
/* system of passing an eventProc address */
|
||||
/********************************************************************/
|
||||
|
||||
long getXWindowProperty(Window window, Atom atom)
|
||||
long getXWindowProperty (Window window, Atom atom)
|
||||
{
|
||||
long result = 0;
|
||||
int userSize;
|
||||
unsigned long bytes;
|
||||
unsigned long userCount;
|
||||
unsigned char *data;
|
||||
Atom userType;
|
||||
Atom userType;
|
||||
LXVST_xerror = false;
|
||||
|
||||
/*Use our own Xerror handler while we're in here - in an
|
||||
attempt to stop the brain dead default Xerror behaviour of
|
||||
qutting the entire application because of e.g. an invalid
|
||||
window ID*/
|
||||
* attempt to stop the brain dead default Xerror behaviour of
|
||||
* qutting the entire application because of e.g. an invalid
|
||||
* window ID
|
||||
*/
|
||||
|
||||
XErrorHandler olderrorhandler = XSetErrorHandler(TempErrorHandler);
|
||||
XErrorHandler olderrorhandler = XSetErrorHandler (TempErrorHandler);
|
||||
|
||||
XGetWindowProperty( LXVST_XDisplay,
|
||||
window,
|
||||
atom,
|
||||
0,
|
||||
2,
|
||||
false,
|
||||
AnyPropertyType,
|
||||
&userType,
|
||||
&userSize,
|
||||
&userCount,
|
||||
&bytes,
|
||||
&data);
|
||||
XGetWindowProperty (LXVST_XDisplay,
|
||||
window,
|
||||
atom,
|
||||
0,
|
||||
2,
|
||||
false,
|
||||
AnyPropertyType,
|
||||
&userType,
|
||||
&userSize,
|
||||
&userCount,
|
||||
&bytes,
|
||||
&data);
|
||||
|
||||
if(LXVST_xerror == false && userCount == 1)
|
||||
result = *(long*)data;
|
||||
if (LXVST_xerror == false && userCount == 1) {
|
||||
result = *(long*)data;
|
||||
}
|
||||
|
||||
XSetErrorHandler(olderrorhandler);
|
||||
XSetErrorHandler (olderrorhandler);
|
||||
|
||||
/*Hopefully this will return zero if the property is not set*/
|
||||
|
||||
|
@ -179,7 +182,7 @@ dispatch_x_events (XEvent* event, VSTState* vstfx)
|
|||
{
|
||||
/*Handle some of the Events we might be interested in*/
|
||||
|
||||
switch(event->type)
|
||||
switch (event->type)
|
||||
{
|
||||
/*Configure event - when the window is resized or first drawn*/
|
||||
|
||||
|
@ -199,7 +202,7 @@ dispatch_x_events (XEvent* event, VSTState* vstfx)
|
|||
|
||||
if (window == (Window) (vstfx->linux_window)) {
|
||||
#ifndef NDEBUG
|
||||
printf("dispatch_x_events: ConfigureNotify cfg:(%d %d) plugin:(%d %d)\n",
|
||||
printf ("dispatch_x_events: ConfigureNotify cfg: (%d %d) plugin: (%d %d)\n",
|
||||
width, height,
|
||||
vstfx->width, vstfx->height
|
||||
);
|
||||
|
@ -246,7 +249,7 @@ dispatch_x_events (XEvent* event, VSTState* vstfx)
|
|||
|
||||
vstfx->linux_plugin_ui_window = PluginUIWindowID;
|
||||
#ifdef LXVST_32BIT
|
||||
int result = getXWindowProperty(PluginUIWindowID, XInternAtom(LXVST_XDisplay, "_XEventProc", false));
|
||||
int result = getXWindowProperty (PluginUIWindowID, XInternAtom (LXVST_XDisplay, "_XEventProc", false));
|
||||
|
||||
if (result == 0) {
|
||||
vstfx->eventProc = NULL;
|
||||
|
@ -255,12 +258,13 @@ dispatch_x_events (XEvent* event, VSTState* vstfx)
|
|||
}
|
||||
#endif
|
||||
#ifdef LXVST_64BIT
|
||||
long result = getXWindowProperty(PluginUIWindowID, XInternAtom(LXVST_XDisplay, "_XEventProc", false));
|
||||
long result = getXWindowProperty (PluginUIWindowID, XInternAtom (LXVST_XDisplay, "_XEventProc", false));
|
||||
|
||||
if(result == 0)
|
||||
if (result == 0) {
|
||||
vstfx->eventProc = NULL;
|
||||
else
|
||||
} else {
|
||||
vstfx->eventProc = (void (*) (void* event))result;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
@ -276,15 +280,15 @@ dispatch_x_events (XEvent* event, VSTState* vstfx)
|
|||
to effEditOpen when the editor is launched*/
|
||||
|
||||
if (window == (Window) (vstfx->linux_window)) {
|
||||
char* message = XGetAtomName(LXVST_XDisplay, message_type);
|
||||
char* message = XGetAtomName (LXVST_XDisplay, message_type);
|
||||
|
||||
if (strcmp(message,"LaunchEditor") == 0) {
|
||||
if (strcmp (message,"LaunchEditor") == 0) {
|
||||
if (event->xclient.data.l[0] == 0x0FEEDBAC) {
|
||||
vstfx_launch_editor (vstfx);
|
||||
}
|
||||
}
|
||||
|
||||
XFree(message);
|
||||
XFree (message);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -306,7 +310,7 @@ dispatch_x_events (XEvent* event, VSTState* vstfx)
|
|||
return;
|
||||
}
|
||||
|
||||
vstfx->eventProc((void*)event);
|
||||
vstfx->eventProc ((void*)event);
|
||||
}
|
||||
|
||||
/** This is the main gui event loop for the plugin, we also need to pass
|
||||
|
@ -333,11 +337,10 @@ void* gui_event_loop (void* ptr)
|
|||
|
||||
bool may_sleep = true;
|
||||
|
||||
if(LXVST_XDisplay)
|
||||
{
|
||||
if (LXVST_XDisplay) {
|
||||
/*See if there are any events in the queue*/
|
||||
|
||||
int num_events = XPending(LXVST_XDisplay);
|
||||
int num_events = XPending (LXVST_XDisplay);
|
||||
|
||||
if (num_events > 0) {
|
||||
// keep dispatching events as fast as possible
|
||||
|
@ -346,19 +349,17 @@ void* gui_event_loop (void* ptr)
|
|||
|
||||
/*process them if there are any*/
|
||||
|
||||
while(num_events)
|
||||
{
|
||||
XNextEvent(LXVST_XDisplay, &event);
|
||||
while (num_events) {
|
||||
XNextEvent (LXVST_XDisplay, &event);
|
||||
|
||||
/*Call dispatch events, with the event, for each plugin in the linked list*/
|
||||
|
||||
for (vstfx = vstfx_first; vstfx; vstfx = vstfx->next)
|
||||
{
|
||||
pthread_mutex_lock(&vstfx->lock);
|
||||
for (vstfx = vstfx_first; vstfx; vstfx = vstfx->next) {
|
||||
pthread_mutex_lock (&vstfx->lock);
|
||||
|
||||
dispatch_x_events(&event, vstfx);
|
||||
dispatch_x_events (&event, vstfx);
|
||||
|
||||
pthread_mutex_unlock(&vstfx->lock);
|
||||
pthread_mutex_unlock (&vstfx->lock);
|
||||
}
|
||||
|
||||
num_events--;
|
||||
|
@ -367,16 +368,15 @@ void* gui_event_loop (void* ptr)
|
|||
|
||||
/*We don't want to use all the CPU.. */
|
||||
|
||||
Glib::usleep(1000);
|
||||
Glib::usleep (1000);
|
||||
|
||||
/*See if its time for us to do a scheduled event pass on all the plugins*/
|
||||
|
||||
clock2 = g_get_monotonic_time();
|
||||
const int64_t elapsed_time_ms = (clock2 - clock1) / 1000;
|
||||
|
||||
if((LXVST_sched_timer_interval != 0) && elapsed_time_ms >= LXVST_sched_timer_interval)
|
||||
{
|
||||
//printf("elapsed %d ms ^= %.2f Hz\n", elapsed_time_ms, 1000.0/(double)elapsed_time_ms); // DEBUG
|
||||
if ((LXVST_sched_timer_interval != 0) && elapsed_time_ms >= LXVST_sched_timer_interval) {
|
||||
//printf ("elapsed %d ms ^= %.2f Hz\n", elapsed_time_ms, 1000.0/ (double)elapsed_time_ms); // DEBUG
|
||||
pthread_mutex_lock (&plugin_mutex);
|
||||
|
||||
again:
|
||||
|
@ -417,7 +417,7 @@ again:
|
|||
pthread_mutex_unlock (&vstfx->lock);
|
||||
goto again;
|
||||
} else {
|
||||
/* condition/unlock: it was signalled & unlocked in fst_create_editor() */
|
||||
/* condition/unlock: it was signalled & unlocked in fst_create_editor() */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -445,8 +445,9 @@ again:
|
|||
|
||||
vstfx->plugin->dispatcher (vstfx->plugin, effEditIdle, 0, 0, NULL, 0);
|
||||
|
||||
if(vstfx->wantIdle)
|
||||
if (vstfx->wantIdle) {
|
||||
vstfx->plugin->dispatcher (vstfx->plugin, 53, 0, 0, NULL, 0);
|
||||
}
|
||||
|
||||
pthread_mutex_unlock (&vstfx->lock);
|
||||
}
|
||||
|
@ -456,12 +457,12 @@ again:
|
|||
}
|
||||
|
||||
if (!gui_quit && may_sleep && elapsed_time_ms + 1 < LXVST_sched_timer_interval) {
|
||||
Glib::usleep(1000 * (LXVST_sched_timer_interval - elapsed_time_ms - 1));
|
||||
Glib::usleep (1000 * (LXVST_sched_timer_interval - elapsed_time_ms - 1));
|
||||
}
|
||||
}
|
||||
|
||||
if (LXVST_XDisplay) {
|
||||
XCloseDisplay(LXVST_XDisplay);
|
||||
XCloseDisplay (LXVST_XDisplay);
|
||||
LXVST_XDisplay = 0;
|
||||
}
|
||||
|
||||
|
@ -506,12 +507,12 @@ int vstfx_init (void* ptr)
|
|||
|
||||
/*Init the attribs to defaults*/
|
||||
|
||||
pthread_attr_init(&thread_attributes);
|
||||
pthread_attr_init (&thread_attributes);
|
||||
|
||||
/*Make sure the thread is joinable - this should be the default anyway -
|
||||
so we can join to it on vstfx_exit*/
|
||||
|
||||
pthread_attr_setdetachstate(&thread_attributes, PTHREAD_CREATE_JOINABLE);
|
||||
pthread_attr_setdetachstate (&thread_attributes, PTHREAD_CREATE_JOINABLE);
|
||||
|
||||
|
||||
/*This is where we need to open a connection to X, and start the GUI thread*/
|
||||
|
@ -520,13 +521,13 @@ int vstfx_init (void* ptr)
|
|||
will talk to X down this connection - X cannot handle multi-threaded access via
|
||||
the same Display* */
|
||||
|
||||
if(LXVST_XDisplay==NULL)
|
||||
LXVST_XDisplay = XOpenDisplay(NULL); //We might be able to make this open a specific screen etc
|
||||
if (LXVST_XDisplay == NULL) {
|
||||
LXVST_XDisplay = XOpenDisplay (NULL); //We might be able to make this open a specific screen etc
|
||||
}
|
||||
|
||||
/*Drop out and report the error if we fail to connect to X */
|
||||
|
||||
if(LXVST_XDisplay==NULL)
|
||||
{
|
||||
if (LXVST_XDisplay == NULL) {
|
||||
vstfx_error ("** ERROR ** VSTFX: Failed opening connection to X");
|
||||
|
||||
return -1;
|
||||
|
@ -536,15 +537,15 @@ int vstfx_init (void* ptr)
|
|||
|
||||
/*Create the thread - use default attrs for now, don't think we need anything special*/
|
||||
|
||||
thread_create_result = pthread_create(&LXVST_gui_event_thread, &thread_attributes, gui_event_loop, NULL);
|
||||
thread_create_result = pthread_create (&LXVST_gui_event_thread, &thread_attributes, gui_event_loop, NULL);
|
||||
|
||||
if(thread_create_result!=0)
|
||||
if (thread_create_result != 0)
|
||||
{
|
||||
/*There was a problem starting the GUI event thread*/
|
||||
|
||||
vstfx_error ("** ERROR ** VSTFX: Failed starting GUI event thread");
|
||||
|
||||
XCloseDisplay(LXVST_XDisplay);
|
||||
XCloseDisplay (LXVST_XDisplay);
|
||||
LXVST_XDisplay = 0;
|
||||
gui_quit = 1;
|
||||
|
||||
|
@ -556,7 +557,7 @@ int vstfx_init (void* ptr)
|
|||
|
||||
/*The vstfx Quit function*/
|
||||
|
||||
void vstfx_exit()
|
||||
void vstfx_exit ()
|
||||
{
|
||||
if (gui_quit) {
|
||||
return;
|
||||
|
@ -679,8 +680,8 @@ int vstfx_create_editor (VSTState* vstfx)
|
|||
event.window = parent_window;
|
||||
event.message_type = WindowActiveAtom;
|
||||
|
||||
event.format = 32; //Data format
|
||||
event.data.l[0] = 0x0FEEDBAC; //Something we can recognize later
|
||||
event.format = 32; //Data format
|
||||
event.data.l[0] = 0x0FEEDBAC; //Something we can recognize later
|
||||
|
||||
/*Push the event into the queue on our Display*/
|
||||
|
||||
|
@ -727,7 +728,7 @@ vstfx_launch_editor (VSTState* vstfx)
|
|||
/* linuxDSP VSTs don't use the host Display* at all */
|
||||
/**************************************************************/
|
||||
|
||||
vstfx->plugin->dispatcher (vstfx->plugin, effEditOpen, 0, (long)LXVST_XDisplay, (void*)(parent_window), 0 );
|
||||
vstfx->plugin->dispatcher (vstfx->plugin, effEditOpen, 0, (long)LXVST_XDisplay, (void*)(parent_window), 0);
|
||||
|
||||
/*QUIRK - some plugins need a slight delay after opening the editor before you can
|
||||
ask the window size or they might return zero - specifically discoDSP */
|
||||
|
@ -736,7 +737,7 @@ vstfx_launch_editor (VSTState* vstfx)
|
|||
|
||||
/*Now we can find out how big the parent window should be (and try) to resize it*/
|
||||
|
||||
vstfx->plugin->dispatcher (vstfx->plugin, effEditGetRect, 0, 0, &er, 0 );
|
||||
vstfx->plugin->dispatcher (vstfx->plugin, effEditGetRect, 0, 0, &er, 0);
|
||||
|
||||
if (er) {
|
||||
// Don't crash is plugin does not implement effEditGetRect
|
||||
|
@ -748,7 +749,7 @@ vstfx_launch_editor (VSTState* vstfx)
|
|||
vstfx->width = x_size;
|
||||
vstfx->height = y_size;
|
||||
|
||||
XResizeWindow(LXVST_XDisplay, parent_window, x_size, y_size);
|
||||
XResizeWindow (LXVST_XDisplay, parent_window, x_size, y_size);
|
||||
|
||||
XFlush (LXVST_XDisplay);
|
||||
|
||||
|
@ -801,7 +802,7 @@ vstfx_event_loop_remove_plugin (VSTState* vstfx)
|
|||
|
||||
// if this function is called, there must be
|
||||
// at least one plugin in the linked list
|
||||
assert(vstfx_first);
|
||||
assert (vstfx_first);
|
||||
|
||||
if (vstfx_first == vstfx) {
|
||||
vstfx_first = vstfx_first->next;
|
||||
|
|
|
@ -541,7 +541,7 @@ LocationEditRow::cd_toggled ()
|
|||
|
||||
item_table.remove (cd_track_details_hbox);
|
||||
// item_table.resize(1, 7);
|
||||
redraw_ranges(); /* EMIT_SIGNAL */
|
||||
redraw_ranges(); /* EMIT_SIGNAL */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -590,7 +590,7 @@ LocationEditRow::remove_button_pressed ()
|
|||
return;
|
||||
}
|
||||
|
||||
remove_requested (location); /* EMIT_SIGNAL */
|
||||
remove_requested (location); /* EMIT_SIGNAL */
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -73,9 +73,9 @@ class ImageSurface {
|
|||
* color or alpha channel belonging to format will be 0. The contents of bits
|
||||
* within a pixel, but not belonging to the given format are undefined).
|
||||
*
|
||||
* @param format format of pixels in the surface to create
|
||||
* @param width width of the surface, in pixels
|
||||
* @param height height of the surface, in pixels
|
||||
* @param format format of pixels in the surface to create
|
||||
* @param width width of the surface, in pixels
|
||||
* @param height height of the surface, in pixels
|
||||
*/
|
||||
ImageSurface (Cairo::Format format, int width, int height)
|
||||
: _surface (Cairo::ImageSurface::create (format, width, height))
|
||||
|
@ -147,10 +147,10 @@ class ImageSurface {
|
|||
|
||||
/** Marks a rectangular area of the given surface dirty.
|
||||
*
|
||||
* @param x X coordinate of dirty rectangle
|
||||
* @param y Y coordinate of dirty rectangle
|
||||
* @param width width of dirty rectangle
|
||||
* @param height height of dirty rectangle
|
||||
* @param x X coordinate of dirty rectangle
|
||||
* @param y Y coordinate of dirty rectangle
|
||||
* @param width width of dirty rectangle
|
||||
* @param height height of dirty rectangle
|
||||
*/
|
||||
void mark_dirty (int x, int y, int width, int height) {
|
||||
_surface->mark_dirty (x, y, width, height);
|
||||
|
|
|
@ -377,7 +377,7 @@ int main (int argc, char *argv[])
|
|||
<< _("Some portions Copyright (C) Steve Harris, Ari Johnson, Brett Viren, Joel Baker, Robin Gareus") << endl
|
||||
<< endl
|
||||
<< string_compose (_("%1 comes with ABSOLUTELY NO WARRANTY"), PROGRAM_NAME) << endl
|
||||
<< _("not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.") << endl
|
||||
<< _("not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.") << endl
|
||||
<< _("This is free software, and you are welcome to redistribute it ") << endl
|
||||
<< _("under certain conditions; see the source for copying conditions.")
|
||||
<< endl;
|
||||
|
|
|
@ -839,15 +839,15 @@ void
|
|||
Panner2d::cart_to_gtk (CartesianVector& c) const
|
||||
{
|
||||
/* cartesian coordinate space:
|
||||
center = 0.0
|
||||
dimension = 2.0 * 2.0
|
||||
increasing y moves up
|
||||
so max values along each axis are -1..+1
|
||||
|
||||
GTK uses a coordinate space that is:
|
||||
top left = 0.0
|
||||
dimension = (radius*2.0) * (radius*2.0)
|
||||
increasing y moves down
|
||||
* center = 0.0
|
||||
* dimension = 2.0 * 2.0
|
||||
* increasing y moves up
|
||||
* so max values along each axis are -1..+1
|
||||
*
|
||||
* GTK uses a coordinate space that is:
|
||||
* top left = 0.0
|
||||
* dimension = (radius*2.0) * (radius*2.0)
|
||||
* increasing y moves down
|
||||
*/
|
||||
const double diameter = radius*2.0;
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ PannerUI::set_panner (boost::shared_ptr<PannerShell> ps, boost::shared_ptr<Panne
|
|||
/* note that the panshell might not change here (i.e. ps == _panshell)
|
||||
*/
|
||||
|
||||
connections.drop_connections ();
|
||||
connections.drop_connections ();
|
||||
|
||||
delete pan_astyle_menu;
|
||||
pan_astyle_menu = 0;
|
||||
|
|
|
@ -247,8 +247,8 @@ PortMatrixRowLabels::render_bundle_name (
|
|||
Gdk::Color textcolor;
|
||||
ARDOUR_UI_UTILS::set_color_from_rgba(textcolor, Gtkmm2ext::contrasting_text_color(ARDOUR_UI_UTILS::gdk_color_to_rgba(bg_colour)));
|
||||
set_source_rgb (cr, textcolor);
|
||||
cairo_move_to (cr, xoff + x + name_pad(), yoff + name_pad() + off);
|
||||
cairo_show_text (cr, b->name().c_str());
|
||||
cairo_move_to (cr, xoff + x + name_pad(), yoff + name_pad() + off);
|
||||
cairo_show_text (cr, b->name().c_str());
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -135,24 +135,24 @@ RegionEditor::RegionEditor (Session* s, boost::shared_ptr<Region> r)
|
|||
_table.attach (position_clock, 1, 2, _table_row, _table_row + 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL);
|
||||
++_table_row;
|
||||
|
||||
_table.attach (end_label, 0, 1, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
|
||||
_table.attach (end_label, 0, 1, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
|
||||
_table.attach (end_clock, 1, 2, _table_row, _table_row + 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL);
|
||||
++_table_row;
|
||||
|
||||
_table.attach (length_label, 0, 1, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
|
||||
_table.attach (length_label, 0, 1, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
|
||||
_table.attach (length_clock, 1, 2, _table_row, _table_row + 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL);
|
||||
++_table_row;
|
||||
|
||||
_table.attach (sync_relative_label, 0, 1, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
|
||||
_table.attach (sync_offset_relative_clock, 1, 2, _table_row, _table_row + 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL);
|
||||
_table.attach (sync_relative_label, 0, 1, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
|
||||
_table.attach (sync_offset_relative_clock, 1, 2, _table_row, _table_row + 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL);
|
||||
++_table_row;
|
||||
|
||||
_table.attach (sync_absolute_label, 0, 1, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
|
||||
_table.attach (sync_offset_absolute_clock, 1, 2, _table_row, _table_row + 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL);
|
||||
_table.attach (sync_absolute_label, 0, 1, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
|
||||
_table.attach (sync_offset_absolute_clock, 1, 2, _table_row, _table_row + 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL);
|
||||
++_table_row;
|
||||
|
||||
_table.attach (start_label, 0, 1, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
|
||||
_table.attach (start_clock, 1, 2, _table_row, _table_row + 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL);
|
||||
_table.attach (start_label, 0, 1, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
|
||||
_table.attach (start_clock, 1, 2, _table_row, _table_row + 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL);
|
||||
++_table_row;
|
||||
|
||||
_table.attach (_sources_label, 0, 1, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
|
||||
|
|
|
@ -414,11 +414,11 @@ RegionView::region_resized (const PropertyChange& what_changed)
|
|||
|
||||
unit_length = _region->length() / samples_per_pixel;
|
||||
|
||||
for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
|
||||
for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
|
||||
|
||||
(*i)->set_duration (unit_length);
|
||||
(*i)->set_duration (unit_length);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -865,7 +865,7 @@ RegionView::trim_front (samplepos_t new_bound, bool no_overlap, const int32_t su
|
|||
}
|
||||
|
||||
/* Only trim region on the left if the first sample has gone beyond the left region's last sample. */
|
||||
if (region_left != 0 && (region_left->last_sample() > _region->first_sample() || regions_touching)) {
|
||||
if (region_left != 0 && (region_left->last_sample() > _region->first_sample() || regions_touching)) {
|
||||
region_left->trim_end (_region->first_sample() - 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,12 +49,12 @@ namespace ArdourCanvas {
|
|||
class RegionView : public TimeAxisViewItem
|
||||
{
|
||||
public:
|
||||
RegionView (ArdourCanvas::Container* parent,
|
||||
TimeAxisView& time_view,
|
||||
RegionView (ArdourCanvas::Container* parent,
|
||||
TimeAxisView& time_view,
|
||||
boost::shared_ptr<ARDOUR::Region> region,
|
||||
double samples_per_pixel,
|
||||
uint32_t base_color,
|
||||
bool automation = false);
|
||||
double samples_per_pixel,
|
||||
uint32_t base_color,
|
||||
bool automation = false);
|
||||
|
||||
RegionView (const RegionView& other);
|
||||
RegionView (const RegionView& other, boost::shared_ptr<ARDOUR::Region> other_region);
|
||||
|
|
|
@ -353,14 +353,14 @@ void
|
|||
RouteParams_UI::cleanup_view (bool stopupdate)
|
||||
{
|
||||
if (_active_view) {
|
||||
GenericPluginUI * plugui = 0;
|
||||
GenericPluginUI* plugui = 0;
|
||||
|
||||
if (stopupdate && (plugui = dynamic_cast<GenericPluginUI*>(_active_view)) != 0) {
|
||||
plugui->stop_updating (0);
|
||||
plugui->stop_updating (0);
|
||||
}
|
||||
|
||||
_processor_going_away_connection.disconnect ();
|
||||
redir_hpane.remove(*_active_view);
|
||||
redir_hpane.remove(*_active_view);
|
||||
delete _active_view;
|
||||
_active_view = 0;
|
||||
}
|
||||
|
|
|
@ -42,15 +42,6 @@ SendUI::SendUI (Gtk::Window* parent, boost::shared_ptr<Send> s, Session* session
|
|||
{
|
||||
assert (_send);
|
||||
|
||||
_panners.set_panner (s->panner_shell(), s->panner());
|
||||
_gpm.set_controls (boost::shared_ptr<Route>(), s->meter(), s->amp(), s->gain_control());
|
||||
|
||||
_hbox.pack_start (_gpm, true, true);
|
||||
set_name (X_("SendUIFrame"));
|
||||
|
||||
_vbox.set_spacing (5);
|
||||
_vbox.set_border_width (5);
|
||||
|
||||
_vbox.pack_start (_hbox, false, false, false);
|
||||
_vbox.pack_start (_panners, false, false);
|
||||
|
||||
|
|
|
@ -127,15 +127,15 @@ std::string Mootcher::sortMethodString(enum sortMethod sort)
|
|||
// sort the results in the requested way.
|
||||
|
||||
switch (sort) {
|
||||
case sort_duration_desc: return "duration_desc";
|
||||
case sort_duration_asc: return "duration_asc";
|
||||
case sort_created_desc: return "created_desc";
|
||||
case sort_created_asc: return "created_asc";
|
||||
case sort_downloads_desc: return "downloads_desc";
|
||||
case sort_downloads_asc: return "downloads_asc";
|
||||
case sort_rating_desc: return "rating_desc";
|
||||
case sort_rating_asc: return "rating_asc";
|
||||
default: return "";
|
||||
case sort_duration_desc: return "duration_desc";
|
||||
case sort_duration_asc: return "duration_asc";
|
||||
case sort_created_desc: return "created_desc";
|
||||
case sort_created_asc: return "created_asc";
|
||||
case sort_downloads_desc: return "downloads_desc";
|
||||
case sort_downloads_asc: return "downloads_asc";
|
||||
case sort_rating_desc: return "rating_desc";
|
||||
case sort_rating_asc: return "rating_asc";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -54,15 +54,15 @@ struct SfdbMemoryStruct {
|
|||
};
|
||||
|
||||
enum sortMethod {
|
||||
sort_none, // no sort
|
||||
sort_duration_desc, // Sort by the duration of the sounds, longest sounds first.
|
||||
sort_duration_asc, // Same as above, but shortest sounds first.
|
||||
sort_created_desc, // Sort by the date of when the sound was added. newest sounds first.
|
||||
sort_created_asc, // Same as above, but oldest sounds first.
|
||||
sort_downloads_desc, // Sort by the number of downloads, most downloaded sounds first.
|
||||
sort_downloads_asc, // Same as above, but least downloaded sounds first.
|
||||
sort_rating_desc, // Sort by the average rating given to the sounds, highest rated first.
|
||||
sort_rating_asc // Same as above, but lowest rated sounds first.
|
||||
sort_none, // no sort
|
||||
sort_duration_desc, // Sort by the duration of the sounds, longest sounds first.
|
||||
sort_duration_asc, // Same as above, but shortest sounds first.
|
||||
sort_created_desc, // Sort by the date of when the sound was added. newest sounds first.
|
||||
sort_created_asc, // Same as above, but oldest sounds first.
|
||||
sort_downloads_desc, // Sort by the number of downloads, most downloaded sounds first.
|
||||
sort_downloads_asc, // Same as above, but least downloaded sounds first.
|
||||
sort_rating_desc, // Sort by the average rating given to the sounds, highest rated first.
|
||||
sort_rating_asc // Same as above, but lowest rated sounds first.
|
||||
};
|
||||
|
||||
|
||||
|
@ -72,14 +72,14 @@ public:
|
|||
Mootcher();
|
||||
~Mootcher();
|
||||
|
||||
bool checkAudioFile(std::string originalFileName, std::string ID);
|
||||
bool fetchAudioFile(std::string originalFileName, std::string ID, std::string audioURL, SoundFileBrowser *caller);
|
||||
std::string searchText(std::string query, int page, std::string filter, enum sortMethod sort);
|
||||
std::string searchSimilar(std::string id);
|
||||
void * threadFunc();
|
||||
bool checkAudioFile(std::string originalFileName, std::string ID);
|
||||
bool fetchAudioFile(std::string originalFileName, std::string ID, std::string audioURL, SoundFileBrowser *caller);
|
||||
std::string searchText(std::string query, int page, std::string filter, enum sortMethod sort);
|
||||
std::string searchSimilar(std::string id);
|
||||
void* threadFunc();
|
||||
SoundFileBrowser *sfb;
|
||||
std::string audioFileName;
|
||||
std::string ID;
|
||||
std::string audioFileName;
|
||||
std::string ID;
|
||||
|
||||
/** signal emitted when mootcher reports progress updates during download.
|
||||
* The parameters are current and total numbers of bytes downloaded.
|
||||
|
@ -90,19 +90,18 @@ public:
|
|||
|
||||
|
||||
private:
|
||||
void ensureWorkingDir ();
|
||||
|
||||
void ensureWorkingDir();
|
||||
std::string doRequest (std::string uri, std::string params);
|
||||
void setcUrlOptions ();
|
||||
|
||||
std::string doRequest(std::string uri, std::string params);
|
||||
void setcUrlOptions();
|
||||
|
||||
static size_t WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data);
|
||||
static int progress_callback(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow);
|
||||
std::string sortMethodString(enum sortMethod sort);
|
||||
std::string getSoundResourceFile(std::string ID);
|
||||
static size_t WriteMemoryCallback (void *ptr, size_t size, size_t nmemb, void *data);
|
||||
static int progress_callback (void *clientp, double dltotal, double dlnow, double ultotal, double ulnow);
|
||||
std::string sortMethodString (enum sortMethod sort);
|
||||
std::string getSoundResourceFile (std::string ID);
|
||||
|
||||
CURL *curl;
|
||||
char errorBuffer[CURL_ERROR_SIZE]; // storage for cUrl error message
|
||||
char errorBuffer[CURL_ERROR_SIZE]; // storage for cUrl error message
|
||||
|
||||
FILE* theFile;
|
||||
|
||||
|
|
|
@ -246,13 +246,13 @@ SpeakerDialog::clamp_to_circle (double& x, double& y)
|
|||
void
|
||||
SpeakerDialog::darea_size_allocate (Gtk::Allocation& alloc)
|
||||
{
|
||||
width = alloc.get_width();
|
||||
height = alloc.get_height();
|
||||
width = alloc.get_width();
|
||||
height = alloc.get_height();
|
||||
|
||||
/* The allocation will (should) be rectangualar, but make the basic
|
||||
drawing square; space to the right of the square is for over-hanging
|
||||
text labels.
|
||||
*/
|
||||
* drawing square; space to the right of the square is for over-hanging
|
||||
* text labels.
|
||||
*/
|
||||
width = height;
|
||||
|
||||
if (height > 100) {
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace ArdourCanvas {
|
|||
class Rectangle;
|
||||
class Item;
|
||||
class Container;
|
||||
class Text;
|
||||
class Text;
|
||||
}
|
||||
|
||||
using ARDOUR::samplepos_t;
|
||||
|
|
|
@ -405,7 +405,7 @@ ARDOUR_UI_UTILS::get_xpm (std::string name)
|
|||
|
||||
try {
|
||||
xpm_map[name] = Gdk::Pixbuf::create_from_file (data_file_path);
|
||||
} catch(const Glib::Error& e) {
|
||||
} catch (const Glib::Error& e) {
|
||||
warning << "Caught Glib::Error: " << e.what() << endmsg;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user