Developer Documentation

Blueprint Reference

Functions

NameDescription
Construct Local Room HandleCreates a local room object that will be used to handle events and client side connection settings. Connect the Room output to the Room input of the Join Room node. You can also use the Room output to handle events like Room Joined or Media Added.
Make ODIN APM SettingsCreates an APM settings object that can be used to construct a local room handle.
Generate Room TokenTakes an access key and a room id and creates a room token that is used to join a room. In production this should be done in a protected environment, e.g. your authentication server (see example project `Token ServerĀ“)
Construct a Token GeneratorCreates a token generator that is used to generate room tokens on client side.
Create Odin Audio CaptureCreates an Odin Audio Capture object, that can be used to get access to the microphone on the users device. The Odin Audio Capture object adds features to the default Unreal Audio Capture, like enabling capture device switching on supported platforms or improved Push-To-Talk features. Please make sure, that the Audio Capture Plugin is enabled.
Format ErrorTakes an ODIN error code and returns an error message a string which can be printed to the log.
Generate Access KeyCreates an access key that can be used to generate room tokens. These keys are only for development and should not be used in production.
Add Odin Synth ComponentAdds the Odin Synth Component to the specified actor.
Get and Set Volume MultiplierGetVolumeMultiplier: Retrieves the current volume multiplier of the capture device’s input. SetVolumeMultiplier: Sets the volume multiplier for the capture device’s input.
Get and Set Max Volume MultiplierGetMaxVolumeMultiplier: Retrieves the current maximum volume multiplier value. SetMaxVolumeMultiplier: Sets the new maximum volume multiplier value.

Events

NameDescription
On Add Media To Room SuccessThis event is triggered in the Add Media To Room function once the media has been added to the room successfully.
On Connection State ChangedHandles Connection State Changed events which are called when the connection state changed (i.e. a disconnect to the server). Connect a Bind to On Connection State Changed delegate node to handle this event for the specified room.
On Room JoinedHandles Room Joined events which are called once the local user has successfully joined a room. Connect a Bind to On Room Joined delegate node to handle this event for the specified room.
On Room User Data ChangedCalled whenever the user data of the room changed. Connect a Bind to On Room User Data Changed delegate node to handle this event for the specified room.
On Peer JoinedCalled whenever a peer joins the room. Connect a Bind to On Peer Joined delegate node to handle this event for the specified room.
On Peer LeftCalled whenever a peer leaves the room. Connect to a Bind to On Peer Left node to handle this event for the specified room.
On Peer User Data ChangedCalled whenever a peer has changed its user data. Connect to a Bind to On Peer User Data Changed node to handle this event for the specified room.
On Media AddedCalled whenever a peer has added a media (i.e. activated the microphone). Connect to a Bind to On Media Added delegate node to handle this event for the specified room. Will not be called for the local player.
On Media RemovedCalled whenever a peer has removed a media stream. Connect to a Bind to On Media Removed delegate node to handle this event for the specified room.
On Message ReceivedCalled whenever another peer has sent a message. Connect to a Bind to On Message Received delegate node to handle this event for the specified room.

Delegates

NameDescription
Bind to On Connection State ChangedListens to on Connection State Changed events from the given Room object and calls the connected event handler of type On Connection Changed.
Bind to On Room JoinedListens on Room Joined events on the given Room object and calls the connected Room Joined Event handler.
Bind to On Room User Data ChangedBind to Room User Data Changed events in the given Room.
Bind to On Peer JoinedListens to Peer Joined events in the given Room object. Peer Joined events will be called whenever a peer joins the room. Will not be called for the local player. Use the On Room Joined event to handle joins from the local player instead.
Bind to On Peer LeftListens on Peer Left events on the given Room object which will be called whenever a peer left the room. Is not called for the local player.
Bind to On Peer User Data ChangedListens to Peer User Data Changed events for the given Room object. Peer User Data Changed events will be called whenever a peer updates their user data. Is not called for the local player.
Bind to On Media AddedListens for On Media Added events in the given Room object. On Media Added events will be called whenever a peer has added a media (i.e. activated the microphone). Is not called for the local player.
Bind to On Media RemovedListens to On Media Removed events in the given Room. On Media Removed will be called whenever a peer has removed a media (i.e. muted the microphone). Is not called for the local player.
Bind to On Message ReceivedListens to On Message Received events in the given Room object. On Message Received events will be triggered whenever another peer has sent a message.

Audio Capture

NameDescription
Construct Local MediaCreates a media object that will be used in the Add Media To Room node input. Connect an Audio Capture or Odin Audio Capture object to it.
Get Capture Devices AvailableReturns all available capture devices with the device id. IMPORTANT! Use the Async version in case you experience stuttering. The Async version runs asynchronously and uses a callback when the result is available.
Get Current Audio Capture DeviceReturns info on the current capture device.
Change Capture Device By IdIMPORTANT! Use the Async version in case you experience stuttering. Updates the capture device and restarts the capture stream of the Audio Capture component. The Async version runs asynchronously and does not block the main thread.
Change Capture Device By NameIMPORTANT! Use the Async version in case you experience stuttering. Updates the capture device and restarts the capture stream of the Audio Capture component. The Async version runs asynchronously and does not block the main thread.
Restart CapturingRestart the stream, using CurrentSelectedDeviceIndex as the new input.
Get and Set Is PausedGet Is Capturing Paused: Returns whether the audio capture is paused. Set Is Capturing Paused: Sets the paused state of the audio capture.
On Capture Device ResetWill be called if ODIN recognizes that the selected capture device does not supply data anymore, i.e., if a microphone was unplugged. ODIN will wait for AllowedTimeWithoutStreamUpdate seconds before trying a stream restart. You can set the AllowedTimeWithoutStreamUpdate parameter on the Odin Audio Capture Object.
On Default Device ChangedWill be called if the Default Device is the currently selected device and if the Default Device was switched by the system.

Room

NameDescription
Join RoomJoins an ODIN room with the room token provided. Every peer connected to the same room will be able to talk to each other and exchange data.
Add Media To RoomAdds a previously generated media object to the room. Once this is done, the users microphone input will be sent to other users so they can hear the audio.
Set Room Position ScaleSets the multiplicative scale for all coordinates used in position updates. Use this as the maximum radius in which a peer can be heard. The scale value is used to optimize audio streams by not streaming audio data to peer’s that are outside of hearing range.
Update Peer PositionUpdates the position of the own peer in the room. You have to set the scale beforehand via Set Room Position Scale.
Send MessageSends arbitrary data to a list of target peers to an ODIN room. Every peer connected to the same room will be able to receive the message.
Get Room Connection StatsGet statistics for a room connection. This function provides detailed information about the connection status and metrics in an ODIN room.
Set Room APM ConfigUpdates audio processing settings for capture media handles in a specific room. This function allows modification of various audio processing parameters for a room.
Set Room APM Stream DelayUpdates the delay estimate in ms for reverse stream used in echo cancellation. This function modifies the delay settings for a specific room.
Destroy Local Room HandleCloses the connection to the server and destroys the local room handle. This function is used to properly disconnect and clean up resources associated with a room.

Odin Synth Component

NameDescription
Odin Assign Synth to MediaAssign a media stream coming with the Media Added event to the Odin Synth Component which will generate audio output from the incoming stream.
Reset Odin MediaThis function can be used to reset the media handle assigned to the targeted ODIN Synth Component instance. Resetting a media handle will restore it to its default configuration. This operation resets the internal Opus encoder/decoder, ensuring a clean state. Additionally, it clears internal buffers, providing a fresh start.
Adjust AttenuationThis function is used to modify the Attenuation Settings on the targeted ODIN Synth instance. It is worth noting that Attenuation Settings are only passed to new Active Sounds on start, so modified Attenuation data should be set before sound playback.