Class EOS_RTC_Audio_Interface
- All Implemented Interfaces:
com.sun.jna.NativeMapped
- Since:
- 11/1/2023
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddNotifyAudioBeforeRender
(EOS_RTCAudio_AddNotifyAudioBeforeRenderOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnAudioBeforeRenderCallback completionDelegate) Register to receive notifications with remote audio buffers before they are rendered.addNotifyAudioBeforeSend
(EOS_RTCAudio_AddNotifyAudioBeforeSendOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnAudioBeforeSendCallback completionDelegate) Register to receive notifications when local audio buffers are about to be encoded and sent.addNotifyAudioDevicesChanged
(EOS_RTCAudio_AddNotifyAudioDevicesChangedOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnAudioDevicesChangedCallback completionDelegate) Register to receive notifications when an audio device is added or removed to the system.addNotifyAudioInputState
(EOS_RTCAudio_AddNotifyAudioInputStateOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnAudioInputStateCallback completionDelegate) Register to receive notifications when audio input state changed.addNotifyAudioOutputState
(EOS_RTCAudio_AddNotifyAudioOutputStateOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnAudioOutputStateCallback completionDelegate) Register to receive notifications when audio output state changed.addNotifyParticipantUpdated
(EOS_RTCAudio_AddNotifyParticipantUpdatedOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnParticipantUpdatedCallback completionDelegate) Register to receive notifications when a room participant audio status is updated (f.e when speaking flag changes).Fetches an audio input device's information from then given index that are cached locally.Fetches an audio output device's information from then given index that are cached locally.int
Fetch the number of audio input devices available in the system that are cached locally.int
Fetch the number of audio output devices available in the system that are cached locally.void
queryInputDevicesInformation
(EOS_RTCAudio_QueryInputDevicesInformationOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnQueryInputDevicesInformationCallback completionDelegate) Query for a list of audio input devices available in the system together with their specifications.void
queryOutputDevicesInformation
(EOS_RTCAudio_QueryOutputDevicesInformationOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnQueryOutputDevicesInformationCallback completionDelegate) Query for a list of audio output devices available in the system together with their specifications.void
registerPlatformUser
(EOS_RTCAudio_RegisterPlatformUserOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnRegisterPlatformUserCallback completionDelegate) Use this function to inform the audio system of a user.void
removeNotifyAudioBeforeRender
(EOS_NotificationId notificationId) Unregister a previously bound notification handler from receiving remote audio buffers before they are rendered.void
removeNotifyAudioBeforeSend
(EOS_NotificationId notificationId) Unregister a previously bound notification handler from receiving local audio buffers before they are encoded and sent.void
removeNotifyAudioDevicesChanged
(EOS_NotificationId notificationId) Unregister a previously bound notification handler from receiving audio devices notificationsvoid
removeNotifyAudioInputState
(EOS_NotificationId notificationId) Unregister a previously bound notification handler from receiving notifications on audio input state changed.void
removeNotifyAudioOutputState
(EOS_NotificationId notificationId) Unregister a previously bound notification handler from receiving notifications on audio output state changed.void
removeNotifyParticipantUpdated
(EOS_NotificationId notificationId) Unregister a previously bound notification handler from receiving participant updated notificationssendAudio
(EOS_RTCAudio_SendAudioOptions options) Use this function to push a new audio buffer to be sent to the participants of a room.void
setInputDeviceSettings
(EOS_RTCAudio_SetInputDeviceSettingsOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnSetInputDeviceSettingsCallback completionDelegate) Use this function to set audio input device settings, such as the active input device, or platform AEC.void
setOutputDeviceSettings
(EOS_RTCAudio_SetOutputDeviceSettingsOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnSetOutputDeviceSettingsCallback completionDelegate) Use this function to set audio output device settings, such as the active output device.void
unregisterPlatformUser
(EOS_RTCAudio_UnregisterPlatformUserOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnUnregisterPlatformUserCallback completionDelegate) Use this function to remove a user that was added with EOS_RTCAudio_RegisterPlatformUser.void
updateParticipantVolume
(EOS_RTCAudio_UpdateParticipantVolumeOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnUpdateParticipantVolumeCallback completionDelegate) Use this function to change participant audio volume for a room.void
updateReceiving
(EOS_RTCAudio_UpdateReceivingOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnUpdateReceivingCallback completionDelegate) Use this function to tweak incoming audio options for a room.void
updateReceivingVolume
(EOS_RTCAudio_UpdateReceivingVolumeOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnUpdateReceivingVolumeCallback completionDelegate) Use this function to change incoming audio volume for a room.void
updateSending
(EOS_RTCAudio_UpdateSendingOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnUpdateSendingCallback completionDelegate) Use this function to tweak outgoing audio options for a room.void
updateSendingVolume
(EOS_RTCAudio_UpdateSendingVolumeOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnUpdateSendingVolumeCallback completionDelegate) Use this function to change outgoing audio volume for a room.Methods inherited from class com.sun.jna.PointerType
equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative, toString
-
Constructor Details
-
EOS_RTC_Audio_Interface
public EOS_RTC_Audio_Interface(com.sun.jna.Pointer address) -
EOS_RTC_Audio_Interface
public EOS_RTC_Audio_Interface()
-
-
Method Details
-
sendAudio
Use this function to push a new audio buffer to be sent to the participants of a room.This should only be used if Manual Audio Input was enabled locally for the specified room.
- Parameters:
options
- structure containing the parameters for the operation.- Returns:
EOS_EResult.EOS_Success
if the buffer was successfully queued for sending
EOS_EResult.EOS_InvalidParameters
if any of the parameters are incorrect
EOS_EResult.EOS_NotFound
if the specified room was not found
EOS_EResult.EOS_InvalidState
if manual recording was not enabled when joining the room.- See Also:
-
updateSending
public void updateSending(EOS_RTCAudio_UpdateSendingOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnUpdateSendingCallback completionDelegate) Use this function to tweak outgoing audio options for a room.Due to internal implementation details, this function requires that you first register to any notification for room
- Parameters:
options
- structure containing the parameters for the operation.clientData
- Arbitrary data that is passed back in the completionDelegatecompletionDelegate
- The callback to be fired when the operation completes, either successfully or in error
-
updateReceiving
public void updateReceiving(EOS_RTCAudio_UpdateReceivingOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnUpdateReceivingCallback completionDelegate) Use this function to tweak incoming audio options for a room.Due to internal implementation details, this function requires that you first register to any notification for room
- Parameters:
options
- structure containing the parameters for the operation.clientData
- Arbitrary data that is passed back in the completionDelegatecompletionDelegate
- The callback to be fired when the operation completes, either successfully or in error
-
updateSendingVolume
public void updateSendingVolume(EOS_RTCAudio_UpdateSendingVolumeOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnUpdateSendingVolumeCallback completionDelegate) Use this function to change outgoing audio volume for a room.Due to internal implementation details, this function requires that you first register to any notification for room
- Parameters:
options
- structure containing the parameters for the operation.clientData
- Arbitrary data that is passed back in the completionDelegatecompletionDelegate
- The callback to be fired when the operation completes, either successfully or in error
-
updateReceivingVolume
public void updateReceivingVolume(EOS_RTCAudio_UpdateReceivingVolumeOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnUpdateReceivingVolumeCallback completionDelegate) Use this function to change incoming audio volume for a room.Due to internal implementation details, this function requires that you first register to any notification for room
- Parameters:
options
- structure containing the parameters for the operation.clientData
- Arbitrary data that is passed back in the completionDelegatecompletionDelegate
- The callback to be fired when the operation completes, either successfully or on error
-
updateParticipantVolume
public void updateParticipantVolume(EOS_RTCAudio_UpdateParticipantVolumeOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnUpdateParticipantVolumeCallback completionDelegate) Use this function to change participant audio volume for a room.Due to internal implementation details, this function requires that you first register to any notification for room
- Parameters:
options
- structure containing the parameters for the operation.clientData
- Arbitrary data that is passed back in the completionDelegatecompletionDelegate
- The callback to be fired when the operation completes, either successfully or in error
-
addNotifyParticipantUpdated
public EOS_NotificationId addNotifyParticipantUpdated(EOS_RTCAudio_AddNotifyParticipantUpdatedOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnParticipantUpdatedCallback completionDelegate) Register to receive notifications when a room participant audio status is updated (f.e when speaking flag changes).If the returned NotificationId is valid, you must call EOS_RTCAudio_RemoveNotifyParticipantUpdated when you no longer wish to have your completionDelegate called.
- Parameters:
clientData
- Arbitrary data that is passed back in the completionDelegatecompletionDelegate
- The callback to be fired when a presence change occurs- Returns:
- Notification ID representing the registered callback if successful, an invalid NotificationId if not
- See Also:
-
removeNotifyParticipantUpdated
Unregister a previously bound notification handler from receiving participant updated notifications- Parameters:
notificationId
- The Notification ID representing the registered callback
-
addNotifyAudioDevicesChanged
public EOS_NotificationId addNotifyAudioDevicesChanged(EOS_RTCAudio_AddNotifyAudioDevicesChangedOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnAudioDevicesChangedCallback completionDelegate) Register to receive notifications when an audio device is added or removed to the system.If the returned NotificationId is valid, you must call EOS_RTCAudio_RemoveNotifyAudioDevicesChanged when you no longer wish to have your completionDelegate called.
The library will try to use user selected audio device while following these rules:
- if none of the audio devices has been available and connected before - the library will try to use it;
- if user selected device failed for some reason, default device will be used instead (and user selected device will be memorized);
- if user selected a device but it was not used for some reason (and default was used instead), when devices selection is triggered we will try to use user selected device again;
- triggers to change a device: when new audio device appears or disappears - library will try to use previously user selected;
- if for any reason, a device cannot be used - the library will fallback to using default;
- if a configuration of the current audio device has been changed, it will be restarted.
- Parameters:
clientData
- Arbitrary data that is passed back in the completionDelegatecompletionDelegate
- The callback to be fired when an audio device change occurs- Returns:
- Notification ID representing the registered callback if successful, an invalid NotificationId if not
- See Also:
-
removeNotifyAudioDevicesChanged
Unregister a previously bound notification handler from receiving audio devices notifications- Parameters:
notificationId
- The Notification ID representing the registered callback
-
addNotifyAudioInputState
public EOS_NotificationId addNotifyAudioInputState(EOS_RTCAudio_AddNotifyAudioInputStateOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnAudioInputStateCallback completionDelegate) Register to receive notifications when audio input state changed.If the returned NotificationId is valid, you must call EOS_RTCAudio_RemoveNotifyAudioInputState when you no longer wish to have your completionDelegate called.
- Parameters:
clientData
- Arbitrary data that is passed back in the completionDelegatecompletionDelegate
- The callback to be fired when audio input state changes- Returns:
- Notification ID representing the registered callback if successful, an invalid NotificationId if not
- See Also:
-
removeNotifyAudioInputState
Unregister a previously bound notification handler from receiving notifications on audio input state changed.- Parameters:
notificationId
- The Notification ID representing the registered callback
-
addNotifyAudioOutputState
public EOS_NotificationId addNotifyAudioOutputState(EOS_RTCAudio_AddNotifyAudioOutputStateOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnAudioOutputStateCallback completionDelegate) Register to receive notifications when audio output state changed.If the returned NotificationId is valid, you must call EOS_RTCAudio_RemoveNotifyAudioOutputState when you no longer wish to have your completionDelegate called.
- Parameters:
clientData
- Arbitrary data that is passed back in the completionDelegatecompletionDelegate
- The callback to be fired when audio output state changes- Returns:
- Notification ID representing the registered callback if successful, an invalid NotificationId if not
- See Also:
-
removeNotifyAudioOutputState
Unregister a previously bound notification handler from receiving notifications on audio output state changed.- Parameters:
notificationId
- The Notification ID representing the registered callback
-
addNotifyAudioBeforeSend
public EOS_NotificationId addNotifyAudioBeforeSend(EOS_RTCAudio_AddNotifyAudioBeforeSendOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnAudioBeforeSendCallback completionDelegate) Register to receive notifications when local audio buffers are about to be encoded and sent.This gives you access to the audio data about to be sent, allowing for example the implementation of custom filters/effects.
If the returned NotificationId is valid, you must call EOS_RTCAudio_RemoveNotifyAudioBeforeSend when you no longer wish to have your completionDelegate called.
- Parameters:
clientData
- Arbitrary data that is passed back in the completionDelegatecompletionDelegate
- The callback to be fired when a presence change occurs- Returns:
- Notification ID representing the registered callback if successful, an invalid NotificationId if not
- See Also:
-
removeNotifyAudioBeforeSend
Unregister a previously bound notification handler from receiving local audio buffers before they are encoded and sent.- Parameters:
notificationId
- The Notification ID representing the registered callback
-
addNotifyAudioBeforeRender
public EOS_NotificationId addNotifyAudioBeforeRender(EOS_RTCAudio_AddNotifyAudioBeforeRenderOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnAudioBeforeRenderCallback completionDelegate) Register to receive notifications with remote audio buffers before they are rendered.This gives you access to the audio data received, allowing for example the implementation of custom filters/effects.
If the returned NotificationId is valid, you must call EOS_RTCAudio_RemoveNotifyAudioBeforeRender when you no longer wish to have your completionDelegate called.
- Parameters:
clientData
- Arbitrary data that is passed back in the completionDelegatecompletionDelegate
- The callback to be fired when a presence change occurs- Returns:
- Notification ID representing the registered callback if successful, an invalid NotificationId if not
- See Also:
-
removeNotifyAudioBeforeRender
Unregister a previously bound notification handler from receiving remote audio buffers before they are rendered.- Parameters:
notificationId
- The Notification ID representing the registered callback
-
registerPlatformUser
public void registerPlatformUser(EOS_RTCAudio_RegisterPlatformUserOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnRegisterPlatformUserCallback completionDelegate) Use this function to inform the audio system of a user.This function is only necessary for some platforms.
- Parameters:
options
- structure containing the parameters for the operationclientData
- Arbitrary data that is passed back in the completionDelegatecompletionDelegate
- The callback to be fired when the operation completes, either successfully or in error- See Also:
-
unregisterPlatformUser
public void unregisterPlatformUser(EOS_RTCAudio_UnregisterPlatformUserOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnUnregisterPlatformUserCallback completionDelegate) Use this function to remove a user that was added with EOS_RTCAudio_RegisterPlatformUser.This function is only necessary for some platforms.
- Parameters:
options
- structure containing the parameters for the operationclientData
- Arbitrary data that is passed back in the completionDelegatecompletionDelegate
- The callback to be fired when the operation completes, either successfully or in error
-
queryInputDevicesInformation
public void queryInputDevicesInformation(EOS_RTCAudio_QueryInputDevicesInformationOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnQueryInputDevicesInformationCallback completionDelegate) Query for a list of audio input devices available in the system together with their specifications.- Parameters:
options
- structure containing the parameters for the operationclientData
- Arbitrary data that is passed back in the completionDelegatecompletionDelegate
- The callback to be fired when the operation completes, either successfully or in error
-
getInputDevicesCount
Fetch the number of audio input devices available in the system that are cached locally.The returned value should not be cached and should instead be used immediately with the EOS_RTCAudio_CopyInputDeviceInformationByIndex function.
- Parameters:
options
- structure containing the parameters for the operation- Returns:
- The number of audio input devices available in the system or 0 if there is an error
- See Also:
-
copyInputDeviceInformationByIndex
public EOS_RTCAudio_InputDeviceInformation copyInputDeviceInformationByIndex(EOS_RTCAudio_CopyInputDeviceInformationByIndexOptions options) throws EOSException Fetches an audio input device's information from then given index that are cached locally.- Parameters:
options
- structure containing the index being accessed- Returns:
- The audio input device's information for the given index, if it exists and is valid, use EOS_RTCAudio_InputDeviceInformation_Release when finished
- Throws:
EOSInvalidParametersException
- if you pass a null pointer for the out parameterEOSNotFoundException
- if the audio input device's information is not foundEOSException
- See Also:
-
queryOutputDevicesInformation
public void queryOutputDevicesInformation(EOS_RTCAudio_QueryOutputDevicesInformationOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnQueryOutputDevicesInformationCallback completionDelegate) Query for a list of audio output devices available in the system together with their specifications.- Parameters:
options
- structure containing the parameters for the operationclientData
- Arbitrary data that is passed back in the completionDelegatecompletionDelegate
- The callback to be fired when the operation completes, either successfully or in error
-
getOutputDevicesCount
Fetch the number of audio output devices available in the system that are cached locally.The returned value should not be cached and should instead be used immediately with the EOS_RTCAudio_CopyOutputDeviceInformationByIndex function.
- Parameters:
options
- structure containing the parameters for the operation- Returns:
- The number of audio output devices available in the system or 0 if there is an error
- See Also:
-
copyOutputDeviceInformationByIndex
public EOS_RTCAudio_OutputDeviceInformation copyOutputDeviceInformationByIndex(EOS_RTCAudio_CopyOutputDeviceInformationByIndexOptions options) throws EOSException Fetches an audio output device's information from then given index that are cached locally.- Parameters:
options
- structure containing the index being accessed- Returns:
- The audio output device's information for the given index, if it exists and is valid, use EOS_RTCAudio_OutputDeviceInformation_Release when finished
- Throws:
EOSInvalidParametersException
- if you pass a null pointer for the out parameterEOSNotFoundException
- if the audio output device's information is not foundEOSException
- See Also:
-
setInputDeviceSettings
public void setInputDeviceSettings(EOS_RTCAudio_SetInputDeviceSettingsOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnSetInputDeviceSettingsCallback completionDelegate) Use this function to set audio input device settings, such as the active input device, or platform AEC.- Parameters:
options
- structure containing the parameters for the operationclientData
- Arbitrary data that is passed back in the completionDelegatecompletionDelegate
- The callback to be fired when the operation completes, either successfully or in error
-
setOutputDeviceSettings
public void setOutputDeviceSettings(EOS_RTCAudio_SetOutputDeviceSettingsOptions options, com.sun.jna.Pointer clientData, EOS_RTCAudio_OnSetOutputDeviceSettingsCallback completionDelegate) Use this function to set audio output device settings, such as the active output device.- Parameters:
options
- structure containing the parameters for the operationclientData
- Arbitrary data that is passed back in the completionDelegatecompletionDelegate
- The callback to be fired when the operation completes, either successfully or in error
-