00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __JackClientControl__
00022 #define __JackClientControl__
00023
00024 #include "JackShmMem.h"
00025 #include "JackPort.h"
00026 #include "JackSynchro.h"
00027 #include "JackNotification.h"
00028
00029 namespace Jack
00030 {
00031
00036 struct JackClientControl : public JackShmMemAble
00037 {
00038 char fName[JACK_CLIENT_NAME_SIZE + 1];
00039 bool fCallback[kMaxNotification];
00040 volatile jack_transport_state_t fTransportState;
00041 volatile bool fTransportSync;
00042 volatile bool fTransportTimebase;
00043 int fRefNum;
00044 int fPID;
00045 bool fActive;
00046
00047 JackClientControl(const char* name, int pid, int refnum)
00048 {
00049 Init(name, pid, refnum);
00050 }
00051
00052 JackClientControl(const char* name)
00053 {
00054 Init(name, 0, -1);
00055 }
00056
00057 JackClientControl()
00058 {
00059 Init("", 0, -1);
00060 }
00061
00062 void Init(const char* name, int pid, int refnum)
00063 {
00064 strcpy(fName, name);
00065 for (int i = 0; i < kMaxNotification; i++)
00066 fCallback[i] = false;
00067
00068 fCallback[kAddClient] = true;
00069 fCallback[kRemoveClient] = true;
00070 fCallback[kActivateClient] = true;
00071
00072 fCallback[kStartFreewheelCallback] = true;
00073 fCallback[kStopFreewheelCallback] = true;
00074 fRefNum = refnum;
00075 fPID = pid;
00076 fTransportState = JackTransportStopped;
00077 fTransportSync = false;
00078 fTransportTimebase = false;
00079 fActive = false;
00080 }
00081
00082 };
00083
00084 }
00085
00086
00087 #endif