오디오 디바이스 관리
Allow players to select audio input and output devices.
읽는 시간 1분최근 업데이트: 19일 전
Vivox SDK는 시스템의 기본 오디오 입력 및 출력 디바이스를 자동으로 사용합니다. 게임에서는 보통 이러한 동작을 오버라이드하여 게임에 사용되는 오디오 디바이스와는 별도로 그룹 음성 채팅에 사용할 오디오 디바이스를 사용자가 선택하도록 할 수 있습니다. 이 오버라이드를 수행하려면 게임에서 사용자에게 사용 가능한 디바이스 목록을 표시하고 해당 목록에서 디바이스를 선택하도록 하는 사용자 인터페이스를 빌드합니다. InputDevices와 OutputDevices에 대한 이 사용자 인터페이스를 빌드하고
VivoxService.Instance.AvailableInputDevicesVivoxService.Instance.AvailableOutputDevicesVivoxInputDevicesVivoxOutputDevicesVivoxService.Instance.AvailableInputDevicesChangedVivoxService.Instance.AvailableOutputDevicesChangedVivoxService.Instance.AvailableInputDevicesVivoxService.Instance.AvailableOutputDevicesivoxService.Instance.SetActiveInputDeviceAsync(VivoxInputDevice device)VivoxService.Instance.SetActiveOutputDeviceAsync(VivoxOutputDevice device)async void SetVivoxInputDeviceAsync(VivoxInputDevice device){ if(VivoxService.Instance.AvailableInputDevices.Contains(device)) { await VivoxService.Instance.SetActiveInputDeviceAsync(device); }}await void SetVivoxOutputDeviceAsync(VivoxInputDevice device){ if(VivoxService.Instance.AvailableOutputDevices.Contains(device)) { await VivoxService.Instance.SetActiveOutputDeviceAsync(device); }}
AudioDeviceSettings.cs작동 중인 디바이스 식별
참가자는 음성 채팅을 사용할 때Default System DeviceDefault Communication Device예를 들어, 플레이어가 게임 내 입력 디바이스로VivoxService.Instance.EffectiveInputDeviceChanged;VivoxService.Instance.EffectiveOutputDeviceChanged;VivoxService.Instance.EffectiveInputDevice;VivoxService.Instance.EffectiveOutputDevice;
Default System DeviceDefault System DeviceVivoxService.Instance.EffectiveInputDevice
작동 중인 디바이스가 표시된 채팅 채널 샘플 오디오 디바이스 선택 메뉴의 스크린샷입니다.
Default System DeviceDefault System Device