From c271123265d2c1b7e498053fe9c9aaf34c8d402e Mon Sep 17 00:00:00 2001 From: petern Date: Thu, 23 Jul 2009 16:43:47 +0000 Subject: [PATCH] -Add: Disconnect from jack with ^D, for completeness... git-svn-id: http://svn.fuzzle.org/mloop/trunk@29 ba049829-c6ef-42ef-81ac-908dd8d2e907 --- src/ui.cpp | 7 +++++++ src/ui.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/ui.cpp b/src/ui.cpp index 39dc6a6..9003bb5 100644 --- a/src/ui.cpp +++ b/src/ui.cpp @@ -277,6 +277,13 @@ bool UI::Run(Jack &j) } } break; + + case UIKEY_DISCONNECT: + if (j.Connected()) { + j.Disconnect(); + snprintf(status, sizeof status, "Disconnected from JACK"); + } + break; } return false; diff --git a/src/ui.h b/src/ui.h index 4d8519f..b18fa4c 100644 --- a/src/ui.h +++ b/src/ui.h @@ -42,5 +42,6 @@ public: #define UIKEY_TEMPO 't' #define UIKEY_SAVE 'S' #define UIKEY_RECONNECT 18 +#define UIKEY_DISCONNECT 4 #endif /* UI_H */