git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3471 0c269be4-1314-0410-8aa9-9f06e86f4224tags/v1.9.3
| @@ -24,6 +24,10 @@ Torben Hohn | |||||
| Jackdmp changes log | Jackdmp changes log | ||||
| --------------------------- | --------------------------- | ||||
| 2009-03-26 Stephane Letz <letz@grame.fr> | |||||
| * Add a buffer size callback for netmaster that just remove the client (it will be recreated with the new parameters). | |||||
| 2009-03-26 Stephane Letz <letz@grame.fr> | 2009-03-26 Stephane Letz <letz@grame.fr> | ||||
| * First working JackBoomerDriver two threads version. | * First working JackBoomerDriver two threads version. | ||||
| @@ -329,9 +329,6 @@ namespace Jack | |||||
| jack_error ( "Can't send suicide request : %s", StrError ( NET_ERROR_CODE ) ); | jack_error ( "Can't send suicide request : %s", StrError ( NET_ERROR_CODE ) ); | ||||
| mcast_socket.Close(); | mcast_socket.Close(); | ||||
| // UGLY temporary way to be sure the thread does not call code possibly causing a deadlock in JackEngine. | |||||
| ThreadExit(); | |||||
| } | } | ||||
| int JackNetMasterInterface::Recv ( size_t size, int flags ) | int JackNetMasterInterface::Recv ( size_t size, int flags ) | ||||
| @@ -349,6 +346,9 @@ namespace Jack | |||||
| jack_error ( "'%s' : %s, exiting.", fParams.fName, StrError ( NET_ERROR_CODE ) ); | jack_error ( "'%s' : %s, exiting.", fParams.fName, StrError ( NET_ERROR_CODE ) ); | ||||
| //ask to the manager to properly remove the master | //ask to the manager to properly remove the master | ||||
| Exit(); | Exit(); | ||||
| // UGLY temporary way to be sure the thread does not call code possibly causing a deadlock in JackEngine. | |||||
| ThreadExit(); | |||||
| } | } | ||||
| else | else | ||||
| jack_error ( "Error in master receive : %s", StrError ( NET_ERROR_CODE ) ); | jack_error ( "Error in master receive : %s", StrError ( NET_ERROR_CODE ) ); | ||||
| @@ -373,6 +373,9 @@ namespace Jack | |||||
| //fatal connection issue, exit | //fatal connection issue, exit | ||||
| jack_error ( "'%s' : %s, exiting.", fParams.fName, StrError ( NET_ERROR_CODE ) ); | jack_error ( "'%s' : %s, exiting.", fParams.fName, StrError ( NET_ERROR_CODE ) ); | ||||
| Exit(); | Exit(); | ||||
| // UGLY temporary way to be sure the thread does not call code possibly causing a deadlock in JackEngine. | |||||
| ThreadExit(); | |||||
| } | } | ||||
| else | else | ||||
| jack_error ( "Error in master send : %s", StrError ( NET_ERROR_CODE ) ); | jack_error ( "Error in master send : %s", StrError ( NET_ERROR_CODE ) ); | ||||
| @@ -127,7 +127,11 @@ namespace Jack | |||||
| return false; | return false; | ||||
| } | } | ||||
| jack_set_process_callback ( fJackClient, SetProcess, this ); | |||||
| if (jack_set_process_callback(fJackClient, SetProcess, this ) < 0) | |||||
| goto fail; | |||||
| if (jack_set_buffer_size_callback(fJackClient, SetBufferSize, this) < 0) | |||||
| goto fail; | |||||
| if ( AllocPorts() != 0 ) | if ( AllocPorts() != 0 ) | ||||
| { | { | ||||
| @@ -369,6 +373,13 @@ namespace Jack | |||||
| { | { | ||||
| return ( fReturnTransportData.fState == JackTransportNetStarting ); | return ( fReturnTransportData.fState == JackTransportNetStarting ); | ||||
| } | } | ||||
| int JackNetMaster::SetBufferSize (jack_nframes_t nframes, void* arg) | |||||
| { | |||||
| jack_error("Cannot handle bufer size change, so proxy will be removed..."); | |||||
| static_cast<JackNetMaster*> ( arg )->Exit(); | |||||
| return 0; | |||||
| } | |||||
| //process----------------------------------------------------------------------------- | //process----------------------------------------------------------------------------- | ||||
| int JackNetMaster::SetProcess ( jack_nframes_t nframes, void* arg ) | int JackNetMaster::SetProcess ( jack_nframes_t nframes, void* arg ) | ||||
| @@ -39,6 +39,7 @@ namespace Jack | |||||
| friend class JackNetMasterManager; | friend class JackNetMasterManager; | ||||
| private: | private: | ||||
| static int SetProcess ( jack_nframes_t nframes, void* arg ); | static int SetProcess ( jack_nframes_t nframes, void* arg ); | ||||
| static int SetBufferSize (jack_nframes_t nframes, void* arg); | |||||
| static void SetTimebaseCallback ( jack_transport_state_t state, jack_nframes_t nframes, jack_position_t* pos, int new_pos, void* arg ); | static void SetTimebaseCallback ( jack_transport_state_t state, jack_nframes_t nframes, jack_position_t* pos, int new_pos, void* arg ); | ||||
| //jack client | //jack client | ||||
| @@ -63,8 +64,7 @@ namespace Jack | |||||
| bool Init(bool auto_connect); | bool Init(bool auto_connect); | ||||
| int AllocPorts(); | int AllocPorts(); | ||||
| void FreePorts(); | void FreePorts(); | ||||
| void Exit(); | |||||
| //transport | //transport | ||||
| void EncodeTransportData(); | void EncodeTransportData(); | ||||
| void DecodeTransportData(); | void DecodeTransportData(); | ||||