기술 자료

​
​

Development

User Acquisition

Monetization

산업 분야

Vivox Unreal SDK

Vivox Unreal SDK

이 페이지는 선택한 언어로 제공되지 않습니다.
Vivox
​
​
Vivox Unreal SDK
  • Overview
  • Get started
  • Release notes
  • Developer guide
    • Set up your project
    • Unity Authentication Service in Unreal
    • Create voice and text channels
    • Messaging
    • Audio management
      • In-game audio control
        • In-game audio device selection
        • In-game control of audio levels
        • Create a dynamic voice energy meter
    • Muting
    • In-game moderation
    • Android app development
    • iOS app development
    • Server-side recording
    • Speech-to-text audio transcription
    • Text-to-speech
    • Real-time recording
    • Transmission
    • Troubleshooting
  • Tutorials
  • Reference
  1. Vivox Unreal SDK documentation
  2. Audio

In-game audio device selection

Allow players to select audio input and output devices.
읽는 시간 2분
최근 업데이트: 8달 전

The Vivox SDK automatically uses the system default audio input and output devices. However, you can override this behavior and provide users with a choice of which audio device to use for group voice chat independent of the audio devices that are used for the game.
To perform this override, build a user interface for the game that displays a list of available devices to users that they can select a device from. Build this user interface with the following requests, where audio output devices are called render devices, and audio input devices are called capture devices:
  • VivoxCoreError IAudioDevices::SetActiveDevice(const FString \&device, const FOnSetActiveDeviceCompletedDelegate \&theDelegate=FOnSetActiveDeviceCompletedDelegate())
  • const TMap<FString, IAudioDevice *> \&IAudioDevices::AvailableDevices()
  • const IAudioDevice IAudioDevices::CommunicationDevice()
  • const IAudioDevice IAudioDevices::SystemDevice()
  • const IAudioDevice IAudioDevices::NullDevice()
  • const IAudioDevice IAudioDevices::ActiveDevice()
  • const IAudioDevice IAudioDevices::EffectiveDevice()
IAudioDevices::AvailableDevices
returns a
TMap<FString, IAudioDevice \*>
map that contains a list of every device name and its corresponding Vivox
IAudioDevice
object. Use this request to populate a drop-down menu or to find an appropriate
IAudioDevice
instance to pass in to
IAudioDevices::SetActiveDevice
.
The following code is an example of how to activate the devices that the user selects:
void UMyClass::SetAudioDevice(const IAudioDevice &inputToSet, const IAudioDevice &outputToSet){ // IClient *VivoxVoiceClient; if (VivoxVoiceClient->AudioInputDevices().ActiveDevice().Id() != inputToSet.Id()) { VivoxVoiceClient->AudioInputDevices().SetActiveDevice(inputToSet); } if (VivoxVoiceClient->AudioOutputDevices().ActiveDevice().Id() != outputToSet.Id()) { VivoxVoiceClient->AudioOutputDevices().SetActiveDevice(outputToSet); }}
When a user selects a new device, the game passes the appropriate
IAudioDevice
in to
IAudioDevices::SetActiveDevice
.
Alternately, you can pass a virtual device, such as
IAudioDevices::SystemDevice()
or
IAudioDevices::CommunicationDevice()
, in to
IAudioDevices::SetActiveDevice
to set the
ActiveDevice
to the system's default device or the system's communication device, respectively.
Set
IAudioDevices::NullDevice()
explicitly to prevent input or output.
To alert the game to changes in the IAudioDevices setup, bind to the following events:
  • IAudioDevices::EventAfterDeviceAvailableAdded
  • IAudioDevices::EventBeforeAvailableDeviceRemoved
  • IAudioDevices::EventEffectiveDeviceChanged
Binding to these events helps you to build a responsive system that can handle device hotswapping.

Copyright © 2026 Unity Technologies
법률 정보개인정보 처리방침쿠키Documentation Terms of Use개인 정보 판매 또는 공유 금지개인정보 보호 선택(쿠키 설정)

'Unity', Unity 로고 및 기타 Unity 상표는 미국 및 기타 지역 내 Unity Technologies 또는 그 계열사의 상표 또는 등록상표입니다(자세한 내용은 여기에서 확인하세요). 기타 명칭 또는 브랜드는 해당 소유자의 상표입니다.

일부 페이지는 편의를 위해 기계 번역되었으며 부정확한 내용이 있을 수 있습니다. 정보가 상충되는 경우, 영어 버전을 우선으로 참조하세요.


    이 페이지의 문제 보고