#include <string>
#include <mutex>
Go to the source code of this file.
Functions | |
IMMERSITECH_LOGGER_API const char * | imm_get_version () |
Function to return the current version of the immersitech library. More... | |
IMMERSITECH_LOGGER_API imm_error_code | imm_enable_logging (bool enable) |
Function to turn on or off logging within the Immersitech Library. More... | |
IMMERSITECH_LOGGER_API imm_error_code | imm_set_log_level (int level) |
Function to set the log level of the Immersitech logger. More... | |
IMMERSITECH_LOGGER_API const char * | imm_error_code_to_string (imm_error_code error_code) |
Get a human readable string for an error code. More... | |
Data Structures | |
class | imm_logger_handler |
Default Immersitech logger handler. More... | |
class | imm_logger |
Logger class. More... | |
Enumerations | |
enum | imm_error_code { IMM_ERROR_START = -10001 , IMM_ERROR_NONE , IMM_ERROR_HANDLE_NULL , IMM_ERROR_DATA_NULL , IMM_ERROR_DATA_LENGTH , IMM_ERROR_NUM_CHANNELS , IMM_ERROR_SAMPLE_RATE , IMM_ERROR_SPATIAL_QUALITY , IMM_ERROR_INVALID_ROOM_ID , IMM_ERROR_INVALID_PARTICIPANT_ID , IMM_ERROR_INVALID_CONTROL , IMM_ERROR_INVALID_VALUE , IMM_ERROR_INVALID_HEADING , IMM_ERROR_INVALID_JSON_FILE , IMM_ERROR_NO_INPUT_AUDIO , IMM_ERROR_PARTICIPANT_TYPE , IMM_ERROR_LIBRARY_NOT_YET_INITIALIZED , IMM_ERROR_LICENSE_DATE_EXPIRED , IMM_ERROR_LICENSE_VERSION_MISMATCH , IMM_ERROR_LICENSE_TAMPERED , IMM_ERROR_LICENSE_MISSING , IMM_ERROR_FILE_DOES_NOT_EXIST , IMM_ERROR_MISSING_OR_INVALID_PARAMETER , IMM_ERROR_INVALID_FUNCTION_CALL , IMM_ERROR_INVALID_STREAM_ID , IMM_ERROR_END } |
All error codes that may be produced by the library. More... | |
enum | imm_log_level { IMM_LOG_VERBOSE , IMM_LOG_DEBUG , IMM_LOG_INFO , IMM_LOG_WARNING , IMM_LOG_ERROR } |
Log level definition. More... | |
Typedefs | |
typedef enum imm_error_code | imm_error_code |
All error codes that may be produced by the library. More... | |
IMMERSITECH_LOGGER_API imm_error_code imm_enable_logging | ( | bool | enable | ) |
Function to turn on or off logging within the Immersitech Library.
If you disable logging by sending false to this function, nothing will ever be logged. No messages will be printed. If you enable logging by sending true to this function. The Immersitech Library will log all messages equal to or above the set logging level. By default, Immersitech Library will log all messages to the standard output. By default, Immersitech Library will set the log level to Warnings and above only.
[in] | enable | This bool dictates whether you'd like to enable logging or not |
IMMERSITECH_LOGGER_API const char * imm_error_code_to_string | ( | imm_error_code | error_code | ) |
Get a human readable string for an error code.
This function allows you to print an error code enum value as its human readable equivalent by returning a string
[in] | error_code | The error code you'd like to get human readable form for |
IMMERSITECH_LOGGER_API const char * imm_get_version | ( | ) |
Function to return the current version of the immersitech library.
IMMERSITECH_LOGGER_API imm_error_code imm_set_log_level | ( | int | level | ) |
Function to set the log level of the Immersitech logger.
The logger will only log messages that are equal to or greater than the currently set log level.
[in] | level | The log level you'd like to set. check the imm_log_level enum for details on which integer value corresponds to which log level |
typedef enum imm_error_code imm_error_code |
All error codes that may be produced by the library.
enum imm_error_code |
All error codes that may be produced by the library.
Enumerator | |
---|---|
IMM_ERROR_START | This value allows you to identify the start of the enum. |
IMM_ERROR_NONE | This error code indicates the function worked successfully without error. |
IMM_ERROR_HANDLE_NULL | This error code indicates you have not initialized your imm_handle properly yet. |
IMM_ERROR_DATA_NULL | This error code indicates you tried to use a buffer or variable that wasn't allocated properly. |
IMM_ERROR_DATA_LENGTH | This error code indicates there is a mismatch between the size of the data buffer you provided and the size required. |
IMM_ERROR_NUM_CHANNELS | This error code indicates that you tried to specify a number of channels outside the allowed bounds. Currently only 1 or 2 channels are allowed. |
IMM_ERROR_SAMPLE_RATE | This error code indicates that you tried to specify an output sampling rate that is unsupported or an input sampling rate that doesn't work with the output sampling rate. |
IMM_ERROR_SPATIAL_QUALITY | This error code indicates that you specified an invalid spatial quality value. Allowable values are from 1 to 5. |
IMM_ERROR_INVALID_ROOM_ID | This error code indicates that you requested a room with an ID that doesn't exist or tried to create a room with an ID that already existed. |
IMM_ERROR_INVALID_PARTICIPANT_ID | This error code indicates that you requested a participant with an ID that doesn't exist or tried to add a participant with an ID that already existed. |
IMM_ERROR_INVALID_CONTROL | This error code indicates the control specified is not a valid one with the bounds of imm_audio_control. |
IMM_ERROR_INVALID_VALUE | This error code indicates the value provided is outside the bounds specified for the various imm_audio_control. It can also indicate you provided an invalid function parameter in general. |
IMM_ERROR_INVALID_HEADING | This error code indicates you provide a heading that was outside the allowed values. Please reference imm_heading for allowed values. |
IMM_ERROR_INVALID_JSON_FILE | This error code indicates a syntax error in the provided JSON file (parameter, formating). |
IMM_ERROR_NO_INPUT_AUDIO | This error code indicates that there was no input audio to be processed, meaning an output buffer could not be generated. Instead the output buffer will be zeroed. |
IMM_ERROR_PARTICIPANT_TYPE | This error code matches the exceptions specified under imm_participant_type. |
IMM_ERROR_LIBRARY_NOT_YET_INITIALIZED | This error code will be generated if you call any functions before initializing the library. |
IMM_ERROR_LICENSE_DATE_EXPIRED | This error code indicates your license files no longer matches the date requirements. All audio effects will be bypassed. |
IMM_ERROR_LICENSE_VERSION_MISMATCH | This error code indicates your license files version requirements no longer match. All audio effects will be bypassed. |
IMM_ERROR_LICENSE_TAMPERED | This error code indicates your license file has been corrupted. All audio effects will be bypassed. |
IMM_ERROR_LICENSE_MISSING | This error code indicates the path to your license file is invalid. All audio effects will be bypassed. |
IMM_ERROR_FILE_DOES_NOT_EXIST | This error code indicates that an invalid file path was provided (invalid path or invalid filename). |
IMM_ERROR_MISSING_OR_INVALID_PARAMETER | This error code indicates that a parameter is either missing or invalid. |
IMM_ERROR_INVALID_FUNCTION_CALL | This error code indicates you called a function that is incompatible with your configuration, for example calling imm_cv_add_stream() while multistream_mode is disabled. |
IMM_ERROR_INVALID_STREAM_ID | This error code indicates that you supplied an invalid stream ID. Perhaps you've already removed this stream? |
IMM_ERROR_END | This value allows you to identify the end of the enum. |
enum imm_log_level |
Log level definition.
A message written to the log can have one of these levels of severity