mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 11:46:25 +01:00
a metric ton of changes
git-svn-id: svn://localhost/trunk/ardour2@246 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
1186b1d881
commit
a20f41ab39
36 changed files with 768 additions and 1214 deletions
|
|
@ -81,11 +81,13 @@
|
||||||
<separator/>
|
<separator/>
|
||||||
<menuitem action='edit-cursor-to-range-start'/>
|
<menuitem action='edit-cursor-to-range-start'/>
|
||||||
<menuitem action='edit-cursor-to-range-end'/>
|
<menuitem action='edit-cursor-to-range-end'/>
|
||||||
|
<separator/>
|
||||||
|
<menuitem action='crop'/>
|
||||||
|
<menuitem action='duplicate-region'/>
|
||||||
|
<menuitem action='insert-region'/>
|
||||||
|
<menuitem action='normalize-region'/>
|
||||||
</menu>
|
</menu>
|
||||||
<menu name='View' action = 'View'>
|
<menu name='View' action = 'View'>
|
||||||
<menuitem action='temporal-zoom-in'/>
|
|
||||||
<menuitem action='temporal-zoom-out'/>
|
|
||||||
<menuitem action='zoom-to-session'/>
|
|
||||||
<menu name='ZoomFocus' action='ZoomFocus'>
|
<menu name='ZoomFocus' action='ZoomFocus'>
|
||||||
<menuitem action='zoom-focus-left'/>
|
<menuitem action='zoom-focus-left'/>
|
||||||
<menuitem action='zoom-focus-right'/>
|
<menuitem action='zoom-focus-right'/>
|
||||||
|
|
@ -97,11 +99,36 @@
|
||||||
<menuitem action='snap-to-beat'/>
|
<menuitem action='snap-to-beat'/>
|
||||||
<menuitem action='snap-to-bar'/>
|
<menuitem action='snap-to-bar'/>
|
||||||
</menu>
|
</menu>
|
||||||
|
<menu name='MeterFalloff' action='MeterFalloff'>
|
||||||
|
<menuitem action='MeterFalloffOff'/>
|
||||||
|
<menuitem action='MeterFalloffSlowest'/>
|
||||||
|
<menuitem action='MeterFalloffSlow'/>
|
||||||
|
<menuitem action='MeterFalloffMedium'/>
|
||||||
|
<menuitem action='MeterFalloffFast'/>
|
||||||
|
<menuitem action='MeterFalloffFaster'/>
|
||||||
|
<menuitem action='MeterFalloffFastest'/>
|
||||||
|
</menu>
|
||||||
|
<menu name='MeterHold' action='MeterHold'>
|
||||||
|
<menuitem action='MeterHoldOff'/>
|
||||||
|
<menuitem action='MeterHoldShort'/>
|
||||||
|
<menuitem action='MeterHoldMedium'/>
|
||||||
|
<menuitem action='MeterHoldLong'/>
|
||||||
|
</menu>
|
||||||
|
|
||||||
|
<separator/>
|
||||||
|
|
||||||
|
<menuitem action='temporal-zoom-in'/>
|
||||||
|
<menuitem action='temporal-zoom-out'/>
|
||||||
|
<menuitem action='zoom-to-session'/>
|
||||||
<menuitem action='scroll-tracks-down'/>
|
<menuitem action='scroll-tracks-down'/>
|
||||||
<menuitem action='scroll-tracks-up'/>
|
<menuitem action='scroll-tracks-up'/>
|
||||||
<menuitem action='scroll-tracks-down'/>
|
<menuitem action='scroll-tracks-down'/>
|
||||||
<menuitem action='step-tracks-up'/>
|
<menuitem action='step-tracks-up'/>
|
||||||
<menuitem action='step-tracks-down'/>
|
<menuitem action='step-tracks-down'/>
|
||||||
|
<separator/>
|
||||||
|
<menuitem action='ToggleWaveformVisibility'/>
|
||||||
|
<menuitem action='ToggleWaveformsWhileRecording'/>
|
||||||
|
<menuitem action='ToggleMeasureVisibility'/>
|
||||||
</menu>
|
</menu>
|
||||||
<menu name='JACK' action='JACK'>
|
<menu name='JACK' action='JACK'>
|
||||||
<menuitem action='JACKDisconnect'/>
|
<menuitem action='JACKDisconnect'/>
|
||||||
|
|
@ -130,21 +157,29 @@
|
||||||
<menuitem action='About'/>
|
<menuitem action='About'/>
|
||||||
</menu>
|
</menu>
|
||||||
<menu name='Options' action='Options'>
|
<menu name='Options' action='Options'>
|
||||||
|
<menu action='Autoconnect'>
|
||||||
|
<menuitem action='AutoConnectNewTrackInputsToHardware'/>
|
||||||
|
<menuitem action='AutoConnectNewTrackOutputsToHardware'/>
|
||||||
|
<menuitem action='AutoConnectNewTrackOutputsToHardware'/>
|
||||||
|
<menuitem action='ManuallyConnectNewTrackOutputs'/>
|
||||||
|
</menu>
|
||||||
|
<menu action='Monitoring'>
|
||||||
|
<menuitem action='UseHardwareMonitoring'/>
|
||||||
|
<menuitem action='UseSoftwareMonitoring'/>
|
||||||
|
<menuitem action='UseExternalMonitoring'/>
|
||||||
|
</menu>
|
||||||
|
<menu action='Solo'>
|
||||||
|
<menuitem action='LatchedSolo'/>
|
||||||
|
<menuitem action='SoloInPlace'/>
|
||||||
|
<menuitem action='SoloViaBus'/>
|
||||||
|
</menu>
|
||||||
|
<separator/>
|
||||||
<menuitem action='SendMTC'/>
|
<menuitem action='SendMTC'/>
|
||||||
<menuitem action='SendMMC'/>
|
<menuitem action='SendMMC'/>
|
||||||
<menuitem action='UseMMC'/>
|
<menuitem action='UseMMC'/>
|
||||||
<menuitem action='SendMIDIfeedback'/>
|
<menuitem action='SendMIDIfeedback'/>
|
||||||
<menuitem action='UseMIDIcontrol'/>
|
<menuitem action='UseMIDIcontrol'/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<menuitem action='AutoConnectNewTrackInputsToHardware'/>
|
|
||||||
<menuitem action='AutoConnectNewTrackOutputsToHardware'/>
|
|
||||||
<menuitem action='AutoConnectNewTrackOutputsToHardware'/>
|
|
||||||
<menuitem action='ManuallyConnectNewTrackOutputs'/>
|
|
||||||
<separator/>
|
|
||||||
<menuitem action='UseHardwareMonitoring'/>
|
|
||||||
<menuitem action='UseSoftwareMonitoring'/>
|
|
||||||
<menuitem action='UseExternalMonitoring'/>
|
|
||||||
<separator/>
|
|
||||||
<menuitem action='StopPluginsWithTransport'/>
|
<menuitem action='StopPluginsWithTransport'/>
|
||||||
<menuitem action='RunPluginsWhileRecording'/>
|
<menuitem action='RunPluginsWhileRecording'/>
|
||||||
<separator/>
|
<separator/>
|
||||||
|
|
@ -153,10 +188,6 @@
|
||||||
<menuitem action='StopTransportAtEndOfSession'/>
|
<menuitem action='StopTransportAtEndOfSession'/>
|
||||||
<menuitem action='GainReduceFastTransport'/>
|
<menuitem action='GainReduceFastTransport'/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<menuitem action='LatchedSolo'/>
|
|
||||||
<menuitem action='SoloInPlace'/>
|
|
||||||
<menuitem action='SoloViaBus'/>
|
|
||||||
<separator/>
|
|
||||||
<menuitem action='AutomaticallyCreateCrossfades'/>
|
<menuitem action='AutomaticallyCreateCrossfades'/>
|
||||||
<menuitem action='UnmuteNewFullCrossfades'/>
|
<menuitem action='UnmuteNewFullCrossfades'/>
|
||||||
</menu>
|
</menu>
|
||||||
|
|
|
||||||
|
|
@ -8,19 +8,24 @@
|
||||||
(gtk_accel_path "<Actions>/Transport/GotoEnd" "End")
|
(gtk_accel_path "<Actions>/Transport/GotoEnd" "End")
|
||||||
|
|
||||||
(gtk_accel_path "<Actions>/Editor/align-regions-sync-relative" "a")
|
(gtk_accel_path "<Actions>/Editor/align-regions-sync-relative" "a")
|
||||||
|
(gtk_accel_path "<Actions>/Editor/crop" "c")
|
||||||
|
(gtk_accel_path "<Actions>/Editor/duplicate-region" "d")
|
||||||
(gtk_accel_path "<Actions>/Editor/set-edit-cursor" "e")
|
(gtk_accel_path "<Actions>/Editor/set-edit-cursor" "e")
|
||||||
|
(gtk_accel_path "<Actions>/Editor/insert-region" "i")
|
||||||
|
(gtk_accel_path "<Actions>/Editor/normalize-region" "n")
|
||||||
(gtk_accel_path "<Actions>/Transport/loop" "l")
|
(gtk_accel_path "<Actions>/Transport/loop" "l")
|
||||||
(gtk_accel_path "<Actions>/Editor/set-playhead" "p")
|
(gtk_accel_path "<Actions>/Editor/set-playhead" "p")
|
||||||
(gtk_accel_path "<Actions>/Transport/Record" "R")
|
(gtk_accel_path "<Actions>/Transport/Record" "<shift>r")
|
||||||
|
|
||||||
(gtk_accel_path "<Actions>/Editor/copy" "<Control>c")
|
(gtk_accel_path "<Actions>/Editor/editor-copy" "<Control>c")
|
||||||
(gtk_accel_path "<Actions>/Common/Quit" "<Control>q")
|
(gtk_accel_path "<Actions>/Common/Quit" "<Control>q")
|
||||||
(gtk_accel_path "<Actions>/Editor/redo" "<Control>r")
|
(gtk_accel_path "<Actions>/Editor/redo" "<Control>r")
|
||||||
(gtk_accel_path "<Actions>/Common/Save" "<Control>s")
|
(gtk_accel_path "<Actions>/Common/Save" "<Control>s")
|
||||||
(gtk_accel_path "<Actions>/Editor/paste" "<Control>v")
|
(gtk_accel_path "<Actions>/Editor/editor-paste" "<Control>v")
|
||||||
(gtk_accel_path "<Actions>/Editor/cut" "<Control>x")
|
(gtk_accel_path "<Actions>/Editor/editor-cut" "<Control>x")
|
||||||
(gtk_accel_path "<Actions>/Editor/undo" "<Control>z")
|
(gtk_accel_path "<Actions>/Editor/undo" "<Control>z")
|
||||||
|
|
||||||
|
|
||||||
(gtk_accel_path "<Actions>/Editor/scroll-tracks-down" "Page_Down")
|
(gtk_accel_path "<Actions>/Editor/scroll-tracks-down" "Page_Down")
|
||||||
(gtk_accel_path "<Actions>/Editor/scroll-tracks-up" "Page_Up")
|
(gtk_accel_path "<Actions>/Editor/scroll-tracks-up" "Page_Up")
|
||||||
(gtk_accel_path "<Actions>/Editor/step-tracks-down" "Down")
|
(gtk_accel_path "<Actions>/Editor/step-tracks-down" "Down")
|
||||||
|
|
|
||||||
|
|
@ -653,18 +653,6 @@ ARDOUR_UI::update_wall_clock ()
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
ARDOUR_UI::toggle_recording_plugins ()
|
|
||||||
{
|
|
||||||
/* XXX use toggle_some_session_state */
|
|
||||||
|
|
||||||
if (session == 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
session->set_recording_plugins (!session->get_recording_plugins());
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_auto_play ()
|
ARDOUR_UI::toggle_auto_play ()
|
||||||
|
|
||||||
|
|
@ -735,7 +723,6 @@ ARDOUR_UI::toggle_punch_in ()
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::map_button_state ()
|
ARDOUR_UI::map_button_state ()
|
||||||
|
|
||||||
{
|
{
|
||||||
map_some_session_state (auto_return_button,
|
map_some_session_state (auto_return_button,
|
||||||
&Session::get_auto_return);
|
&Session::get_auto_return);
|
||||||
|
|
@ -751,91 +738,6 @@ ARDOUR_UI::map_button_state ()
|
||||||
&Session::get_clicking);
|
&Session::get_clicking);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
ARDOUR_UI::queue_map_control_change (Session::ControlType t)
|
|
||||||
{
|
|
||||||
ENSURE_GUI_THREAD (bind (mem_fun(*this, &ARDOUR_UI::map_control_change), t));
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
ARDOUR_UI::map_control_change (Session::ControlType t)
|
|
||||||
{
|
|
||||||
switch (t) {
|
|
||||||
case Session::AutoPlay:
|
|
||||||
map_some_session_state (auto_play_button, &Session::get_auto_play);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Session::AutoLoop:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Session::AutoReturn:
|
|
||||||
map_some_session_state (auto_return_button, &Session::get_auto_return);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Session::AutoInput:
|
|
||||||
map_some_session_state (auto_input_button, &Session::get_auto_input);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Session::PunchOut:
|
|
||||||
map_some_session_state (punch_in_button, &Session::get_punch_out);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Session::PunchIn:
|
|
||||||
map_some_session_state (punch_in_button, &Session::get_punch_in);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Session::Clicking:
|
|
||||||
map_some_session_state (click_button, &Session::get_clicking);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Session::SlaveType:
|
|
||||||
// map_some_session_state (mtc_slave_button, &Session::get_mtc_slave);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Session::SendMTC:
|
|
||||||
// map_some_session_state (send_mtc_button, &Session::get_send_mtc);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Session::SendMMC:
|
|
||||||
// map_some_session_state (send_mmc_button, &Session::get_send_mmc);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Session::MMCControl:
|
|
||||||
// map_some_session_state (mmc_control_button, &Session::get_mmc_control);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Session::MidiFeedback:
|
|
||||||
// map_some_session_state (mmc_control_button, &Session::get_mmc_control);
|
|
||||||
break;
|
|
||||||
case Session::MidiControl:
|
|
||||||
// map_some_session_state (mmc_control_button, &Session::get_mmc_control);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Session::Live:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Session::RecordingPlugins:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Session::CrossFadesActive:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Session::EditingMode:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Session::PlayRange:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Session::AlignChoice:
|
|
||||||
/* don't care, this is handled by the options editor */
|
|
||||||
break;
|
|
||||||
case Session::SeamlessLoop:
|
|
||||||
/* don't care, this is handled by the options editor */
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::control_methods_adjusted ()
|
ARDOUR_UI::control_methods_adjusted ()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -566,13 +566,12 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
||||||
void connect_dependents_to_session (ARDOUR::Session *);
|
void connect_dependents_to_session (ARDOUR::Session *);
|
||||||
void we_have_dependents ();
|
void we_have_dependents ();
|
||||||
void setup_keybindings ();
|
void setup_keybindings ();
|
||||||
|
void setup_options ();
|
||||||
|
|
||||||
guint32 last_key_press_time;
|
guint32 last_key_press_time;
|
||||||
|
|
||||||
void snapshot_session ();
|
void snapshot_session ();
|
||||||
|
|
||||||
void map_control_change (ARDOUR::Session::ControlType);
|
|
||||||
void queue_map_control_change (ARDOUR::Session::ControlType);
|
|
||||||
void map_record_state ();
|
void map_record_state ();
|
||||||
void queue_map_record_state ();
|
void queue_map_record_state ();
|
||||||
|
|
||||||
|
|
@ -591,10 +590,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
||||||
LocationUI *location_ui;
|
LocationUI *location_ui;
|
||||||
int create_location_ui ();
|
int create_location_ui ();
|
||||||
|
|
||||||
/* Various options */
|
|
||||||
|
|
||||||
void toggle_recording_plugins ();
|
|
||||||
|
|
||||||
/* Options window */
|
/* Options window */
|
||||||
|
|
||||||
OptionEditor *option_editor;
|
OptionEditor *option_editor;
|
||||||
|
|
@ -675,7 +670,11 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
||||||
|
|
||||||
void editor_realized ();
|
void editor_realized ();
|
||||||
|
|
||||||
void toggle_session_state (const char* group, const char* action, void (ARDOUR::Session::*set)(bool));
|
std::vector<std::string> positional_sync_strings;
|
||||||
|
|
||||||
|
void toggle_config_state (const char* group, const char* action, void (ARDOUR::Configuration::*set)(bool));
|
||||||
|
void toggle_session_state (const char* group, const char* action, void (ARDOUR::Session::*set)(bool), bool (ARDOUR::Session::*get)(void) const);
|
||||||
|
void toggle_session_state (const char* group, const char* action, sigc::slot<void> theSlot);
|
||||||
void toggle_send_midi_feedback ();
|
void toggle_send_midi_feedback ();
|
||||||
void toggle_use_mmc ();
|
void toggle_use_mmc ();
|
||||||
void toggle_send_mmc ();
|
void toggle_send_mmc ();
|
||||||
|
|
@ -699,6 +698,11 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
||||||
void toggle_SoloViaBus();
|
void toggle_SoloViaBus();
|
||||||
void toggle_AutomaticallyCreateCrossfades();
|
void toggle_AutomaticallyCreateCrossfades();
|
||||||
void toggle_UnmuteNewFullCrossfades();
|
void toggle_UnmuteNewFullCrossfades();
|
||||||
|
|
||||||
|
void mtc_port_changed ();
|
||||||
|
void map_some_session_state (const char* group, const char* action, bool (ARDOUR::Session::*get)() const);
|
||||||
|
void queue_session_control_changed (ARDOUR::Session::ControlType t);
|
||||||
|
void session_control_changed (ARDOUR::Session::ControlType t);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,16 +53,6 @@ using namespace Gtk;
|
||||||
using namespace Glib;
|
using namespace Glib;
|
||||||
using namespace sigc;
|
using namespace sigc;
|
||||||
|
|
||||||
|
|
||||||
static const gchar *psync_strings[] = {
|
|
||||||
N_("Internal"),
|
|
||||||
N_("Slave to MTC"),
|
|
||||||
N_("Sync with JACK"),
|
|
||||||
0
|
|
||||||
};
|
|
||||||
|
|
||||||
static vector<string> positional_sync_strings;
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ARDOUR_UI::setup_windows ()
|
ARDOUR_UI::setup_windows ()
|
||||||
{
|
{
|
||||||
|
|
@ -391,7 +381,7 @@ ARDOUR_UI::setup_transport ()
|
||||||
ARDOUR_UI::instance()->tooltips().set_tip (primary_clock, _("Primary clock"));
|
ARDOUR_UI::instance()->tooltips().set_tip (primary_clock, _("Primary clock"));
|
||||||
ARDOUR_UI::instance()->tooltips().set_tip (secondary_clock, _("secondary clock"));
|
ARDOUR_UI::instance()->tooltips().set_tip (secondary_clock, _("secondary clock"));
|
||||||
|
|
||||||
/* options */
|
/* options: XXX these should all be actions with the buttons as proxies */
|
||||||
|
|
||||||
auto_return_button.signal_toggled().connect (mem_fun(*this,&ARDOUR_UI::toggle_auto_return));
|
auto_return_button.signal_toggled().connect (mem_fun(*this,&ARDOUR_UI::toggle_auto_return));
|
||||||
auto_play_button.signal_toggled().connect (mem_fun(*this,&ARDOUR_UI::toggle_auto_play));
|
auto_play_button.signal_toggled().connect (mem_fun(*this,&ARDOUR_UI::toggle_auto_play));
|
||||||
|
|
@ -458,9 +448,7 @@ ARDOUR_UI::setup_transport ()
|
||||||
sdframe->set_shadow_type (SHADOW_IN);
|
sdframe->set_shadow_type (SHADOW_IN);
|
||||||
sdframe->add (speed_display_box);
|
sdframe->add (speed_display_box);
|
||||||
|
|
||||||
positional_sync_strings = internationalize (psync_strings);
|
mtc_port_changed ();
|
||||||
|
|
||||||
set_popdown_strings (sync_option_combo, positional_sync_strings);
|
|
||||||
sync_option_combo.set_active_text (positional_sync_strings.front());
|
sync_option_combo.set_active_text (positional_sync_strings.front());
|
||||||
sync_option_combo.signal_changed().connect (mem_fun (*this, &ARDOUR_UI::sync_option_changed));
|
sync_option_combo.signal_changed().connect (mem_fun (*this, &ARDOUR_UI::sync_option_changed));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,8 @@ ARDOUR_UI::connect_to_session (Session *s)
|
||||||
sfdb->set_session (s);
|
sfdb->set_session (s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setup_options ();
|
||||||
|
|
||||||
Blink.connect (mem_fun(*this, &ARDOUR_UI::transport_rec_enable_blink));
|
Blink.connect (mem_fun(*this, &ARDOUR_UI::transport_rec_enable_blink));
|
||||||
Blink.connect (mem_fun(*this, &ARDOUR_UI::solo_blink));
|
Blink.connect (mem_fun(*this, &ARDOUR_UI::solo_blink));
|
||||||
Blink.connect (mem_fun(*this, &ARDOUR_UI::audition_blink));
|
Blink.connect (mem_fun(*this, &ARDOUR_UI::audition_blink));
|
||||||
|
|
@ -89,7 +91,6 @@ ARDOUR_UI::connect_to_session (Session *s)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
session->TransportStateChange.connect (mem_fun(*this, &ARDOUR_UI::queue_transport_change));
|
session->TransportStateChange.connect (mem_fun(*this, &ARDOUR_UI::queue_transport_change));
|
||||||
session->ControlChanged.connect (mem_fun(*this, &ARDOUR_UI::queue_map_control_change));
|
|
||||||
|
|
||||||
/* alert the user to these things happening */
|
/* alert the user to these things happening */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -335,7 +335,7 @@ ARDOUR_UI::install_actions ()
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
act = ActionManager::register_toggle_action (option_actions, X_("SendMMC"), _("Send MMC"), mem_fun (*this, &ARDOUR_UI::toggle_send_mtc));
|
act = ActionManager::register_toggle_action (option_actions, X_("SendMMC"), _("Send MMC"), mem_fun (*this, &ARDOUR_UI::toggle_send_mtc));
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
act = ActionManager::register_toggle_action (option_actions, X_("UseMMC"), _("Send MMC"), mem_fun (*this, &ARDOUR_UI::toggle_use_mmc));
|
act = ActionManager::register_toggle_action (option_actions, X_("UseMMC"), _("Use MMC"), mem_fun (*this, &ARDOUR_UI::toggle_use_mmc));
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
act = ActionManager::register_toggle_action (option_actions, X_("SendMIDIfeedback"), _("Send MIDI feedback"), mem_fun (*this, &ARDOUR_UI::toggle_send_midi_feedback));
|
act = ActionManager::register_toggle_action (option_actions, X_("SendMIDIfeedback"), _("Send MIDI feedback"), mem_fun (*this, &ARDOUR_UI::toggle_send_midi_feedback));
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
|
|
|
||||||
|
|
@ -18,36 +18,67 @@
|
||||||
$Id$
|
$Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <gtkmm2ext/utils.h>
|
||||||
|
|
||||||
#include <ardour/configuration.h>
|
#include <ardour/configuration.h>
|
||||||
#include <ardour/session.h>
|
#include <ardour/session.h>
|
||||||
#include <ardour/audioengine.h>
|
#include <ardour/audioengine.h>
|
||||||
|
|
||||||
#include "ardour_ui.h"
|
#include "ardour_ui.h"
|
||||||
#include "actions.h"
|
#include "actions.h"
|
||||||
|
#include "gui_thread.h"
|
||||||
|
|
||||||
|
#include "i18n.h"
|
||||||
|
|
||||||
using namespace Gtk;
|
using namespace Gtk;
|
||||||
|
using namespace Gtkmm2ext;
|
||||||
using namespace ARDOUR;
|
using namespace ARDOUR;
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_time_master ()
|
ARDOUR_UI::toggle_time_master ()
|
||||||
{
|
{
|
||||||
bool yn = time_master_button.get_active();
|
toggle_config_state ("Transport", "ToggleTimeMaster", &Configuration::set_jack_time_master);
|
||||||
|
|
||||||
Config->set_jack_time_master (yn);
|
|
||||||
|
|
||||||
if (session) {
|
if (session) {
|
||||||
session->engine().reset_timebase ();
|
session->engine().reset_timebase ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_session_state (const char* group, const char* action, void (Session::*set)(bool))
|
ARDOUR_UI::toggle_config_state (const char* group, const char* action, void (Configuration::*set)(bool))
|
||||||
|
{
|
||||||
|
Glib::RefPtr<Action> act = ActionManager::get_action (group, action);
|
||||||
|
if (act) {
|
||||||
|
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||||
|
(Config->*set) (tact->get_active());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ARDOUR_UI::toggle_session_state (const char* group, const char* action, void (Session::*set)(bool), bool (Session::*get)(void) const)
|
||||||
{
|
{
|
||||||
if (session) {
|
if (session) {
|
||||||
Glib::RefPtr<Action> act = ActionManager::get_action (group, action);
|
Glib::RefPtr<Action> act = ActionManager::get_action (group, action);
|
||||||
if (act) {
|
if (act) {
|
||||||
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||||
(session->*set) (tact->get_active());
|
bool x = (session->*get)();
|
||||||
|
|
||||||
|
if (x != tact->get_active()) {
|
||||||
|
(session->*set) (!x);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ARDOUR_UI::toggle_session_state (const char* group, const char* action, sigc::slot<void> theSlot)
|
||||||
|
{
|
||||||
|
if (session) {
|
||||||
|
Glib::RefPtr<Action> act = ActionManager::get_action (group, action);
|
||||||
|
if (act) {
|
||||||
|
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||||
|
if (tact->get_active()) {
|
||||||
|
theSlot ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -55,93 +86,170 @@ ARDOUR_UI::toggle_session_state (const char* group, const char* action, void (Se
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_send_mtc ()
|
ARDOUR_UI::toggle_send_mtc ()
|
||||||
{
|
{
|
||||||
toggle_session_state ("options", "SendMTC", &Session::set_send_mtc);
|
toggle_session_state ("options", "SendMTC", &Session::set_send_mtc, &Session::get_send_mtc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_send_mmc ()
|
ARDOUR_UI::toggle_send_mmc ()
|
||||||
{
|
{
|
||||||
toggle_session_state ("options", "SendMMC", &Session::set_send_mmc);
|
toggle_session_state ("options", "SendMMC", &Session::set_send_mmc, &Session::get_send_mmc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_use_mmc ()
|
ARDOUR_UI::toggle_use_mmc ()
|
||||||
{
|
{
|
||||||
toggle_session_state ("options", "UseMMC", &Session::set_mmc_control);
|
toggle_session_state ("options", "UseMMC", &Session::set_mmc_control, &Session::get_mmc_control);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_use_midi_control ()
|
ARDOUR_UI::toggle_use_midi_control ()
|
||||||
{
|
{
|
||||||
toggle_session_state ("options", "UseMIDIcontrol", &Session::set_midi_control);
|
toggle_session_state ("options", "UseMIDIcontrol", &Session::set_midi_control, &Session::get_midi_control);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_send_midi_feedback ()
|
ARDOUR_UI::toggle_send_midi_feedback ()
|
||||||
{
|
{
|
||||||
toggle_session_state ("options", "SendMIDIfeedback", &Session::set_midi_feedback);
|
toggle_session_state ("options", "SendMIDIfeedback", &Session::set_midi_feedback, &Session::get_midi_feedback);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_AutoConnectNewTrackInputsToHardware()
|
ARDOUR_UI::toggle_AutoConnectNewTrackInputsToHardware()
|
||||||
{
|
{
|
||||||
|
toggle_session_state ("options", "AutoConnectNewTrackInputsToHardware", &Session::set_input_auto_connect, &Session::get_input_auto_connect);
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_AutoConnectNewTrackOutputsToHardware()
|
ARDOUR_UI::toggle_AutoConnectNewTrackOutputsToHardware()
|
||||||
{
|
{
|
||||||
|
toggle_session_state ("options", "AutoConnectNewTrackOutputsToHardware", bind (mem_fun (session, &Session::set_output_auto_connect), Session::AutoConnectPhysical));
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_AutoConnectNewTrackOutputsToMaster()
|
ARDOUR_UI::toggle_AutoConnectNewTrackOutputsToMaster()
|
||||||
{
|
{
|
||||||
|
toggle_session_state ("options", "AutoConnectNewTrackOutputsToHardware", bind (mem_fun (session, &Session::set_output_auto_connect), Session::AutoConnectMaster));
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_ManuallyConnectNewTrackOutputs()
|
ARDOUR_UI::toggle_ManuallyConnectNewTrackOutputs()
|
||||||
{
|
{
|
||||||
|
toggle_session_state ("options", "AutoConnectNewTrackOutputsToHardware", bind (mem_fun (session, &Session::set_output_auto_connect), Session::AutoConnectOption (0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_UseHardwareMonitoring()
|
ARDOUR_UI::toggle_UseHardwareMonitoring()
|
||||||
{
|
{
|
||||||
|
Glib::RefPtr<Action> act = ActionManager::get_action ("options", "UseSoftwareMonitoring");
|
||||||
|
if (act) {
|
||||||
|
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||||
|
if (tact->get_active()) {
|
||||||
|
Config->set_use_hardware_monitoring (true);
|
||||||
|
Config->set_use_sw_monitoring (false);
|
||||||
|
if (session) {
|
||||||
|
session->reset_input_monitor_state();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_UseSoftwareMonitoring()
|
ARDOUR_UI::toggle_UseSoftwareMonitoring()
|
||||||
{
|
{
|
||||||
|
Glib::RefPtr<Action> act = ActionManager::get_action ("options", "UseSoftwareMonitoring");
|
||||||
|
if (act) {
|
||||||
|
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||||
|
if (tact->get_active()) {
|
||||||
|
Config->set_use_hardware_monitoring (false);
|
||||||
|
Config->set_use_sw_monitoring (true);
|
||||||
|
if (session) {
|
||||||
|
session->reset_input_monitor_state();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_UseExternalMonitoring()
|
ARDOUR_UI::toggle_UseExternalMonitoring()
|
||||||
{
|
{
|
||||||
|
Glib::RefPtr<Action> act = ActionManager::get_action ("options", "UseExternalMonitoring");
|
||||||
|
if (act) {
|
||||||
|
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||||
|
if (tact->get_active()) {
|
||||||
|
Config->set_use_hardware_monitoring (false);
|
||||||
|
Config->set_use_sw_monitoring (false);
|
||||||
|
if (session) {
|
||||||
|
session->reset_input_monitor_state();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_StopPluginsWithTransport()
|
ARDOUR_UI::toggle_StopPluginsWithTransport()
|
||||||
{
|
{
|
||||||
|
toggle_config_state ("options", "StopPluginsWithTransport", &Configuration::set_plugins_stop_with_transport);
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_RunPluginsWhileRecording()
|
ARDOUR_UI::toggle_RunPluginsWhileRecording()
|
||||||
{
|
{
|
||||||
|
toggle_session_state ("options", "RunPluginsWhileRecording", &Session::set_recording_plugins, &Session::get_recording_plugins);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_VerifyRemoveLastCapture()
|
ARDOUR_UI::toggle_VerifyRemoveLastCapture()
|
||||||
{
|
{
|
||||||
|
toggle_config_state ("options", "VerifyRemoveLastCapture", &Configuration::set_verify_remove_last_capture);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_StopRecordingOnXrun()
|
ARDOUR_UI::toggle_StopRecordingOnXrun()
|
||||||
{
|
{
|
||||||
|
toggle_config_state ("options", "StopRecordingOnXrun", &Configuration::set_stop_recording_on_xrun);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_StopTransportAtEndOfSession()
|
ARDOUR_UI::toggle_StopTransportAtEndOfSession()
|
||||||
{
|
{
|
||||||
|
toggle_config_state ("options", "StopTransportAtEndOfSession", &Configuration::set_stop_at_session_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_GainReduceFastTransport()
|
ARDOUR_UI::toggle_GainReduceFastTransport()
|
||||||
{
|
{
|
||||||
|
Glib::RefPtr<Action> act = ActionManager::get_action ("options", "GainReduceFastTransport");
|
||||||
|
if (act) {
|
||||||
|
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||||
|
if (tact->get_active()) {
|
||||||
|
Config->set_quieten_at_speed (0.251189); // -12dB reduction for ffwd or rewind
|
||||||
|
} else {
|
||||||
|
Config->set_quieten_at_speed (1.0); /* no change */
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_LatchedSolo()
|
ARDOUR_UI::toggle_LatchedSolo()
|
||||||
{
|
{
|
||||||
|
toggle_session_state ("options", "LatchedSolo", &Session::set_solo_latched, &Session::solo_latched);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_SoloViaBus()
|
ARDOUR_UI::toggle_SoloViaBus()
|
||||||
{
|
{
|
||||||
|
if (!session) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Glib::RefPtr<Action> act = ActionManager::get_action ("options", "SoloViaBus");
|
||||||
|
if (act) {
|
||||||
|
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||||
|
|
||||||
|
if (tact->get_active()) {
|
||||||
|
session->set_solo_model (Session::SoloBus);
|
||||||
|
} else {
|
||||||
|
session->set_solo_model (Session::InverseMute);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_AutomaticallyCreateCrossfades()
|
ARDOUR_UI::toggle_AutomaticallyCreateCrossfades()
|
||||||
{
|
{
|
||||||
|
|
@ -150,3 +258,187 @@ void
|
||||||
ARDOUR_UI::toggle_UnmuteNewFullCrossfades()
|
ARDOUR_UI::toggle_UnmuteNewFullCrossfades()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ARDOUR_UI::mtc_port_changed ()
|
||||||
|
{
|
||||||
|
bool have_mtc;
|
||||||
|
|
||||||
|
if (session) {
|
||||||
|
if (session->mtc_port()) {
|
||||||
|
have_mtc = true;
|
||||||
|
} else {
|
||||||
|
have_mtc = false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
have_mtc = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (have_mtc) {
|
||||||
|
const gchar *psync_strings[] = {
|
||||||
|
N_("Internal"),
|
||||||
|
N_("MTC"),
|
||||||
|
N_("JACK"),
|
||||||
|
0
|
||||||
|
};
|
||||||
|
|
||||||
|
positional_sync_strings = internationalize (psync_strings);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
const gchar *psync_strings[] = {
|
||||||
|
N_("Internal"),
|
||||||
|
N_("JACK"),
|
||||||
|
0
|
||||||
|
};
|
||||||
|
positional_sync_strings = internationalize (psync_strings);
|
||||||
|
}
|
||||||
|
|
||||||
|
set_popdown_strings (sync_option_combo, positional_sync_strings);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ARDOUR_UI::setup_options ()
|
||||||
|
{
|
||||||
|
mtc_port_changed ();
|
||||||
|
|
||||||
|
session_control_changed (Session::SlaveType);
|
||||||
|
session_control_changed (Session::SendMTC);
|
||||||
|
session_control_changed (Session::SendMMC);
|
||||||
|
session_control_changed (Session::MMCControl);
|
||||||
|
session_control_changed (Session::MidiFeedback);
|
||||||
|
session_control_changed (Session::MidiControl);
|
||||||
|
session_control_changed (Session::RecordingPlugins);
|
||||||
|
session_control_changed (Session::CrossFadesActive);
|
||||||
|
session_control_changed (Session::SoloLatch);
|
||||||
|
session_control_changed (Session::SoloingModel);
|
||||||
|
session_control_changed (Session::LayeringModel);
|
||||||
|
session_control_changed (Session::CrossfadingModel);
|
||||||
|
|
||||||
|
session->ControlChanged.connect (mem_fun (*this, &ARDOUR_UI::queue_session_control_changed));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ARDOUR_UI::map_some_session_state (const char* group, const char* action, bool (Session::*get)() const)
|
||||||
|
{
|
||||||
|
if (!session) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Glib::RefPtr<Action> act = ActionManager::get_action (group, action);
|
||||||
|
if (act) {
|
||||||
|
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||||
|
bool x = (session->*get)();
|
||||||
|
if (tact->get_active() != x) {
|
||||||
|
tact->set_active (x);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ARDOUR_UI::queue_session_control_changed (Session::ControlType t)
|
||||||
|
{
|
||||||
|
ENSURE_GUI_THREAD (bind (mem_fun (*this, &ARDOUR_UI::session_control_changed), t));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ARDOUR_UI::session_control_changed (Session::ControlType t)
|
||||||
|
{
|
||||||
|
switch (t) {
|
||||||
|
case Session::SlaveType:
|
||||||
|
switch (session->slave_source()) {
|
||||||
|
case Session::None:
|
||||||
|
sync_option_combo.set_active_text (_("Internal"));
|
||||||
|
break;
|
||||||
|
case Session::MTC:
|
||||||
|
sync_option_combo.set_active_text (_("MTC"));
|
||||||
|
break;
|
||||||
|
case Session::JACK:
|
||||||
|
sync_option_combo.set_active_text (_("JACK"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Session::SendMTC:
|
||||||
|
map_some_session_state ("options", "SendMTC", &Session::get_send_mtc);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Session::SendMMC:
|
||||||
|
map_some_session_state ("options", "SendMMC", &Session::get_send_mmc);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Session::MMCControl:
|
||||||
|
map_some_session_state ("options", "UseMMC", &Session::get_mmc_control);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Session::MidiFeedback:
|
||||||
|
map_some_session_state ("options", "SendMIDIfeedback", &Session::get_midi_feedback);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Session::MidiControl:
|
||||||
|
map_some_session_state ("options", "UseMIDIcontrol", &Session::get_midi_control);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Session::RecordingPlugins:
|
||||||
|
map_some_session_state ("options", "RunPluginsWhileRecording", &Session::get_recording_plugins);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Session::CrossFadesActive:
|
||||||
|
map_some_session_state ("options", "CrossfadesActive", &Session::get_crossfades_active);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Session::SoloLatch:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Session::SoloingModel:
|
||||||
|
switch (session->solo_model()) {
|
||||||
|
case Session::InverseMute:
|
||||||
|
break;
|
||||||
|
case Session::SoloBus:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Session::LayeringModel:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Session::CrossfadingModel:
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
// BUTTON STATE: fix me in the future to use actions
|
||||||
|
|
||||||
|
|
||||||
|
case Session::AutoPlay:
|
||||||
|
map_some_session_state (auto_play_button, &Session::get_auto_play);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Session::AutoLoop:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Session::AutoReturn:
|
||||||
|
map_some_session_state (auto_return_button, &Session::get_auto_return);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Session::AutoInput:
|
||||||
|
map_some_session_state (auto_input_button, &Session::get_auto_input);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Session::PunchOut:
|
||||||
|
map_some_session_state (punch_in_button, &Session::get_punch_out);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Session::PunchIn:
|
||||||
|
map_some_session_state (punch_in_button, &Session::get_punch_in);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Session::Clicking:
|
||||||
|
map_some_session_state (click_button, &Session::get_clicking);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// somebody else handles this
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -2605,23 +2605,35 @@ Editor::setup_toolbar ()
|
||||||
|
|
||||||
selection_start_clock_label.set_text (_("Start:"));
|
selection_start_clock_label.set_text (_("Start:"));
|
||||||
selection_end_clock_label.set_text (_("End:"));
|
selection_end_clock_label.set_text (_("End:"));
|
||||||
edit_cursor_clock_label.set_text (_("Edit:"));
|
edit_cursor_clock_label.set_text (_("Edit"));
|
||||||
|
|
||||||
toolbar_selection_clock_table.set_border_width (5);
|
/* the zoom in/out buttons are generally taller than the clocks, so
|
||||||
toolbar_selection_clock_table.set_col_spacings (2);
|
put all the toolbar clocks into a size group with one of the
|
||||||
toolbar_selection_clock_table.set_homogeneous (false);
|
buttons to make them all equal height.
|
||||||
|
|
||||||
// toolbar_selection_clock_table.attach (selection_start_clock_label, 0, 1, 0, 1, 0, 0, 0, 0);
|
this also applies to the various toolbar combos
|
||||||
// toolbar_selection_clock_table.attach (selection_end_clock_label, 1, 2, 0, 1, 0, 0, 0, 0);
|
*/
|
||||||
toolbar_selection_clock_table.attach (edit_cursor_clock_label, 2, 3, 0, 1, FILL, FILL, 0, 0);
|
|
||||||
|
|
||||||
// toolbar_selection_clock_table.attach (selection_start_clock, 0, 1, 1, 2, 0, 0);
|
RefPtr<SizeGroup> toolbar_clock_size_group = SizeGroup::create (SIZE_GROUP_VERTICAL);
|
||||||
// toolbar_selection_clock_table.attach (selection_end_clock, 1, 2, 1, 2, 0, 0);
|
toolbar_clock_size_group->add_widget (zoom_out_button);
|
||||||
toolbar_selection_clock_table.attach (edit_cursor_clock, 2, 3, 1, 2, FILL, FILL);
|
toolbar_clock_size_group->add_widget (edit_cursor_clock);
|
||||||
|
toolbar_clock_size_group->add_widget (zoom_range_clock);
|
||||||
|
toolbar_clock_size_group->add_widget (nudge_clock);
|
||||||
|
toolbar_clock_size_group->add_widget (edit_mode_selector);
|
||||||
|
toolbar_clock_size_group->add_widget (snap_type_selector);
|
||||||
|
toolbar_clock_size_group->add_widget (snap_mode_selector);
|
||||||
|
toolbar_clock_size_group->add_widget (zoom_focus_selector);
|
||||||
|
|
||||||
|
HBox* edit_clock_hbox = manage (new HBox());
|
||||||
|
VBox* edit_clock_vbox = manage (new VBox());
|
||||||
|
|
||||||
|
edit_clock_hbox->pack_start (edit_cursor_clock, false, false);
|
||||||
|
|
||||||
|
edit_clock_vbox->set_spacing (3);
|
||||||
|
edit_clock_vbox->set_border_width (3);
|
||||||
|
edit_clock_vbox->pack_start (edit_cursor_clock_label, false, false);
|
||||||
|
edit_clock_vbox->pack_start (*edit_clock_hbox, false, false);
|
||||||
|
|
||||||
// toolbar_clock_vbox.set_spacing (2);
|
|
||||||
// toolbar_clock_vbox.set_border_width (10);
|
|
||||||
/* the editor/mixer button will be enabled at session connect */
|
/* the editor/mixer button will be enabled at session connect */
|
||||||
|
|
||||||
editor_mixer_button.set_active(false);
|
editor_mixer_button.set_active(false);
|
||||||
|
|
@ -2630,7 +2642,7 @@ Editor::setup_toolbar ()
|
||||||
HBox* hbox = new HBox;
|
HBox* hbox = new HBox;
|
||||||
|
|
||||||
hbox->pack_start (editor_mixer_button, false, false);
|
hbox->pack_start (editor_mixer_button, false, false);
|
||||||
hbox->pack_start (toolbar_selection_clock_table, false, false);
|
hbox->pack_start (*edit_clock_vbox, false, false);
|
||||||
hbox->pack_start (zoom_indicator_vbox, false, false);
|
hbox->pack_start (zoom_indicator_vbox, false, false);
|
||||||
hbox->pack_start (zoom_focus_box, false, false);
|
hbox->pack_start (zoom_focus_box, false, false);
|
||||||
hbox->pack_start (snap_type_box, false, false);
|
hbox->pack_start (snap_type_box, false, false);
|
||||||
|
|
@ -3643,7 +3655,7 @@ Editor::pane_allocation_handler (Allocation &alloc, Paned* which)
|
||||||
char buf[32];
|
char buf[32];
|
||||||
XMLNode* node = ARDOUR_UI::instance()->editor_settings();
|
XMLNode* node = ARDOUR_UI::instance()->editor_settings();
|
||||||
int width, height;
|
int width, height;
|
||||||
static int32_t done[4] = { 0, 0, 0, 0 };
|
static int32_t done;
|
||||||
XMLNode* geometry;
|
XMLNode* geometry;
|
||||||
|
|
||||||
if ((geometry = find_named_node (*node, "geometry")) == 0) {
|
if ((geometry = find_named_node (*node, "geometry")) == 0) {
|
||||||
|
|
@ -3656,18 +3668,19 @@ Editor::pane_allocation_handler (Allocation &alloc, Paned* which)
|
||||||
|
|
||||||
if (which == static_cast<Paned*> (&edit_pane)) {
|
if (which == static_cast<Paned*> (&edit_pane)) {
|
||||||
|
|
||||||
if (done[0]) {
|
if (done) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!geometry || (prop = geometry->property ("edit_pane_pos")) == 0) {
|
if (!geometry || (prop = geometry->property ("edit_pane_pos")) == 0) {
|
||||||
pos = 75;
|
/* initial allocation is 90% to canvas, 10% to notebook */
|
||||||
|
pos = (int) floor (alloc.get_width() * 0.90f);
|
||||||
snprintf (buf, sizeof(buf), "%d", pos);
|
snprintf (buf, sizeof(buf), "%d", pos);
|
||||||
} else {
|
} else {
|
||||||
pos = atoi (prop->value());
|
pos = atoi (prop->value());
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((done[0] = GTK_WIDGET(edit_pane.gobj())->allocation.width > pos)) {
|
if ((done = GTK_WIDGET(edit_pane.gobj())->allocation.width > pos)) {
|
||||||
edit_pane.set_position (pos);
|
edit_pane.set_position (pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -278,6 +278,13 @@ class Editor : public PublicEditor
|
||||||
void toggle_follow_playhead ();
|
void toggle_follow_playhead ();
|
||||||
bool follow_playhead() const { return _follow_playhead; }
|
bool follow_playhead() const { return _follow_playhead; }
|
||||||
|
|
||||||
|
void toggle_waveform_visibility ();
|
||||||
|
void toggle_waveforms_while_recording ();
|
||||||
|
void toggle_measure_visibility ();
|
||||||
|
|
||||||
|
void set_meter_falloff (float);
|
||||||
|
void set_meter_hold (int32_t);
|
||||||
|
|
||||||
/* xfades */
|
/* xfades */
|
||||||
|
|
||||||
void toggle_xfades_active();
|
void toggle_xfades_active();
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,15 @@ Editor::register_actions ()
|
||||||
RefPtr<ActionGroup> editor_actions = ActionGroup::create (X_("Editor"));
|
RefPtr<ActionGroup> editor_actions = ActionGroup::create (X_("Editor"));
|
||||||
|
|
||||||
/* non-operative menu items for menu bar */
|
/* non-operative menu items for menu bar */
|
||||||
-
|
|
||||||
ActionManager::register_action (editor_actions, X_("Edit"), _("Edit"));
|
ActionManager::register_action (editor_actions, X_("Edit"), _("Edit"));
|
||||||
ActionManager::register_action (editor_actions, X_("View"), _("View"));
|
ActionManager::register_action (editor_actions, X_("View"), _("View"));
|
||||||
ActionManager::register_action (editor_actions, X_("ZoomFocus"), _("ZoomFocus"));
|
ActionManager::register_action (editor_actions, X_("ZoomFocus"), _("ZoomFocus"));
|
||||||
|
ActionManager::register_action (editor_actions, X_("MeterHold"), _("Meter hold"));
|
||||||
|
ActionManager::register_action (editor_actions, X_("MeterFalloff"), _("Meter falloff"));
|
||||||
|
ActionManager::register_action (editor_actions, X_("Solo"), _("Solo"));
|
||||||
|
ActionManager::register_action (editor_actions, X_("Monitoring"), _("Monitoring"));
|
||||||
|
ActionManager::register_action (editor_actions, X_("Autoconnect"), _("Autoconnect"));
|
||||||
|
|
||||||
/* add named actions for the editor */
|
/* add named actions for the editor */
|
||||||
|
|
||||||
|
|
@ -165,7 +170,7 @@ Editor::register_actions ()
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
act = ActionManager::register_action (editor_actions, "normalize-region", _("normalize region"), mem_fun(*this, &Editor::normalize_region));
|
act = ActionManager::register_action (editor_actions, "normalize-region", _("normalize region"), mem_fun(*this, &Editor::normalize_region));
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
act = ActionManager::register_action (editor_actions, "editor-crop", _("editor crop"), mem_fun(*this, &Editor::crop_region_to_selection));
|
act = ActionManager::register_action (editor_actions, "crop", _("crop"), mem_fun(*this, &Editor::crop_region_to_selection));
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
act = ActionManager::register_action (editor_actions, "insert-chunk", _("insert chunk"), bind (mem_fun(*this, &Editor::paste_named_selection), 1.0f));
|
act = ActionManager::register_action (editor_actions, "insert-chunk", _("insert chunk"), bind (mem_fun(*this, &Editor::paste_named_selection), 1.0f));
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
|
|
@ -200,8 +205,6 @@ Editor::register_actions ()
|
||||||
Glib::RefPtr<ActionGroup> zoom_actions = ActionGroup::create (X_("Zoom"));
|
Glib::RefPtr<ActionGroup> zoom_actions = ActionGroup::create (X_("Zoom"));
|
||||||
RadioAction::Group zoom_group;
|
RadioAction::Group zoom_group;
|
||||||
|
|
||||||
ActionManager::register_action (editor_actions, X_("ZoomFocus"), _("Zoom focus"));
|
|
||||||
|
|
||||||
ActionManager::register_radio_action (zoom_actions, zoom_group, "zoom-focus-left", _("zoom focus left"), bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusLeft));
|
ActionManager::register_radio_action (zoom_actions, zoom_group, "zoom-focus-left", _("zoom focus left"), bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusLeft));
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
ActionManager::register_radio_action (zoom_actions, zoom_group, "zoom-focus-right", _("zoom focus right"), bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusRight));
|
ActionManager::register_radio_action (zoom_actions, zoom_group, "zoom-focus-right", _("zoom focus right"), bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusRight));
|
||||||
|
|
@ -297,13 +300,30 @@ Editor::register_actions ()
|
||||||
act = ActionManager::register_action (rl_actions, X_("rlImportAudio"), _("Embed audio (link)"), bind (mem_fun(*this, &Editor::import_audio), false));
|
act = ActionManager::register_action (rl_actions, X_("rlImportAudio"), _("Embed audio (link)"), bind (mem_fun(*this, &Editor::import_audio), false));
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
|
|
||||||
#ifdef NEW_ACTIONS
|
ActionManager::register_toggle_action (editor_actions, X_("ToggleWaveformVisibility"), _("show waveforms"), mem_fun (*this, &Editor::toggle_waveform_visibility));
|
||||||
|
ActionManager::register_toggle_action (editor_actions, X_("ToggleWaveformsWhileRecording"), _("show waveforms while recording"), mem_fun (*this, &Editor::toggle_waveforms_while_recording));
|
||||||
|
ActionManager::register_toggle_action (editor_actions, X_("ToggleMeasureVisibility"), _("show measures"), mem_fun (*this, &Editor::toggle_measure_visibility));
|
||||||
|
|
||||||
ToggleWaveformVisibility;
|
RadioAction::Group meter_falloff_group;
|
||||||
ToggleWaveformsWhileRecording;
|
RadioAction::Group meter_hold_group;
|
||||||
ToggleMeasureVisibility;
|
|
||||||
|
|
||||||
#endif
|
/*
|
||||||
|
Slowest = 6.6dB/sec falloff at update rate of 40ms
|
||||||
|
Slow = 6.8dB/sec falloff at update rate of 40ms
|
||||||
|
*/
|
||||||
|
|
||||||
|
ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffOff"), _("off"), bind (mem_fun (*this, &Editor::set_meter_falloff), 0.0f));
|
||||||
|
ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffSlowest"), _("slowest"), bind (mem_fun (*this, &Editor::set_meter_falloff), 0.266f));
|
||||||
|
ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffSlow"), _("slow"), bind (mem_fun (*this, &Editor::set_meter_falloff), 0.342f));
|
||||||
|
ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffMedium"), _("medium"), bind (mem_fun (*this, &Editor::set_meter_falloff), 0.7f));
|
||||||
|
ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffFast"), _("fast"), bind (mem_fun (*this, &Editor::set_meter_falloff), 1.1f));
|
||||||
|
ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffFaster"), _("faster"), bind (mem_fun (*this, &Editor::set_meter_falloff), 1.5f));
|
||||||
|
ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffFastest"), _("fastest"), bind (mem_fun (*this, &Editor::set_meter_falloff), 2.5f));
|
||||||
|
|
||||||
|
ActionManager::register_radio_action (editor_actions, meter_hold_group, X_("MeterHoldOff"), _("off"), bind (mem_fun (*this, &Editor::set_meter_hold), 0));
|
||||||
|
ActionManager::register_radio_action (editor_actions, meter_hold_group, X_("MeterHoldShort"), _("short"), bind (mem_fun (*this, &Editor::set_meter_hold), 40));
|
||||||
|
ActionManager::register_radio_action (editor_actions, meter_hold_group, X_("MeterHoldMedium"), _("medium"), bind (mem_fun (*this, &Editor::set_meter_hold), 100));
|
||||||
|
ActionManager::register_radio_action (editor_actions, meter_hold_group, X_("MeterHoldLong"), _("long"), bind (mem_fun (*this, &Editor::set_meter_hold), 200));
|
||||||
|
|
||||||
ActionManager::add_action_group (rl_actions);
|
ActionManager::add_action_group (rl_actions);
|
||||||
ActionManager::add_action_group (zoom_actions);
|
ActionManager::add_action_group (zoom_actions);
|
||||||
|
|
@ -311,3 +331,34 @@ Editor::register_actions ()
|
||||||
ActionManager::add_action_group (snap_actions);
|
ActionManager::add_action_group (snap_actions);
|
||||||
ActionManager::add_action_group (editor_actions);
|
ActionManager::add_action_group (editor_actions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Editor::toggle_waveform_visibility ()
|
||||||
|
{
|
||||||
|
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("ToggleWaveformVisibility"));
|
||||||
|
if (act) {
|
||||||
|
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||||
|
set_show_waveforms (tact->get_active());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Editor::toggle_waveforms_while_recording ()
|
||||||
|
{
|
||||||
|
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("ToggleWaveformVisibility"));
|
||||||
|
if (act) {
|
||||||
|
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||||
|
set_show_waveforms_recording (tact->get_active());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Editor::toggle_measure_visibility ()
|
||||||
|
{
|
||||||
|
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("ToggleWaveformVisibility"));
|
||||||
|
if (act) {
|
||||||
|
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||||
|
set_show_measures (tact->get_active());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3245,7 +3245,8 @@ Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event
|
||||||
|
|
||||||
rv->get_time_axis_view().reveal_dependent_views (*rv);
|
rv->get_time_axis_view().reveal_dependent_views (*rv);
|
||||||
|
|
||||||
session->add_undo (rv->region.playlist()->get_memento());
|
/* no need to add an undo here, we did that when we added this playlist to motion_frozen playlists */
|
||||||
|
|
||||||
rv->region.set_position (where, (void *) this);
|
rv->region.set_position (where, (void *) this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,7 @@ void
|
||||||
Editor::undo (uint32_t n)
|
Editor::undo (uint32_t n)
|
||||||
{
|
{
|
||||||
if (session) {
|
if (session) {
|
||||||
|
cerr << "Undo " << n << " operations\n";
|
||||||
session->undo (n);
|
session->undo (n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -91,6 +92,23 @@ Editor::redo (uint32_t n)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Editor::set_meter_hold (int32_t cnt)
|
||||||
|
{
|
||||||
|
if (session) {
|
||||||
|
session->set_meter_hold (cnt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Editor::set_meter_falloff (float val)
|
||||||
|
{
|
||||||
|
if (session) {
|
||||||
|
session->set_meter_falloff (val);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
Editor::ensure_cursor (jack_nframes_t *pos)
|
Editor::ensure_cursor (jack_nframes_t *pos)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1244,7 +1244,7 @@ MixerStrip::build_route_ops_menu ()
|
||||||
{
|
{
|
||||||
using namespace Menu_Helpers;
|
using namespace Menu_Helpers;
|
||||||
|
|
||||||
route_ops_menu = new Menu;
|
route_ops_menu = manage (new Menu);
|
||||||
route_ops_menu->set_name ("ArdourContextMenu");
|
route_ops_menu->set_name ("ArdourContextMenu");
|
||||||
|
|
||||||
MenuList& items = route_ops_menu->items();
|
MenuList& items = route_ops_menu->items();
|
||||||
|
|
@ -1255,6 +1255,11 @@ MixerStrip::build_route_ops_menu ()
|
||||||
route_active_menu_item = dynamic_cast<CheckMenuItem *> (&items.back());
|
route_active_menu_item = dynamic_cast<CheckMenuItem *> (&items.back());
|
||||||
route_active_menu_item->set_active (_route.active());
|
route_active_menu_item->set_active (_route.active());
|
||||||
|
|
||||||
|
build_remote_control_menu ();
|
||||||
|
|
||||||
|
items.push_back (SeparatorElem());
|
||||||
|
items.push_back (MenuElem (_("Remote Control ID"), *remote_control_menu));
|
||||||
|
|
||||||
items.push_back (SeparatorElem());
|
items.push_back (SeparatorElem());
|
||||||
items.push_back (MenuElem (_("Remove"), mem_fun(*this, &RouteUI::remove_this_route)));
|
items.push_back (MenuElem (_("Remove"), mem_fun(*this, &RouteUI::remove_this_route)));
|
||||||
}
|
}
|
||||||
|
|
@ -1275,6 +1280,8 @@ MixerStrip::list_route_operations ()
|
||||||
build_route_ops_menu ();
|
build_route_ops_menu ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
refresh_remote_control_menu();
|
||||||
|
|
||||||
route_ops_menu->popup (1, 0);
|
route_ops_menu->popup (1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -268,6 +268,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
|
||||||
|
|
||||||
string solo_button_name () const { return "MixerSoloButton"; }
|
string solo_button_name () const { return "MixerSoloButton"; }
|
||||||
string safe_solo_button_name () const { return "MixerSafeSoloButton"; }
|
string safe_solo_button_name () const { return "MixerSafeSoloButton"; }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __ardour_mixer_strip__ */
|
#endif /* __ardour_mixer_strip__ */
|
||||||
|
|
|
||||||
|
|
@ -45,14 +45,6 @@ using namespace Editing;
|
||||||
using namespace Gtkmm2ext;
|
using namespace Gtkmm2ext;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
static const gchar *psync_strings[] = {
|
|
||||||
N_("Internal"),
|
|
||||||
N_("Slave to MTC"),
|
|
||||||
N_("Sync with JACK"),
|
|
||||||
N_("never used but stops crashes"),
|
|
||||||
0
|
|
||||||
};
|
|
||||||
|
|
||||||
static const gchar *lmode_strings[] = {
|
static const gchar *lmode_strings[] = {
|
||||||
N_("Later regions are higher"),
|
N_("Later regions are higher"),
|
||||||
N_("Most recently added/moved/trimmed regions are higher"),
|
N_("Most recently added/moved/trimmed regions are higher"),
|
||||||
|
|
@ -91,32 +83,13 @@ OptionEditor::OptionEditor (ARDOUR_UI& uip, PublicEditor& ed, Mixer_UI& mixui)
|
||||||
short_xfade_adjustment (0, 1.0, 500.0, 5.0, 100.0),
|
short_xfade_adjustment (0, 1.0, 500.0, 5.0, 100.0),
|
||||||
short_xfade_slider (short_xfade_adjustment),
|
short_xfade_slider (short_xfade_adjustment),
|
||||||
|
|
||||||
/* solo */
|
|
||||||
solo_latched_button (_("Latched solo")),
|
|
||||||
solo_via_bus_button (_("Solo via bus")),
|
|
||||||
|
|
||||||
/* display */
|
|
||||||
|
|
||||||
show_waveforms_button (_("Show waveforms")),
|
|
||||||
show_waveforms_recording_button (_("Show waveforms while recording")),
|
|
||||||
mixer_strip_width_button (_("Narrow mixer strips")),
|
|
||||||
show_measures_button (_("Show measure lines")),
|
|
||||||
follow_playhead_button (_("Follow playhead")),
|
|
||||||
|
|
||||||
/* Sync */
|
/* Sync */
|
||||||
|
|
||||||
send_mtc_button (_("Send MTC")),
|
|
||||||
send_mmc_button (_("Send MMC")),
|
|
||||||
jack_time_master_button (_("JACK time master")),
|
|
||||||
smpte_offset_clock (X_("SMPTEOffsetClock"), true, true),
|
smpte_offset_clock (X_("SMPTEOffsetClock"), true, true),
|
||||||
smpte_offset_negative_button (_("SMPTE offset is negative")),
|
smpte_offset_negative_button (_("SMPTE offset is negative")),
|
||||||
|
|
||||||
/* MIDI */
|
/* MIDI */
|
||||||
|
|
||||||
midi_feedback_button (_("Send MIDI parameter feedback")),
|
|
||||||
midi_control_button (_("MIDI parameter control")),
|
|
||||||
mmc_control_button (_("MMC control")),
|
|
||||||
|
|
||||||
/* Click */
|
/* Click */
|
||||||
|
|
||||||
click_table (2, 3),
|
click_table (2, 3),
|
||||||
|
|
@ -129,23 +102,7 @@ OptionEditor::OptionEditor (ARDOUR_UI& uip, PublicEditor& ed, Mixer_UI& mixui)
|
||||||
delete_button_adjustment (3, 1, 5),
|
delete_button_adjustment (3, 1, 5),
|
||||||
delete_button_spin (delete_button_adjustment),
|
delete_button_spin (delete_button_adjustment),
|
||||||
edit_button_adjustment (3, 1, 5),
|
edit_button_adjustment (3, 1, 5),
|
||||||
edit_button_spin (edit_button_adjustment),
|
edit_button_spin (edit_button_adjustment)
|
||||||
|
|
||||||
/* Misc */
|
|
||||||
|
|
||||||
auto_connect_inputs_button (_("Auto-connect new track inputs to hardware")),
|
|
||||||
auto_connect_output_physical_button (_("Auto-connect new track outputs to hardware")),
|
|
||||||
auto_connect_output_master_button (_("Auto-connect new track outputs to master bus")),
|
|
||||||
auto_connect_output_manual_button (_("Manually connect new track outputs")),
|
|
||||||
hw_monitor_button(_("Use Hardware Monitoring")),
|
|
||||||
sw_monitor_button(_("Use Software Monitoring")),
|
|
||||||
plugins_stop_button (_("Stop plugins with transport")),
|
|
||||||
plugins_on_rec_button (_("Run plugins while recording")),
|
|
||||||
verify_remove_last_capture_button (_("Verify remove last capture")),
|
|
||||||
stop_rec_on_xrun_button (_("Stop recording on xrun")),
|
|
||||||
stop_at_end_button (_("Stop transport at end of session")),
|
|
||||||
debug_keyboard_button (_("Debug keyboard events")),
|
|
||||||
speed_quieten_button (_("-12dB gain reduction for ffwd/rew"))
|
|
||||||
|
|
||||||
{
|
{
|
||||||
using namespace Notebook_Helpers;
|
using namespace Notebook_Helpers;
|
||||||
|
|
@ -178,21 +135,15 @@ OptionEditor::OptionEditor (ARDOUR_UI& uip, PublicEditor& ed, Mixer_UI& mixui)
|
||||||
setup_sync_options();
|
setup_sync_options();
|
||||||
setup_path_options();
|
setup_path_options();
|
||||||
setup_fade_options ();
|
setup_fade_options ();
|
||||||
setup_solo_options ();
|
|
||||||
setup_display_options ();
|
|
||||||
setup_misc_options ();
|
|
||||||
setup_keyboard_options ();
|
setup_keyboard_options ();
|
||||||
setup_auditioner_editor ();
|
setup_auditioner_editor ();
|
||||||
|
|
||||||
notebook.pages().push_back (TabElem (misc_packer, _("Misc")));
|
|
||||||
notebook.pages().push_back (TabElem (sync_packer, _("Sync")));
|
notebook.pages().push_back (TabElem (sync_packer, _("Sync")));
|
||||||
notebook.pages().push_back (TabElem (path_table, _("Paths/Files")));
|
notebook.pages().push_back (TabElem (path_table, _("Paths/Files")));
|
||||||
notebook.pages().push_back (TabElem (display_packer, _("Display")));
|
|
||||||
notebook.pages().push_back (TabElem (keyboard_mouse_table, _("Kbd/Mouse")));
|
notebook.pages().push_back (TabElem (keyboard_mouse_table, _("Kbd/Mouse")));
|
||||||
notebook.pages().push_back (TabElem (click_packer, _("Click")));
|
notebook.pages().push_back (TabElem (click_packer, _("Click")));
|
||||||
notebook.pages().push_back (TabElem (audition_packer, _("Audition")));
|
notebook.pages().push_back (TabElem (audition_packer, _("Audition")));
|
||||||
notebook.pages().push_back (TabElem (fade_packer, _("Layers & Fades")));
|
notebook.pages().push_back (TabElem (fade_packer, _("Layers & Fades")));
|
||||||
notebook.pages().push_back (TabElem (solo_packer, _("Solo")));
|
|
||||||
|
|
||||||
if (!MIDI::Manager::instance()->get_midi_ports().empty()) {
|
if (!MIDI::Manager::instance()->get_midi_ports().empty()) {
|
||||||
setup_midi_options ();
|
setup_midi_options ();
|
||||||
|
|
@ -213,26 +164,11 @@ OptionEditor::set_session (Session *s)
|
||||||
click_emphasis_path_entry.set_text ("");
|
click_emphasis_path_entry.set_text ("");
|
||||||
session_raid_entry.set_text ("");
|
session_raid_entry.set_text ("");
|
||||||
|
|
||||||
send_mtc_button.set_sensitive (false);
|
|
||||||
send_mmc_button.set_sensitive (false);
|
|
||||||
midi_feedback_button.set_sensitive (false);
|
|
||||||
midi_control_button.set_sensitive (false);
|
|
||||||
mmc_control_button.set_sensitive (false);
|
|
||||||
click_path_entry.set_sensitive (false);
|
click_path_entry.set_sensitive (false);
|
||||||
click_emphasis_path_entry.set_sensitive (false);
|
click_emphasis_path_entry.set_sensitive (false);
|
||||||
session_raid_entry.set_sensitive (false);
|
session_raid_entry.set_sensitive (false);
|
||||||
plugins_on_rec_button.set_sensitive (false);
|
|
||||||
verify_remove_last_capture_button.set_sensitive (false);
|
|
||||||
slave_type_combo.set_sensitive (false);
|
|
||||||
solo_latched_button.set_sensitive (false);
|
|
||||||
solo_via_bus_button.set_sensitive (false);
|
|
||||||
smpte_fps_combo.set_sensitive (false);
|
smpte_fps_combo.set_sensitive (false);
|
||||||
meter_hold_combo.set_sensitive (false);
|
|
||||||
meter_falloff_combo.set_sensitive (false);
|
|
||||||
auto_connect_inputs_button.set_sensitive (false);
|
|
||||||
auto_connect_output_physical_button.set_sensitive (false);
|
|
||||||
auto_connect_output_master_button.set_sensitive (false);
|
|
||||||
auto_connect_output_manual_button.set_sensitive (false);
|
|
||||||
layer_mode_combo.set_sensitive (false);
|
layer_mode_combo.set_sensitive (false);
|
||||||
short_xfade_slider.set_sensitive (false);
|
short_xfade_slider.set_sensitive (false);
|
||||||
smpte_offset_negative_button.set_sensitive (false);
|
smpte_offset_negative_button.set_sensitive (false);
|
||||||
|
|
@ -243,26 +179,11 @@ OptionEditor::set_session (Session *s)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
send_mtc_button.set_sensitive (true);
|
|
||||||
send_mmc_button.set_sensitive (true);
|
|
||||||
midi_feedback_button.set_sensitive (true);
|
|
||||||
midi_control_button.set_sensitive (true);
|
|
||||||
mmc_control_button.set_sensitive (true);
|
|
||||||
click_path_entry.set_sensitive (true);
|
click_path_entry.set_sensitive (true);
|
||||||
click_emphasis_path_entry.set_sensitive (true);
|
click_emphasis_path_entry.set_sensitive (true);
|
||||||
session_raid_entry.set_sensitive (true);
|
session_raid_entry.set_sensitive (true);
|
||||||
plugins_on_rec_button.set_sensitive (true);
|
|
||||||
verify_remove_last_capture_button.set_sensitive (true);
|
|
||||||
slave_type_combo.set_sensitive (true);
|
|
||||||
solo_latched_button.set_sensitive (true);
|
|
||||||
solo_via_bus_button.set_sensitive (true);
|
|
||||||
smpte_fps_combo.set_sensitive (true);
|
smpte_fps_combo.set_sensitive (true);
|
||||||
meter_hold_combo.set_sensitive (true);
|
|
||||||
meter_falloff_combo.set_sensitive (true);
|
|
||||||
auto_connect_inputs_button.set_sensitive (true);
|
|
||||||
auto_connect_output_physical_button.set_sensitive (true);
|
|
||||||
auto_connect_output_master_button.set_sensitive (true);
|
|
||||||
auto_connect_output_manual_button.set_sensitive (true);
|
|
||||||
layer_mode_combo.set_sensitive (true);
|
layer_mode_combo.set_sensitive (true);
|
||||||
short_xfade_slider.set_sensitive (true);
|
short_xfade_slider.set_sensitive (true);
|
||||||
smpte_offset_negative_button.set_sensitive (true);
|
smpte_offset_negative_button.set_sensitive (true);
|
||||||
|
|
@ -289,14 +210,6 @@ OptionEditor::set_session (Session *s)
|
||||||
smpte_offset_clock.set (s->smpte_offset (), true);
|
smpte_offset_clock.set (s->smpte_offset (), true);
|
||||||
|
|
||||||
smpte_offset_negative_button.set_active (session->smpte_offset_negative());
|
smpte_offset_negative_button.set_active (session->smpte_offset_negative());
|
||||||
send_mtc_button.set_active (session->get_send_mtc());
|
|
||||||
|
|
||||||
/* MIDI I/O */
|
|
||||||
|
|
||||||
send_mmc_button.set_active (session->get_send_mmc());
|
|
||||||
midi_control_button.set_active (session->get_midi_control());
|
|
||||||
midi_feedback_button.set_active (session->get_midi_feedback());
|
|
||||||
mmc_control_button.set_active (session->get_mmc_control());
|
|
||||||
|
|
||||||
/* set up port assignments */
|
/* set up port assignments */
|
||||||
|
|
||||||
|
|
@ -320,77 +233,15 @@ OptionEditor::set_session (Session *s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto_connect_inputs_button.set_active (session->get_input_auto_connect());
|
|
||||||
|
|
||||||
Session::AutoConnectOption oac = session->get_output_auto_connect();
|
|
||||||
if (oac & Session::AutoConnectPhysical) {
|
|
||||||
auto_connect_output_physical_button.set_active (true);
|
|
||||||
} else if (oac & Session::AutoConnectMaster) {
|
|
||||||
auto_connect_output_master_button.set_active (true);
|
|
||||||
} else {
|
|
||||||
auto_connect_output_manual_button.set_active (true);
|
|
||||||
}
|
|
||||||
|
|
||||||
setup_click_editor ();
|
setup_click_editor ();
|
||||||
connect_audition_editor ();
|
connect_audition_editor ();
|
||||||
|
|
||||||
plugins_on_rec_button.set_active (session->get_recording_plugins ());
|
|
||||||
verify_remove_last_capture_button.set_active (Config->get_verify_remove_last_capture());
|
|
||||||
|
|
||||||
layer_mode_combo.set_active_text (layer_mode_strings[session->get_layer_model()]);
|
layer_mode_combo.set_active_text (layer_mode_strings[session->get_layer_model()]);
|
||||||
xfade_model_combo.set_active_text (xfade_model_strings[session->get_xfade_model()]);
|
xfade_model_combo.set_active_text (xfade_model_strings[session->get_xfade_model()]);
|
||||||
|
|
||||||
short_xfade_adjustment.set_value ((Crossfade::short_xfade_length() / (float) session->frame_rate()) * 1000.0);
|
short_xfade_adjustment.set_value ((Crossfade::short_xfade_length() / (float) session->frame_rate()) * 1000.0);
|
||||||
|
|
||||||
xfade_active_button.set_active (session->get_crossfades_active());
|
|
||||||
solo_latched_button.set_active (session->solo_latched());
|
|
||||||
solo_via_bus_button.set_active (session->solo_model() == Session::SoloBus);
|
|
||||||
|
|
||||||
add_session_paths ();
|
add_session_paths ();
|
||||||
|
|
||||||
vector<string> dumb;
|
|
||||||
dumb.push_back (positional_sync_strings[Session::None]);
|
|
||||||
dumb.push_back (positional_sync_strings[Session::JACK]);
|
|
||||||
if (session->mtc_port()) {
|
|
||||||
dumb.push_back (positional_sync_strings[Session::MTC]);
|
|
||||||
}
|
|
||||||
set_popdown_strings (slave_type_combo, dumb);
|
|
||||||
|
|
||||||
// meter stuff
|
|
||||||
if (session->meter_falloff() == 0.0f) {
|
|
||||||
meter_falloff_combo.set_active_text (_("Off"));
|
|
||||||
} else if (session->meter_falloff() <= 0.3f) {
|
|
||||||
meter_falloff_combo.set_active_text (_("Slowest"));
|
|
||||||
} else if (session->meter_falloff() <= 0.4f) {
|
|
||||||
meter_falloff_combo.set_active_text (_("Slow"));
|
|
||||||
} else if (session->meter_falloff() <= 0.8f) {
|
|
||||||
meter_falloff_combo.set_active_text (_("Medium"));
|
|
||||||
} else if (session->meter_falloff() <= 1.4f) {
|
|
||||||
meter_falloff_combo.set_active_text (_("Fast"));
|
|
||||||
} else if (session->meter_falloff() <= 2.0f) {
|
|
||||||
meter_falloff_combo.set_active_text (_("Faster"));
|
|
||||||
} else {
|
|
||||||
meter_falloff_combo.set_active_text (_("Fastest"));
|
|
||||||
}
|
|
||||||
|
|
||||||
switch ((int) floor (session->meter_hold())) {
|
|
||||||
case 0:
|
|
||||||
meter_hold_combo.set_active_text (_("Off"));
|
|
||||||
break;
|
|
||||||
case 40:
|
|
||||||
meter_hold_combo.set_active_text (_("Short"));
|
|
||||||
break;
|
|
||||||
case 100:
|
|
||||||
meter_hold_combo.set_active_text (_("Medium"));
|
|
||||||
break;
|
|
||||||
case 200:
|
|
||||||
meter_hold_combo.set_active_text (_("Long"));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
session_control_changed (Session::SlaveType);
|
|
||||||
session_control_changed (Session::AlignChoice);
|
|
||||||
session->ControlChanged.connect (mem_fun(*this, &OptionEditor::queue_session_control_changed));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OptionEditor::~OptionEditor ()
|
OptionEditor::~OptionEditor ()
|
||||||
|
|
@ -608,237 +459,12 @@ OptionEditor::xfade_active_clicked ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::setup_solo_options ()
|
|
||||||
{
|
|
||||||
Gtk::HBox* hbox;
|
|
||||||
|
|
||||||
solo_via_bus_button.set_name ("OptionEditorToggleButton");
|
|
||||||
solo_latched_button.set_name ("OptionEditorToggleButton");
|
|
||||||
|
|
||||||
hbox = manage (new HBox);
|
|
||||||
hbox->set_border_width (12);
|
|
||||||
hbox->pack_start (solo_via_bus_button, false, false);
|
|
||||||
solo_packer.pack_start (*hbox, false, false);
|
|
||||||
|
|
||||||
hbox = manage (new HBox);
|
|
||||||
hbox->set_border_width (12);
|
|
||||||
hbox->pack_start (solo_latched_button, false, false);
|
|
||||||
solo_packer.pack_start (*hbox, false, false);
|
|
||||||
|
|
||||||
solo_via_bus_button.signal_clicked().connect
|
|
||||||
(mem_fun(*this, &OptionEditor::solo_via_bus_clicked));
|
|
||||||
solo_latched_button.signal_clicked().connect
|
|
||||||
(mem_fun(*this, &OptionEditor::solo_latched_clicked));
|
|
||||||
|
|
||||||
solo_packer.show_all ();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::solo_via_bus_clicked ()
|
|
||||||
{
|
|
||||||
if (!session) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (solo_via_bus_button.get_active()) {
|
|
||||||
session->set_solo_model (Session::SoloBus);
|
|
||||||
} else {
|
|
||||||
session->set_solo_model (Session::InverseMute);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::solo_latched_clicked ()
|
|
||||||
{
|
|
||||||
if (!session) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool x = solo_latched_button.get_active();
|
|
||||||
|
|
||||||
if (x != session->solo_latched()) {
|
|
||||||
session->set_solo_latched (x);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::setup_display_options ()
|
|
||||||
{
|
|
||||||
HBox* hbox;
|
|
||||||
vector<string> dumb;
|
|
||||||
|
|
||||||
display_packer.set_border_width (12);
|
|
||||||
display_packer.set_spacing (5);
|
|
||||||
|
|
||||||
show_waveforms_button.set_name ("OptionEditorToggleButton");
|
|
||||||
show_waveforms_recording_button.set_name ("OptionEditorToggleButton");
|
|
||||||
show_measures_button.set_name ("OptionEditorToggleButton");
|
|
||||||
follow_playhead_button.set_name ("OptionEditorToggleButton");
|
|
||||||
mixer_strip_width_button.set_name ("OptionEditorToggleButton");
|
|
||||||
|
|
||||||
mixer_strip_width_button.set_active (mixer.get_strip_width() == Narrow);
|
|
||||||
|
|
||||||
hbox = manage (new HBox);
|
|
||||||
hbox->set_border_width (8);
|
|
||||||
hbox->pack_start (show_waveforms_button, false, false);
|
|
||||||
display_packer.pack_start (*hbox, false, false);
|
|
||||||
|
|
||||||
hbox = manage (new HBox);
|
|
||||||
hbox->set_border_width (8);
|
|
||||||
hbox->pack_start (show_waveforms_recording_button, false, false);
|
|
||||||
display_packer.pack_start (*hbox, false, false);
|
|
||||||
|
|
||||||
hbox = manage (new HBox);
|
|
||||||
hbox->set_border_width (8);
|
|
||||||
hbox->pack_start (show_measures_button, false, false);
|
|
||||||
display_packer.pack_start (*hbox, false, false);
|
|
||||||
|
|
||||||
hbox = manage (new HBox);
|
|
||||||
hbox->set_border_width (8);
|
|
||||||
hbox->pack_start (mixer_strip_width_button, false, false);
|
|
||||||
display_packer.pack_start (*hbox, false, false);
|
|
||||||
|
|
||||||
hbox = manage (new HBox);
|
|
||||||
hbox->set_border_width (8);
|
|
||||||
hbox->pack_start (follow_playhead_button, false, false);
|
|
||||||
display_packer.pack_start (*hbox, false, false);
|
|
||||||
|
|
||||||
Label *meter_hold_label = manage (new Label (_("Meter Peak Hold")));
|
|
||||||
meter_hold_label->set_name ("OptionsLabel");
|
|
||||||
dumb.clear ();
|
|
||||||
dumb.push_back (_("Off"));
|
|
||||||
dumb.push_back (_("Short"));
|
|
||||||
dumb.push_back (_("Medium"));
|
|
||||||
dumb.push_back (_("Long"));
|
|
||||||
set_popdown_strings (meter_hold_combo, dumb);
|
|
||||||
meter_hold_combo.signal_changed().connect (mem_fun(*this, &OptionEditor::meter_hold_chosen));
|
|
||||||
hbox = manage (new HBox);
|
|
||||||
hbox->set_border_width (8);
|
|
||||||
hbox->set_spacing (8);
|
|
||||||
hbox->pack_start (*meter_hold_label, false, false);
|
|
||||||
hbox->pack_start (meter_hold_combo, false, false);
|
|
||||||
display_packer.pack_start (*hbox, false, false);
|
|
||||||
|
|
||||||
Label *meter_falloff_label = manage (new Label (_("Meter Falloff")));
|
|
||||||
meter_falloff_label->set_name ("OptionsLabel");
|
|
||||||
dumb.clear ();
|
|
||||||
dumb.push_back (_("Off"));
|
|
||||||
dumb.push_back (_("Slowest"));
|
|
||||||
dumb.push_back (_("Slow"));
|
|
||||||
dumb.push_back (_("Medium"));
|
|
||||||
dumb.push_back (_("Fast"));
|
|
||||||
dumb.push_back (_("Faster"));
|
|
||||||
dumb.push_back (_("Fastest"));
|
|
||||||
set_popdown_strings (meter_falloff_combo, dumb);
|
|
||||||
meter_falloff_combo.signal_changed().connect (mem_fun(*this, &OptionEditor::meter_falloff_chosen));
|
|
||||||
hbox = manage (new HBox);
|
|
||||||
hbox->set_border_width (8);
|
|
||||||
hbox->set_spacing (8);
|
|
||||||
hbox->pack_start (*meter_falloff_label, false, false);
|
|
||||||
hbox->pack_start (meter_falloff_combo, false, false);
|
|
||||||
display_packer.pack_start (*hbox, false, false);
|
|
||||||
|
|
||||||
|
|
||||||
show_waveforms_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::show_waveforms_clicked));
|
|
||||||
show_waveforms_recording_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::show_waveforms_recording_clicked));
|
|
||||||
show_measures_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::show_measures_clicked));
|
|
||||||
mixer_strip_width_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::strip_width_clicked));
|
|
||||||
follow_playhead_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::follow_playhead_clicked));
|
|
||||||
|
|
||||||
editor.DisplayControlChanged.connect (mem_fun(*this, &OptionEditor::display_control_changed));
|
|
||||||
|
|
||||||
show_measures_button.set_active (editor.show_measures());
|
|
||||||
show_waveforms_button.set_active (editor.show_waveforms());
|
|
||||||
show_waveforms_recording_button.set_active (editor.show_waveforms_recording());
|
|
||||||
follow_playhead_button.set_active (editor.follow_playhead());
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::meter_hold_chosen ()
|
|
||||||
{
|
|
||||||
if (session) {
|
|
||||||
string str = meter_hold_combo.get_active_text();
|
|
||||||
|
|
||||||
if (str == _("Off")) {
|
|
||||||
session->set_meter_hold (0);
|
|
||||||
} else if (str == _("Short")) {
|
|
||||||
session->set_meter_hold (40);
|
|
||||||
} else if (str == _("Medium")) {
|
|
||||||
session->set_meter_hold (100);
|
|
||||||
} else if (str == _("Long")) {
|
|
||||||
session->set_meter_hold (200);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::meter_falloff_chosen ()
|
|
||||||
{
|
|
||||||
if (session) {
|
|
||||||
string str = meter_falloff_combo.get_active_text();
|
|
||||||
|
|
||||||
if (str == _("Off")) {
|
|
||||||
session->set_meter_falloff (0.0f);
|
|
||||||
} else if (str == _("Slowest")) {
|
|
||||||
session->set_meter_falloff (0.266f); // 6.6 dB/sec falloff at update rate of 40 ms
|
|
||||||
} else if (str == _("Slow")) {
|
|
||||||
session->set_meter_falloff (0.342f); // 8.6 dB/sec falloff at update rate of 40 ms
|
|
||||||
} else if (str == _("Medium")) {
|
|
||||||
session->set_meter_falloff (0.7f);
|
|
||||||
} else if (str == _("Fast")) {
|
|
||||||
session->set_meter_falloff (1.1f);
|
|
||||||
} else if (str == _("Faster")) {
|
|
||||||
session->set_meter_falloff (1.5f);
|
|
||||||
} else if (str == _("Fastest")) {
|
|
||||||
session->set_meter_falloff (2.5f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::display_control_changed (Editing::DisplayControl dc)
|
|
||||||
{
|
|
||||||
ToggleButton* button = 0;
|
|
||||||
bool val = true;
|
|
||||||
|
|
||||||
switch (dc) {
|
|
||||||
case ShowMeasures:
|
|
||||||
val = editor.show_measures ();
|
|
||||||
button = &show_measures_button;
|
|
||||||
break;
|
|
||||||
case ShowWaveforms:
|
|
||||||
val = editor.show_waveforms ();
|
|
||||||
button = &show_waveforms_button;
|
|
||||||
break;
|
|
||||||
case ShowWaveformsRecording:
|
|
||||||
val = editor.show_waveforms_recording ();
|
|
||||||
button = &show_waveforms_recording_button;
|
|
||||||
break;
|
|
||||||
case FollowPlayhead:
|
|
||||||
val = editor.follow_playhead ();
|
|
||||||
button = &follow_playhead_button;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (button->get_active() != val) {
|
|
||||||
button->set_active (val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
OptionEditor::setup_sync_options ()
|
OptionEditor::setup_sync_options ()
|
||||||
{
|
{
|
||||||
Label *slave_type_label = manage (new Label (_("Positional Sync")));
|
|
||||||
HBox* hbox;
|
HBox* hbox;
|
||||||
vector<string> dumb;
|
vector<string> dumb;
|
||||||
|
|
||||||
slave_type_label->set_name("OptionsLabel");
|
|
||||||
positional_sync_strings = internationalize (psync_strings);
|
|
||||||
|
|
||||||
slave_type_combo.set_name ("OptionsEntry");
|
|
||||||
slave_type_combo.signal_changed().connect (mem_fun(*this, &OptionEditor::slave_type_chosen));
|
|
||||||
|
|
||||||
dumb.clear ();
|
dumb.clear ();
|
||||||
dumb.push_back (X_("24 FPS"));
|
dumb.push_back (X_("24 FPS"));
|
||||||
dumb.push_back (X_("25 FPS"));
|
dumb.push_back (X_("25 FPS"));
|
||||||
|
|
@ -851,32 +477,10 @@ OptionEditor::setup_sync_options ()
|
||||||
smpte_offset_clock.set_mode (AudioClock::SMPTE);
|
smpte_offset_clock.set_mode (AudioClock::SMPTE);
|
||||||
smpte_offset_clock.ValueChanged.connect (mem_fun(*this, &OptionEditor::smpte_offset_chosen));
|
smpte_offset_clock.ValueChanged.connect (mem_fun(*this, &OptionEditor::smpte_offset_chosen));
|
||||||
|
|
||||||
send_mtc_button.set_name ("OptionEditorToggleButton");
|
|
||||||
jack_time_master_button.set_name ("OptionEditorToggleButton");
|
|
||||||
smpte_offset_negative_button.set_name ("OptionEditorToggleButton");
|
smpte_offset_negative_button.set_name ("OptionEditorToggleButton");
|
||||||
|
|
||||||
send_mtc_button.unset_flags (Gtk::CAN_FOCUS);
|
|
||||||
jack_time_master_button.unset_flags (Gtk::CAN_FOCUS);
|
|
||||||
smpte_offset_negative_button.unset_flags (Gtk::CAN_FOCUS);
|
smpte_offset_negative_button.unset_flags (Gtk::CAN_FOCUS);
|
||||||
|
|
||||||
hbox = manage (new HBox);
|
|
||||||
hbox->set_border_width (5);
|
|
||||||
hbox->set_spacing (10);
|
|
||||||
hbox->pack_start (*slave_type_label, false, false);
|
|
||||||
hbox->pack_start (slave_type_combo, false, false);
|
|
||||||
|
|
||||||
sync_packer.pack_start (*hbox, false, false);
|
|
||||||
|
|
||||||
hbox = manage (new HBox);
|
|
||||||
hbox->set_border_width (5);
|
|
||||||
hbox->pack_start (send_mtc_button, false, false);
|
|
||||||
sync_packer.pack_start (*hbox, false, false);
|
|
||||||
|
|
||||||
hbox = manage (new HBox);
|
|
||||||
hbox->set_border_width (5);
|
|
||||||
hbox->pack_start (jack_time_master_button, false, false);
|
|
||||||
sync_packer.pack_start (*hbox, false, false);
|
|
||||||
|
|
||||||
Label *smpte_fps_label = manage (new Label (_("SMPTE Frames/second")));
|
Label *smpte_fps_label = manage (new Label (_("SMPTE Frames/second")));
|
||||||
Label *smpte_offset_label = manage (new Label (_("SMPTE Offset")));
|
Label *smpte_offset_label = manage (new Label (_("SMPTE Offset")));
|
||||||
smpte_fps_label->set_name("OptionsLabel");
|
smpte_fps_label->set_name("OptionsLabel");
|
||||||
|
|
@ -899,10 +503,6 @@ OptionEditor::setup_sync_options ()
|
||||||
|
|
||||||
sync_packer.pack_start (*hbox, false, false);
|
sync_packer.pack_start (*hbox, false, false);
|
||||||
|
|
||||||
jack_time_master_button.set_active (Config->get_jack_time_master());
|
|
||||||
|
|
||||||
send_mtc_button.signal_button_press_event().connect (bind (mem_fun(*this, &OptionEditor::send_mtc_toggled), &send_mtc_button));
|
|
||||||
jack_time_master_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::jack_time_master_clicked));
|
|
||||||
smpte_offset_negative_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::smpte_offset_negative_clicked));
|
smpte_offset_negative_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::smpte_offset_negative_clicked));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1061,46 +661,9 @@ OptionEditor::setup_midi_options ()
|
||||||
hbox->set_border_width (6);
|
hbox->set_border_width (6);
|
||||||
hbox->pack_start (*table, true, false);
|
hbox->pack_start (*table, true, false);
|
||||||
midi_packer.pack_start (*hbox, false, false);
|
midi_packer.pack_start (*hbox, false, false);
|
||||||
|
|
||||||
VBox* mmcbuttonbox = manage (new VBox);
|
|
||||||
|
|
||||||
mmc_control_button.set_name ("OptionEditorToggleButton");
|
|
||||||
|
|
||||||
hbox = manage (new HBox);
|
|
||||||
hbox->set_border_width (6);
|
|
||||||
hbox->pack_start (mmc_control_button, false, false, 36);
|
|
||||||
mmcbuttonbox->pack_start (*hbox, false, false);
|
|
||||||
|
|
||||||
midi_control_button.set_name ("OptionEditorToggleButton");
|
|
||||||
|
|
||||||
hbox = manage (new HBox);
|
|
||||||
hbox->set_border_width (6);
|
|
||||||
hbox->pack_start (midi_control_button, false, false, 36);
|
|
||||||
mmcbuttonbox->pack_start (*hbox, false, false);
|
|
||||||
|
|
||||||
send_mmc_button.set_name ("OptionEditorToggleButton");
|
|
||||||
|
|
||||||
hbox = manage (new HBox);
|
|
||||||
hbox->set_border_width (6);
|
|
||||||
hbox->pack_start (send_mmc_button, false, false, 36);
|
|
||||||
mmcbuttonbox->pack_start (*hbox, false, false);
|
|
||||||
|
|
||||||
midi_feedback_button.set_name ("OptionEditorToggleButton");
|
|
||||||
|
|
||||||
hbox = manage (new HBox);
|
|
||||||
hbox->set_border_width (6);
|
|
||||||
hbox->pack_start (midi_feedback_button, false, false, 36);
|
|
||||||
mmcbuttonbox->pack_start (*hbox, false, false);
|
|
||||||
|
|
||||||
midi_packer.pack_start (*mmcbuttonbox, false, false);
|
|
||||||
|
|
||||||
mmc_control_button.signal_toggled().connect (bind (mem_fun(*this, &OptionEditor::mmc_control_toggled), &mmc_control_button));
|
|
||||||
midi_control_button.signal_toggled().connect (bind (mem_fun(*this, &OptionEditor::midi_control_toggled), &midi_control_button));
|
|
||||||
send_mmc_button.signal_toggled().connect (bind (mem_fun(*this, &OptionEditor::send_mmc_toggled), &send_mmc_button));
|
|
||||||
midi_feedback_button.signal_toggled().connect (bind (mem_fun(*this, &OptionEditor::midi_feedback_toggled), &midi_feedback_button));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gint
|
bool
|
||||||
OptionEditor::mtc_port_chosen (GdkEventButton* ev, MIDI::Port *port, Gtk::RadioButton* rb)
|
OptionEditor::mtc_port_chosen (GdkEventButton* ev, MIDI::Port *port, Gtk::RadioButton* rb)
|
||||||
{
|
{
|
||||||
if (session) {
|
if (session) {
|
||||||
|
|
@ -1111,26 +674,14 @@ OptionEditor::mtc_port_chosen (GdkEventButton* ev, MIDI::Port *port, Gtk::RadioB
|
||||||
} else {
|
} else {
|
||||||
session->set_mtc_port ("");
|
session->set_mtc_port ("");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* update sync options to reflect MTC port availability */
|
|
||||||
|
|
||||||
vector<string> dumb;
|
|
||||||
dumb.push_back (positional_sync_strings[Session::None]);
|
|
||||||
dumb.push_back (positional_sync_strings[Session::JACK]);
|
|
||||||
|
|
||||||
if (session->mtc_port()) {
|
|
||||||
dumb.push_back (positional_sync_strings[Session::MTC]);
|
|
||||||
}
|
|
||||||
set_popdown_strings (slave_type_combo, dumb);
|
|
||||||
|
|
||||||
rb->set_active (true);
|
rb->set_active (true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return stop_signal (*rb, "button_press_event");
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
gint
|
bool
|
||||||
OptionEditor::mmc_port_chosen (GdkEventButton* ev, MIDI::Port* port, Gtk::RadioButton* rb)
|
OptionEditor::mmc_port_chosen (GdkEventButton* ev, MIDI::Port* port, Gtk::RadioButton* rb)
|
||||||
{
|
{
|
||||||
if (session) {
|
if (session) {
|
||||||
|
|
@ -1144,10 +695,10 @@ OptionEditor::mmc_port_chosen (GdkEventButton* ev, MIDI::Port* port, Gtk::RadioB
|
||||||
rb->set_active (true);
|
rb->set_active (true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return stop_signal (*rb, "button_press_event");
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
gint
|
bool
|
||||||
OptionEditor::midi_port_chosen (GdkEventButton* ev, MIDI::Port* port, Gtk::RadioButton* rb)
|
OptionEditor::midi_port_chosen (GdkEventButton* ev, MIDI::Port* port, Gtk::RadioButton* rb)
|
||||||
{
|
{
|
||||||
if (session) {
|
if (session) {
|
||||||
|
|
@ -1161,7 +712,7 @@ OptionEditor::midi_port_chosen (GdkEventButton* ev, MIDI::Port* port, Gtk::Radio
|
||||||
rb->set_active (true);
|
rb->set_active (true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return stop_signal (*rb, "button_press_event");
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
gint
|
gint
|
||||||
|
|
@ -1207,47 +758,6 @@ OptionEditor::port_trace_out_toggled (GdkEventButton* ev,MIDI::Port* port, Toggl
|
||||||
return stop_signal (*tb, "button_press_event");
|
return stop_signal (*tb, "button_press_event");
|
||||||
}
|
}
|
||||||
|
|
||||||
gint
|
|
||||||
OptionEditor::send_mtc_toggled (GdkEventButton *ev, CheckButton *button)
|
|
||||||
{
|
|
||||||
if (session) {
|
|
||||||
session->set_send_mtc (!button->get_active());
|
|
||||||
}
|
|
||||||
return stop_signal (*button, "button_press_event");
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::send_mmc_toggled (CheckButton *button)
|
|
||||||
{
|
|
||||||
if (session) {
|
|
||||||
session->set_send_mmc (button->get_active());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::mmc_control_toggled (CheckButton *button)
|
|
||||||
{
|
|
||||||
if (session) {
|
|
||||||
session->set_mmc_control (button->get_active());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::midi_control_toggled (CheckButton *button)
|
|
||||||
{
|
|
||||||
if (session) {
|
|
||||||
session->set_midi_control (button->get_active());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::midi_feedback_toggled (CheckButton *button)
|
|
||||||
{
|
|
||||||
if (session) {
|
|
||||||
session->set_midi_feedback (button->get_active());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
OptionEditor::save ()
|
OptionEditor::save ()
|
||||||
{
|
{
|
||||||
|
|
@ -1260,22 +770,10 @@ gint
|
||||||
OptionEditor::wm_close (GdkEventAny *ev)
|
OptionEditor::wm_close (GdkEventAny *ev)
|
||||||
{
|
{
|
||||||
save ();
|
save ();
|
||||||
just_close_win();
|
hide ();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::jack_time_master_clicked ()
|
|
||||||
{
|
|
||||||
bool yn = jack_time_master_button.get_active();
|
|
||||||
|
|
||||||
Config->set_jack_time_master (yn);
|
|
||||||
|
|
||||||
if (session) {
|
|
||||||
session->engine().reset_timebase ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
OptionEditor::raid_path_changed ()
|
OptionEditor::raid_path_changed ()
|
||||||
{
|
{
|
||||||
|
|
@ -1376,96 +874,6 @@ OptionEditor::click_emphasis_sound_changed ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::show_waveforms_clicked ()
|
|
||||||
{
|
|
||||||
editor.set_show_waveforms (show_waveforms_button.get_active());
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::show_waveforms_recording_clicked ()
|
|
||||||
{
|
|
||||||
editor.set_show_waveforms_recording (show_waveforms_recording_button.get_active());
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::show_measures_clicked ()
|
|
||||||
{
|
|
||||||
editor.set_show_measures (show_measures_button.get_active());
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::follow_playhead_clicked ()
|
|
||||||
{
|
|
||||||
editor.set_follow_playhead (follow_playhead_button.get_active());
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::strip_width_clicked ()
|
|
||||||
{
|
|
||||||
mixer.set_strip_width (mixer_strip_width_button.get_active() ? Narrow : Wide);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::just_close_win()
|
|
||||||
{
|
|
||||||
hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::queue_session_control_changed (Session::ControlType t)
|
|
||||||
{
|
|
||||||
ui.call_slot (bind (mem_fun(*this, &OptionEditor::session_control_changed), t));
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::session_control_changed (Session::ControlType t)
|
|
||||||
{
|
|
||||||
switch (t) {
|
|
||||||
case Session::SlaveType:
|
|
||||||
switch (session->slave_source()) {
|
|
||||||
case Session::None:
|
|
||||||
slave_type_combo.set_active_text (positional_sync_strings[Session::None]);
|
|
||||||
break;
|
|
||||||
case Session::MTC:
|
|
||||||
slave_type_combo.set_active_text (positional_sync_strings[Session::MTC]);
|
|
||||||
break;
|
|
||||||
case Session::JACK:
|
|
||||||
slave_type_combo.set_active_text (positional_sync_strings[Session::JACK]);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
slave_type_combo.set_active_text (_("--unknown--"));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Session::SendMTC:
|
|
||||||
map_some_session_state (send_mtc_button, &Session::get_send_mtc);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Session::SendMMC:
|
|
||||||
map_some_session_state (send_mmc_button, &Session::get_send_mmc);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Session::MMCControl:
|
|
||||||
map_some_session_state (mmc_control_button, &Session::get_mmc_control);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Session::MidiFeedback:
|
|
||||||
map_some_session_state (midi_feedback_button, &Session::get_midi_feedback);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Session::MidiControl:
|
|
||||||
map_some_session_state (midi_control_button, &Session::get_midi_control);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
OptionEditor::native_format_chosen ()
|
OptionEditor::native_format_chosen ()
|
||||||
{
|
{
|
||||||
|
|
@ -1483,26 +891,6 @@ OptionEditor::native_format_chosen ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::slave_type_chosen ()
|
|
||||||
{
|
|
||||||
string which;
|
|
||||||
|
|
||||||
if (session == 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
which = slave_type_combo.get_active_text();
|
|
||||||
|
|
||||||
if (which == positional_sync_strings[Session::None]) {
|
|
||||||
session->request_slave_source (Session::None);
|
|
||||||
} else if (which == positional_sync_strings[Session::MTC]) {
|
|
||||||
session->request_slave_source (Session::MTC);
|
|
||||||
} else if (which == positional_sync_strings[Session::JACK]) {
|
|
||||||
session->request_slave_source (Session::JACK);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
OptionEditor::clear_click_editor ()
|
OptionEditor::clear_click_editor ()
|
||||||
{
|
{
|
||||||
|
|
@ -1619,183 +1007,6 @@ OptionEditor::focus_out_event_handler (GdkEventFocus* ev, void (OptionEditor::*p
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::setup_misc_options()
|
|
||||||
{
|
|
||||||
Gtk::Table* table = manage (new Table (4, 2));
|
|
||||||
table->set_homogeneous (true);
|
|
||||||
|
|
||||||
misc_packer.set_border_width (8);
|
|
||||||
misc_packer.set_spacing (3);
|
|
||||||
misc_packer.pack_start (*table, true, true);
|
|
||||||
|
|
||||||
table->attach (hw_monitor_button, 0, 1, 0, 1, Gtk::FILL, FILL, 8, 0);
|
|
||||||
table->attach (sw_monitor_button, 0, 1, 1, 2, Gtk::FILL, FILL, 8, 0);
|
|
||||||
table->attach (plugins_stop_button, 0, 1, 2, 3, Gtk::FILL, FILL, 8, 0);
|
|
||||||
table->attach (plugins_on_rec_button, 0, 1, 3, 4, Gtk::FILL, FILL, 8, 0);
|
|
||||||
table->attach (verify_remove_last_capture_button, 0, 1, 4, 5, Gtk::FILL, FILL, 8, 0);
|
|
||||||
|
|
||||||
table->attach (stop_rec_on_xrun_button, 1, 2, 0, 1, Gtk::FILL, FILL, 8, 0);
|
|
||||||
table->attach (stop_at_end_button, 1, 2, 1, 2, Gtk::FILL, FILL, 8, 0);
|
|
||||||
table->attach (debug_keyboard_button, 1, 2, 2, 3, Gtk::FILL, FILL, 8, 0);
|
|
||||||
table->attach (speed_quieten_button, 1, 2, 3, 4, Gtk::FILL, FILL, 8, 0);
|
|
||||||
|
|
||||||
Gtk::VBox* connect_box = manage (new VBox);
|
|
||||||
connect_box->set_spacing (3);
|
|
||||||
connect_box->set_border_width (8);
|
|
||||||
|
|
||||||
auto_connect_output_button_group = auto_connect_output_master_button.get_group();
|
|
||||||
auto_connect_output_manual_button.set_group (auto_connect_output_button_group);
|
|
||||||
auto_connect_output_physical_button.set_group (auto_connect_output_button_group);
|
|
||||||
|
|
||||||
Gtk::HBox* useless_box = manage (new HBox);
|
|
||||||
useless_box->pack_start (auto_connect_inputs_button, false, false);
|
|
||||||
connect_box->pack_start (*useless_box, false, false);
|
|
||||||
connect_box->pack_start (auto_connect_output_master_button, false, false);
|
|
||||||
connect_box->pack_start (auto_connect_output_physical_button, false, false);
|
|
||||||
connect_box->pack_start (auto_connect_output_manual_button, false, false);
|
|
||||||
|
|
||||||
misc_packer.pack_start (*connect_box, false, false);
|
|
||||||
|
|
||||||
hw_monitor_button.set_name ("OptionEditorToggleButton");
|
|
||||||
sw_monitor_button.set_name ("OptionEditorToggleButton");
|
|
||||||
plugins_stop_button.set_name ("OptionEditorToggleButton");
|
|
||||||
plugins_on_rec_button.set_name ("OptionEditorToggleButton");
|
|
||||||
verify_remove_last_capture_button.set_name ("OptionEditorToggleButton");
|
|
||||||
auto_connect_inputs_button.set_name ("OptionEditorToggleButton");
|
|
||||||
auto_connect_output_physical_button.set_name ("OptionEditorToggleButton");
|
|
||||||
auto_connect_output_master_button.set_name ("OptionEditorToggleButton");
|
|
||||||
auto_connect_output_manual_button.set_name ("OptionEditorToggleButton");
|
|
||||||
stop_rec_on_xrun_button.set_name ("OptionEditorToggleButton");
|
|
||||||
stop_at_end_button.set_name ("OptionEditorToggleButton");
|
|
||||||
debug_keyboard_button.set_name ("OptionEditorToggleButton");
|
|
||||||
speed_quieten_button.set_name ("OptionEditorToggleButton");
|
|
||||||
|
|
||||||
hw_monitor_button.set_active (Config->get_use_hardware_monitoring());
|
|
||||||
sw_monitor_button.set_active (!Config->get_no_sw_monitoring());
|
|
||||||
plugins_stop_button.set_active (Config->get_plugins_stop_with_transport());
|
|
||||||
stop_rec_on_xrun_button.set_active (Config->get_stop_recording_on_xrun());
|
|
||||||
stop_at_end_button.set_active (Config->get_stop_at_session_end());
|
|
||||||
debug_keyboard_button.set_active (false);
|
|
||||||
speed_quieten_button.set_active (Config->get_quieten_at_speed() != 1.0f);
|
|
||||||
|
|
||||||
hw_monitor_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::hw_monitor_clicked));
|
|
||||||
sw_monitor_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::sw_monitor_clicked));
|
|
||||||
plugins_stop_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::plugins_stop_with_transport_clicked));
|
|
||||||
plugins_on_rec_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::plugins_on_while_recording_clicked));
|
|
||||||
verify_remove_last_capture_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::verify_remove_last_capture_clicked));
|
|
||||||
auto_connect_inputs_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::auto_connect_inputs_clicked));
|
|
||||||
auto_connect_output_physical_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::auto_connect_output_physical_clicked));
|
|
||||||
auto_connect_output_master_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::auto_connect_output_master_clicked));
|
|
||||||
auto_connect_output_manual_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::auto_connect_output_manual_clicked));
|
|
||||||
stop_rec_on_xrun_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::stop_rec_on_xrun_clicked));
|
|
||||||
stop_at_end_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::stop_at_end_clicked));
|
|
||||||
debug_keyboard_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::debug_keyboard_clicked));
|
|
||||||
speed_quieten_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::speed_quieten_clicked));
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::speed_quieten_clicked ()
|
|
||||||
{
|
|
||||||
if (speed_quieten_button.get_active()) {
|
|
||||||
Config->set_quieten_at_speed (0.251189); // -12dB reduction for ffwd or rewind
|
|
||||||
} else {
|
|
||||||
Config->set_quieten_at_speed (1.0); /* no change */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::debug_keyboard_clicked ()
|
|
||||||
{
|
|
||||||
extern bool debug_keyboard;
|
|
||||||
debug_keyboard = debug_keyboard_button.get_active ();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::auto_connect_inputs_clicked ()
|
|
||||||
{
|
|
||||||
if (session) {
|
|
||||||
session->set_input_auto_connect (auto_connect_inputs_button.get_active());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::auto_connect_output_master_clicked ()
|
|
||||||
{
|
|
||||||
if (session) {
|
|
||||||
if (auto_connect_output_master_button.get_active()) {
|
|
||||||
session->set_output_auto_connect (Session::AutoConnectMaster);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::auto_connect_output_physical_clicked ()
|
|
||||||
{
|
|
||||||
if (session) {
|
|
||||||
if (auto_connect_output_physical_button.get_active()) {
|
|
||||||
session->set_output_auto_connect (Session::AutoConnectPhysical);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::auto_connect_output_manual_clicked ()
|
|
||||||
{
|
|
||||||
if (session) {
|
|
||||||
if (auto_connect_output_manual_button.get_active()) {
|
|
||||||
session->set_output_auto_connect (Session::AutoConnectOption (0));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::hw_monitor_clicked ()
|
|
||||||
{
|
|
||||||
Config->set_use_hardware_monitoring (hw_monitor_button.get_active());
|
|
||||||
if (session) {
|
|
||||||
session->reset_input_monitor_state ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::sw_monitor_clicked ()
|
|
||||||
{
|
|
||||||
Config->set_no_sw_monitoring (!sw_monitor_button.get_active());
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::plugins_stop_with_transport_clicked ()
|
|
||||||
{
|
|
||||||
Config->set_plugins_stop_with_transport (plugins_stop_button.get_active());
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::plugins_on_while_recording_clicked ()
|
|
||||||
{
|
|
||||||
if (session) {
|
|
||||||
session->set_recording_plugins (plugins_on_rec_button.get_active());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::verify_remove_last_capture_clicked ()
|
|
||||||
{
|
|
||||||
Config->set_verify_remove_last_capture(verify_remove_last_capture_button.get_active());
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::stop_rec_on_xrun_clicked ()
|
|
||||||
{
|
|
||||||
Config->set_stop_recording_on_xrun (stop_rec_on_xrun_button.get_active());
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::stop_at_end_clicked ()
|
|
||||||
{
|
|
||||||
Config->set_stop_at_session_end (stop_at_end_button.get_active());
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct {
|
static const struct {
|
||||||
const char *name;
|
const char *name;
|
||||||
guint modifier;
|
guint modifier;
|
||||||
|
|
@ -1988,11 +1199,3 @@ OptionEditor::fixup_combo_size (Gtk::ComboBoxText& combo, vector<string>& string
|
||||||
set_size_request_to_display_given_text (combo, maxstring.c_str(), 10 + FUDGE, 10);
|
set_size_request_to_display_given_text (combo, maxstring.c_str(), 10 + FUDGE, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::map_some_session_state (CheckButton& button, bool (Session::*get)() const)
|
|
||||||
{
|
|
||||||
if (session) {
|
|
||||||
button.set_active ((session->*get)());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,28 +65,22 @@ class OptionEditor : public Gtk::Dialog
|
||||||
|
|
||||||
/* Generic */
|
/* Generic */
|
||||||
|
|
||||||
void session_control_changed (ARDOUR::Session::ControlType);
|
|
||||||
void queue_session_control_changed (ARDOUR::Session::ControlType);
|
|
||||||
void map_some_session_state (Gtk::CheckButton& button, bool (ARDOUR::Session::*get)() const);
|
|
||||||
gint wm_close (GdkEventAny *);
|
gint wm_close (GdkEventAny *);
|
||||||
void just_close_win();
|
|
||||||
bool focus_out_event_handler (GdkEventFocus*, void (OptionEditor::*pmf)());
|
bool focus_out_event_handler (GdkEventFocus*, void (OptionEditor::*pmf)());
|
||||||
|
|
||||||
/* paths */
|
/* paths */
|
||||||
|
|
||||||
Gtk::Table path_table;
|
Gtk::Table path_table;
|
||||||
|
|
||||||
Gtk::Entry session_raid_entry;
|
Gtk::Entry session_raid_entry;
|
||||||
|
|
||||||
Gtk::ComboBoxText native_format_combo;
|
Gtk::ComboBoxText native_format_combo;
|
||||||
|
|
||||||
struct SoundFilePathColumns : public Gtk::TreeModel::ColumnRecord
|
struct SoundFilePathColumns : public Gtk::TreeModel::ColumnRecord {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
|
SoundFilePathColumns() { add (paths); }
|
||||||
Gtk::TreeModelColumn<std::string> paths;
|
Gtk::TreeModelColumn<std::string> paths;
|
||||||
|
|
||||||
SoundFilePathColumns() { add (paths); }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
SoundFilePathColumns sfdb_path_columns;
|
SoundFilePathColumns sfdb_path_columns;
|
||||||
Glib::RefPtr<Gtk::ListStore> sfdb_paths;
|
Glib::RefPtr<Gtk::ListStore> sfdb_paths;
|
||||||
Gtk::TreeView sfdb_path_view;
|
Gtk::TreeView sfdb_path_view;
|
||||||
|
|
@ -99,8 +93,6 @@ class OptionEditor : public Gtk::Dialog
|
||||||
|
|
||||||
/* fades */
|
/* fades */
|
||||||
|
|
||||||
// Gtk::Table fade_table;
|
|
||||||
|
|
||||||
Gtk::VBox fade_packer;
|
Gtk::VBox fade_packer;
|
||||||
Gtk::CheckButton auto_xfade_button;
|
Gtk::CheckButton auto_xfade_button;
|
||||||
Gtk::CheckButton xfade_active_button;
|
Gtk::CheckButton xfade_active_button;
|
||||||
|
|
@ -118,57 +110,17 @@ class OptionEditor : public Gtk::Dialog
|
||||||
void setup_fade_options();
|
void setup_fade_options();
|
||||||
void short_xfade_adjustment_changed ();
|
void short_xfade_adjustment_changed ();
|
||||||
|
|
||||||
/* solo */
|
|
||||||
|
|
||||||
Gtk::VBox solo_packer;
|
|
||||||
Gtk::CheckButton solo_latched_button;
|
|
||||||
Gtk::CheckButton solo_via_bus_button;
|
|
||||||
|
|
||||||
void solo_latched_clicked();
|
|
||||||
void solo_via_bus_clicked ();
|
|
||||||
|
|
||||||
void setup_solo_options();
|
|
||||||
|
|
||||||
/* display */
|
|
||||||
|
|
||||||
Gtk::VBox display_packer;
|
|
||||||
Gtk::CheckButton show_waveforms_button;
|
|
||||||
Gtk::CheckButton show_waveforms_recording_button;
|
|
||||||
Gtk::CheckButton mixer_strip_width_button;
|
|
||||||
Gtk::CheckButton show_measures_button;
|
|
||||||
Gtk::CheckButton follow_playhead_button;
|
|
||||||
Gtk::ComboBoxText meter_hold_combo;
|
|
||||||
Gtk::ComboBoxText meter_falloff_combo;
|
|
||||||
|
|
||||||
void setup_display_options();
|
|
||||||
void show_waveforms_clicked ();
|
|
||||||
void show_waveforms_recording_clicked ();
|
|
||||||
void show_measures_clicked ();
|
|
||||||
void strip_width_clicked ();
|
|
||||||
void follow_playhead_clicked ();
|
|
||||||
void meter_hold_chosen ();
|
|
||||||
void meter_falloff_chosen ();
|
|
||||||
|
|
||||||
void display_control_changed (Editing::DisplayControl);
|
|
||||||
|
|
||||||
/* Sync */
|
/* Sync */
|
||||||
|
|
||||||
Gtk::VBox sync_packer;
|
Gtk::VBox sync_packer;
|
||||||
|
|
||||||
Gtk::CheckButton send_mtc_button;
|
|
||||||
Gtk::CheckButton send_mmc_button;
|
|
||||||
Gtk::CheckButton jack_time_master_button;
|
|
||||||
Gtk::ComboBoxText slave_type_combo;
|
Gtk::ComboBoxText slave_type_combo;
|
||||||
Gtk::ComboBoxText smpte_fps_combo;
|
Gtk::ComboBoxText smpte_fps_combo;
|
||||||
AudioClock smpte_offset_clock;
|
AudioClock smpte_offset_clock;
|
||||||
Gtk::CheckButton smpte_offset_negative_button;
|
Gtk::CheckButton smpte_offset_negative_button;
|
||||||
|
|
||||||
void setup_sync_options ();
|
void setup_sync_options ();
|
||||||
gint send_mtc_toggled (GdkEventButton*, Gtk::CheckButton*);
|
|
||||||
|
|
||||||
void slave_type_chosen ();
|
|
||||||
void jack_time_master_clicked ();
|
|
||||||
void jack_transport_master_clicked ();
|
|
||||||
void smpte_fps_chosen ();
|
void smpte_fps_chosen ();
|
||||||
void smpte_offset_chosen ();
|
void smpte_offset_chosen ();
|
||||||
void smpte_offset_negative_clicked ();
|
void smpte_offset_negative_clicked ();
|
||||||
|
|
@ -176,26 +128,18 @@ class OptionEditor : public Gtk::Dialog
|
||||||
/* MIDI */
|
/* MIDI */
|
||||||
|
|
||||||
Gtk::VBox midi_packer;
|
Gtk::VBox midi_packer;
|
||||||
Gtk::CheckButton midi_feedback_button;
|
|
||||||
Gtk::CheckButton midi_control_button;
|
|
||||||
Gtk::CheckButton mmc_control_button;
|
|
||||||
|
|
||||||
Gtk::RadioButton::Group mtc_button_group;
|
Gtk::RadioButton::Group mtc_button_group;
|
||||||
Gtk::RadioButton::Group mmc_button_group;
|
Gtk::RadioButton::Group mmc_button_group;
|
||||||
Gtk::RadioButton::Group midi_button_group;
|
Gtk::RadioButton::Group midi_button_group;
|
||||||
|
|
||||||
void send_mmc_toggled (Gtk::CheckButton*);
|
|
||||||
void mmc_control_toggled (Gtk::CheckButton*);
|
|
||||||
void midi_control_toggled (Gtk::CheckButton*);
|
|
||||||
void midi_feedback_toggled (Gtk::CheckButton*);
|
|
||||||
|
|
||||||
gint port_online_toggled (GdkEventButton*,MIDI::Port*,Gtk::ToggleButton*);
|
gint port_online_toggled (GdkEventButton*,MIDI::Port*,Gtk::ToggleButton*);
|
||||||
gint port_trace_in_toggled (GdkEventButton*,MIDI::Port*,Gtk::ToggleButton*);
|
gint port_trace_in_toggled (GdkEventButton*,MIDI::Port*,Gtk::ToggleButton*);
|
||||||
gint port_trace_out_toggled (GdkEventButton*,MIDI::Port*,Gtk::ToggleButton*);
|
gint port_trace_out_toggled (GdkEventButton*,MIDI::Port*,Gtk::ToggleButton*);
|
||||||
|
|
||||||
gint mmc_port_chosen (GdkEventButton*,MIDI::Port*,Gtk::RadioButton*);
|
bool mmc_port_chosen (GdkEventButton*,MIDI::Port*,Gtk::RadioButton*);
|
||||||
gint mtc_port_chosen (GdkEventButton*,MIDI::Port*,Gtk::RadioButton*);
|
bool mtc_port_chosen (GdkEventButton*,MIDI::Port*,Gtk::RadioButton*);
|
||||||
gint midi_port_chosen (GdkEventButton*,MIDI::Port*,Gtk::RadioButton*);
|
bool midi_port_chosen (GdkEventButton*,MIDI::Port*,Gtk::RadioButton*);
|
||||||
|
|
||||||
void map_port_online (MIDI::Port*, Gtk::ToggleButton*);
|
void map_port_online (MIDI::Port*, Gtk::ToggleButton*);
|
||||||
|
|
||||||
|
|
@ -264,42 +208,6 @@ class OptionEditor : public Gtk::Dialog
|
||||||
void edit_button_changed ();
|
void edit_button_changed ();
|
||||||
void delete_button_changed ();
|
void delete_button_changed ();
|
||||||
|
|
||||||
/* Miscellany */
|
|
||||||
|
|
||||||
Gtk::VBox misc_packer;
|
|
||||||
|
|
||||||
Gtk::CheckButton auto_connect_inputs_button;
|
|
||||||
|
|
||||||
Gtk::RadioButton auto_connect_output_physical_button;
|
|
||||||
Gtk::RadioButton auto_connect_output_master_button;
|
|
||||||
Gtk::RadioButton auto_connect_output_manual_button;
|
|
||||||
Gtk::RadioButton::Group auto_connect_output_button_group;
|
|
||||||
|
|
||||||
Gtk::CheckButton hw_monitor_button;
|
|
||||||
Gtk::CheckButton sw_monitor_button;
|
|
||||||
Gtk::CheckButton plugins_stop_button;
|
|
||||||
Gtk::CheckButton plugins_on_rec_button;
|
|
||||||
Gtk::CheckButton verify_remove_last_capture_button;
|
|
||||||
Gtk::CheckButton stop_rec_on_xrun_button;
|
|
||||||
Gtk::CheckButton stop_at_end_button;
|
|
||||||
Gtk::CheckButton debug_keyboard_button;
|
|
||||||
Gtk::CheckButton speed_quieten_button;
|
|
||||||
|
|
||||||
void setup_misc_options ();
|
|
||||||
void plugins_stop_with_transport_clicked ();
|
|
||||||
void verify_remove_last_capture_clicked ();
|
|
||||||
void plugins_on_while_recording_clicked ();
|
|
||||||
void auto_connect_inputs_clicked ();
|
|
||||||
void auto_connect_output_physical_clicked ();
|
|
||||||
void auto_connect_output_master_clicked ();
|
|
||||||
void auto_connect_output_manual_clicked ();
|
|
||||||
void hw_monitor_clicked ();
|
|
||||||
void sw_monitor_clicked ();
|
|
||||||
void stop_rec_on_xrun_clicked ();
|
|
||||||
void stop_at_end_clicked ();
|
|
||||||
void debug_keyboard_clicked ();
|
|
||||||
void speed_quieten_clicked ();
|
|
||||||
|
|
||||||
void fixup_combo_size (Gtk::ComboBoxText&, std::vector<std::string>& strings);
|
void fixup_combo_size (Gtk::ComboBoxText&, std::vector<std::string>& strings);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ RouteUI::RouteUI (ARDOUR::Route& rt, ARDOUR::Session& sess, const char* m_name,
|
||||||
xml_node = 0;
|
xml_node = 0;
|
||||||
mute_menu = 0;
|
mute_menu = 0;
|
||||||
solo_menu = 0;
|
solo_menu = 0;
|
||||||
|
remote_control_menu = 0;
|
||||||
ignore_toggle = false;
|
ignore_toggle = false;
|
||||||
wait_for_release = false;
|
wait_for_release = false;
|
||||||
route_active_menu_item = 0;
|
route_active_menu_item = 0;
|
||||||
|
|
@ -408,6 +409,58 @@ RouteUI::update_rec_display ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
RouteUI::build_remote_control_menu ()
|
||||||
|
{
|
||||||
|
remote_control_menu = manage (new Menu);
|
||||||
|
refresh_remote_control_menu ();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
RouteUI::refresh_remote_control_menu ()
|
||||||
|
{
|
||||||
|
using namespace Menu_Helpers;
|
||||||
|
|
||||||
|
RadioMenuItem::Group rc_group;
|
||||||
|
CheckMenuItem* rc_active;
|
||||||
|
uint32_t limit = _session.ntracks();
|
||||||
|
char buf[32];
|
||||||
|
|
||||||
|
MenuList& rc_items = remote_control_menu->items();
|
||||||
|
rc_items.clear ();
|
||||||
|
|
||||||
|
/* note that this menu list starts at zero, not 1, because zero
|
||||||
|
is a valid, if useless, ID.
|
||||||
|
*/
|
||||||
|
|
||||||
|
limit += 4; /* leave some breathing room */
|
||||||
|
|
||||||
|
for (uint32_t i = 0; i < limit; ++i) {
|
||||||
|
snprintf (buf, sizeof (buf), "%u", i);
|
||||||
|
rc_items.push_back (RadioMenuElem (rc_group, buf));
|
||||||
|
rc_active = dynamic_cast<RadioMenuItem*>(&rc_items.back());
|
||||||
|
if (_route.remote_control_id() == i) {
|
||||||
|
rc_active = dynamic_cast<CheckMenuItem*> (&rc_items.back());
|
||||||
|
rc_active->set_active ();
|
||||||
|
}
|
||||||
|
rc_active->signal_activate().connect (bind (mem_fun (*this, &RouteUI::set_remote_control_id), i, rc_active));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
RouteUI::set_remote_control_id (uint32_t id, CheckMenuItem* item)
|
||||||
|
{
|
||||||
|
/* this is called when the radio menu item is toggled, and so
|
||||||
|
is actually invoked twice per menu selection. we only
|
||||||
|
care about the invocation for the item that was being
|
||||||
|
marked active.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (item->get_active()) {
|
||||||
|
_route.set_remote_control_id (id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RouteUI::build_solo_menu (void)
|
RouteUI::build_solo_menu (void)
|
||||||
{
|
{
|
||||||
|
|
@ -840,3 +893,4 @@ RouteUI::map_frozen ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,7 @@ class RouteUI : public virtual AxisView
|
||||||
|
|
||||||
Gtk::Menu* mute_menu;
|
Gtk::Menu* mute_menu;
|
||||||
Gtk::Menu* solo_menu;
|
Gtk::Menu* solo_menu;
|
||||||
|
Gtk::Menu* remote_control_menu;
|
||||||
|
|
||||||
XMLNode *xml_node;
|
XMLNode *xml_node;
|
||||||
void ensure_xml_node ();
|
void ensure_xml_node ();
|
||||||
|
|
@ -92,6 +93,8 @@ class RouteUI : public virtual AxisView
|
||||||
void session_rec_enable_changed();
|
void session_rec_enable_changed();
|
||||||
|
|
||||||
void build_solo_menu (void);
|
void build_solo_menu (void);
|
||||||
|
void build_remote_control_menu (void);
|
||||||
|
void refresh_remote_control_menu ();
|
||||||
|
|
||||||
void solo_safe_toggle (void*, Gtk::CheckMenuItem*);
|
void solo_safe_toggle (void*, Gtk::CheckMenuItem*);
|
||||||
void toggle_solo_safe (Gtk::CheckMenuItem*);
|
void toggle_solo_safe (Gtk::CheckMenuItem*);
|
||||||
|
|
@ -123,8 +126,6 @@ class RouteUI : public virtual AxisView
|
||||||
virtual void name_changed (void *src);
|
virtual void name_changed (void *src);
|
||||||
void route_removed ();
|
void route_removed ();
|
||||||
|
|
||||||
static gint okay_gplusplus_cannot_do_complex_templates (RouteUI *rui);
|
|
||||||
|
|
||||||
Gtk::CheckMenuItem *route_active_menu_item;
|
Gtk::CheckMenuItem *route_active_menu_item;
|
||||||
void toggle_route_active ();
|
void toggle_route_active ();
|
||||||
virtual void route_active_changed ();
|
virtual void route_active_changed ();
|
||||||
|
|
@ -137,6 +138,8 @@ class RouteUI : public virtual AxisView
|
||||||
void update_solo_display ();
|
void update_solo_display ();
|
||||||
virtual void map_frozen ();
|
virtual void map_frozen ();
|
||||||
|
|
||||||
|
void set_remote_control_id (uint32_t id, Gtk::CheckMenuItem* item);
|
||||||
|
|
||||||
void reversibly_apply_route_boolean (string name, void (ARDOUR::Route::*func)(bool, void*), bool, void *);
|
void reversibly_apply_route_boolean (string name, void (ARDOUR::Route::*func)(bool, void*), bool, void *);
|
||||||
void reversibly_apply_audio_track_boolean (string name, void (ARDOUR::AudioTrack::*func)(bool, void*), bool, void *);
|
void reversibly_apply_audio_track_boolean (string name, void (ARDOUR::AudioTrack::*func)(bool, void*), bool, void *);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -124,6 +124,9 @@ class Configuration : public Stateful
|
||||||
bool get_use_hardware_monitoring();
|
bool get_use_hardware_monitoring();
|
||||||
void set_use_hardware_monitoring(bool);
|
void set_use_hardware_monitoring(bool);
|
||||||
|
|
||||||
|
bool get_use_sw_monitoring();
|
||||||
|
void set_use_sw_monitoring(bool);
|
||||||
|
|
||||||
bool get_jack_time_master();
|
bool get_jack_time_master();
|
||||||
void set_jack_time_master(bool);
|
void set_jack_time_master(bool);
|
||||||
|
|
||||||
|
|
@ -133,9 +136,6 @@ class Configuration : public Stateful
|
||||||
bool get_plugins_stop_with_transport();
|
bool get_plugins_stop_with_transport();
|
||||||
void set_plugins_stop_with_transport(bool);
|
void set_plugins_stop_with_transport(bool);
|
||||||
|
|
||||||
bool get_no_sw_monitoring();
|
|
||||||
void set_no_sw_monitoring(bool);
|
|
||||||
|
|
||||||
bool get_stop_recording_on_xrun();
|
bool get_stop_recording_on_xrun();
|
||||||
void set_stop_recording_on_xrun(bool);
|
void set_stop_recording_on_xrun(bool);
|
||||||
|
|
||||||
|
|
@ -220,8 +220,8 @@ class Configuration : public Stateful
|
||||||
bool trace_midi_output_is_user;
|
bool trace_midi_output_is_user;
|
||||||
bool plugins_stop_with_transport;
|
bool plugins_stop_with_transport;
|
||||||
bool plugins_stop_with_transport_is_user;
|
bool plugins_stop_with_transport_is_user;
|
||||||
bool no_sw_monitoring;
|
bool use_sw_monitoring;
|
||||||
bool no_sw_monitoring_is_user;
|
bool use_sw_monitoring_is_user;
|
||||||
bool stop_recording_on_xrun;
|
bool stop_recording_on_xrun;
|
||||||
bool stop_recording_on_xrun_is_user;
|
bool stop_recording_on_xrun_is_user;
|
||||||
bool verify_remove_last_capture;
|
bool verify_remove_last_capture;
|
||||||
|
|
|
||||||
|
|
@ -245,6 +245,10 @@ class Route : public IO
|
||||||
|
|
||||||
void protect_automation ();
|
void protect_automation ();
|
||||||
|
|
||||||
|
void set_remote_control_id (uint32_t id);
|
||||||
|
uint32_t remote_control_id () const;
|
||||||
|
sigc::signal<void> RemoteControlIDChanged;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
friend class Session;
|
friend class Session;
|
||||||
|
|
||||||
|
|
@ -317,6 +321,7 @@ class Route : public IO
|
||||||
|
|
||||||
state_id_t _current_state_id;
|
state_id_t _current_state_id;
|
||||||
uint32_t redirect_max_outs;
|
uint32_t redirect_max_outs;
|
||||||
|
uint32_t _remote_control_id;
|
||||||
|
|
||||||
uint32_t pans_required() const;
|
uint32_t pans_required() const;
|
||||||
uint32_t n_process_buffers ();
|
uint32_t n_process_buffers ();
|
||||||
|
|
|
||||||
|
|
@ -391,7 +391,8 @@ class Session : public sigc::trackable, public Stateful
|
||||||
PunchOut,
|
PunchOut,
|
||||||
SendMTC,
|
SendMTC,
|
||||||
MMCControl,
|
MMCControl,
|
||||||
Live,
|
SoloLatch,
|
||||||
|
SoloingModel,
|
||||||
RecordingPlugins,
|
RecordingPlugins,
|
||||||
CrossFadesActive,
|
CrossFadesActive,
|
||||||
SendMMC,
|
SendMMC,
|
||||||
|
|
@ -399,7 +400,8 @@ class Session : public sigc::trackable, public Stateful
|
||||||
Clicking,
|
Clicking,
|
||||||
EditingMode,
|
EditingMode,
|
||||||
PlayRange,
|
PlayRange,
|
||||||
AlignChoice,
|
LayeringModel,
|
||||||
|
CrossfadingModel,
|
||||||
SeamlessLoop,
|
SeamlessLoop,
|
||||||
MidiFeedback,
|
MidiFeedback,
|
||||||
MidiControl
|
MidiControl
|
||||||
|
|
@ -440,7 +442,7 @@ class Session : public sigc::trackable, public Stateful
|
||||||
bool get_recording_plugins () const { return recording_plugins; }
|
bool get_recording_plugins () const { return recording_plugins; }
|
||||||
bool get_crossfades_active () const { return crossfades_active; }
|
bool get_crossfades_active () const { return crossfades_active; }
|
||||||
|
|
||||||
AutoConnectOption get_input_auto_connect () const { return input_auto_connect; }
|
bool get_input_auto_connect () const;
|
||||||
AutoConnectOption get_output_auto_connect () const { return output_auto_connect; }
|
AutoConnectOption get_output_auto_connect () const { return output_auto_connect; }
|
||||||
|
|
||||||
enum LayerModel {
|
enum LayerModel {
|
||||||
|
|
@ -452,14 +454,9 @@ class Session : public sigc::trackable, public Stateful
|
||||||
void set_layer_model (LayerModel);
|
void set_layer_model (LayerModel);
|
||||||
LayerModel get_layer_model () const { return layer_model; }
|
LayerModel get_layer_model () const { return layer_model; }
|
||||||
|
|
||||||
sigc::signal<void> LayerModelChanged;
|
|
||||||
|
|
||||||
void set_xfade_model (CrossfadeModel);
|
void set_xfade_model (CrossfadeModel);
|
||||||
CrossfadeModel get_xfade_model () const { return xfade_model; }
|
CrossfadeModel get_xfade_model () const { return xfade_model; }
|
||||||
|
|
||||||
void set_align_style (AlignStyle);
|
|
||||||
AlignStyle get_align_style () const { return align_style; }
|
|
||||||
|
|
||||||
void add_event (jack_nframes_t action_frame, Event::Type type, jack_nframes_t target_frame = 0);
|
void add_event (jack_nframes_t action_frame, Event::Type type, jack_nframes_t target_frame = 0);
|
||||||
void remove_event (jack_nframes_t frame, Event::Type type);
|
void remove_event (jack_nframes_t frame, Event::Type type);
|
||||||
void clear_events (Event::Type type);
|
void clear_events (Event::Type type);
|
||||||
|
|
@ -1719,8 +1716,6 @@ class Session : public sigc::trackable, public Stateful
|
||||||
AutoConnectOption input_auto_connect;
|
AutoConnectOption input_auto_connect;
|
||||||
AutoConnectOption output_auto_connect;
|
AutoConnectOption output_auto_connect;
|
||||||
|
|
||||||
AlignStyle align_style;
|
|
||||||
|
|
||||||
gain_t* _gain_automation_buffer;
|
gain_t* _gain_automation_buffer;
|
||||||
pan_t** _pan_automation_buffer;
|
pan_t** _pan_automation_buffer;
|
||||||
void allocate_pan_automation_buffers (jack_nframes_t nframes, uint32_t howmany, bool force);
|
void allocate_pan_automation_buffers (jack_nframes_t nframes, uint32_t howmany, bool force);
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include <sigc++/signal.h>
|
#include <sigc++/signal.h>
|
||||||
|
|
||||||
|
|
@ -35,7 +36,14 @@ class StateManager : public sigc::trackable
|
||||||
|
|
||||||
state_id_t _current_state_id;
|
state_id_t _current_state_id;
|
||||||
|
|
||||||
|
static void set_allow_save (bool);
|
||||||
|
static bool allow_save ();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
static bool _allow_save;
|
||||||
|
typedef std::pair<StateManager*,std::string> DeferredSave;
|
||||||
|
static std::vector<DeferredSave> deferred;
|
||||||
|
|
||||||
StateMap states;
|
StateMap states;
|
||||||
|
|
||||||
virtual Change restore_state (State&) = 0;
|
virtual Change restore_state (State&) = 0;
|
||||||
|
|
|
||||||
|
|
@ -576,7 +576,6 @@ AudioPlaylist::state_factory (std::string why) const
|
||||||
for (Crossfades::const_iterator i = _crossfades.begin(); i != _crossfades.end(); ++i) {
|
for (Crossfades::const_iterator i = _crossfades.begin(); i != _crossfades.end(); ++i) {
|
||||||
state->crossfade_states.push_back ((*i)->get_memento());
|
state->crossfade_states.push_back ((*i)->get_memento());
|
||||||
}
|
}
|
||||||
|
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -592,13 +591,13 @@ AudioPlaylist::restore_state (StateManager::State& state)
|
||||||
regions = apstate->regions;
|
regions = apstate->regions;
|
||||||
|
|
||||||
for (list<UndoAction>::iterator s = apstate->region_states.begin(); s != apstate->region_states.end(); ++s) {
|
for (list<UndoAction>::iterator s = apstate->region_states.begin(); s != apstate->region_states.end(); ++s) {
|
||||||
*s;
|
(*s) ();
|
||||||
}
|
}
|
||||||
|
|
||||||
_crossfades = apstate->crossfades;
|
_crossfades = apstate->crossfades;
|
||||||
|
|
||||||
for (list<UndoAction>::iterator s = apstate->crossfade_states.begin(); s != apstate->crossfade_states.end(); ++s) {
|
for (list<UndoAction>::iterator s = apstate->crossfade_states.begin(); s != apstate->crossfade_states.end(); ++s) {
|
||||||
*s;
|
(*s) ();
|
||||||
}
|
}
|
||||||
|
|
||||||
in_set_state = false;
|
in_set_state = false;
|
||||||
|
|
|
||||||
|
|
@ -322,6 +322,24 @@ AudioTrack::set_state (const XMLNode& node)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
XMLNodeList nlist;
|
||||||
|
XMLNodeConstIterator niter;
|
||||||
|
XMLNode *child;
|
||||||
|
|
||||||
|
nlist = node.children();
|
||||||
|
for (niter = nlist.begin(); niter != nlist.end(); ++niter){
|
||||||
|
child = *niter;
|
||||||
|
|
||||||
|
if (child->name() == X_("remote_control")) {
|
||||||
|
if ((prop = child->property (X_("id"))) != 0) {
|
||||||
|
int32_t x;
|
||||||
|
sscanf (prop->value().c_str(), "%d", &x);
|
||||||
|
set_remote_control_id (x);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pending_state = const_cast<XMLNode*> (&node);
|
pending_state = const_cast<XMLNode*> (&node);
|
||||||
|
|
||||||
_session.StateReady.connect (mem_fun (*this, &AudioTrack::set_state_part_two));
|
_session.StateReady.connect (mem_fun (*this, &AudioTrack::set_state_part_two));
|
||||||
|
|
@ -393,6 +411,10 @@ AudioTrack::get_state()
|
||||||
set_midi_node_info (child, ev, chn, additional);
|
set_midi_node_info (child, ev, chn, additional);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XMLNode* remote_control_node = new XMLNode (X_("remote_control"));
|
||||||
|
snprintf (buf, sizeof (buf), "%d", _remote_control_id);
|
||||||
|
remote_control_node->add_property (X_("id"), buf);
|
||||||
|
root.add_child_nocopy (*remote_control_node);
|
||||||
|
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
@ -519,17 +541,17 @@ AudioTrack::no_roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nf
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (_session.get_auto_input()) {
|
if (_session.get_auto_input()) {
|
||||||
if (Config->get_no_sw_monitoring()) {
|
if (Config->get_use_sw_monitoring()) {
|
||||||
send_silence = true;
|
|
||||||
} else {
|
|
||||||
send_silence = false;
|
send_silence = false;
|
||||||
|
} else {
|
||||||
|
send_silence = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (diskstream->record_enabled()) {
|
if (diskstream->record_enabled()) {
|
||||||
if (Config->get_no_sw_monitoring()) {
|
if (Config->get_use_sw_monitoring()) {
|
||||||
send_silence = true;
|
|
||||||
} else {
|
|
||||||
send_silence = false;
|
send_silence = false;
|
||||||
|
} else {
|
||||||
|
send_silence = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
send_silence = true;
|
send_silence = true;
|
||||||
|
|
|
||||||
|
|
@ -257,8 +257,8 @@ Configuration::state (bool user_only)
|
||||||
if (!user_only || plugins_stop_with_transport_is_user) {
|
if (!user_only || plugins_stop_with_transport_is_user) {
|
||||||
node->add_child_nocopy(option_node("plugins-stop-with-transport", plugins_stop_with_transport?"yes":"no"));
|
node->add_child_nocopy(option_node("plugins-stop-with-transport", plugins_stop_with_transport?"yes":"no"));
|
||||||
}
|
}
|
||||||
if (!user_only || no_sw_monitoring_is_user) {
|
if (!user_only || use_sw_monitoring_is_user) {
|
||||||
node->add_child_nocopy(option_node("no-sw-monitoring", no_sw_monitoring?"yes":"no"));
|
node->add_child_nocopy(option_node("use-sw-monitoring", use_sw_monitoring?"yes":"no"));
|
||||||
}
|
}
|
||||||
if (!user_only || stop_recording_on_xrun_is_user) {
|
if (!user_only || stop_recording_on_xrun_is_user) {
|
||||||
node->add_child_nocopy(option_node("stop-recording-on-xrun", stop_recording_on_xrun?"yes":"no"));
|
node->add_child_nocopy(option_node("stop-recording-on-xrun", stop_recording_on_xrun?"yes":"no"));
|
||||||
|
|
@ -400,8 +400,10 @@ Configuration::set_state (const XMLNode& root)
|
||||||
set_trace_midi_output (option_value == "yes");
|
set_trace_midi_output (option_value == "yes");
|
||||||
} else if (option_name == "plugins-stop-with-transport") {
|
} else if (option_name == "plugins-stop-with-transport") {
|
||||||
set_plugins_stop_with_transport (option_value == "yes");
|
set_plugins_stop_with_transport (option_value == "yes");
|
||||||
} else if (option_name == "no-sw-monitoring") {
|
} else if (option_name == "use-sw-monitoring") {
|
||||||
set_no_sw_monitoring (option_value == "yes");
|
set_use_sw_monitoring (option_value == "yes");
|
||||||
|
} else if (option_name == "no-sw-monitoring") { /* DEPRECATED */
|
||||||
|
set_use_sw_monitoring (option_value != "yes");
|
||||||
} else if (option_name == "stop-recording-on-xrun") {
|
} else if (option_name == "stop-recording-on-xrun") {
|
||||||
set_stop_recording_on_xrun (option_value == "yes");
|
set_stop_recording_on_xrun (option_value == "yes");
|
||||||
} else if (option_name == "verify-remove-last-capture") {
|
} else if (option_name == "verify-remove-last-capture") {
|
||||||
|
|
@ -475,7 +477,7 @@ Configuration::set_defaults ()
|
||||||
trace_midi_input = false;
|
trace_midi_input = false;
|
||||||
trace_midi_output = false;
|
trace_midi_output = false;
|
||||||
plugins_stop_with_transport = false;
|
plugins_stop_with_transport = false;
|
||||||
no_sw_monitoring = false;
|
use_sw_monitoring = true;
|
||||||
stop_recording_on_xrun = false;
|
stop_recording_on_xrun = false;
|
||||||
verify_remove_last_capture = true;
|
verify_remove_last_capture = true;
|
||||||
stop_at_session_end = true;
|
stop_at_session_end = true;
|
||||||
|
|
@ -514,7 +516,7 @@ Configuration::set_defaults ()
|
||||||
trace_midi_input_is_user = false;
|
trace_midi_input_is_user = false;
|
||||||
trace_midi_output_is_user = false;
|
trace_midi_output_is_user = false;
|
||||||
plugins_stop_with_transport_is_user = false;
|
plugins_stop_with_transport_is_user = false;
|
||||||
no_sw_monitoring_is_user = false;
|
use_sw_monitoring_is_user = false;
|
||||||
stop_recording_on_xrun_is_user = false;
|
stop_recording_on_xrun_is_user = false;
|
||||||
verify_remove_last_capture_is_user = false;
|
verify_remove_last_capture_is_user = false;
|
||||||
stop_at_session_end_is_user = false;
|
stop_at_session_end_is_user = false;
|
||||||
|
|
@ -948,17 +950,17 @@ Configuration::set_plugins_stop_with_transport (bool yn)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Configuration::get_no_sw_monitoring ()
|
Configuration::get_use_sw_monitoring ()
|
||||||
{
|
{
|
||||||
return no_sw_monitoring;
|
return use_sw_monitoring;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Configuration::set_no_sw_monitoring (bool yn)
|
Configuration::set_use_sw_monitoring (bool yn)
|
||||||
{
|
{
|
||||||
no_sw_monitoring = yn;
|
use_sw_monitoring = yn;
|
||||||
if (user_configuration) {
|
if (user_configuration) {
|
||||||
no_sw_monitoring_is_user = true;
|
use_sw_monitoring_is_user = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -223,8 +223,6 @@ Playlist::init (bool hide)
|
||||||
layer_op_counter = 0;
|
layer_op_counter = 0;
|
||||||
freeze_length = 0;
|
freeze_length = 0;
|
||||||
|
|
||||||
// _session.LayerModelChanged.connect (slot (*this, &Playlist::relayer));
|
|
||||||
|
|
||||||
Modified.connect (mem_fun (*this, &Playlist::mark_session_dirty));
|
Modified.connect (mem_fun (*this, &Playlist::mark_session_dirty));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,7 @@ Route::init ()
|
||||||
_have_internal_generator = false;
|
_have_internal_generator = false;
|
||||||
_declickable = false;
|
_declickable = false;
|
||||||
_pending_declick = true;
|
_pending_declick = true;
|
||||||
|
_remote_control_id = 0;
|
||||||
|
|
||||||
_edit_group = 0;
|
_edit_group = 0;
|
||||||
_mix_group = 0;
|
_mix_group = 0;
|
||||||
|
|
@ -118,6 +119,21 @@ Route::~Route ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Route::set_remote_control_id (uint32_t id)
|
||||||
|
{
|
||||||
|
if (id != _remote_control_id) {
|
||||||
|
_remote_control_id = id;
|
||||||
|
RemoteControlIDChanged ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t
|
||||||
|
Route::remote_control_id() const
|
||||||
|
{
|
||||||
|
return _remote_control_id;
|
||||||
|
}
|
||||||
|
|
||||||
long
|
long
|
||||||
Route::order_key (string name) const
|
Route::order_key (string name) const
|
||||||
{
|
{
|
||||||
|
|
@ -213,7 +229,7 @@ Route::process_output_buffers (vector<Sample*>& bufs, uint32_t nbufs,
|
||||||
IO *co;
|
IO *co;
|
||||||
bool mute_audible;
|
bool mute_audible;
|
||||||
bool solo_audible;
|
bool solo_audible;
|
||||||
bool no_monitor = (Config->get_use_hardware_monitoring() || Config->get_no_sw_monitoring ());
|
bool no_monitor = (Config->get_use_hardware_monitoring() || !Config->get_use_sw_monitoring ());
|
||||||
gain_t* gab = _session.gain_automation_buffer();
|
gain_t* gab = _session.gain_automation_buffer();
|
||||||
|
|
||||||
declick = _pending_declick;
|
declick = _pending_declick;
|
||||||
|
|
@ -406,7 +422,7 @@ Route::process_output_buffers (vector<Sample*>& bufs, uint32_t nbufs,
|
||||||
|
|
||||||
// AND software monitoring required
|
// AND software monitoring required
|
||||||
|
|
||||||
!Config->get_no_sw_monitoring())) {
|
Config->get_use_sw_monitoring())) {
|
||||||
|
|
||||||
if (apply_gain_automation) {
|
if (apply_gain_automation) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -989,6 +989,12 @@ Session::set_input_auto_connect (bool yn)
|
||||||
set_dirty ();
|
set_dirty ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
Session::get_input_auto_connect () const
|
||||||
|
{
|
||||||
|
return (input_auto_connect & AutoConnectPhysical);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Session::set_output_auto_connect (AutoConnectOption aco)
|
Session::set_output_auto_connect (AutoConnectOption aco)
|
||||||
{
|
{
|
||||||
|
|
@ -1715,6 +1721,8 @@ Session::new_audio_track (int input_channels, int output_channels)
|
||||||
track->diskstream_changed.connect (mem_fun (this, &Session::resort_routes));
|
track->diskstream_changed.connect (mem_fun (this, &Session::resort_routes));
|
||||||
|
|
||||||
add_route (track);
|
add_route (track);
|
||||||
|
|
||||||
|
track->set_remote_control_id (ntracks());
|
||||||
}
|
}
|
||||||
|
|
||||||
catch (failed_constructor &err) {
|
catch (failed_constructor &err) {
|
||||||
|
|
@ -2031,8 +2039,11 @@ Session::route_solo_changed (void* src, Route* route)
|
||||||
void
|
void
|
||||||
Session::set_solo_latched (bool yn)
|
Session::set_solo_latched (bool yn)
|
||||||
{
|
{
|
||||||
|
if (yn != _solo_latched) {
|
||||||
_solo_latched = yn;
|
_solo_latched = yn;
|
||||||
set_dirty ();
|
set_dirty ();
|
||||||
|
ControlChanged (SoloLatch);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -3304,23 +3315,15 @@ Session::n_playlists () const
|
||||||
return playlists.size();
|
return playlists.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
Session::set_align_style (AlignStyle style)
|
|
||||||
{
|
|
||||||
align_style = style;
|
|
||||||
|
|
||||||
foreach_diskstream (&DiskStream::set_capture_offset);
|
|
||||||
|
|
||||||
set_dirty ();
|
|
||||||
ControlChanged (AlignChoice);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Session::set_solo_model (SoloModel sm)
|
Session::set_solo_model (SoloModel sm)
|
||||||
{
|
{
|
||||||
|
if (sm != _solo_model) {
|
||||||
_solo_model = sm;
|
_solo_model = sm;
|
||||||
|
ControlChanged (SoloingModel);
|
||||||
set_dirty ();
|
set_dirty ();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Session::allocate_pan_automation_buffers (jack_nframes_t nframes, uint32_t howmany, bool force)
|
Session::allocate_pan_automation_buffers (jack_nframes_t nframes, uint32_t howmany, bool force)
|
||||||
|
|
@ -3555,15 +3558,20 @@ Session::nbusses () const
|
||||||
void
|
void
|
||||||
Session::set_layer_model (LayerModel lm)
|
Session::set_layer_model (LayerModel lm)
|
||||||
{
|
{
|
||||||
|
if (lm != layer_model) {
|
||||||
layer_model = lm;
|
layer_model = lm;
|
||||||
LayerModelChanged (); /* EMIT SIGNAL */
|
|
||||||
set_dirty ();
|
set_dirty ();
|
||||||
|
ControlChanged (LayeringModel);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Session::set_xfade_model (CrossfadeModel xm)
|
Session::set_xfade_model (CrossfadeModel xm)
|
||||||
{
|
{
|
||||||
|
if (xm != xfade_model) {
|
||||||
xfade_model = xm;
|
xfade_model = xm;
|
||||||
set_dirty ();
|
set_dirty ();
|
||||||
|
ControlChanged (CrossfadingModel);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,7 @@ Session::feedback_thread_work ()
|
||||||
tmp = i;
|
tmp = i;
|
||||||
++tmp;
|
++tmp;
|
||||||
|
|
||||||
if ((*i)) {
|
if ((*i) ()) {
|
||||||
feedback_functions.erase (i);
|
feedback_functions.erase (i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -803,19 +803,14 @@ Session::mmc_record_enable (MIDI::MachineControl &mmc, size_t trk, bool enabled)
|
||||||
{
|
{
|
||||||
if (mmc_control) {
|
if (mmc_control) {
|
||||||
|
|
||||||
/* don't take route or diskstream lock: if using dynamic punch,
|
|
||||||
this could cause a dropout. XXX is that really OK?
|
|
||||||
or should we queue a rec-enable request?
|
|
||||||
*/
|
|
||||||
|
|
||||||
size_t n;
|
|
||||||
RouteList::iterator i;
|
RouteList::iterator i;
|
||||||
|
RWLockMonitor (route_lock, false, __LINE__, __FILE__);
|
||||||
|
|
||||||
for (n = 0, i = routes.begin(); i != routes.end(); ++i) {
|
for (i = routes.begin(); i != routes.end(); ++i) {
|
||||||
AudioTrack *at;
|
AudioTrack *at;
|
||||||
|
|
||||||
if ((at = dynamic_cast<AudioTrack*>(*i)) != 0) {
|
if ((at = dynamic_cast<AudioTrack*>(*i)) != 0) {
|
||||||
if (n++ == trk) {
|
if (trk == at->remote_control_id()) {
|
||||||
at->set_record_enable (enabled, &mmc);
|
at->set_record_enable (enabled, &mmc);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -1468,7 +1463,7 @@ Session::midi_thread_work ()
|
||||||
tmp = i;
|
tmp = i;
|
||||||
++tmp;
|
++tmp;
|
||||||
|
|
||||||
if (!(*i)) {
|
if (!(*i)()) {
|
||||||
midi_timeouts.erase (i);
|
midi_timeouts.erase (i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,6 @@ Session::first_stage_init (string fullpath, string snapshot_name)
|
||||||
_edit_mode = Slide;
|
_edit_mode = Slide;
|
||||||
pending_edit_mode = _edit_mode;
|
pending_edit_mode = _edit_mode;
|
||||||
_play_range = false;
|
_play_range = false;
|
||||||
align_style = ExistingMaterial;
|
|
||||||
_control_out = 0;
|
_control_out = 0;
|
||||||
_master_out = 0;
|
_master_out = 0;
|
||||||
input_auto_connect = AutoConnectOption (0);
|
input_auto_connect = AutoConnectOption (0);
|
||||||
|
|
@ -988,16 +987,6 @@ Session::load_options (const XMLNode& node)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((child = find_named_node (node, "align-style")) != 0) {
|
|
||||||
if ((prop = child->property ("val")) != 0) {
|
|
||||||
if (prop->value() == "capture") {
|
|
||||||
set_align_style (CaptureTime);
|
|
||||||
} else {
|
|
||||||
set_align_style (ExistingMaterial);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((child = find_named_node (node, "layer-model")) != 0) {
|
if ((child = find_named_node (node, "layer-model")) != 0) {
|
||||||
if ((prop = child->property ("val")) != 0) {
|
if ((prop = child->property ("val")) != 0) {
|
||||||
if (prop->value() == X_("LaterHigher")) {
|
if (prop->value() == X_("LaterHigher")) {
|
||||||
|
|
@ -1197,9 +1186,6 @@ Session::get_options () const
|
||||||
child = opthead->add_child ("solo-model");
|
child = opthead->add_child ("solo-model");
|
||||||
child->add_property ("val", _solo_model == SoloBus ? "SoloBus" : "InverseMute");
|
child->add_property ("val", _solo_model == SoloBus ? "SoloBus" : "InverseMute");
|
||||||
|
|
||||||
child = opthead->add_child ("align-style");
|
|
||||||
child->add_property ("val", (align_style == ExistingMaterial ? "existing" : "capture"));
|
|
||||||
|
|
||||||
child = opthead->add_child ("layer-model");
|
child = opthead->add_child ("layer-model");
|
||||||
switch (layer_model) {
|
switch (layer_model) {
|
||||||
case LaterHigher:
|
case LaterHigher:
|
||||||
|
|
@ -1450,6 +1436,7 @@ Session::set_state (const XMLNode& node)
|
||||||
XMLNodeList nlist;
|
XMLNodeList nlist;
|
||||||
XMLNode* child;
|
XMLNode* child;
|
||||||
const XMLProperty* prop;
|
const XMLProperty* prop;
|
||||||
|
int ret = -1;
|
||||||
|
|
||||||
_state_of_the_state = StateOfTheState (_state_of_the_state|CannotSave);
|
_state_of_the_state = StateOfTheState (_state_of_the_state|CannotSave);
|
||||||
|
|
||||||
|
|
@ -1458,6 +1445,8 @@ Session::set_state (const XMLNode& node)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StateManager::set_allow_save (false);
|
||||||
|
|
||||||
if ((prop = node.property ("name")) != 0) {
|
if ((prop = node.property ("name")) != 0) {
|
||||||
_name = prop->value ();
|
_name = prop->value ();
|
||||||
}
|
}
|
||||||
|
|
@ -1483,7 +1472,6 @@ Session::set_state (const XMLNode& node)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (use_config_midi_ports ()) {
|
if (use_config_midi_ports ()) {
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((child = find_named_node (node, "Path")) != 0) {
|
if ((child = find_named_node (node, "Path")) != 0) {
|
||||||
|
|
@ -1500,63 +1488,61 @@ Session::set_state (const XMLNode& node)
|
||||||
|
|
||||||
if ((child = find_named_node (node, "Options")) == 0) {
|
if ((child = find_named_node (node, "Options")) == 0) {
|
||||||
error << _("Session: XML state has no options section") << endmsg;
|
error << _("Session: XML state has no options section") << endmsg;
|
||||||
return -1;
|
|
||||||
} else if (load_options (*child)) {
|
} else if (load_options (*child)) {
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((child = find_named_node (node, "Sources")) == 0) {
|
if ((child = find_named_node (node, "Sources")) == 0) {
|
||||||
error << _("Session: XML state has no sources section") << endmsg;
|
error << _("Session: XML state has no sources section") << endmsg;
|
||||||
return -1;
|
goto out;
|
||||||
} else if (load_sources (*child)) {
|
} else if (load_sources (*child)) {
|
||||||
return -1;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((child = find_named_node (node, "Regions")) == 0) {
|
if ((child = find_named_node (node, "Regions")) == 0) {
|
||||||
error << _("Session: XML state has no Regions section") << endmsg;
|
error << _("Session: XML state has no Regions section") << endmsg;
|
||||||
return -1;
|
goto out;
|
||||||
} else if (load_regions (*child)) {
|
} else if (load_regions (*child)) {
|
||||||
return -1;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((child = find_named_node (node, "Playlists")) == 0) {
|
if ((child = find_named_node (node, "Playlists")) == 0) {
|
||||||
error << _("Session: XML state has no playlists section") << endmsg;
|
error << _("Session: XML state has no playlists section") << endmsg;
|
||||||
return -1;
|
goto out;
|
||||||
} else if (load_playlists (*child)) {
|
} else if (load_playlists (*child)) {
|
||||||
return -1;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((child = find_named_node (node, "UnusedPlaylists")) == 0) {
|
if ((child = find_named_node (node, "UnusedPlaylists")) == 0) {
|
||||||
// this is OK
|
// this is OK
|
||||||
} else if (load_unused_playlists (*child)) {
|
} else if (load_unused_playlists (*child)) {
|
||||||
return -1;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((child = find_named_node (node, "NamedSelections")) != 0) {
|
if ((child = find_named_node (node, "NamedSelections")) != 0) {
|
||||||
if (load_named_selections (*child)) {
|
if (load_named_selections (*child)) {
|
||||||
return -1;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((child = find_named_node (node, "DiskStreams")) == 0) {
|
if ((child = find_named_node (node, "DiskStreams")) == 0) {
|
||||||
error << _("Session: XML state has no diskstreams section") << endmsg;
|
error << _("Session: XML state has no diskstreams section") << endmsg;
|
||||||
return -1;
|
goto out;
|
||||||
} else if (load_diskstreams (*child)) {
|
} else if (load_diskstreams (*child)) {
|
||||||
return -1;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((child = find_named_node (node, "Connections")) == 0) {
|
if ((child = find_named_node (node, "Connections")) == 0) {
|
||||||
error << _("Session: XML state has no connections section") << endmsg;
|
error << _("Session: XML state has no connections section") << endmsg;
|
||||||
return -1;
|
goto out;
|
||||||
} else if (load_connections (*child)) {
|
} else if (load_connections (*child)) {
|
||||||
return -1;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((child = find_named_node (node, "Locations")) == 0) {
|
if ((child = find_named_node (node, "Locations")) == 0) {
|
||||||
error << _("Session: XML state has no locations section") << endmsg;
|
error << _("Session: XML state has no locations section") << endmsg;
|
||||||
return -1;
|
goto out;
|
||||||
} else if (_locations.set_state (*child)) {
|
} else if (_locations.set_state (*child)) {
|
||||||
return -1;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
Location* location;
|
Location* location;
|
||||||
|
|
@ -1579,30 +1565,30 @@ Session::set_state (const XMLNode& node)
|
||||||
|
|
||||||
if ((child = find_named_node (node, "EditGroups")) == 0) {
|
if ((child = find_named_node (node, "EditGroups")) == 0) {
|
||||||
error << _("Session: XML state has no edit groups section") << endmsg;
|
error << _("Session: XML state has no edit groups section") << endmsg;
|
||||||
return -1;
|
goto out;
|
||||||
} else if (load_edit_groups (*child)) {
|
} else if (load_edit_groups (*child)) {
|
||||||
return -1;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((child = find_named_node (node, "MixGroups")) == 0) {
|
if ((child = find_named_node (node, "MixGroups")) == 0) {
|
||||||
error << _("Session: XML state has no mix groups section") << endmsg;
|
error << _("Session: XML state has no mix groups section") << endmsg;
|
||||||
return -1;
|
goto out;
|
||||||
} else if (load_mix_groups (*child)) {
|
} else if (load_mix_groups (*child)) {
|
||||||
return -1;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((child = find_named_node (node, "TempoMap")) == 0) {
|
if ((child = find_named_node (node, "TempoMap")) == 0) {
|
||||||
error << _("Session: XML state has no Tempo Map section") << endmsg;
|
error << _("Session: XML state has no Tempo Map section") << endmsg;
|
||||||
return -1;
|
goto out;
|
||||||
} else if (_tempo_map->set_state (*child)) {
|
} else if (_tempo_map->set_state (*child)) {
|
||||||
return -1;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((child = find_named_node (node, "Routes")) == 0) {
|
if ((child = find_named_node (node, "Routes")) == 0) {
|
||||||
error << _("Session: XML state has no routes section") << endmsg;
|
error << _("Session: XML state has no routes section") << endmsg;
|
||||||
return -1;
|
goto out;
|
||||||
} else if (load_routes (*child)) {
|
} else if (load_routes (*child)) {
|
||||||
return -1;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((child = find_named_node (node, "Click")) == 0) {
|
if ((child = find_named_node (node, "Click")) == 0) {
|
||||||
|
|
@ -1621,13 +1607,20 @@ Session::set_state (const XMLNode& node)
|
||||||
|
|
||||||
_state_of_the_state = Clean;
|
_state_of_the_state = Clean;
|
||||||
|
|
||||||
|
StateManager::set_allow_save (true);
|
||||||
|
|
||||||
if (state_was_pending) {
|
if (state_was_pending) {
|
||||||
save_state (_current_snapshot_name);
|
save_state (_current_snapshot_name);
|
||||||
remove_pending_capture_state ();
|
remove_pending_capture_state ();
|
||||||
state_was_pending = false;
|
state_was_pending = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
ret = 0;
|
||||||
|
|
||||||
|
out:
|
||||||
|
/* yes, doing it twice doesn't hurt and makes the code easier */
|
||||||
|
StateManager::set_allow_save (true);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,10 @@
|
||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
|
|
||||||
using namespace ARDOUR;
|
using namespace ARDOUR;
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
bool StateManager::_allow_save = true;
|
||||||
|
vector<StateManager::DeferredSave> StateManager::deferred;
|
||||||
|
|
||||||
StateManager::StateManager ()
|
StateManager::StateManager ()
|
||||||
{
|
{
|
||||||
|
|
@ -14,6 +18,19 @@ StateManager::~StateManager()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
StateManager::set_allow_save (bool yn)
|
||||||
|
{
|
||||||
|
_allow_save = yn;
|
||||||
|
|
||||||
|
if (yn) {
|
||||||
|
for (vector<DeferredSave>::iterator x = deferred.begin(); x != deferred.end(); ++x) {
|
||||||
|
(*x).first->save_state ((*x).second);
|
||||||
|
}
|
||||||
|
deferred.clear ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
StateManager::drop_all_states ()
|
StateManager::drop_all_states ()
|
||||||
{
|
{
|
||||||
|
|
@ -37,8 +54,7 @@ StateManager::use_state (state_id_t id)
|
||||||
|
|
||||||
if (n != id || i == states.end()) {
|
if (n != id || i == states.end()) {
|
||||||
fatal << string_compose (_("programming error: illegal state ID (%1) passed to "
|
fatal << string_compose (_("programming error: illegal state ID (%1) passed to "
|
||||||
"StateManager::set_state() (range = 0-%3)"), id,
|
"StateManager::set_state() (range = 0-%2)"), id, states.size()-1)
|
||||||
states.size()-1)
|
|
||||||
<< endmsg;
|
<< endmsg;
|
||||||
/*NOTREACHED*/
|
/*NOTREACHED*/
|
||||||
return;
|
return;
|
||||||
|
|
@ -52,6 +68,11 @@ StateManager::use_state (state_id_t id)
|
||||||
void
|
void
|
||||||
StateManager::save_state (std::string why)
|
StateManager::save_state (std::string why)
|
||||||
{
|
{
|
||||||
|
if (!_allow_save) {
|
||||||
|
deferred.push_back (DeferredSave (this, why));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
states.push_back (state_factory (why));
|
states.push_back (state_factory (why));
|
||||||
_current_state_id = states.size() - 1;
|
_current_state_id = states.size() - 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ UndoCommand::clear ()
|
||||||
void
|
void
|
||||||
UndoCommand::undo ()
|
UndoCommand::undo ()
|
||||||
{
|
{
|
||||||
|
cerr << "There are " << undo_actions.size() << " actions to undo\n";
|
||||||
for (list<UndoAction>::reverse_iterator i = undo_actions.rbegin(); i != undo_actions.rend(); ++i) {
|
for (list<UndoAction>::reverse_iterator i = undo_actions.rbegin(); i != undo_actions.rend(); ++i) {
|
||||||
(*i)();
|
(*i)();
|
||||||
}
|
}
|
||||||
|
|
@ -99,12 +100,14 @@ UndoHistory::add (UndoCommand uc)
|
||||||
void
|
void
|
||||||
UndoHistory::undo (unsigned int n)
|
UndoHistory::undo (unsigned int n)
|
||||||
{
|
{
|
||||||
|
cerr << "Undo history undoing " << n << " with a list of " << UndoList.size() << endl;
|
||||||
while (n--) {
|
while (n--) {
|
||||||
if (UndoList.size() == 0) {
|
if (UndoList.size() == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
UndoCommand uc = UndoList.back ();
|
UndoCommand uc = UndoList.back ();
|
||||||
UndoList.pop_back ();
|
UndoList.pop_back ();
|
||||||
|
cerr << "undoing command called " << uc.name() << endl;
|
||||||
uc.undo ();
|
uc.undo ();
|
||||||
RedoList.push_back (uc);
|
RedoList.push_back (uc);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue