Accept
(
userID
)
|
Accepts a Voip connection from a given Models.User.
Signature
static void Oculus.Platform.Voip.Accept(UInt64 userID) Parameters userID: UInt64Returns void |
GetIsConnectionUsingDtx
(
peerID
)
|
Gets whether or not a voice connection is using discontinuous transmission (DTX). Both sides must set to using DTX when their connection is established in order for this to be true. Returns unknown if there is no connection.
Signature
static Oculus.Platform.VoipDtxState Oculus.Platform.Voip.GetIsConnectionUsingDtx(UInt64 peerID) Parameters peerID: UInt64Returns Oculus.Platform.VoipDtxState |
GetLocalBitrate
(
peerID
)
|
Gets the current local bitrate used for the connection to the specified user. This is set by the current client. Returns unknown if there is no connection.
Signature
static Oculus.Platform.VoipBitrate Oculus.Platform.Voip.GetLocalBitrate(UInt64 peerID) Parameters peerID: UInt64Returns Oculus.Platform.VoipBitrate |
GetMicrophoneAvailability
()
|
Gets whether the microphone is currently available to the app. This can be used to show if the user's voice is able to be heard by other users. Returns a microphone availability state flag which determines whether it is available or not - Models.MicrophoneAvailabilityState.
Signature
static Request<Models.MicrophoneAvailabilityState> Oculus.Platform.Voip.GetMicrophoneAvailability() Returns Request< Models.MicrophoneAvailabilityState > |
GetRemoteBitrate
(
peerID
)
|
Gets the current remote bitrate used for the connection to the specified user. This is set by the client on the other side of the connection. Returns unknown if there is no connection.
Signature
static Oculus.Platform.VoipBitrate Oculus.Platform.Voip.GetRemoteBitrate(UInt64 peerID) Parameters peerID: UInt64Returns Oculus.Platform.VoipBitrate |
GetSystemVoipMicrophoneMuted
()
|
Returns SystemVoip microphone's mute state. The different states are VoipMuteState.
Signature
static VoipMuteState Oculus.Platform.Voip.GetSystemVoipMicrophoneMuted() Returns VoipMuteState |
GetSystemVoipStatus
()
|
Returns SystemVoip status. The different statuses are SystemVoipStatus.
Signature
static SystemVoipStatus Oculus.Platform.Voip.GetSystemVoipStatus() Returns SystemVoipStatus |
SetMicrophoneAvailabilityStateUpdateNotificationCallback
(
callback
)
|
Indicates that the current microphone availability state has been updated. Use Voip.GetMicrophoneAvailability() to extract the microphone availability state.
Signature
static void Oculus.Platform.Voip.SetMicrophoneAvailabilityStateUpdateNotificationCallback(Message< string >.Callback callback) Returns void |
SetMicrophoneFilterCallback
(
callback
)
|
This function allows you to set a callback that will be called every time audio data is captured by the microphone. The callback function must match this signature: void filterCallback(int16_t pcmData[], size_t pcmDataLength, int frequency, int numChannels); The pcmData param is used for both input and output. pcmDataLength is the size of pcmData in elements. numChannels will be 1 or 2. If numChannels is 2, then the channel data will be interleaved in pcmData. Frequency is the input data sample rate in hertz. This function can be safely called from any thread.
Signature
static void Oculus.Platform.Voip.SetMicrophoneFilterCallback(CAPI.FilterCallback callback) Parameters callback: CAPI.FilterCallbackReturns void |
SetMicrophoneMuted
(
state
)
|
This function is used to enable or disable the local microphone. When muted, the microphone will not transmit any audio. Voip connections are unaffected by this state. New connections can be established or closed whether the microphone is muted or not. This can be used to implement push-to-talk, or a local mute button. The default state is unmuted. This function can be safely called from any thread.
Signature
static void Oculus.Platform.Voip.SetMicrophoneMuted(VoipMuteState state) Parameters state: VoipMuteStateReturns void |
SetNewConnectionOptions
(
voipOptions
)
|
The options set for newly created connections to use. Existing connections will continue to use their current settings until they are destroyed and recreated.
Signature
static void Oculus.Platform.Voip.SetNewConnectionOptions(VoipOptions voipOptions) Parameters voipOptions: VoipOptionsReturns void |
SetSystemVoipStateNotificationCallback
(
callback
)
|
Sent to indicate that some part of the overall state of SystemVoip has changed. Use SystemVoipState::Status and the properties of Models.SystemVoipState to extract the state that triggered the notification. Note that the state may have changed further since the notification was generated, and that you may call the GetSystemVoip...() family of functions at any time to get the current state directly.
Signature
static void Oculus.Platform.Voip.SetSystemVoipStateNotificationCallback(Message< Models.SystemVoipState >.Callback callback) Parameters callback: Message< Models.SystemVoipState >.CallbackReturns void |
SetSystemVoipSuppressed
(
suppressed
)
|
Sets whether SystemVoip should be suppressed so that this app's Voip can use the microphone and play incoming Voip audio. Once microphone switching functionality for the user is released, this function will no longer work. You can use Voip.GetMicrophoneAvailability() to see if the user has allowed the app access to the microphone. This returns a Models.SystemVoipState object which contains statuses about whether the microphone is muted or whether passthrough is enabled.
Signature
static Request<Models.SystemVoipState> Oculus.Platform.Voip.SetSystemVoipSuppressed(bool suppressed) Parameters suppressed: bool
A boolean indicates if the voip is supressed or not.
Returns Request< Models.SystemVoipState > |
Start
(
userID
)
|
Attempts to establish a Voip session with the specified user. A message of type Message::MessageType::Notification_Voip_StateChange will be posted when the session is established. This function can be safely called from any thread.
Signature
static void Oculus.Platform.Voip.Start(UInt64 userID) Parameters userID: UInt64Returns void |
Stop
(
userID
)
|
Terminates a Voip session with the specified user. Note that Voip.SetMicrophoneMuted should be used to temporarily stop sending audio; stopping and restarting a Voip session after tearing it down may be an expensive operation. This function can be safely called from any thread.
Signature
static void Oculus.Platform.Voip.Stop(UInt64 userID) Parameters userID: UInt64Returns void |