summaryrefslogtreecommitdiff
path: root/common/JackClient.cpp
diff options
context:
space:
mode:
authorsletz <sletz@0c269be4-1314-0410-8aa9-9f06e86f4224>2012-02-01 19:41:21 +0000
committersletz <sletz@0c269be4-1314-0410-8aa9-9f06e86f4224>2012-02-01 19:41:21 +0000
commitd03fd1e807f4f9a52cd8725e85a57a6ff7a68f43 (patch)
treed80165c4a3efa35ed29181ece026615422bad53d /common/JackClient.cpp
parent1acc1db9efd3973964644c044a36073df329cf41 (diff)
downloadjack2-d03fd1e807f4f9a52cd8725e85a57a6ff7a68f43.tar.gz
Cleanup.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4764 0c269be4-1314-0410-8aa9-9f06e86f4224
Diffstat (limited to 'common/JackClient.cpp')
-rw-r--r--common/JackClient.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/common/JackClient.cpp b/common/JackClient.cpp
index b426665f..fd12bc22 100644
--- a/common/JackClient.cpp
+++ b/common/JackClient.cpp
@@ -585,19 +585,22 @@ inline void JackClient::ExecuteThread()
inline jack_nframes_t JackClient::CycleWaitAux()
{
- if (!WaitSync())
+ if (!WaitSync()) {
Error(); // Terminates the thread
+ }
CallSyncCallbackAux();
return GetEngineControl()->fBufferSize;
}
inline void JackClient::CycleSignalAux(int status)
{
- if (status == 0)
+ if (status == 0) {
CallTimebaseCallbackAux();
+ }
SignalSync();
- if (status != 0)
+ if (status != 0) {
End(); // Terminates the thread
+ }
}
jack_nframes_t JackClient::CycleWait()
@@ -784,8 +787,9 @@ inline int JackClient::ActivateAux()
jack_log("JackClient::ActivateAux");
// RT thread is started
- if (StartThread() < 0)
+ if (StartThread() < 0) {
return -1;
+ }
int result = -1;
GetClientControl()->fCallback[kRealTimeCallback] = IsRealTime();
@@ -1045,8 +1049,9 @@ int JackClient::SetSampleRateCallback(JackSampleRateCallback callback, void *arg
fSampleRateArg = arg;
fSampleRate = callback;
// Now invoke it
- if (callback)
+ if (callback) {
callback(GetEngineControl()->fSampleRate, arg);
+ }
return 0;
}
}
@@ -1125,7 +1130,7 @@ int JackClient::SetProcessThread(JackThreadCallback fun, void *arg)
jack_error("You cannot set callbacks on an active client");
return -1;
} else if (fProcess) {
- jack_error ("A process callback has already been setup, both models cannot be used at the same time!");
+ jack_error("A process callback has already been setup, both models cannot be used at the same time!");
return -1;
} else {
fThreadFun = fun;