SOUND4 x1.CLOUD Library [1.5.6]
Loading...
Searching...
No Matches
Classes | Functions
Process creation/destruction

Create and destroy a process instance. More...

Classes

struct  cloudx1_CInstance
 
struct  cloudx1_CParameters
 

Functions

struct cloudx1_CParameterscloudx1_NewParameters ()
 
void cloudx1_FreeParameters (struct cloudx1_CParameters *params)
 
void cloudx1_SetParameter (struct cloudx1_CParameters *params, const char *name, const char *value)
 
const char * cloudx1_GetParameter (struct cloudx1_CParameters *params, const char *name)
 
void cloudx1_FreeParameterValue (const char *value)
 
struct cloudx1_CInstancecloudx1_InitProcess (const char *LoginKey, const char *RadioName, const char *Access_Key_ID, const char *Access_Key_Secret, const char *save_path)
 
struct cloudx1_CInstancecloudx1_InitProcess2 (const char *LoginKey, const char *RadioName, const char *Access_Key_ID, const char *Access_Key_Secret, const char *save_path, const struct cloudx1_CParameters *parameters)
 
struct cloudx1_CInstancecloudx1_InitProcess3 (const char *LoginKey, const char *RadioName, const char *Access_Key_ID, const char *Access_Key_Secret, const char *save_path, const struct cloudx1_CParameters *parameters, unsigned int frames_per_chunk)
 
unsigned int cloudx1_GetProcessChunkFrames (struct cloudx1_CInstance *instance)
 
int cloudx1_TerminateProcess (struct cloudx1_CInstance *instance)
 
void cloudx1_ExitProcess (struct cloudx1_CInstance *instance)
 

Detailed Description

Create and destroy a process instance, and retrieve some general information about the process.

Function Documentation

◆ cloudx1_ExitProcess()

void cloudx1_ExitProcess ( struct cloudx1_CInstance instance)

Quit and destroy the instance

Parameters
instancethe instance to destroy

◆ cloudx1_FreeParameters()

void cloudx1_FreeParameters ( struct cloudx1_CParameters params)

Free the parameters created with cloudx1_NewParameters.

◆ cloudx1_FreeParameterValue()

void cloudx1_FreeParameterValue ( const char *  value)

Free a parameter value returned by cloudx1_GetParameter

Parameters
valuethe returned value

◆ cloudx1_GetParameter()

const char * cloudx1_GetParameter ( struct cloudx1_CParameters params,
const char *  name 
)

Get current parameter value.

Returned value must be freed with cloudx1_FreeParameterValue

◆ cloudx1_GetProcessChunkFrames()

unsigned int cloudx1_GetProcessChunkFrames ( struct cloudx1_CInstance instance)

Get the number of audio frames in each chunk of processing.

The value reflects the frames_per_chunk parameter passed to cloudx1_InitProcess3

Parameters
instancethe instance to destroy
Returns
the number of audio frames in each chunk of processing
Note
A Frame is a set of cloudx1_GetChannelCount samples

◆ cloudx1_InitProcess()

struct cloudx1_CInstance * cloudx1_InitProcess ( const char *  LoginKey,
const char *  RadioName,
const char *  Access_Key_ID,
const char *  Access_Key_Secret,
const char *  save_path 
)

Create a process instance with default parameters (from env)

Same as cloudx1_InitProcess2, but with default parameters (from env)

Deprecated:
Use cloudx1_InitProcess3

◆ cloudx1_InitProcess2()

struct cloudx1_CInstance * cloudx1_InitProcess2 ( const char *  LoginKey,
const char *  RadioName,
const char *  Access_Key_ID,
const char *  Access_Key_Secret,
const char *  save_path,
const struct cloudx1_CParameters parameters 
)

Create a process instance with default frames_per_chunk (64)

Same as cloudx1_InitProcess3, but with default frames_per_chunk

Deprecated:
Use cloudx1_InitProcess3

◆ cloudx1_InitProcess3()

struct cloudx1_CInstance * cloudx1_InitProcess3 ( const char *  LoginKey,
const char *  RadioName,
const char *  Access_Key_ID,
const char *  Access_Key_Secret,
const char *  save_path,
const struct cloudx1_CParameters parameters,
unsigned int  frames_per_chunk 
)

Create a process instance

The output will have to be freed with cloudx1_ExitProcess

Attention
The save_path must be an existing folder with R/W access, or be NULL (then it uses volatile memory storage)

If the save_path is NULL or the folder is empty, a default configuration with a default preset will be loaded, unless using Custom preset managagement.

If used in a container, we recommend to put a volume for this path, so it will survive updates.

License access
The licenses are retrieved via Internet and access some servers. You may use an alternate server by changing LICENSE_SERVER in the parameters.

See also Environment variables and parameters

Parameters
LoginKeySOUND4 Login key (was User ID)
RadioNameSOUND4 RadioName
Access_Key_IDSOUND4 AWS access ID
Access_Key_SecretSOUND4 AWS access Secret
save_pathPath where we can load/save the configuration. If NULL, memory storage will be used.
parametersParameters
frames_per_chunkThe number of audio frames in each chunk of processing. Must be in the list returned by cloudx1_GetPossibleChunkSizeInFrames
Returns
A new process instance

◆ cloudx1_NewParameters()

struct cloudx1_CParameters * cloudx1_NewParameters ( )

Create parameters to use with cloudx1_InitProcess2.

The output will have to be freed with cloudx1_FreeParameters

The default values are taken from environment (for compatibility).

◆ cloudx1_SetParameter()

void cloudx1_SetParameter ( struct cloudx1_CParameters params,
const char *  name,
const char *  value 
)

Set a new parameter.

Some values are in taken from env, so see Environment variables and parameters for usable variables

See also Custom preset managagement

◆ cloudx1_TerminateProcess()

int cloudx1_TerminateProcess ( struct cloudx1_CInstance instance)

Terminate the processing

This is useful only with file processing, to get the final status. For some plugins, this is mandatory

Parameters
instancethe instance to terminate
Returns
0 is success, <0 if error, >0 if some status