SOUND4 Plugin Host Library [1.0.2]
Functions
Update Management

Functions

void plughost_StartUpdateThread (struct plughost_CInstance *instance, unsigned int port)
 
void plughost_StopUpdateThread (struct plughost_CInstance *instance)
 
int plughost_WaitUpdateThreadReady (struct plughost_CInstance *instance, int milliseconds)
 

Detailed Description

Manage the process update.

Function Documentation

◆ plughost_StartUpdateThread()

void plughost_StartUpdateThread ( struct plughost_CInstance *  instance,
unsigned int  port 
)

Update function

This needs to run in a thread, which can have low priority. It will also allow the JSON access via TCP.

Remarks
This function does not return until it is stopped with plughost_StopUpdateThread
Parameters
instancethe instance
portthe port to listen for incoming JSON connections. If 0, the JSON server is not accessible

◆ plughost_StopUpdateThread()

void plughost_StopUpdateThread ( struct plughost_CInstance *  instance)

Stop the update thread

Parameters
instancethe processing instance

◆ plughost_WaitUpdateThreadReady()

int plughost_WaitUpdateThreadReady ( struct plughost_CInstance *  instance,
int  milliseconds 
)

Wait for the update thread to be ready

Parameters
instancethe processing instance
millisecondsmaximum time to wait in milliseconds
Returns
-1 if timeout waiting for the thread, 0 if OK