2010-08-31 10:16:29 -04:00
|
|
|
/*
|
2019-08-02 17:26:43 -04:00
|
|
|
* Copyright (C) 2014-2017 Robin Gareus <robin@gareus.org>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
2010-08-31 10:16:29 -04:00
|
|
|
|
|
|
|
#ifndef __gtkardour_port_insert_ui_h__
|
|
|
|
#define __gtkardour_port_insert_ui_h__
|
|
|
|
|
2022-10-11 00:16:10 -04:00
|
|
|
#include "widgets/ardour_button.h"
|
2017-07-16 22:55:52 -04:00
|
|
|
#include "widgets/stateful_button.h"
|
2022-10-11 00:16:10 -04:00
|
|
|
|
|
|
|
#include "ardour_window.h"
|
|
|
|
#include "gain_meter.h"
|
2010-08-31 10:16:29 -04:00
|
|
|
#include "io_selector.h"
|
|
|
|
|
2022-10-11 00:16:10 -04:00
|
|
|
namespace ARDOUR
|
|
|
|
{
|
2010-08-31 10:16:29 -04:00
|
|
|
class PortInsert;
|
|
|
|
}
|
|
|
|
|
2022-10-11 00:16:10 -04:00
|
|
|
class LatencyGUI;
|
|
|
|
class MTDM;
|
|
|
|
|
2010-08-31 10:16:29 -04:00
|
|
|
class PortInsertUI : public Gtk::VBox
|
|
|
|
{
|
2017-07-01 15:11:14 -04:00
|
|
|
public:
|
2023-02-16 18:33:28 -05:00
|
|
|
PortInsertUI (Gtk::Window*, ARDOUR::Session*, std::shared_ptr<ARDOUR::PortInsert>);
|
2022-10-11 00:16:10 -04:00
|
|
|
~PortInsertUI ();
|
2010-08-31 10:16:29 -04:00
|
|
|
|
|
|
|
void redisplay ();
|
|
|
|
void finished (IOSelector::Result);
|
|
|
|
|
2017-07-01 15:11:14 -04:00
|
|
|
private:
|
2022-10-11 00:16:10 -04:00
|
|
|
void fast_update ();
|
|
|
|
void send_changed (ARDOUR::IOChange, void*);
|
|
|
|
void return_changed (ARDOUR::IOChange, void*);
|
2010-08-31 10:16:29 -04:00
|
|
|
|
2017-07-01 12:42:24 -04:00
|
|
|
bool check_latency_measurement ();
|
2022-10-11 00:16:10 -04:00
|
|
|
void set_latency_label ();
|
|
|
|
void forget_measuremed_latency ();
|
|
|
|
void set_measured_status (MTDM* mtdm = NULL);
|
|
|
|
|
|
|
|
bool invert_press (GdkEventButton* ev);
|
|
|
|
bool invert_release (GdkEventButton* ev);
|
|
|
|
bool measure_latency_press (GdkEventButton* ev);
|
|
|
|
void edit_latency_button_clicked ();
|
2017-07-01 12:42:24 -04:00
|
|
|
void latency_button_toggled ();
|
2010-08-31 10:16:29 -04:00
|
|
|
|
2023-02-16 18:33:28 -05:00
|
|
|
std::shared_ptr<ARDOUR::PortInsert> _pi;
|
2010-08-31 10:16:29 -04:00
|
|
|
|
2022-10-11 00:16:10 -04:00
|
|
|
Gtk::Notebook _notebook;
|
|
|
|
ArdourWidgets::StatefulToggleButton _measure_latency_button;
|
|
|
|
ArdourWidgets::ArdourButton _invert_button;
|
|
|
|
ArdourWidgets::ArdourButton _edit_latency_button;
|
2010-08-31 10:16:29 -04:00
|
|
|
|
2022-10-11 00:16:10 -04:00
|
|
|
IOSelector _input_selector;
|
|
|
|
IOSelector _output_selector;
|
|
|
|
GainMeter _input_gpm;
|
|
|
|
GainMeter _output_gpm;
|
|
|
|
Gtk::HBox _input_hbox;
|
|
|
|
Gtk::HBox _output_hbox;
|
|
|
|
Gtk::VBox _input_vbox;
|
|
|
|
Gtk::VBox _output_vbox;
|
|
|
|
Gtk::Label _latency_display;
|
|
|
|
Gtk::HBox _latency_hbox;
|
|
|
|
|
|
|
|
Gtk::Window* _parent;
|
|
|
|
LatencyGUI* _latency_gui;
|
|
|
|
ArdourWindow* _latency_dialog;
|
2010-08-31 10:16:29 -04:00
|
|
|
|
2022-10-11 00:16:10 -04:00
|
|
|
sigc::connection _latency_timeout;
|
|
|
|
sigc::connection _fast_screen_update_connection;
|
|
|
|
|
|
|
|
PBD::ScopedConnectionList _connections;
|
|
|
|
};
|
2010-08-31 10:16:29 -04:00
|
|
|
|
2022-10-11 00:16:10 -04:00
|
|
|
class PortInsertWindow : public ArdourWindow
|
|
|
|
{
|
|
|
|
public:
|
2023-02-16 18:33:28 -05:00
|
|
|
PortInsertWindow (Gtk::Window&, ARDOUR::Session*, std::shared_ptr<ARDOUR::PortInsert>);
|
2023-05-15 16:47:12 -04:00
|
|
|
PortInsertWindow (ARDOUR::Session*, std::shared_ptr<ARDOUR::PortInsert>);
|
2010-08-31 10:16:29 -04:00
|
|
|
|
2022-10-11 00:16:10 -04:00
|
|
|
private:
|
|
|
|
PortInsertUI _portinsertui;
|
2010-08-31 10:16:29 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __gtkardour_port_insert_ui_h__ */
|