// Initialize the Immersitech library
imm_handle handle = imm_initialize_library(license_file_path, room_layout_file_path, websocket_file_path, output_config, &error_code);
// Create a new room
imm_create_room( handle, 0 );
// Add participants 1 and 2 to the room
imm_add_participant( handle, 0, 1, "participant_1", input_config);
imm_add_participant( handle, 0, 2, "participant_2", input_config);
// Turn on and off the different effects in the library (thread safe)
imm_set_participant_state( handle, 0, 1, IMM_CONTROL_ANC_ENABLE, 1); // Turn on Noise Cancellation for participant 1
imm_set_participant_state( handle, 0, 2, IMM_CONTROL_MIXING_3D_ENABLE, 70); // Turn on 3D Mixing for participant 2
// Move participants to different 3D locations
imm_set_participant_position( handle, 0, 1, {-100, 0, -50}, {0,0});
imm_set_participant_position( handle, 0, 2, { 10, 30, 20 }, {0,0});
// Input each participant's audio
imm_input_audio_short( handle, 0, 1, my_audio_data_1, num_frames);
imm_input_audio_short( handle, 0, 2, my_audio_data_2, num_frames);
// Receive the processed output for each participant
imm_output_audio_short( handle, 0, 1, output_buffer_1);
imm_output_audio_short( handle, 0, 2, output_buffer_2);
// When done cleanup by remove participants
imm_remove_participant( handle, 0, 1 );
imm_remove_participant( handle, 0, 2 );
// Destroy the room
imm_destroy_room( handle, 0 );
// Destroy the library
imm_destroy_library( handle );
|