Respond to JACK session quit request. Fixes #3491.
git-svn-id: svn://localhost/ardour2/branches/3.0@7878 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -260,6 +260,10 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
|
||||
|
||||
ARDOUR::Session::AskAboutSampleRateMismatch.connect_same_thread (forever_connections, boost::bind (&ARDOUR_UI::sr_mismatch_dialog, this, _1, _2));
|
||||
|
||||
/* handle requests to quit (coming from JACK session) */
|
||||
|
||||
ARDOUR::Session::Quit.connect (forever_connections, MISSING_INVALIDATOR, ui_bind (&ARDOUR_UI::finish, this), gui_context ());
|
||||
|
||||
/* lets get this party started */
|
||||
|
||||
try {
|
||||
|
||||
@@ -785,6 +785,9 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
|
||||
void request_resume_timecode_transmission ();
|
||||
bool timecode_transmission_suspended () const;
|
||||
|
||||
/** Emitted when the session wants Ardour to quit */
|
||||
static PBD::Signal0<void> Quit;
|
||||
|
||||
protected:
|
||||
friend class AudioEngine;
|
||||
void set_block_size (nframes_t nframes);
|
||||
|
||||
@@ -125,6 +125,7 @@ PBD::Signal0<void> Session::AutoBindingOn;
|
||||
PBD::Signal0<void> Session::AutoBindingOff;
|
||||
PBD::Signal2<void,std::string, std::string> Session::Exported;
|
||||
PBD::Signal1<int,boost::shared_ptr<Playlist> > Session::AskAboutPlaylistDeletion;
|
||||
PBD::Signal0<void> Session::Quit;
|
||||
|
||||
static void clean_up_session_event (SessionEvent* ev) { delete ev; }
|
||||
const SessionEvent::RTeventCallback Session::rt_cleanup (clean_up_session_event);
|
||||
|
||||
@@ -746,7 +746,7 @@ Session::jack_session_event (jack_session_event_t * event)
|
||||
jack_session_reply (_engine.jack(), event);
|
||||
|
||||
if (event->type == JackSessionSaveAndQuit) {
|
||||
// TODO: make ardour quit.
|
||||
Quit (); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
jack_session_event_free( event );
|
||||
|
||||
Reference in New Issue
Block a user