Immersitech SDK Documentation
Engage SDK documentation
|
Go to the source code of this file.
Classes | |
struct | immersitech_position |
A structure to describe a postion within a three-dimensional space. More... | |
struct | immersitech_heading |
A strucutre to describe the direction a participant is facing in three-dimensional space. More... | |
Macros | |
#define | IMMERSITECH_LIBRARY_H_ |
#define | IMMERSITECH_SOUND_MANAGER_API |
#define | IMM_VERSION_BUFFER_LENGTH 11 |
Constant to state the length of the version string. More... | |
Typedefs | |
typedef struct immersitech_position | immersitech_position |
A structure to describe a postion within a three-dimensional space. More... | |
typedef struct immersitech_heading | immersitech_heading |
A strucutre to describe the direction a participant is facing in three-dimensional space. More... | |
typedef enum immersitech_audio_controls | immersitech_audio_controls |
Audio Controls you can change in real-time. More... | |
typedef enum immersitech_device_types | immersitech_device_types |
Output Device Types you may be listening on. More... | |
typedef enum immersitech_participant_types | immersitech_participant_types |
Types of participants you can instantiate. More... | |
typedef enum immersitech_output_format | immersitech_output_format |
Output Types - how your output stream will be formatted. More... | |
typedef enum immersitech_error_codes | immersitech_error_codes |
All error codes that may be produced by the library. More... | |
typedef void * | Immersitech_Conference |
Immersitech Library API Handler. More... | |
Functions | |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes | imm_get_version (char *character_buffer, int buffer_len) |
Function to return the current version of the immersitech library. More... | |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes | imm_initialize_library (const char *license_file_name, int sampling_rate, int num_frames_per_buffer, immersitech_output_format output_format, int impulse_length) |
Function to allocate memory for the immersitech library. More... | |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes | imm_destroy_library () |
Function to frees all memory associated with the immersitech library. More... | |
IMMERSITECH_SOUND_MANAGER_API Immersitech_Conference | imm_create_conference () |
Function to allocate memory and initialize a conference. More... | |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes | imm_destroy_conference (Immersitech_Conference conference) |
Function to removes all remaining participants from a conference and frees all the data for the conference. More... | |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes | imm_add_participant (Immersitech_Conference conference, int sampling_rate, int num_channels, immersitech_participant_types participant_type, int *new_id) |
Function to add a new pariticipant into a conference. More... | |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes | imm_remove_participant (Immersitech_Conference conference, int participant_ID) |
Function to remove a participant from a conference. More... | |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes | imm_input_audio (Immersitech_Conference conference, short *audio_data, int number_frames, int participant_ID) |
Function to add audio data from a participant into the conference. More... | |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes | imm_output_audio (Immersitech_Conference conference, int participant_ID, short *output) |
Function to process audio data and return the output audio data for a participant. More... | |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes | imm_edit_participant_position (Immersitech_Conference conference, int participant_ID, immersitech_position position, immersitech_heading heading) |
Function to edit x,y,z position of a given participant. More... | |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes | imm_get_participant_position (Immersitech_Conference conference, int participant_ID, immersitech_position *position, immersitech_heading *heading) |
Function to retrieve Location of a given conference participant. More... | |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes | imm_edit_participant_state (Immersitech_Conference conference, int participant_ID, immersitech_audio_controls control_to_edit, int value) |
Function to edit state of a given participant. More... | |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes | imm_get_participant_state (Immersitech_Conference conference, int participant_ID, immersitech_audio_controls control_to_edit, int *value) |
Function to retrieve state of a given conference participant. More... | |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes | imm_get_participant_spherical (Immersitech_Conference conference, int listener_ID, int source_ID, int *azimuth, int *elevation, int *distance) |
Function to retrieve Spherical Coordinates of a given source of a given conference participant. More... | |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes | imm_flush_data (Immersitech_Conference conference, int participant_id) |
Function to clear all data related to a particular participant. More... | |
#define IMM_VERSION_BUFFER_LENGTH 11 |
Constant to state the length of the version string.
You can use this value to initalize a character buffer that is sure to be compatible with the get version function.
#define IMMERSITECH_LIBRARY_H_ |
Copyright (C) Immersitech 2021 The use of this code is bound by the Immersitech Terms of Use at: https://immersitech.io/wp-content/uploads/2020/10/terms-of-use.pdf
DESCRIPTION Immersitech Sound Manager Library Interface definition file
NOTES
This is the Immersitech Sound Manager Library API To learn more please send an email to info@ or visit imme rsite ch.i ohttps://www.immersitech.io/
Author: Isaac Mosebrook Date Created: August 14, 2019 Date Modified: March 9, 2021
#define IMMERSITECH_SOUND_MANAGER_API |
typedef enum immersitech_audio_controls immersitech_audio_controls |
Audio Controls you can change in real-time.
A list of all the audio effects available in the Immersitech Library. For any control that ends with ENABLE, the only two possible values are 1 or 0 (enabled or disabled respectively).
typedef void* Immersitech_Conference |
Immersitech Library API Handler.
This handle will help keep a pointer to any conference you generate using the create conference function.
typedef enum immersitech_device_types immersitech_device_types |
Output Device Types you may be listening on.
The type of device a participant is listening to the output on. Note that speaker refers to a stereo loudspeaker pair. If a participant isn't sure what type of device they have, it is always advised to default to IMM_DEVICE_HEADPHONE.
typedef enum immersitech_error_codes immersitech_error_codes |
All error codes that may be produced by the library.
typedef struct immersitech_heading immersitech_heading |
A strucutre to describe the direction a participant is facing in three-dimensional space.
The azimuth angle is with respect to the x and z plane. The elevation angle is with respect to the y and z plane.
azimuth_heading | The azimuth angle the participant is facing. Allowable azimuth headings are from -180 to 180. |
elevation_heading | The elevation angle the participant is facing. Allowable elevation headings are from -90 to 90. |
typedef enum immersitech_output_format immersitech_output_format |
Output Types - how your output stream will be formatted.
Types of participants you can instantiate.
The rules will be enforced stricly. For example, if you create a source only participant and try to output audio, a error code will be returned and no processing will occur. One possible benefit of source only participants would be sound effect audio or audio from a video being shown in a conference. One possible benefit of listener only participants would be recording a conference.
typedef struct immersitech_position immersitech_position |
A structure to describe a postion within a three-dimensional space.
Note that the coordinate system uses centimeters. Check the documentation section on the coordinate system to see the alginment of the axes.
x | The position of a participant along the x-axis. |
y | The position of a participant along the y-axis. |
z | The position of a participant along the z-axis. |
Audio Controls you can change in real-time.
A list of all the audio effects available in the Immersitech Library. For any control that ends with ENABLE, the only two possible values are 1 or 0 (enabled or disabled respectively).
Output Device Types you may be listening on.
The type of device a participant is listening to the output on. Note that speaker refers to a stereo loudspeaker pair. If a participant isn't sure what type of device they have, it is always advised to default to IMM_DEVICE_HEADPHONE.
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_ENGINE_NULL | This error code indicates you have not initialized one of the handles 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. |
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_OUTPUT_TYPE | This error code indicates that you specified an invalid output type. Reference immersitech_output_format for the valid options. |
IMM_ERROR_IMPULSE_LENGTH | This error code indicates that you specified an invalid impulse length. Allowable values are from 512 to 8192. |
IMM_ERROR_INVALID_ROOM_ID | This error code indicates that you requested a room with an ID that doesn't exist. (For use with Room Manager Only) |
IMM_ERROR_INVALID_PARTICIPANT_ID | This error code indicates that you requested a participant with an ID that doesn't exist. |
IMM_ERROR_INVALID_CONTROL | This error code indicates the control specified is not a valid one with the bounds of immersitech_audio_controls. |
IMM_ERROR_INVALID_VALUE | This error code indicates the value provided is outside the bounds specified for the various immersitech_audio_controls. |
IMM_ERROR_INVALID_HEADING | This error code indicates you provide a heading that was outside the allowed values. Please reference immersitech_heading for allowed values. |
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_CONFERENCE_EMPTY | This error code indicates that there are not yet any participants in the conference to be processed. |
IMM_ERROR_PARTICIPANT_TYPE | This error code matches the exceptions specified under immersitech_participant_types. |
IMM_ERROR_LIBRARY_ALREADY_INITIALIZED | This error code will be generated if you try to initialize the library after you have already initialized it. |
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_END | This value allows you to identify the end of the enum. |
Output Types - how your output stream will be formatted.
Types of participants you can instantiate.
The rules will be enforced stricly. For example, if you create a source only participant and try to output audio, a error code will be returned and no processing will occur. One possible benefit of source only participants would be sound effect audio or audio from a video being shown in a conference. One possible benefit of listener only participants would be recording a conference.
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes imm_add_participant | ( | Immersitech_Conference | conference, |
int | sampling_rate, | ||
int | num_channels, | ||
immersitech_participant_types | participant_type, | ||
int * | new_id | ||
) |
Function to add a new pariticipant into a conference.
[in] | conference | The Immersitech_Conference corresponding to the conference you'd like to add the new participant to. |
[in] | sampling_rate | The input sampling rate of the new participant. |
[in] | num_channels | The number of channels this participant will input. Currently only supports 1 or 2 channels input. |
[in] | participant_type | An immersitech_participant_types value that will describe whether this participant will input audio, output audio, or both. |
[out] | new_id | If it was a success, this value will store the ID with which you can now reference this participant |
IMMERSITECH_SOUND_MANAGER_API Immersitech_Conference imm_create_conference | ( | ) |
Function to allocate memory and initialize a conference.
Creates a new conference that you can begin adding participants to.
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes imm_destroy_conference | ( | Immersitech_Conference | conference | ) |
Function to removes all remaining participants from a conference and frees all the data for the conference.
[in] | conference | The Immersitech_Conference object you would like to destroy |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes imm_destroy_library | ( | ) |
Function to frees all memory associated with the immersitech library.
This function needs to be called only once at the very end of your program when everything else is finished. Once this function is called, you won't be able to call any other functions unless you reinitialize the library.
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes imm_edit_participant_position | ( | Immersitech_Conference | conference, |
int | participant_ID, | ||
immersitech_position | position, | ||
immersitech_heading | heading | ||
) |
Function to edit x,y,z position of a given participant.
Change both the position and heading of a participant. These two values fully quanitify the participant's 3D experience.
[in] | conference | The Immersitech_Conference corresponding to the participant who you want to relocate. |
[in] | participant_ID | The ID of the participant you are relocating. |
[in] | position | The position you would like to move this participant to. |
[in] | heading | The direction you would like this participant to face. |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes imm_edit_participant_state | ( | Immersitech_Conference | conference, |
int | participant_ID, | ||
immersitech_audio_controls | control_to_edit, | ||
int | value | ||
) |
Function to edit state of a given participant.
Use this function to adjust the various audio effects available through immersitech_audio_controls
[in] | conference | The Immersitech_Conference corresponding to the participant whose state you want to edit. |
[in] | participant_ID | The ID of the pariticipant whose state you want to edit. |
[in] | control_to_edit | The control you want to adjust. |
[in] | value | The new value of the control_to_edit that was specified. |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes imm_flush_data | ( | Immersitech_Conference | conference, |
int | participant_id | ||
) |
Function to clear all data related to a particular participant.
This function will remove all audio data that was input for this participant. It will also clear all data that was on the output path to this participant.
[in] | conference | An Immersitech_Conference corresponding to the participant. |
[in] | participant_id | The ID of the participant whose data you would like to flush. |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes imm_get_participant_position | ( | Immersitech_Conference | conference, |
int | participant_ID, | ||
immersitech_position * | position, | ||
immersitech_heading * | heading | ||
) |
Function to retrieve Location of a given conference participant.
[in] | conference | The Immersitech_Conference corresponding to the participant who you want to get position information about. |
[in] | participant_ID | The ID of the participant you want to learn the position of. |
[out] | position | A pointer to an immersitech_position object that you allocated. The position information you requested will be stored in this object. |
[out] | heading | A pointer to an immersitech_heading object that you allocated. The heading information you requested will be stored in this object. |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes imm_get_participant_spherical | ( | Immersitech_Conference | conference, |
int | listener_ID, | ||
int | source_ID, | ||
int * | azimuth, | ||
int * | elevation, | ||
int * | distance | ||
) |
Function to retrieve Spherical Coordinates of a given source of a given conference participant.
This function can give detailed information about the current 3D rendering between two participants. The returned angles are the spherical coordinates that represent where the listner (listener_ID) will hear the source (source_ID) rendered.
[in] | conference | An Immersitech_Conference corresponding to the listener and source. |
[in] | listener_ID | The ID of the participant who is listening to the source. |
[in] | source_ID | The ID of the participant who is generated the sound heard by the listener. |
[out] | azimuth | The azimuth angle from the source to the listener. |
[out] | elevation | The elevation angle from the source to the listener. |
[out] | distance | The distance from the source to the listener. |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes imm_get_participant_state | ( | Immersitech_Conference | conference, |
int | participant_ID, | ||
immersitech_audio_controls | control_to_edit, | ||
int * | value | ||
) |
Function to retrieve state of a given conference participant.
[in] | conference | An Immersitech_Conference corresponding to the participant whose state you want to learn about. |
[in] | participant_ID | The ID of the participant whose state you want to learn about |
[in] | control_to_edit | The control you want to learn the state of. |
[out] | value | If the call is a success, value is the value of the control of the requested participant in the requested conference. |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes imm_get_version | ( | char * | character_buffer, |
int | buffer_len | ||
) |
Function to return the current version of the immersitech library.
[out] | character_buffer | Character buffer that will store the version. You must initialize this buffer before sending it. |
[in] | buffer_len | The size character_buffer has been allocated to. |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes imm_initialize_library | ( | const char * | license_file_name, |
int | sampling_rate, | ||
int | num_frames_per_buffer, | ||
immersitech_output_format | output_format, | ||
int | impulse_length | ||
) |
Function to allocate memory for the immersitech library.
This function only needs to be called once, but must be called before any other function is called.
[in] | license_file_name | The path to your immersitech license file including the file name ("/path/my_license.dat"). |
[in] | sampling_rate | The output sampling rate of the library. Currently the library only supports output sampling rates of 44100 and 48000. |
[in] | num_frames_per_buffer | The number of frames generated in the output. Currently the library supports values of 480, 512, 960, and 1024. |
[in] | output_format | An immersitech_output_format value that will describe the number of channels and interleaving / block properties of your output. |
[in] | impulse_length | This value describes the length of impulse responses used in 3D rendering. A smaller value gives better CPU / RAM performance but lesser 3D accuracy. Currently supports values between 512 to 8192. |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes imm_input_audio | ( | Immersitech_Conference | conference, |
short * | audio_data, | ||
int | number_frames, | ||
int | participant_ID | ||
) |
Function to add audio data from a participant into the conference.
[in] | conference | The Immersitech_Conference corresponding to the conference you'd like to add this participant's input audio to. |
[in] | audio_data | The buffer that has the audio data you'd like to input stored in it. |
[in] | number_frames | The number of frames allocated in the audio_data buffer. Note number of frames is a channel insensitive value as described earlier. |
[in] | participant_ID | The ID of the participant's whose audio is being input into the conference. |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes imm_output_audio | ( | Immersitech_Conference | conference, |
int | participant_ID, | ||
short * | output | ||
) |
Function to process audio data and return the output audio data for a participant.
[in] | conference | The Immersitech_Conference corresponding to the participant whose output you'd like to generate. |
[in] | participant_ID | The ID of the participant whose output stream will be generated. In other words, this is the output data this participant will hear. |
[out] | output | This is an audio data buffer that you have initialized. The output data will be written to this buffer. Ensure its allocated size matches the output number of frames and channels specified upon initializing the library. |
IMMERSITECH_SOUND_MANAGER_API immersitech_error_codes imm_remove_participant | ( | Immersitech_Conference | conference, |
int | participant_ID | ||
) |
Function to remove a participant from a conference.
[in] | conference | The Immersitech_Conference corresponding to the conference you'd like to remove a participant from. |
[in] | participant_ID | The ID of the pariticipant you'd like to remove. Note the ID was generated as the output of the add participant function. |