-Add: Allow reconnecting to jackd with ^R.

git-svn-id: http://svn.fuzzle.org/mloop/trunk@28 ba049829-c6ef-42ef-81ac-908dd8d2e907
master
petern 2009-07-23 15:35:15 +00:00
parent aba2225a48
commit b4494dc6b2
3 changed files with 14 additions and 0 deletions

View File

@ -55,6 +55,11 @@ public:
void StopLoop(int loop);
void EraseLoop(int loop);
bool Connected() const
{
return m_connected;
}
bool Recording() const
{
return m_recording;

View File

@ -269,6 +269,14 @@ bool UI::Run(Jack &j)
case UIKEY_SAVE:
j.Save();
break;
case UIKEY_RECONNECT:
if (!j.Connected()) {
if (j.Connect()) {
snprintf(status, sizeof status, "Reconnected to JACK");
}
}
break;
}
return false;

View File

@ -41,5 +41,6 @@ public:
#define UIKEY_BPM 'b'
#define UIKEY_TEMPO 't'
#define UIKEY_SAVE 'S'
#define UIKEY_RECONNECT 18
#endif /* UI_H */