00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __JackLockedEngine__
00021 #define __JackLockedEngine__
00022
00023 #include "JackEngine.h"
00024 #include "JackMutex.h"
00025
00026 namespace Jack
00027 {
00028
00033 class SERVER_EXPORT JackLockedEngine : public JackLockAble
00034 {
00035 private:
00036
00037 JackEngine fEngine;
00038
00039 public:
00040
00041 JackLockedEngine(JackGraphManager* manager, JackSynchro* table, JackEngineControl* controler):
00042 fEngine(manager, table, controler)
00043 {}
00044 ~JackLockedEngine()
00045 {}
00046
00047 int Open()
00048 {
00049
00050 return fEngine.Open();
00051 }
00052 int Close()
00053 {
00054
00055 return fEngine.Close();
00056 }
00057
00058
00059 int ClientCheck(const char* name, char* name_res, int protocol, int options, int* status)
00060 {
00061 JackLock lock(this);
00062 return fEngine.ClientCheck(name, name_res, protocol, options, status);
00063 }
00064 int ClientExternalOpen(const char* name, int pid, int* ref, int* shared_engine, int* shared_client, int* shared_graph_manager)
00065 {
00066 JackLock lock(this);
00067 return fEngine.ClientExternalOpen(name, pid, ref, shared_engine, shared_client, shared_graph_manager);
00068 }
00069 int ClientInternalOpen(const char* name, int* ref, JackEngineControl** shared_engine, JackGraphManager** shared_manager, JackClientInterface* client, bool wait)
00070 {
00071 JackLock lock(this);
00072 return fEngine.ClientInternalOpen(name, ref, shared_engine, shared_manager, client, wait);
00073 }
00074
00075 int ClientExternalClose(int refnum)
00076 {
00077 JackLock lock(this);
00078 return fEngine.ClientExternalClose(refnum);
00079 }
00080 int ClientInternalClose(int refnum, bool wait)
00081 {
00082 JackLock lock(this);
00083 return fEngine.ClientInternalClose(refnum, wait);
00084 }
00085
00086 int ClientActivate(int refnum, bool state)
00087 {
00088 JackLock lock(this);
00089 return fEngine.ClientActivate(refnum, state);
00090 }
00091 int ClientDeactivate(int refnum)
00092 {
00093 JackLock lock(this);
00094 return fEngine.ClientDeactivate(refnum);
00095 }
00096
00097
00098 int GetInternalClientName(int int_ref, char* name_res)
00099 {
00100 JackLock lock(this);
00101 return fEngine.GetInternalClientName(int_ref, name_res);
00102 }
00103 int InternalClientHandle(const char* client_name, int* status, int* int_ref)
00104 {
00105 JackLock lock(this);
00106 return fEngine.InternalClientHandle(client_name, status, int_ref);
00107 }
00108 int InternalClientUnload(int refnum, int* status)
00109 {
00110 JackLock lock(this);
00111 return fEngine.InternalClientUnload(refnum, status);
00112 }
00113
00114
00115 int PortRegister(int refnum, const char* name, const char *type, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port)
00116 {
00117 JackLock lock(this);
00118 return fEngine.PortRegister(refnum, name, type, flags, buffer_size, port);
00119 }
00120 int PortUnRegister(int refnum, jack_port_id_t port)
00121 {
00122 JackLock lock(this);
00123 return fEngine.PortUnRegister(refnum, port);
00124 }
00125
00126 int PortConnect(int refnum, const char* src, const char* dst)
00127 {
00128 JackLock lock(this);
00129 return fEngine.PortConnect(refnum, src, dst);
00130 }
00131 int PortDisconnect(int refnum, const char* src, const char* dst)
00132 {
00133 JackLock lock(this);
00134 return fEngine.PortDisconnect(refnum, src, dst);
00135 }
00136
00137 int PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst)
00138 {
00139 JackLock lock(this);
00140 return fEngine.PortConnect(refnum, src, dst);
00141 }
00142 int PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t dst)
00143 {
00144 JackLock lock(this);
00145 return fEngine.PortDisconnect(refnum, src, dst);
00146 }
00147
00148 int PortRename(int refnum, jack_port_id_t port, const char* name)
00149 {
00150 JackLock lock(this);
00151 return fEngine.PortRename(refnum, port, name);
00152 }
00153
00154
00155 bool Process(jack_time_t cur_cycle_begin, jack_time_t prev_cycle_end)
00156 {
00157
00158 return fEngine.Process(cur_cycle_begin, prev_cycle_end);
00159 }
00160
00161
00162 void NotifyXRun(jack_time_t cur_cycle_begin, float delayed_usecs)
00163 {
00164
00165 fEngine.NotifyXRun(cur_cycle_begin, delayed_usecs);
00166 }
00167
00168 void NotifyXRun(int refnum)
00169 {
00170 JackLock lock(this);
00171 fEngine.NotifyXRun(refnum);
00172 }
00173 void NotifyGraphReorder()
00174 {
00175 JackLock lock(this);
00176 fEngine.NotifyGraphReorder();
00177 }
00178 void NotifyBufferSize(jack_nframes_t buffer_size)
00179 {
00180 JackLock lock(this);
00181 fEngine.NotifyBufferSize(buffer_size);
00182 }
00183 void NotifySampleRate(jack_nframes_t sample_rate)
00184 {
00185 JackLock lock(this);
00186 fEngine.NotifySampleRate(sample_rate);
00187 }
00188 void NotifyFreewheel(bool onoff)
00189 {
00190 JackLock lock(this);
00191 fEngine.NotifyFreewheel(onoff);
00192 }
00193
00194 int GetClientPID(const char* name)
00195 {
00196 JackLock lock(this);
00197 return fEngine.GetClientPID(name);
00198 }
00199
00200 };
00201
00202 }
00203
00204 #endif
00205