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.
-
is replaced by
GetAvailableInputDevices(), GetAvailableOutputDevices()AudioInputDevices(), AudioOutputDevices()- The available input and output devices are stored in two collections on the IClient referenced by calling AudioInputDevices() and AudioOutputDevices()
-
is replaced by
GetInputDevice(), GetOutputDevice()ActiveDevice()- Calling ActiveDevice() on either AudioInputDevices() or AudioOutputDevices() returns the IAudioDevice that is currently being used for input or output.
-
is replaced by
SetInputDevice(const FString& InputDevice), SetOutputDevice(const FString& OutputDevice)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.
-
is replaced by
GetDefaultInputDevice(), GetDefaultOutputDevice()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.
-
is replaced by
SetAudioInputVolume(float Volume), SetAudioOutputVolume(float Volume)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.
-
is replaced by
GetAudioInputVolume(), GetAudioOutputVolume()VolumeAdjustment()- Calling VolumeAdjustment() on the ActiveDevice() of either AudioInputDevices() or AudioOutputDevices() produces the same functionality.
-
is replaced by
SetAudioInputDeviceMuted(bool bIsMuted), SetAudioOutputDeviceMuted(bool bIsMuted)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.