2010-07-25 21:54:51 -04:00
|
|
|
/*
|
|
|
|
Copyright (C) 2010 Paul Davis
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2007-10-11 18:07:47 -04:00
|
|
|
#ifndef __gtk2_ardour_engine_dialog_h__
|
|
|
|
#define __gtk2_ardour_engine_dialog_h__
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include <gtkmm/checkbutton.h>
|
|
|
|
#include <gtkmm/spinbutton.h>
|
|
|
|
#include <gtkmm/comboboxtext.h>
|
|
|
|
#include <gtkmm/table.h>
|
|
|
|
#include <gtkmm/expander.h>
|
|
|
|
#include <gtkmm/box.h>
|
|
|
|
#include <gtkmm/buttonbox.h>
|
|
|
|
#include <gtkmm/button.h>
|
|
|
|
|
|
|
|
class EngineControl : public Gtk::VBox {
|
|
|
|
public:
|
|
|
|
EngineControl ();
|
|
|
|
~EngineControl ();
|
|
|
|
|
2012-11-08 10:54:16 -05:00
|
|
|
static bool need_setup ();
|
2013-08-05 12:51:51 -04:00
|
|
|
int setup_engine (bool start);
|
2007-10-11 18:07:47 -04:00
|
|
|
|
|
|
|
bool was_used() const { return _used; }
|
|
|
|
XMLNode& get_state ();
|
|
|
|
void set_state (const XMLNode&);
|
|
|
|
|
|
|
|
private:
|
2013-08-09 00:50:41 -04:00
|
|
|
Gtk::Notebook notebook;
|
|
|
|
|
2013-08-04 14:03:19 -04:00
|
|
|
/* core fields used by all backends */
|
|
|
|
|
|
|
|
Gtk::ComboBoxText backend_combo;
|
|
|
|
Gtk::ComboBoxText input_device_combo;
|
|
|
|
Gtk::ComboBoxText output_device_combo;
|
|
|
|
Gtk::ComboBoxText sample_rate_combo;
|
|
|
|
Gtk::ComboBoxText buffer_size_combo;
|
|
|
|
Gtk::Adjustment input_latency_adjustment;
|
|
|
|
Gtk::SpinButton input_latency;
|
|
|
|
Gtk::Adjustment output_latency_adjustment;
|
|
|
|
Gtk::SpinButton output_latency;
|
|
|
|
Gtk::Adjustment input_channels_adjustment;
|
|
|
|
Gtk::SpinButton input_channels;
|
|
|
|
Gtk::Adjustment output_channels_adjustment;
|
|
|
|
Gtk::SpinButton output_channels;
|
|
|
|
Gtk::Adjustment ports_adjustment;
|
|
|
|
Gtk::SpinButton ports_spinner;
|
|
|
|
|
|
|
|
/* JACK specific */
|
|
|
|
|
|
|
|
Gtk::CheckButton realtime_button;
|
|
|
|
Gtk::CheckButton no_memory_lock_button;
|
|
|
|
Gtk::CheckButton unlock_memory_button;
|
|
|
|
Gtk::CheckButton soft_mode_button;
|
|
|
|
Gtk::CheckButton monitor_button;
|
|
|
|
Gtk::CheckButton force16bit_button;
|
|
|
|
Gtk::CheckButton hw_monitor_button;
|
|
|
|
Gtk::CheckButton hw_meter_button;
|
|
|
|
Gtk::CheckButton verbose_output_button;
|
|
|
|
|
|
|
|
|
|
|
|
Gtk::ComboBoxText preset_combo;
|
|
|
|
Gtk::ComboBoxText serverpath_combo;
|
|
|
|
Gtk::ComboBoxText driver_combo;
|
|
|
|
Gtk::ComboBoxText interface_combo;
|
|
|
|
Gtk::ComboBoxText timeout_combo;
|
|
|
|
Gtk::ComboBoxText dither_mode_combo;
|
|
|
|
Gtk::ComboBoxText audio_mode_combo;
|
|
|
|
Gtk::ComboBoxText midi_driver_combo;
|
|
|
|
|
|
|
|
Gtk::Table basic_packer;
|
2013-08-09 00:50:41 -04:00
|
|
|
Gtk::Table midi_packer;
|
2013-08-04 14:03:19 -04:00
|
|
|
Gtk::HBox basic_hbox;
|
2013-08-09 00:50:41 -04:00
|
|
|
Gtk::HBox midi_hbox;
|
2013-08-08 23:31:35 -04:00
|
|
|
|
|
|
|
sigc::connection sr_connection;
|
2013-08-04 14:03:19 -04:00
|
|
|
|
|
|
|
bool _used;
|
|
|
|
|
|
|
|
static bool engine_running ();
|
|
|
|
|
|
|
|
void driver_changed ();
|
|
|
|
void backend_changed ();
|
|
|
|
|
2013-08-05 12:51:51 -04:00
|
|
|
uint32_t get_rate() const;
|
|
|
|
uint32_t get_buffer_size() const;
|
|
|
|
uint32_t get_input_channels() const;
|
|
|
|
uint32_t get_output_channels() const;
|
|
|
|
uint32_t get_input_latency() const;
|
|
|
|
uint32_t get_output_latency() const;
|
|
|
|
std::string get_device_name() const;
|
|
|
|
std::string get_driver() const;
|
|
|
|
|
2013-08-04 14:03:19 -04:00
|
|
|
void audio_mode_changed ();
|
|
|
|
void interface_changed ();
|
|
|
|
void list_devices ();
|
2013-08-08 23:31:35 -04:00
|
|
|
void reshow_buffer_sizes ();
|
2007-10-11 18:07:47 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __gtk2_ardour_engine_dialog_h__ */
|