mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
merge from trunk
git-svn-id: svn://localhost/ardour2/branches/undo@773 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
c26215c1e5
commit
a160eb92db
16 changed files with 171 additions and 135 deletions
|
|
@ -454,6 +454,8 @@ conf = Configure (libraries['flac'])
|
||||||
conf.CheckLib ('FLAC', 'FLAC__stream_decoder_new', language='CXX')
|
conf.CheckLib ('FLAC', 'FLAC__stream_decoder_new', language='CXX')
|
||||||
libraries['flac'] = conf.Finish ()
|
libraries['flac'] = conf.Finish ()
|
||||||
|
|
||||||
|
libraries['flac'] = LibraryInfo (LIBS='FLAC')
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check for liblo
|
# Check for liblo
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr<Ro
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
name_label.set_text (shortpname);
|
name_label.set_text (shortpname);
|
||||||
name_label.set_alignment (1.0, 0.5);
|
name_label.set_alignment (Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
|
||||||
|
|
||||||
if (nomparent.length()) {
|
if (nomparent.length()) {
|
||||||
|
|
||||||
|
|
@ -118,7 +118,6 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr<Ro
|
||||||
|
|
||||||
plugname = new Label (pname);
|
plugname = new Label (pname);
|
||||||
plugname->set_name (X_("TrackPlugName"));
|
plugname->set_name (X_("TrackPlugName"));
|
||||||
plugname->set_alignment (1.0, 0.5);
|
|
||||||
plugname->show();
|
plugname->show();
|
||||||
name_label.set_name (X_("TrackParameterName"));
|
name_label.set_name (X_("TrackParameterName"));
|
||||||
controls_table.remove (name_hbox);
|
controls_table.remove (name_hbox);
|
||||||
|
|
|
||||||
|
|
@ -293,60 +293,43 @@ Please consider the possibilities, and perhaps (re)start JACK."));
|
||||||
static bool
|
static bool
|
||||||
maybe_load_session ()
|
maybe_load_session ()
|
||||||
{
|
{
|
||||||
|
/* If no session name is given: we're not loading a session yet, nor creating a new one */
|
||||||
|
if (!session_name.length()) {
|
||||||
|
ui->hide_splash ();
|
||||||
|
if (!Config->get_no_new_session_dialog()) {
|
||||||
|
ui->new_session (true);
|
||||||
|
}
|
||||||
|
|
||||||
/* load session, if given */
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Load session or start the new session dialog */
|
||||||
string name, path;
|
string name, path;
|
||||||
|
|
||||||
if (session_name.length()){
|
bool isnew;
|
||||||
bool isnew;
|
|
||||||
|
|
||||||
if (Session::find_session (session_name, path, name, isnew)) {
|
if (Session::find_session (session_name, path, name, isnew)) {
|
||||||
error << string_compose(_("could not load command line session \"%1\""), session_name) << endmsg;
|
error << string_compose(_("could not load command line session \"%1\""), session_name) << endmsg;
|
||||||
} else {
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (new_session) {
|
if (!new_session) {
|
||||||
|
|
||||||
/* command line required that the session be new */
|
/* Loading a session, but the session doesn't exist */
|
||||||
|
if (isnew) {
|
||||||
if (isnew) {
|
error << string_compose (_("\n\nNo session named \"%1\" exists.\n\
|
||||||
|
To create it from the command line, start ardour as \"ardour --new %1"), path) << endmsg;
|
||||||
/* popup the new session dialog
|
return false;
|
||||||
once everything else is OK.
|
|
||||||
*/
|
|
||||||
|
|
||||||
Glib::signal_idle().connect (bind (mem_fun (*ui, &ARDOUR_UI::cmdline_new_session), path));
|
|
||||||
ui->set_will_create_new_session_automatically (true);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
/* it wasn't new, but we require a new session */
|
|
||||||
|
|
||||||
error << string_compose (_("\n\nA session named \"%1\" already exists.\n\
|
|
||||||
To avoid this message, start ardour as \"ardour %1"), path)
|
|
||||||
<< endmsg;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
/* command line didn't require a new session */
|
|
||||||
|
|
||||||
if (isnew) {
|
|
||||||
error << string_compose (_("\n\nNo session named \"%1\" exists.\n\
|
|
||||||
To create it from the command line, start ardour as \"ardour --new %1"), path)
|
|
||||||
<< endmsg;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
ui->load_session (path, name);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (no_splash) {
|
ui->load_session (path, name);
|
||||||
ui->show();
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
/* TODO: This bit of code doesn't work properly yet
|
||||||
|
Glib::signal_idle().connect (bind (mem_fun (*ui, &ARDOUR_UI::cmdline_new_session), path));
|
||||||
|
ui->set_will_create_new_session_automatically (true); */
|
||||||
|
|
||||||
|
/* Show the NSD */
|
||||||
ui->hide_splash ();
|
ui->hide_splash ();
|
||||||
if (!Config->get_no_new_session_dialog()) {
|
if (!Config->get_no_new_session_dialog()) {
|
||||||
ui->new_session (true);
|
ui->new_session (true);
|
||||||
|
|
|
||||||
|
|
@ -32,12 +32,15 @@
|
||||||
#include <gtkmm/filefilter.h>
|
#include <gtkmm/filefilter.h>
|
||||||
#include <gtkmm/stock.h>
|
#include <gtkmm/stock.h>
|
||||||
|
|
||||||
|
#include "opts.h"
|
||||||
|
|
||||||
NewSessionDialog::NewSessionDialog()
|
NewSessionDialog::NewSessionDialog()
|
||||||
: ArdourDialog ("New Session Dialog")
|
: ArdourDialog ("New Session Dialog")
|
||||||
{
|
{
|
||||||
session_name_label = Gtk::manage(new class Gtk::Label(_("New Session Name :")));
|
session_name_label = Gtk::manage(new class Gtk::Label(_("New Session Name :")));
|
||||||
m_name = Gtk::manage(new class Gtk::Entry());
|
m_name = Gtk::manage(new class Gtk::Entry());
|
||||||
|
m_name->set_text(GTK_ARDOUR::session_name);
|
||||||
|
|
||||||
session_location_label = Gtk::manage(new class Gtk::Label(_("Create Session Directory In :")));
|
session_location_label = Gtk::manage(new class Gtk::Label(_("Create Session Directory In :")));
|
||||||
m_folder = Gtk::manage(new class Gtk::FileChooserButton(Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER));
|
m_folder = Gtk::manage(new class Gtk::FileChooserButton(Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER));
|
||||||
session_template_label = Gtk::manage(new class Gtk::Label(_("Use Session Template :")));
|
session_template_label = Gtk::manage(new class Gtk::Label(_("Use Session Template :")));
|
||||||
|
|
@ -324,13 +327,21 @@ NewSessionDialog::NewSessionDialog()
|
||||||
m_folder->set_current_folder(getenv ("HOME"));
|
m_folder->set_current_folder(getenv ("HOME"));
|
||||||
m_folder->set_title(_("select directory"));
|
m_folder->set_title(_("select directory"));
|
||||||
|
|
||||||
set_default_response (Gtk::RESPONSE_OK);
|
on_new_session_page = true;
|
||||||
set_response_sensitive (Gtk::RESPONSE_OK, false);
|
|
||||||
set_response_sensitive (Gtk::RESPONSE_NONE, false);
|
|
||||||
m_notebook->set_current_page(0);
|
m_notebook->set_current_page(0);
|
||||||
m_notebook->show();
|
m_notebook->show();
|
||||||
m_notebook->show_all_children();
|
m_notebook->show_all_children();
|
||||||
|
|
||||||
|
|
||||||
|
set_default_response (Gtk::RESPONSE_OK);
|
||||||
|
if (!GTK_ARDOUR::session_name.length()) {
|
||||||
|
set_response_sensitive (Gtk::RESPONSE_OK, false);
|
||||||
|
set_response_sensitive (Gtk::RESPONSE_NONE, false);
|
||||||
|
} else {
|
||||||
|
set_response_sensitive (Gtk::RESPONSE_OK, true);
|
||||||
|
set_response_sensitive (Gtk::RESPONSE_NONE, true);
|
||||||
|
}
|
||||||
|
|
||||||
///@ connect some signals
|
///@ connect some signals
|
||||||
|
|
||||||
m_connect_inputs->signal_clicked().connect (mem_fun (*this, &NewSessionDialog::connect_inputs_clicked));
|
m_connect_inputs->signal_clicked().connect (mem_fun (*this, &NewSessionDialog::connect_inputs_clicked));
|
||||||
|
|
@ -501,11 +512,11 @@ NewSessionDialog::reset_name()
|
||||||
bool
|
bool
|
||||||
NewSessionDialog::entry_key_release (GdkEventKey* ev)
|
NewSessionDialog::entry_key_release (GdkEventKey* ev)
|
||||||
{
|
{
|
||||||
if (m_name->get_text() != "") {
|
if (m_name->get_text() != "") {
|
||||||
set_response_sensitive (Gtk::RESPONSE_OK, true);
|
set_response_sensitive (Gtk::RESPONSE_OK, true);
|
||||||
set_response_sensitive (Gtk::RESPONSE_NONE, true);
|
set_response_sensitive (Gtk::RESPONSE_NONE, true);
|
||||||
} else {
|
} else {
|
||||||
set_response_sensitive (Gtk::RESPONSE_OK, false);
|
set_response_sensitive (Gtk::RESPONSE_OK, false);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -513,25 +524,27 @@ NewSessionDialog::entry_key_release (GdkEventKey* ev)
|
||||||
void
|
void
|
||||||
NewSessionDialog::notebook_page_changed (GtkNotebookPage* np, uint pagenum)
|
NewSessionDialog::notebook_page_changed (GtkNotebookPage* np, uint pagenum)
|
||||||
{
|
{
|
||||||
if (pagenum == 1) {
|
if (pagenum == 1) {
|
||||||
m_okbutton->set_label(_("Open"));
|
on_new_session_page = false;
|
||||||
set_response_sensitive (Gtk::RESPONSE_NONE, false);
|
m_okbutton->set_label(_("Open"));
|
||||||
m_okbutton->set_image (*(new Gtk::Image (Gtk::Stock::OPEN, Gtk::ICON_SIZE_BUTTON)));
|
set_response_sensitive (Gtk::RESPONSE_NONE, false);
|
||||||
if (m_treeview->get_selection()->count_selected_rows() == 0) {
|
m_okbutton->set_image (*(new Gtk::Image (Gtk::Stock::OPEN, Gtk::ICON_SIZE_BUTTON)));
|
||||||
set_response_sensitive (Gtk::RESPONSE_OK, false);
|
if (m_treeview->get_selection()->count_selected_rows() == 0) {
|
||||||
|
set_response_sensitive (Gtk::RESPONSE_OK, false);
|
||||||
} else {
|
} else {
|
||||||
set_response_sensitive (Gtk::RESPONSE_OK, true);
|
set_response_sensitive (Gtk::RESPONSE_OK, true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (m_name->get_text() != "") {
|
on_new_session_page = true;
|
||||||
set_response_sensitive (Gtk::RESPONSE_NONE, true);
|
if (m_name->get_text() != "") {
|
||||||
|
set_response_sensitive (Gtk::RESPONSE_NONE, true);
|
||||||
}
|
}
|
||||||
m_okbutton->set_label(_("New"));
|
m_okbutton->set_label(_("New"));
|
||||||
m_okbutton->set_image (*(new Gtk::Image (Gtk::Stock::NEW, Gtk::ICON_SIZE_BUTTON)));
|
m_okbutton->set_image (*(new Gtk::Image (Gtk::Stock::NEW, Gtk::ICON_SIZE_BUTTON)));
|
||||||
if (m_name->get_text() == "") {
|
if (m_name->get_text() == "") {
|
||||||
set_response_sensitive (Gtk::RESPONSE_OK, false);
|
set_response_sensitive (Gtk::RESPONSE_OK, false);
|
||||||
} else {
|
} else {
|
||||||
set_response_sensitive (Gtk::RESPONSE_OK, true);
|
set_response_sensitive (Gtk::RESPONSE_OK, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -540,35 +553,37 @@ void
|
||||||
NewSessionDialog::treeview_selection_changed ()
|
NewSessionDialog::treeview_selection_changed ()
|
||||||
{
|
{
|
||||||
if (m_treeview->get_selection()->count_selected_rows() == 0) {
|
if (m_treeview->get_selection()->count_selected_rows() == 0) {
|
||||||
if (!m_open_filechooser->get_filename().empty()) {
|
if (!m_open_filechooser->get_filename().empty()) {
|
||||||
set_response_sensitive (Gtk::RESPONSE_OK, true);
|
set_response_sensitive (Gtk::RESPONSE_OK, true);
|
||||||
} else {
|
} else {
|
||||||
set_response_sensitive (Gtk::RESPONSE_OK, false);
|
set_response_sensitive (Gtk::RESPONSE_OK, false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
set_response_sensitive (Gtk::RESPONSE_OK, true);
|
set_response_sensitive (Gtk::RESPONSE_OK, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
NewSessionDialog::file_chosen ()
|
NewSessionDialog::file_chosen ()
|
||||||
{
|
{
|
||||||
m_treeview->get_selection()->unselect_all();
|
if (on_new_session_page) return;
|
||||||
|
|
||||||
|
m_treeview->get_selection()->unselect_all();
|
||||||
|
|
||||||
if (!m_open_filechooser->get_filename().empty()) {
|
if (!m_open_filechooser->get_filename().empty()) {
|
||||||
set_response_sensitive (Gtk::RESPONSE_OK, true);
|
set_response_sensitive (Gtk::RESPONSE_OK, true);
|
||||||
} else {
|
} else {
|
||||||
set_response_sensitive (Gtk::RESPONSE_OK, false);
|
set_response_sensitive (Gtk::RESPONSE_OK, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
NewSessionDialog::template_chosen ()
|
NewSessionDialog::template_chosen ()
|
||||||
{
|
{
|
||||||
if (m_template->get_filename() != "" ) {;
|
if (m_template->get_filename() != "" ) {;
|
||||||
set_response_sensitive (Gtk::RESPONSE_NONE, true);
|
set_response_sensitive (Gtk::RESPONSE_NONE, true);
|
||||||
} else {
|
} else {
|
||||||
set_response_sensitive (Gtk::RESPONSE_NONE, false);
|
set_response_sensitive (Gtk::RESPONSE_NONE, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -182,6 +182,8 @@ protected:
|
||||||
void master_bus_button_clicked ();
|
void master_bus_button_clicked ();
|
||||||
void monitor_bus_button_clicked ();
|
void monitor_bus_button_clicked ();
|
||||||
|
|
||||||
|
bool on_new_session_page;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -143,14 +143,19 @@ GTK_ARDOUR::parse_opts (int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
return print_help(execname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (optind < argc) {
|
if (optind < argc) {
|
||||||
|
if (new_session) {
|
||||||
|
cerr << "Illogical combination: you can either create a new session, or a load an existing session but not both!" << endl;
|
||||||
|
return print_help(execname);
|
||||||
|
}
|
||||||
session_name = argv[optind++];
|
session_name = argv[optind++];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -90,13 +90,13 @@ PluginUIWindow::PluginUIWindow (AudioEngine &engine, boost::shared_ptr<PluginIns
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
PluginUI* pu = new PluginUI (engine, insert, scrollable);
|
LadspaPluginUI* pu = new LadspaPluginUI (engine, insert, scrollable);
|
||||||
|
|
||||||
_pluginui = pu;
|
_pluginui = pu;
|
||||||
get_vbox()->add (*pu);
|
get_vbox()->add (*pu);
|
||||||
|
|
||||||
signal_map_event().connect (mem_fun (*pu, &PluginUI::start_updating));
|
signal_map_event().connect (mem_fun (*pu, &LadspaPluginUI::start_updating));
|
||||||
signal_unmap_event().connect (mem_fun (*pu, &PluginUI::stop_updating));
|
signal_unmap_event().connect (mem_fun (*pu, &LadspaPluginUI::stop_updating));
|
||||||
}
|
}
|
||||||
|
|
||||||
set_position (Gtk::WIN_POS_MOUSE);
|
set_position (Gtk::WIN_POS_MOUSE);
|
||||||
|
|
@ -117,7 +117,7 @@ PluginUIWindow::~PluginUIWindow ()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginUI::PluginUI (AudioEngine &engine, boost::shared_ptr<PluginInsert> pi, bool scrollable)
|
LadspaPluginUI::LadspaPluginUI (AudioEngine &engine, boost::shared_ptr<PluginInsert> pi, bool scrollable)
|
||||||
: PlugUIBase (pi),
|
: PlugUIBase (pi),
|
||||||
engine(engine),
|
engine(engine),
|
||||||
button_table (initial_button_rows, initial_button_cols),
|
button_table (initial_button_rows, initial_button_cols),
|
||||||
|
|
@ -165,13 +165,13 @@ PluginUI::PluginUI (AudioEngine &engine, boost::shared_ptr<PluginInsert> pi, boo
|
||||||
pack_start (hpacker, false, false);
|
pack_start (hpacker, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
insert->active_changed.connect (mem_fun(*this, &PluginUI::redirect_active_changed));
|
insert->active_changed.connect (mem_fun(*this, &LadspaPluginUI::redirect_active_changed));
|
||||||
bypass_button.set_active (!insert->active());
|
bypass_button.set_active (!insert->active());
|
||||||
|
|
||||||
build (engine);
|
build (engine);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginUI::~PluginUI ()
|
LadspaPluginUI::~LadspaPluginUI ()
|
||||||
{
|
{
|
||||||
if (output_controls.size() > 0) {
|
if (output_controls.size() > 0) {
|
||||||
screen_update_connection.disconnect();
|
screen_update_connection.disconnect();
|
||||||
|
|
@ -179,7 +179,7 @@ PluginUI::~PluginUI ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PluginUI::build (AudioEngine &engine)
|
LadspaPluginUI::build (AudioEngine &engine)
|
||||||
|
|
||||||
{
|
{
|
||||||
guint32 i = 0;
|
guint32 i = 0;
|
||||||
|
|
@ -350,7 +350,7 @@ PluginUI::build (AudioEngine &engine)
|
||||||
button_table.show_all ();
|
button_table.show_all ();
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginUI::ControlUI::ControlUI ()
|
LadspaPluginUI::ControlUI::ControlUI ()
|
||||||
: automate_button (X_("")) // force creation of a label
|
: automate_button (X_("")) // force creation of a label
|
||||||
{
|
{
|
||||||
automate_button.set_name ("PluginAutomateButton");
|
automate_button.set_name ("PluginAutomateButton");
|
||||||
|
|
@ -370,7 +370,7 @@ PluginUI::ControlUI::ControlUI ()
|
||||||
meterinfo = 0;
|
meterinfo = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginUI::ControlUI::~ControlUI()
|
LadspaPluginUI::ControlUI::~ControlUI()
|
||||||
{
|
{
|
||||||
if (adjustment) {
|
if (adjustment) {
|
||||||
delete adjustment;
|
delete adjustment;
|
||||||
|
|
@ -383,7 +383,7 @@ PluginUI::ControlUI::~ControlUI()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PluginUI::automation_state_changed (ControlUI* cui)
|
LadspaPluginUI::automation_state_changed (ControlUI* cui)
|
||||||
{
|
{
|
||||||
/* update button label */
|
/* update button label */
|
||||||
|
|
||||||
|
|
@ -413,13 +413,13 @@ static void integer_printer (char buf[32], Adjustment &adj, void *arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PluginUI::print_parameter (char *buf, uint32_t len, uint32_t param)
|
LadspaPluginUI::print_parameter (char *buf, uint32_t len, uint32_t param)
|
||||||
{
|
{
|
||||||
plugin->print_parameter (param, buf, len);
|
plugin->print_parameter (param, buf, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginUI::ControlUI*
|
LadspaPluginUI::ControlUI*
|
||||||
PluginUI::build_control_ui (AudioEngine &engine, guint32 port_index, PBD::Controllable* mcontrol)
|
LadspaPluginUI::build_control_ui (AudioEngine &engine, guint32 port_index, PBD::Controllable* mcontrol)
|
||||||
|
|
||||||
{
|
{
|
||||||
ControlUI* control_ui;
|
ControlUI* control_ui;
|
||||||
|
|
@ -452,8 +452,8 @@ PluginUI::build_control_ui (AudioEngine &engine, guint32 port_index, PBD::Contro
|
||||||
control_ui->combo = new Gtk::ComboBoxText;
|
control_ui->combo = new Gtk::ComboBoxText;
|
||||||
//control_ui->combo->set_value_in_list(true, false);
|
//control_ui->combo->set_value_in_list(true, false);
|
||||||
set_popdown_strings (*control_ui->combo, setup_scale_values(port_index, control_ui));
|
set_popdown_strings (*control_ui->combo, setup_scale_values(port_index, control_ui));
|
||||||
control_ui->combo->signal_changed().connect (bind (mem_fun(*this, &PluginUI::control_combo_changed), control_ui));
|
control_ui->combo->signal_changed().connect (bind (mem_fun(*this, &LadspaPluginUI::control_combo_changed), control_ui));
|
||||||
plugin->ParameterChanged.connect (bind (mem_fun (*this, &PluginUI::parameter_changed), control_ui));
|
plugin->ParameterChanged.connect (bind (mem_fun (*this, &LadspaPluginUI::parameter_changed), control_ui));
|
||||||
control_ui->pack_start(control_ui->label, true, true);
|
control_ui->pack_start(control_ui->label, true, true);
|
||||||
control_ui->pack_start(*control_ui->combo, false, true);
|
control_ui->pack_start(*control_ui->combo, false, true);
|
||||||
|
|
||||||
|
|
@ -476,7 +476,7 @@ PluginUI::build_control_ui (AudioEngine &engine, guint32 port_index, PBD::Contro
|
||||||
control_ui->pack_start (*control_ui->button, false, true);
|
control_ui->pack_start (*control_ui->button, false, true);
|
||||||
control_ui->pack_start (control_ui->automate_button, false, false);
|
control_ui->pack_start (control_ui->automate_button, false, false);
|
||||||
|
|
||||||
control_ui->button->signal_clicked().connect (bind (mem_fun(*this, &PluginUI::control_port_toggled), control_ui));
|
control_ui->button->signal_clicked().connect (bind (mem_fun(*this, &LadspaPluginUI::control_port_toggled), control_ui));
|
||||||
|
|
||||||
if(plugin->get_parameter (port_index) == 1){
|
if(plugin->get_parameter (port_index) == 1){
|
||||||
control_ui->button->set_active(true);
|
control_ui->button->set_active(true);
|
||||||
|
|
@ -514,7 +514,7 @@ PluginUI::build_control_ui (AudioEngine &engine, guint32 port_index, PBD::Contro
|
||||||
Gtkmm2ext::set_size_request_to_display_given_text (*control_ui->clickbox, "g9999999", 2, 2);
|
Gtkmm2ext::set_size_request_to_display_given_text (*control_ui->clickbox, "g9999999", 2, 2);
|
||||||
control_ui->clickbox->set_print_func (integer_printer, 0);
|
control_ui->clickbox->set_print_func (integer_printer, 0);
|
||||||
} else {
|
} else {
|
||||||
sigc::slot<void,char*,uint32_t> pslot = sigc::bind (mem_fun(*this, &PluginUI::print_parameter), (uint32_t) port_index);
|
sigc::slot<void,char*,uint32_t> pslot = sigc::bind (mem_fun(*this, &LadspaPluginUI::print_parameter), (uint32_t) port_index);
|
||||||
|
|
||||||
control_ui->control = new BarController (*control_ui->adjustment, *mcontrol, pslot);
|
control_ui->control = new BarController (*control_ui->adjustment, *mcontrol, pslot);
|
||||||
// should really match the height of the text in the automation button+label
|
// should really match the height of the text in the automation button+label
|
||||||
|
|
@ -523,8 +523,8 @@ PluginUI::build_control_ui (AudioEngine &engine, guint32 port_index, PBD::Contro
|
||||||
control_ui->control->set_style (BarController::LeftToRight);
|
control_ui->control->set_style (BarController::LeftToRight);
|
||||||
control_ui->control->set_use_parent (true);
|
control_ui->control->set_use_parent (true);
|
||||||
|
|
||||||
control_ui->control->StartGesture.connect (bind (mem_fun(*this, &PluginUI::start_touch), control_ui));
|
control_ui->control->StartGesture.connect (bind (mem_fun(*this, &LadspaPluginUI::start_touch), control_ui));
|
||||||
control_ui->control->StopGesture.connect (bind (mem_fun(*this, &PluginUI::stop_touch), control_ui));
|
control_ui->control->StopGesture.connect (bind (mem_fun(*this, &LadspaPluginUI::stop_touch), control_ui));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -547,14 +547,14 @@ PluginUI::build_control_ui (AudioEngine &engine, guint32 port_index, PBD::Contro
|
||||||
}
|
}
|
||||||
|
|
||||||
control_ui->pack_start (control_ui->automate_button, false, false);
|
control_ui->pack_start (control_ui->automate_button, false, false);
|
||||||
control_ui->adjustment->signal_value_changed().connect (bind (mem_fun(*this, &PluginUI::control_adjustment_changed), control_ui));
|
control_ui->adjustment->signal_value_changed().connect (bind (mem_fun(*this, &LadspaPluginUI::control_adjustment_changed), control_ui));
|
||||||
control_ui->automate_button.signal_clicked().connect (bind (mem_fun(*this, &PluginUI::astate_clicked), control_ui, (uint32_t) port_index));
|
control_ui->automate_button.signal_clicked().connect (bind (mem_fun(*this, &LadspaPluginUI::astate_clicked), control_ui, (uint32_t) port_index));
|
||||||
|
|
||||||
automation_state_changed (control_ui);
|
automation_state_changed (control_ui);
|
||||||
|
|
||||||
plugin->ParameterChanged.connect (bind (mem_fun(*this, &PluginUI::parameter_changed), control_ui));
|
plugin->ParameterChanged.connect (bind (mem_fun(*this, &LadspaPluginUI::parameter_changed), control_ui));
|
||||||
insert->automation_list (port_index).automation_state_changed.connect
|
insert->automation_list (port_index).automation_state_changed.connect
|
||||||
(bind (mem_fun(*this, &PluginUI::automation_state_changed), control_ui));
|
(bind (mem_fun(*this, &LadspaPluginUI::automation_state_changed), control_ui));
|
||||||
|
|
||||||
} else if (plugin->parameter_is_output (port_index)) {
|
} else if (plugin->parameter_is_output (port_index)) {
|
||||||
|
|
||||||
|
|
@ -603,24 +603,24 @@ PluginUI::build_control_ui (AudioEngine &engine, guint32 port_index, PBD::Contro
|
||||||
output_controls.push_back (control_ui);
|
output_controls.push_back (control_ui);
|
||||||
}
|
}
|
||||||
|
|
||||||
plugin->ParameterChanged.connect (bind (mem_fun(*this, &PluginUI::parameter_changed), control_ui));
|
plugin->ParameterChanged.connect (bind (mem_fun(*this, &LadspaPluginUI::parameter_changed), control_ui));
|
||||||
return control_ui;
|
return control_ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PluginUI::start_touch (PluginUI::ControlUI* cui)
|
LadspaPluginUI::start_touch (LadspaPluginUI::ControlUI* cui)
|
||||||
{
|
{
|
||||||
insert->automation_list (cui->port_index).start_touch ();
|
insert->automation_list (cui->port_index).start_touch ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PluginUI::stop_touch (PluginUI::ControlUI* cui)
|
LadspaPluginUI::stop_touch (LadspaPluginUI::ControlUI* cui)
|
||||||
{
|
{
|
||||||
insert->automation_list (cui->port_index).stop_touch ();
|
insert->automation_list (cui->port_index).stop_touch ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PluginUI::astate_clicked (ControlUI* cui, uint32_t port)
|
LadspaPluginUI::astate_clicked (ControlUI* cui, uint32_t port)
|
||||||
{
|
{
|
||||||
using namespace Menu_Helpers;
|
using namespace Menu_Helpers;
|
||||||
|
|
||||||
|
|
@ -633,25 +633,25 @@ PluginUI::astate_clicked (ControlUI* cui, uint32_t port)
|
||||||
|
|
||||||
items.clear ();
|
items.clear ();
|
||||||
items.push_back (MenuElem (_("Off"),
|
items.push_back (MenuElem (_("Off"),
|
||||||
bind (mem_fun(*this, &PluginUI::set_automation_state), (AutoState) Off, cui)));
|
bind (mem_fun(*this, &LadspaPluginUI::set_automation_state), (AutoState) Off, cui)));
|
||||||
items.push_back (MenuElem (_("Play"),
|
items.push_back (MenuElem (_("Play"),
|
||||||
bind (mem_fun(*this, &PluginUI::set_automation_state), (AutoState) Play, cui)));
|
bind (mem_fun(*this, &LadspaPluginUI::set_automation_state), (AutoState) Play, cui)));
|
||||||
items.push_back (MenuElem (_("Write"),
|
items.push_back (MenuElem (_("Write"),
|
||||||
bind (mem_fun(*this, &PluginUI::set_automation_state), (AutoState) Write, cui)));
|
bind (mem_fun(*this, &LadspaPluginUI::set_automation_state), (AutoState) Write, cui)));
|
||||||
items.push_back (MenuElem (_("Touch"),
|
items.push_back (MenuElem (_("Touch"),
|
||||||
bind (mem_fun(*this, &PluginUI::set_automation_state), (AutoState) Touch, cui)));
|
bind (mem_fun(*this, &LadspaPluginUI::set_automation_state), (AutoState) Touch, cui)));
|
||||||
|
|
||||||
automation_menu->popup (1, 0);
|
automation_menu->popup (1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PluginUI::set_automation_state (AutoState state, ControlUI* cui)
|
LadspaPluginUI::set_automation_state (AutoState state, ControlUI* cui)
|
||||||
{
|
{
|
||||||
insert->set_port_automation_state (cui->port_index, state);
|
insert->set_port_automation_state (cui->port_index, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PluginUI::control_adjustment_changed (ControlUI* cui)
|
LadspaPluginUI::control_adjustment_changed (ControlUI* cui)
|
||||||
{
|
{
|
||||||
if (cui->ignore_change) {
|
if (cui->ignore_change) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -667,18 +667,18 @@ PluginUI::control_adjustment_changed (ControlUI* cui)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PluginUI::parameter_changed (uint32_t abs_port_id, float val, ControlUI* cui)
|
LadspaPluginUI::parameter_changed (uint32_t abs_port_id, float val, ControlUI* cui)
|
||||||
{
|
{
|
||||||
if (cui->port_index == abs_port_id) {
|
if (cui->port_index == abs_port_id) {
|
||||||
if (!cui->update_pending) {
|
if (!cui->update_pending) {
|
||||||
cui->update_pending = true;
|
cui->update_pending = true;
|
||||||
Gtkmm2ext::UI::instance()->call_slot (bind (mem_fun(*this, &PluginUI::update_control_display), cui));
|
Gtkmm2ext::UI::instance()->call_slot (bind (mem_fun(*this, &LadspaPluginUI::update_control_display), cui));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PluginUI::update_control_display (ControlUI* cui)
|
LadspaPluginUI::update_control_display (ControlUI* cui)
|
||||||
{
|
{
|
||||||
/* XXX how do we handle logarithmic stuff here ? */
|
/* XXX how do we handle logarithmic stuff here ? */
|
||||||
|
|
||||||
|
|
@ -715,7 +715,7 @@ PluginUI::update_control_display (ControlUI* cui)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PluginUI::control_port_toggled (ControlUI* cui)
|
LadspaPluginUI::control_port_toggled (ControlUI* cui)
|
||||||
{
|
{
|
||||||
if (!cui->ignore_change) {
|
if (!cui->ignore_change) {
|
||||||
insert->set_parameter (cui->port_index, cui->button->get_active());
|
insert->set_parameter (cui->port_index, cui->button->get_active());
|
||||||
|
|
@ -723,7 +723,7 @@ PluginUI::control_port_toggled (ControlUI* cui)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PluginUI::control_combo_changed (ControlUI* cui)
|
LadspaPluginUI::control_combo_changed (ControlUI* cui)
|
||||||
{
|
{
|
||||||
if (!cui->ignore_change) {
|
if (!cui->ignore_change) {
|
||||||
string value = cui->combo->get_active_text();
|
string value = cui->combo->get_active_text();
|
||||||
|
|
@ -743,26 +743,26 @@ PluginUIWindow::plugin_going_away (ARDOUR::Redirect* ignored)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PluginUI::redirect_active_changed (Redirect* r, void* src)
|
LadspaPluginUI::redirect_active_changed (Redirect* r, void* src)
|
||||||
{
|
{
|
||||||
ENSURE_GUI_THREAD(bind (mem_fun(*this, &PluginUI::redirect_active_changed), r, src));
|
ENSURE_GUI_THREAD(bind (mem_fun(*this, &LadspaPluginUI::redirect_active_changed), r, src));
|
||||||
|
|
||||||
bypass_button.set_active (!r->active());
|
bypass_button.set_active (!r->active());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
PluginUI::start_updating (GdkEventAny* ignored)
|
LadspaPluginUI::start_updating (GdkEventAny* ignored)
|
||||||
{
|
{
|
||||||
if (output_controls.size() > 0 ) {
|
if (output_controls.size() > 0 ) {
|
||||||
screen_update_connection.disconnect();
|
screen_update_connection.disconnect();
|
||||||
screen_update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect
|
screen_update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect
|
||||||
(mem_fun(*this, &PluginUI::output_update));
|
(mem_fun(*this, &LadspaPluginUI::output_update));
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
PluginUI::stop_updating (GdkEventAny* ignored)
|
LadspaPluginUI::stop_updating (GdkEventAny* ignored)
|
||||||
{
|
{
|
||||||
if (output_controls.size() > 0 ) {
|
if (output_controls.size() > 0 ) {
|
||||||
screen_update_connection.disconnect();
|
screen_update_connection.disconnect();
|
||||||
|
|
@ -771,7 +771,7 @@ PluginUI::stop_updating (GdkEventAny* ignored)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PluginUI::output_update ()
|
LadspaPluginUI::output_update ()
|
||||||
{
|
{
|
||||||
for (vector<ControlUI*>::iterator i = output_controls.begin(); i != output_controls.end(); ++i) {
|
for (vector<ControlUI*>::iterator i = output_controls.begin(); i != output_controls.end(); ++i) {
|
||||||
float val = plugin->get_parameter ((*i)->port_index);
|
float val = plugin->get_parameter ((*i)->port_index);
|
||||||
|
|
@ -805,7 +805,7 @@ PluginUI::output_update ()
|
||||||
}
|
}
|
||||||
|
|
||||||
vector<string>
|
vector<string>
|
||||||
PluginUI::setup_scale_values(guint32 port_index, ControlUI* cui)
|
LadspaPluginUI::setup_scale_values(guint32 port_index, ControlUI* cui)
|
||||||
{
|
{
|
||||||
vector<string> enums;
|
vector<string> enums;
|
||||||
boost::shared_ptr<LadspaPlugin> lp = boost::dynamic_pointer_cast<LadspaPlugin> (plugin);
|
boost::shared_ptr<LadspaPlugin> lp = boost::dynamic_pointer_cast<LadspaPlugin> (plugin);
|
||||||
|
|
|
||||||
|
|
@ -87,11 +87,11 @@ class PlugUIBase : public virtual sigc::trackable
|
||||||
void bypass_toggled();
|
void bypass_toggled();
|
||||||
};
|
};
|
||||||
|
|
||||||
class PluginUI : public PlugUIBase, public Gtk::VBox
|
class LadspaPluginUI : public PlugUIBase, public Gtk::VBox
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PluginUI (ARDOUR::AudioEngine &, boost::shared_ptr<ARDOUR::PluginInsert> plug, bool scrollable=false);
|
LadspaPluginUI (ARDOUR::AudioEngine &, boost::shared_ptr<ARDOUR::PluginInsert> plug, bool scrollable=false);
|
||||||
~PluginUI ();
|
~LadspaPluginUI ();
|
||||||
|
|
||||||
gint get_preferred_height () { return prefheight; }
|
gint get_preferred_height () { return prefheight; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -287,9 +287,9 @@ void
|
||||||
RouteParams_UI::cleanup_pre_view (bool stopupdate)
|
RouteParams_UI::cleanup_pre_view (bool stopupdate)
|
||||||
{
|
{
|
||||||
if (_active_pre_view) {
|
if (_active_pre_view) {
|
||||||
PluginUI * plugui = 0;
|
LadspaPluginUI * plugui = 0;
|
||||||
|
|
||||||
if (stopupdate && (plugui = dynamic_cast<PluginUI*>(_active_pre_view)) != 0) {
|
if (stopupdate && (plugui = dynamic_cast<LadspaPluginUI*>(_active_pre_view)) != 0) {
|
||||||
plugui->stop_updating (0);
|
plugui->stop_updating (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -304,9 +304,9 @@ void
|
||||||
RouteParams_UI::cleanup_post_view (bool stopupdate)
|
RouteParams_UI::cleanup_post_view (bool stopupdate)
|
||||||
{
|
{
|
||||||
if (_active_post_view) {
|
if (_active_post_view) {
|
||||||
PluginUI * plugui = 0;
|
LadspaPluginUI * plugui = 0;
|
||||||
|
|
||||||
if (stopupdate && (plugui = dynamic_cast<PluginUI*>(_active_post_view)) != 0) {
|
if (stopupdate && (plugui = dynamic_cast<LadspaPluginUI*>(_active_post_view)) != 0) {
|
||||||
plugui->stop_updating (0);
|
plugui->stop_updating (0);
|
||||||
}
|
}
|
||||||
_post_plugin_conn.disconnect();
|
_post_plugin_conn.disconnect();
|
||||||
|
|
@ -556,7 +556,7 @@ RouteParams_UI::redirect_selected (boost::shared_ptr<ARDOUR::Redirect> redirect,
|
||||||
|
|
||||||
if ((plugin_insert = boost::dynamic_pointer_cast<PluginInsert> (insert)) != 0) {
|
if ((plugin_insert = boost::dynamic_pointer_cast<PluginInsert> (insert)) != 0) {
|
||||||
|
|
||||||
PluginUI *plugin_ui = new PluginUI (session->engine(), plugin_insert, true);
|
LadspaPluginUI *plugin_ui = new LadspaPluginUI (session->engine(), plugin_insert, true);
|
||||||
|
|
||||||
if (place == PreFader) {
|
if (place == PreFader) {
|
||||||
cleanup_pre_view();
|
cleanup_pre_view();
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@
|
||||||
class CAComponent;
|
class CAComponent;
|
||||||
class CAAudioUnit;
|
class CAAudioUnit;
|
||||||
class CAComponentDescription;
|
class CAComponentDescription;
|
||||||
|
struct AudioBufferList;
|
||||||
|
|
||||||
namespace ARDOUR {
|
namespace ARDOUR {
|
||||||
|
|
||||||
|
|
@ -89,6 +90,9 @@ class AUPlugin : public ARDOUR::Plugin
|
||||||
CAComponent* comp;
|
CAComponent* comp;
|
||||||
CAAudioUnit* unit;
|
CAAudioUnit* unit;
|
||||||
|
|
||||||
|
AudioBufferList* in_list;
|
||||||
|
AudioBufferList* out_list;
|
||||||
|
|
||||||
std::vector<std::pair<uint32_t, uint32_t> > parameter_map;
|
std::vector<std::pair<uint32_t, uint32_t> > parameter_map;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ class Route : public IO
|
||||||
virtual int silent_roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame,
|
virtual int silent_roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame,
|
||||||
jack_nframes_t offset, bool can_record, bool rec_monitors_input);
|
jack_nframes_t offset, bool can_record, bool rec_monitors_input);
|
||||||
virtual void toggle_monitor_input ();
|
virtual void toggle_monitor_input ();
|
||||||
virtual bool can_record() const { return false; }
|
virtual bool can_record() { return false; }
|
||||||
virtual void set_record_enable (bool yn, void *src) {}
|
virtual void set_record_enable (bool yn, void *src) {}
|
||||||
virtual bool record_enabled() const { return false; }
|
virtual bool record_enabled() const { return false; }
|
||||||
virtual void handle_transport_stopped (bool abort, bool did_locate, bool flush_redirects);
|
virtual void handle_transport_stopped (bool abort, bool did_locate, bool flush_redirects);
|
||||||
|
|
|
||||||
|
|
@ -238,7 +238,7 @@ class TempoMap : public Stateful, public StateManager {
|
||||||
|
|
||||||
XMLNode& get_state (void);
|
XMLNode& get_state (void);
|
||||||
int set_state (const XMLNode&);
|
int set_state (const XMLNode&);
|
||||||
PBD::ID id();
|
PBD::ID id() { return _id; }
|
||||||
|
|
||||||
void dump (std::ostream&) const;
|
void dump (std::ostream&) const;
|
||||||
void clear ();
|
void clear ();
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ class Track : public Route
|
||||||
|
|
||||||
void toggle_monitor_input ();
|
void toggle_monitor_input ();
|
||||||
|
|
||||||
bool can_record() const { return true; }
|
virtual bool can_record();
|
||||||
|
|
||||||
Diskstream& diskstream() const { return *_diskstream; }
|
Diskstream& diskstream() const { return *_diskstream; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,14 @@ AUPlugin::~AUPlugin ()
|
||||||
if (comp) {
|
if (comp) {
|
||||||
delete comp;
|
delete comp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (in_list) {
|
||||||
|
delete in_list;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (out_list) {
|
||||||
|
delete out_list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AUPluginInfo::~AUPluginInfo ()
|
AUPluginInfo::~AUPluginInfo ()
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@ IO::silence (jack_nframes_t nframes, jack_nframes_t offset)
|
||||||
void
|
void
|
||||||
IO::apply_declick (vector<Sample *>& bufs, uint32_t nbufs, jack_nframes_t nframes, gain_t initial, gain_t target, bool invert_polarity)
|
IO::apply_declick (vector<Sample *>& bufs, uint32_t nbufs, jack_nframes_t nframes, gain_t initial, gain_t target, bool invert_polarity)
|
||||||
{
|
{
|
||||||
jack_nframes_t declick = min ((jack_nframes_t)4096, nframes);
|
jack_nframes_t declick = min ((jack_nframes_t)128, nframes);
|
||||||
gain_t delta;
|
gain_t delta;
|
||||||
Sample *buffer;
|
Sample *buffer;
|
||||||
double fractional_shift;
|
double fractional_shift;
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
#include <ardour/audioplaylist.h>
|
#include <ardour/audioplaylist.h>
|
||||||
#include <ardour/panner.h>
|
#include <ardour/panner.h>
|
||||||
#include <ardour/utils.h>
|
#include <ardour/utils.h>
|
||||||
|
#include <ardour/connection.h>
|
||||||
|
|
||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
|
|
||||||
|
|
@ -146,6 +147,18 @@ Track::record_enabled () const
|
||||||
{
|
{
|
||||||
return _diskstream->record_enabled ();
|
return _diskstream->record_enabled ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
Track::can_record()
|
||||||
|
{
|
||||||
|
bool will_record = true;
|
||||||
|
for (int i = 0; i < _inputs.size() && will_record; i++) {
|
||||||
|
if (!_inputs[i]->connected())
|
||||||
|
will_record = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return will_record;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Track::set_record_enable (bool yn, void *src)
|
Track::set_record_enable (bool yn, void *src)
|
||||||
|
|
@ -159,8 +172,13 @@ Track::set_record_enable (bool yn, void *src)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* keep track of the meter point as it was before we rec-enabled */
|
// Do not set rec enabled if the track can't record.
|
||||||
|
if (yn && !can_record()) {
|
||||||
|
error << string_compose( _("Can not arm track '%1'. Check the input connections"), name() ) << endmsg;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* keep track of the meter point as it was before we rec-enabled */
|
||||||
if (!_diskstream->record_enabled()) {
|
if (!_diskstream->record_enabled()) {
|
||||||
_saved_meter_point = _meter_point;
|
_saved_meter_point = _meter_point;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue