Documentation

Support

Vivox Unreal SDK

Vivox Unreal SDK

IAudioDevices

Learn how IAudioDevices changed in the upgrade.
Read time 2 minutesLast updated 2 days ago

Various functions in the VivoxVoiceChat module are replaced by the functionality of IAudioDevices. For code examples and usage notes, see In-game audio device selection. The following list provides the name of the function in the VivoxVoiceChat module, the comparable function in VivoxCore, and supplemental information for completing a version switch. Using the proper collection of IAudioDevices to call ActiveDevice() returns the device that the game is currently using. Calling the following functions to edit the properties of the active IAudioDevice replicates the effects of these functions in the UE4 plug-in.
  • GetAvailableInputDevices(), GetAvailableOutputDevices()
    is replaced by
    AudioInputDevices(), AudioOutputDevices()
    • The available input and output devices are stored in two collections on the IClient referenced by calling AudioInputDevices() and AudioOutputDevices()
  • GetInputDevice(), GetOutputDevice()
    is replaced by
    ActiveDevice()
    • Calling ActiveDevice() on either AudioInputDevices() or AudioOutputDevices() returns the IAudioDevice that is currently being used for input or output.
  • SetInputDevice(const FString& InputDevice), SetOutputDevice(const FString& OutputDevice)
    is replaced by
    SetActiveDevice(const IAudioDevice \&device)
    • To set the device within VivoxCore, a developer can use the FString name from the SetInputDevice() and SetOutputDevice() functions to search the proper IAudioDevices collection for the corresponding IAudioDevice, and then use SetActiveDevice(const IAudioDevice &device) on the proper collection with the proper IAudioDevice to change the input or output device.
  • GetDefaultInputDevice(), GetDefaultOutputDevice()
    is replaced by
    SystemDevice(), CommunicationDevice()
    • GetDefaultInputDevice() and GetDefaultOutputDevice() are used in the Unreal Engine 4 plug-in to grab the SystemDevice for the machine. You can replace them by referencing the proper collection with a SystemDevice() to grab the same IAudioDevice. Also, you can use CommunicationDevice() in the same manner to grab the Communication Device that is set on the machine. This always points to the same physical device as SystemDevice(), except on Windows and Xbox One, where it can differ.
  • SetAudioInputVolume(float Volume), SetAudioOutputVolume(float Volume)
    is replaced by
    SetVolumeAdjustment(int value)
    • Calling SetVolumeAdjustment() on the ActiveDevice() of either AudioInputDevices() or AudioOutputDevices() produces nearly the same functionality, but on a logarithmic volume scale of -50 to 50. For more information, see Set audio input and output levels.
  • GetAudioInputVolume(), GetAudioOutputVolume()
    is replaced by
    VolumeAdjustment()
    • Calling VolumeAdjustment() on the ActiveDevice() of either AudioInputDevices() or AudioOutputDevices() produces the same functionality.
  • SetAudioInputDeviceMuted(bool bIsMuted), SetAudioOutputDeviceMuted(bool bIsMuted)
    is replaced by
    SetMuted(bool value)
    • Calling SetMuted(bool value) on the ActiveDevice() of either AudioInputDevices() or AudioOutputDevices() produces the same functionality.
  • GetAudioInputDeviceMuted(), GetAudioOutputDeviceMuted()
    Muted()
    • Calling Muted() on the ActiveDevice() of either AudioInputDevices() or AudioOutputDevices() produces the same functionality.