move RecordState enum from ARDOUR::Session to ARDOUR so we can use it in TriggerBox (GUI)
This commit is contained in:
parent
d7d208dc34
commit
1146a4ad07
@ -1805,7 +1805,7 @@ ARDOUR_UI::transport_record (bool roll)
|
|||||||
{
|
{
|
||||||
if (_session) {
|
if (_session) {
|
||||||
switch (_session->record_status()) {
|
switch (_session->record_status()) {
|
||||||
case Session::Disabled:
|
case Disabled:
|
||||||
if (_session->ntracks() == 0) {
|
if (_session->ntracks() == 0) {
|
||||||
ArdourMessageDialog msg (_main_window, _("Please create one or more tracks before trying to record.\nYou can do this with the \"Add Track or Bus\" option in the Session menu."));
|
ArdourMessageDialog msg (_main_window, _("Please create one or more tracks before trying to record.\nYou can do this with the \"Add Track or Bus\" option in the Session menu."));
|
||||||
msg.run ();
|
msg.run ();
|
||||||
@ -1817,7 +1817,7 @@ ARDOUR_UI::transport_record (bool roll)
|
|||||||
transport_roll ();
|
transport_roll ();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Session::Recording:
|
case Recording:
|
||||||
if (roll) {
|
if (roll) {
|
||||||
_session->request_stop();
|
_session->request_stop();
|
||||||
} else {
|
} else {
|
||||||
@ -1825,7 +1825,7 @@ ARDOUR_UI::transport_record (bool roll)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Session::Enabled:
|
case Enabled:
|
||||||
if (roll) {
|
if (roll) {
|
||||||
transport_roll();
|
transport_roll();
|
||||||
} else {
|
} else {
|
||||||
|
@ -205,7 +205,7 @@ ARDOUR_UI::record_state_changed ()
|
|||||||
|
|
||||||
ActionManager::set_sensitive (ActionManager::rec_sensitive_actions, !_session->actively_recording());
|
ActionManager::set_sensitive (ActionManager::rec_sensitive_actions, !_session->actively_recording());
|
||||||
|
|
||||||
if (_session->record_status () == Session::Recording && _session->have_rec_enabled_track ()) {
|
if (_session->record_status () == Recording && _session->have_rec_enabled_track ()) {
|
||||||
big_clock->set_active (true);
|
big_clock->set_active (true);
|
||||||
} else {
|
} else {
|
||||||
big_clock->set_active (false);
|
big_clock->set_active (false);
|
||||||
|
@ -217,7 +217,7 @@ AudioStreamView::setup_rec_box ()
|
|||||||
// cerr << "\trolling\n";
|
// cerr << "\trolling\n";
|
||||||
|
|
||||||
if (!rec_active &&
|
if (!rec_active &&
|
||||||
_trackview.session()->record_status() == Session::Recording &&
|
_trackview.session()->record_status() == Recording &&
|
||||||
_trackview.track()->rec_enable_control()->get_value()) {
|
_trackview.track()->rec_enable_control()->get_value()) {
|
||||||
if (_trackview.audio_track()->mode() == Normal && UIConfiguration::instance().get_show_waveforms_while_recording() && rec_regions.size() == rec_rects.size()) {
|
if (_trackview.audio_track()->mode() == Normal && UIConfiguration::instance().get_show_waveforms_while_recording() && rec_regions.size() == rec_rects.size()) {
|
||||||
|
|
||||||
@ -270,7 +270,7 @@ AudioStreamView::setup_rec_box ()
|
|||||||
create_rec_box(sample_pos, 0);
|
create_rec_box(sample_pos, 0);
|
||||||
|
|
||||||
} else if (rec_active &&
|
} else if (rec_active &&
|
||||||
(_trackview.session()->record_status() != Session::Recording ||
|
(_trackview.session()->record_status() != Recording ||
|
||||||
!_trackview.track()->rec_enable_control()->get_value())) {
|
!_trackview.track()->rec_enable_control()->get_value())) {
|
||||||
screen_update_connection.disconnect();
|
screen_update_connection.disconnect();
|
||||||
rec_active = false;
|
rec_active = false;
|
||||||
|
@ -305,7 +305,7 @@ MidiStreamView::setup_rec_box ()
|
|||||||
(_trackview.session()->transport_rolling() || _trackview.session()->get_record_enabled())) {
|
(_trackview.session()->transport_rolling() || _trackview.session()->get_record_enabled())) {
|
||||||
|
|
||||||
if (!rec_active &&
|
if (!rec_active &&
|
||||||
_trackview.session()->record_status() == Session::Recording &&
|
_trackview.session()->record_status() == Recording &&
|
||||||
_trackview.track()->rec_enable_control()->get_value()) {
|
_trackview.track()->rec_enable_control()->get_value()) {
|
||||||
|
|
||||||
if (UIConfiguration::instance().get_show_waveforms_while_recording() && rec_regions.size() == rec_rects.size()) {
|
if (UIConfiguration::instance().get_show_waveforms_while_recording() && rec_regions.size() == rec_rects.size()) {
|
||||||
@ -374,7 +374,7 @@ MidiStreamView::setup_rec_box ()
|
|||||||
create_rec_box (_trackview.midi_track()->current_capture_start(), 0);
|
create_rec_box (_trackview.midi_track()->current_capture_start(), 0);
|
||||||
|
|
||||||
} else if (rec_active &&
|
} else if (rec_active &&
|
||||||
(_trackview.session()->record_status() != Session::Recording ||
|
(_trackview.session()->record_status() != Recording ||
|
||||||
!_trackview.track()->rec_enable_control()->get_value())) {
|
!_trackview.track()->rec_enable_control()->get_value())) {
|
||||||
screen_update_connection.disconnect();
|
screen_update_connection.disconnect();
|
||||||
rec_active = false;
|
rec_active = false;
|
||||||
|
@ -1162,7 +1162,7 @@ RouteListBase::idle_update_mute_rec_solo_etc ()
|
|||||||
std::shared_ptr<MidiTrack> mt = std::dynamic_pointer_cast<MidiTrack> (route);
|
std::shared_ptr<MidiTrack> mt = std::dynamic_pointer_cast<MidiTrack> (route);
|
||||||
|
|
||||||
if (trk->rec_enable_control ()->get_value ()) {
|
if (trk->rec_enable_control ()->get_value ()) {
|
||||||
if (_session->record_status () == Session::Recording) {
|
if (_session->record_status () == Recording) {
|
||||||
(*i)[_columns.rec_state] = 1;
|
(*i)[_columns.rec_state] = 1;
|
||||||
} else {
|
} else {
|
||||||
(*i)[_columns.rec_state] = 2;
|
(*i)[_columns.rec_state] = 2;
|
||||||
|
@ -1389,12 +1389,12 @@ RouteUI::blink_rec_display (bool blinkOn)
|
|||||||
|
|
||||||
if (track()->rec_enable_control()->get_value()) {
|
if (track()->rec_enable_control()->get_value()) {
|
||||||
switch (_session->record_status ()) {
|
switch (_session->record_status ()) {
|
||||||
case Session::Recording:
|
case Recording:
|
||||||
rec_enable_button->set_active_state (Gtkmm2ext::ExplicitActive);
|
rec_enable_button->set_active_state (Gtkmm2ext::ExplicitActive);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Session::Disabled:
|
case Disabled:
|
||||||
case Session::Enabled:
|
case Enabled:
|
||||||
if (!UIConfiguration::instance().get_no_strobe() && UIConfiguration::instance().get_blink_rec_arm()) {
|
if (!UIConfiguration::instance().get_no_strobe() && UIConfiguration::instance().get_blink_rec_arm()) {
|
||||||
rec_enable_button->set_active_state ( blinkOn ? Gtkmm2ext::ExplicitActive : Gtkmm2ext::Off );
|
rec_enable_button->set_active_state ( blinkOn ? Gtkmm2ext::ExplicitActive : Gtkmm2ext::Off );
|
||||||
} else {
|
} else {
|
||||||
|
@ -306,20 +306,20 @@ TransportControlUI::blink_rec_enable (bool onoff)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Session::RecordState const r = _session->record_status ();
|
RecordState const r = _session->record_status ();
|
||||||
bool const h = _session->have_rec_enabled_track ();
|
bool const h = _session->have_rec_enabled_track ();
|
||||||
|
|
||||||
if (UIConfiguration::instance().get_no_strobe()) {
|
if (UIConfiguration::instance().get_no_strobe()) {
|
||||||
onoff = true;
|
onoff = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r == Session::Enabled || (r == Session::Recording && !h)) {
|
if (r == Enabled || (r == Recording && !h)) {
|
||||||
if (onoff) {
|
if (onoff) {
|
||||||
rec_button.set_active_state (Gtkmm2ext::ExplicitActive);
|
rec_button.set_active_state (Gtkmm2ext::ExplicitActive);
|
||||||
} else {
|
} else {
|
||||||
rec_button.set_active_state (Gtkmm2ext::Off);
|
rec_button.set_active_state (Gtkmm2ext::Off);
|
||||||
}
|
}
|
||||||
} else if (r == Session::Recording && h) {
|
} else if (r == Recording && h) {
|
||||||
rec_button.set_active_state (Gtkmm2ext::ExplicitActive);
|
rec_button.set_active_state (Gtkmm2ext::ExplicitActive);
|
||||||
} else {
|
} else {
|
||||||
rec_button.unset_active_state ();
|
rec_button.unset_active_state ();
|
||||||
|
Loading…
Reference in New Issue
Block a user