SOUND4 BIGVOICE.CL Library [1.1.4]
Loading...
Searching...
No Matches
Classes | Functions
Process creation/destruction

Classes

struct  bigvoice_CInstance
 
struct  bigvoice_CParameters
 

Functions

struct bigvoice_CParameters * bigvoice_NewParameters ()
 
void bigvoice_FreeParameters (struct bigvoice_CParameters *params)
 
void bigvoice_SetParameter (struct bigvoice_CParameters *params, const char *name, const char *value)
 
const char * bigvoice_GetParameter (struct bigvoice_CParameters *params, const char *name)
 
void bigvoice_FreeParameterValue (const char *value)
 
struct bigvoice_CInstance * bigvoice_InitProcess (const char *LoginKey, const char *RadioName, const char *Access_Key_ID, const char *Access_Key_Secret, const char *save_path)
 
struct bigvoice_CInstance * bigvoice_InitProcess2 (const char *LoginKey, const char *RadioName, const char *Access_Key_ID, const char *Access_Key_Secret, const char *save_path, const struct bigvoice_CParameters *parameters)
 
struct bigvoice_CInstance * bigvoice_InitProcess3 (const char *LoginKey, const char *RadioName, const char *Access_Key_ID, const char *Access_Key_Secret, const char *save_path, const struct bigvoice_CParameters *parameters, unsigned int frames_per_chunk)
 
unsigned int bigvoice_GetProcessChunkFrames (struct bigvoice_CInstance *instance)
 
int bigvoice_TerminateProcess (struct bigvoice_CInstance *instance)
 
void bigvoice_ExitProcess (struct bigvoice_CInstance *instance)
 

Detailed Description

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

Function Documentation

◆ bigvoice_ExitProcess()

void bigvoice_ExitProcess ( struct bigvoice_CInstance *  instance)

Quit and destroy the instance

Parameters
instancethe instance to destroy

◆ bigvoice_FreeParameters()

void bigvoice_FreeParameters ( struct bigvoice_CParameters *  params)

Free the parameters created with bigvoice_NewParameters.

◆ bigvoice_FreeParameterValue()

void bigvoice_FreeParameterValue ( const char *  value)

Free a parameter value returned by bigvoice_GetParameter

Parameters
valuethe returned value

◆ bigvoice_GetParameter()

const char * bigvoice_GetParameter ( struct bigvoice_CParameters *  params,
const char *  name 
)

Get current parameter value.

Returned value must be freed with bigvoice_FreeParameterValue

◆ bigvoice_GetProcessChunkFrames()

unsigned int bigvoice_GetProcessChunkFrames ( struct bigvoice_CInstance *  instance)

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

The value reflects the frames_per_chunk parameter passed to bigvoice_InitProcess3

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

◆ bigvoice_InitProcess()

struct bigvoice_CInstance * bigvoice_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 bigvoice_InitProcess2, but with default parameters (from env)

Deprecated:
Use bigvoice_InitProcess3

◆ bigvoice_InitProcess2()

struct bigvoice_CInstance * bigvoice_InitProcess2 ( const char *  LoginKey,
const char *  RadioName,
const char *  Access_Key_ID,
const char *  Access_Key_Secret,
const char *  save_path,
const struct bigvoice_CParameters *  parameters 
)

Create a process instance with default frames_per_chunk (12)

Same as bigvoice_InitProcess3, but with default frames_per_chunk

Deprecated:
Use bigvoice_InitProcess3

◆ bigvoice_InitProcess3()

struct bigvoice_CInstance * bigvoice_InitProcess3 ( const char *  LoginKey,
const char *  RadioName,
const char *  Access_Key_ID,
const char *  Access_Key_Secret,
const char *  save_path,
const struct bigvoice_CParameters *  parameters,
unsigned int  frames_per_chunk 
)

Create a process instance

The output will have to be freed with bigvoice_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.

Web login initialization
If the storage is not yet initialized, you can choose how to protect the web access.
There are 2 modes:
  1. Setup mode: you define a setup account, which can then create an administrator account.
    The setup account always keeps the access and can delete the administrator.
  2. Admin mode: you define the administrator, which will be the single administrator.
To select the mode, you have to put in the parameters
  1. SETUP_USER (and optionally SETUP_SECRET) to select Setup mode
  2. ADMIN_USER (and optionally ADMIN_SECRET) to select Admin mode
  3. none: the web access is opened, no login will be asked
If you do not set the xxx_SECRET, then the setuppassword will be randomly generated and print in logs (at info severity).
You can also use the JSON api to change this after the storage is created : see Change setup account
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.
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 bigvoice_GetPossibleChunkSizeInFrames
Returns
A new process instance

◆ bigvoice_NewParameters()

struct bigvoice_CParameters * bigvoice_NewParameters ( )

Create parameters to use with bigvoice_InitProcess2.

The output will have to be freed with bigvoice_FreeParameters

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

◆ bigvoice_SetParameter()

void bigvoice_SetParameter ( struct bigvoice_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

See also Instance's bus

◆ bigvoice_TerminateProcess()

int bigvoice_TerminateProcess ( struct bigvoice_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