You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
725 lines
32 KiB
725 lines
32 KiB
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
// This file is automatically generated. Changes to this file may be overwritten.
|
|
|
|
namespace Epic.OnlineServices.RTCAudio
|
|
{
|
|
public sealed partial class RTCAudioInterface : Handle
|
|
{
|
|
public RTCAudioInterface()
|
|
{
|
|
}
|
|
|
|
public RTCAudioInterface(System.IntPtr innerHandle) : base(innerHandle)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="AddNotifyAudioBeforeRender" /> API.
|
|
/// </summary>
|
|
public const int AddnotifyaudiobeforerenderApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="AddNotifyAudioBeforeSend" /> API.
|
|
/// </summary>
|
|
public const int AddnotifyaudiobeforesendApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="AddNotifyAudioDevicesChanged" /> API.
|
|
/// </summary>
|
|
public const int AddnotifyaudiodeviceschangedApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="AddNotifyAudioInputState" /> API.
|
|
/// </summary>
|
|
public const int AddnotifyaudioinputstateApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="AddNotifyAudioOutputState" /> API.
|
|
/// </summary>
|
|
public const int AddnotifyaudiooutputstateApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="AddNotifyParticipantUpdated" /> API.
|
|
/// </summary>
|
|
public const int AddnotifyparticipantupdatedApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="AudioBuffer" /> API
|
|
/// </summary>
|
|
public const int AudiobufferApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="AudioInputDeviceInfo" /> struct.
|
|
/// </summary>
|
|
public const int AudioinputdeviceinfoApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="AudioOutputDeviceInfo" /> struct.
|
|
/// </summary>
|
|
public const int AudiooutputdeviceinfoApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="GetAudioInputDeviceByIndex" /> API.
|
|
/// </summary>
|
|
public const int GetaudioinputdevicebyindexApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="GetAudioInputDevicesCount" /> API.
|
|
/// </summary>
|
|
public const int GetaudioinputdevicescountApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="GetAudioOutputDeviceByIndex" /> API.
|
|
/// </summary>
|
|
public const int GetaudiooutputdevicebyindexApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="GetAudioOutputDevicesCount" /> API.
|
|
/// </summary>
|
|
public const int GetaudiooutputdevicescountApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="RegisterPlatformAudioUser" /> API.
|
|
/// </summary>
|
|
public const int RegisterplatformaudiouserApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="SendAudio" /> API.
|
|
/// </summary>
|
|
public const int SendaudioApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="SetAudioInputSettings" /> API.
|
|
/// </summary>
|
|
public const int SetaudioinputsettingsApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="SetAudioOutputSettings" /> API.
|
|
/// </summary>
|
|
public const int SetaudiooutputsettingsApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="UnregisterPlatformAudioUser" /> API.
|
|
/// </summary>
|
|
public const int UnregisterplatformaudiouserApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="UpdateReceiving" /> API.
|
|
/// </summary>
|
|
public const int UpdatereceivingApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="UpdateSending" /> API.
|
|
/// </summary>
|
|
public const int UpdatesendingApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// 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 <see cref="RemoveNotifyAudioBeforeRender" /> when you no longer wish to
|
|
/// have your CompletionDelegate called.
|
|
/// <seealso cref="Common.InvalidNotificationid" />
|
|
/// <seealso cref="RemoveNotifyAudioBeforeRender" />
|
|
/// </summary>
|
|
/// <param name="clientData">Arbitrary data that is passed back in the CompletionDelegate</param>
|
|
/// <param name="completionDelegate">The callback to be fired when a presence change occurs</param>
|
|
/// <returns>
|
|
/// Notification ID representing the registered callback if successful, an invalid NotificationId if not
|
|
/// </returns>
|
|
public ulong AddNotifyAudioBeforeRender(AddNotifyAudioBeforeRenderOptions options, object clientData, OnAudioBeforeRenderCallback completionDelegate)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<AddNotifyAudioBeforeRenderOptionsInternal, AddNotifyAudioBeforeRenderOptions>(ref optionsAddress, options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var completionDelegateInternal = new OnAudioBeforeRenderCallbackInternal(OnAudioBeforeRenderCallbackInternalImplementation);
|
|
Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
|
|
|
|
var funcResult = Bindings.EOS_RTCAudio_AddNotifyAudioBeforeRender(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
Helper.TryAssignNotificationIdToCallback(clientDataAddress, funcResult);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 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 <see cref="RemoveNotifyAudioBeforeSend" /> when you no longer wish to
|
|
/// have your CompletionDelegate called.
|
|
/// <seealso cref="Common.InvalidNotificationid" />
|
|
/// <seealso cref="RemoveNotifyAudioBeforeSend" />
|
|
/// </summary>
|
|
/// <param name="clientData">Arbitrary data that is passed back in the CompletionDelegate</param>
|
|
/// <param name="completionDelegate">The callback to be fired when a presence change occurs</param>
|
|
/// <returns>
|
|
/// Notification ID representing the registered callback if successful, an invalid NotificationId if not
|
|
/// </returns>
|
|
public ulong AddNotifyAudioBeforeSend(AddNotifyAudioBeforeSendOptions options, object clientData, OnAudioBeforeSendCallback completionDelegate)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<AddNotifyAudioBeforeSendOptionsInternal, AddNotifyAudioBeforeSendOptions>(ref optionsAddress, options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var completionDelegateInternal = new OnAudioBeforeSendCallbackInternal(OnAudioBeforeSendCallbackInternalImplementation);
|
|
Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
|
|
|
|
var funcResult = Bindings.EOS_RTCAudio_AddNotifyAudioBeforeSend(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
Helper.TryAssignNotificationIdToCallback(clientDataAddress, funcResult);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Register to receive notifications when an audio device is added or removed to the system.
|
|
///
|
|
/// If the returned NotificationId is valid, you must call <see cref="RemoveNotifyAudioDevicesChanged" /> when you no longer wish
|
|
/// to have your CompletionDelegate called.
|
|
/// <seealso cref="Common.InvalidNotificationid" />
|
|
/// <seealso cref="RemoveNotifyAudioDevicesChanged" />
|
|
/// </summary>
|
|
/// <param name="clientData">Arbitrary data that is passed back in the CompletionDelegate</param>
|
|
/// <param name="completionDelegate">The callback to be fired when an audio device change occurs</param>
|
|
/// <returns>
|
|
/// Notification ID representing the registered callback if successful, an invalid NotificationId if not
|
|
/// </returns>
|
|
public ulong AddNotifyAudioDevicesChanged(AddNotifyAudioDevicesChangedOptions options, object clientData, OnAudioDevicesChangedCallback completionDelegate)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<AddNotifyAudioDevicesChangedOptionsInternal, AddNotifyAudioDevicesChangedOptions>(ref optionsAddress, options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var completionDelegateInternal = new OnAudioDevicesChangedCallbackInternal(OnAudioDevicesChangedCallbackInternalImplementation);
|
|
Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
|
|
|
|
var funcResult = Bindings.EOS_RTCAudio_AddNotifyAudioDevicesChanged(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
Helper.TryAssignNotificationIdToCallback(clientDataAddress, funcResult);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Register to receive notifications when audio input state changed.
|
|
///
|
|
/// If the returned NotificationId is valid, you must call <see cref="RemoveNotifyAudioInputState" /> when you no longer wish to
|
|
/// have your CompletionDelegate called.
|
|
/// <seealso cref="Common.InvalidNotificationid" />
|
|
/// <seealso cref="RemoveNotifyAudioInputState" />
|
|
/// </summary>
|
|
/// <param name="clientData">Arbitrary data that is passed back in the CompletionDelegate</param>
|
|
/// <param name="completionDelegate">The callback to be fired when audio input state changes</param>
|
|
/// <returns>
|
|
/// Notification ID representing the registered callback if successful, an invalid NotificationId if not
|
|
/// </returns>
|
|
public ulong AddNotifyAudioInputState(AddNotifyAudioInputStateOptions options, object clientData, OnAudioInputStateCallback completionDelegate)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<AddNotifyAudioInputStateOptionsInternal, AddNotifyAudioInputStateOptions>(ref optionsAddress, options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var completionDelegateInternal = new OnAudioInputStateCallbackInternal(OnAudioInputStateCallbackInternalImplementation);
|
|
Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
|
|
|
|
var funcResult = Bindings.EOS_RTCAudio_AddNotifyAudioInputState(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
Helper.TryAssignNotificationIdToCallback(clientDataAddress, funcResult);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Register to receive notifications when audio output state changed.
|
|
///
|
|
/// If the returned NotificationId is valid, you must call <see cref="RemoveNotifyAudioOutputState" /> when you no longer wish to
|
|
/// have your CompletionDelegate called.
|
|
/// <seealso cref="Common.InvalidNotificationid" />
|
|
/// <seealso cref="RemoveNotifyAudioOutputState" />
|
|
/// </summary>
|
|
/// <param name="clientData">Arbitrary data that is passed back in the CompletionDelegate</param>
|
|
/// <param name="completionDelegate">The callback to be fired when audio output state changes</param>
|
|
/// <returns>
|
|
/// Notification ID representing the registered callback if successful, an invalid NotificationId if not
|
|
/// </returns>
|
|
public ulong AddNotifyAudioOutputState(AddNotifyAudioOutputStateOptions options, object clientData, OnAudioOutputStateCallback completionDelegate)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<AddNotifyAudioOutputStateOptionsInternal, AddNotifyAudioOutputStateOptions>(ref optionsAddress, options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var completionDelegateInternal = new OnAudioOutputStateCallbackInternal(OnAudioOutputStateCallbackInternalImplementation);
|
|
Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
|
|
|
|
var funcResult = Bindings.EOS_RTCAudio_AddNotifyAudioOutputState(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
Helper.TryAssignNotificationIdToCallback(clientDataAddress, funcResult);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 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 <see cref="RemoveNotifyParticipantUpdated" /> when you no longer wish
|
|
/// to have your CompletionDelegate called.
|
|
/// <seealso cref="Common.InvalidNotificationid" />
|
|
/// <seealso cref="RemoveNotifyParticipantUpdated" />
|
|
/// </summary>
|
|
/// <param name="clientData">Arbitrary data that is passed back in the CompletionDelegate</param>
|
|
/// <param name="completionDelegate">The callback to be fired when a presence change occurs</param>
|
|
/// <returns>
|
|
/// Notification ID representing the registered callback if successful, an invalid NotificationId if not
|
|
/// </returns>
|
|
public ulong AddNotifyParticipantUpdated(AddNotifyParticipantUpdatedOptions options, object clientData, OnParticipantUpdatedCallback completionDelegate)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<AddNotifyParticipantUpdatedOptionsInternal, AddNotifyParticipantUpdatedOptions>(ref optionsAddress, options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var completionDelegateInternal = new OnParticipantUpdatedCallbackInternal(OnParticipantUpdatedCallbackInternalImplementation);
|
|
Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
|
|
|
|
var funcResult = Bindings.EOS_RTCAudio_AddNotifyParticipantUpdated(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
Helper.TryAssignNotificationIdToCallback(clientDataAddress, funcResult);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Fetches an audio input device's info from then given index. The returned value should not be cached and important
|
|
/// information should be copied off of the result object immediately.
|
|
/// <seealso cref="GetAudioInputDevicesCount" />
|
|
/// <seealso cref="AddNotifyAudioDevicesChanged" />
|
|
/// </summary>
|
|
/// <param name="options">structure containing the index being accessed</param>
|
|
/// <returns>
|
|
/// A pointer to the device information, or NULL on error. You should NOT keep hold of this pointer.
|
|
/// </returns>
|
|
public AudioInputDeviceInfo GetAudioInputDeviceByIndex(GetAudioInputDeviceByIndexOptions options)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<GetAudioInputDeviceByIndexOptionsInternal, GetAudioInputDeviceByIndexOptions>(ref optionsAddress, options);
|
|
|
|
var funcResult = Bindings.EOS_RTCAudio_GetAudioInputDeviceByIndex(InnerHandle, optionsAddress);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
AudioInputDeviceInfo funcResultReturn;
|
|
Helper.TryMarshalGet<AudioInputDeviceInfoInternal, AudioInputDeviceInfo>(funcResult, out funcResultReturn);
|
|
return funcResultReturn;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Returns the number of audio input devices available in the system.
|
|
///
|
|
/// The returned value should not be cached and should instead be used immediately with the <see cref="GetAudioInputDeviceByIndex" />
|
|
/// function.
|
|
/// <seealso cref="GetAudioInputDeviceByIndex" />
|
|
/// <seealso cref="AddNotifyAudioDevicesChanged" />
|
|
/// </summary>
|
|
/// <param name="options">structure containing the parameters for the operation</param>
|
|
/// <returns>
|
|
/// The number of audio input devices
|
|
/// </returns>
|
|
public uint GetAudioInputDevicesCount(GetAudioInputDevicesCountOptions options)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<GetAudioInputDevicesCountOptionsInternal, GetAudioInputDevicesCountOptions>(ref optionsAddress, options);
|
|
|
|
var funcResult = Bindings.EOS_RTCAudio_GetAudioInputDevicesCount(InnerHandle, optionsAddress);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Fetches an audio output device's info from then given index.
|
|
///
|
|
/// The returned value should not be cached and important information should be copied off of the result object immediately.
|
|
/// <seealso cref="GetAudioOutputDevicesCount" />
|
|
/// <seealso cref="AddNotifyAudioDevicesChanged" />
|
|
/// </summary>
|
|
/// <param name="options">structure containing the index being accessed</param>
|
|
/// <returns>
|
|
/// A pointer to the device information, or NULL on error. You should NOT keep hold of this pointer.
|
|
/// </returns>
|
|
public AudioOutputDeviceInfo GetAudioOutputDeviceByIndex(GetAudioOutputDeviceByIndexOptions options)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<GetAudioOutputDeviceByIndexOptionsInternal, GetAudioOutputDeviceByIndexOptions>(ref optionsAddress, options);
|
|
|
|
var funcResult = Bindings.EOS_RTCAudio_GetAudioOutputDeviceByIndex(InnerHandle, optionsAddress);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
AudioOutputDeviceInfo funcResultReturn;
|
|
Helper.TryMarshalGet<AudioOutputDeviceInfoInternal, AudioOutputDeviceInfo>(funcResult, out funcResultReturn);
|
|
return funcResultReturn;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Returns the number of audio output devices available in the system.
|
|
///
|
|
/// The returned value should not be cached and should instead be used immediately with the <see cref="GetAudioOutputDeviceByIndex" />
|
|
/// function.
|
|
/// <seealso cref="GetAudioOutputDeviceByIndex" />
|
|
/// <seealso cref="AddNotifyAudioDevicesChanged" />
|
|
/// </summary>
|
|
/// <param name="options">structure containing the parameters for the operation</param>
|
|
/// <returns>
|
|
/// The number of audio output devices
|
|
/// </returns>
|
|
public uint GetAudioOutputDevicesCount(GetAudioOutputDevicesCountOptions options)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<GetAudioOutputDevicesCountOptionsInternal, GetAudioOutputDevicesCountOptions>(ref optionsAddress, options);
|
|
|
|
var funcResult = Bindings.EOS_RTCAudio_GetAudioOutputDevicesCount(InnerHandle, optionsAddress);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Use this function to inform the audio system of a user.
|
|
///
|
|
/// This function is only necessary for some platforms.
|
|
/// </summary>
|
|
/// <param name="options">structure containing the parameters for the operation.</param>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> if the user was successfully registered, <see cref="Result.UnexpectedError" /> otherwise.
|
|
/// </returns>
|
|
public Result RegisterPlatformAudioUser(RegisterPlatformAudioUserOptions options)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<RegisterPlatformAudioUserOptionsInternal, RegisterPlatformAudioUserOptions>(ref optionsAddress, options);
|
|
|
|
var funcResult = Bindings.EOS_RTCAudio_RegisterPlatformAudioUser(InnerHandle, optionsAddress);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Unregister a previously bound notification handler from receiving remote audio buffers before they are rendered.
|
|
/// </summary>
|
|
/// <param name="notificationId">The Notification ID representing the registered callback</param>
|
|
public void RemoveNotifyAudioBeforeRender(ulong notificationId)
|
|
{
|
|
Helper.TryRemoveCallbackByNotificationId(notificationId);
|
|
|
|
Bindings.EOS_RTCAudio_RemoveNotifyAudioBeforeRender(InnerHandle, notificationId);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Unregister a previously bound notification handler from receiving local audio buffers before they are encoded and sent.
|
|
/// </summary>
|
|
/// <param name="notificationId">The Notification ID representing the registered callback</param>
|
|
public void RemoveNotifyAudioBeforeSend(ulong notificationId)
|
|
{
|
|
Helper.TryRemoveCallbackByNotificationId(notificationId);
|
|
|
|
Bindings.EOS_RTCAudio_RemoveNotifyAudioBeforeSend(InnerHandle, notificationId);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Unregister a previously bound notification handler from receiving audio devices notifications
|
|
/// </summary>
|
|
/// <param name="notificationId">The Notification ID representing the registered callback</param>
|
|
public void RemoveNotifyAudioDevicesChanged(ulong notificationId)
|
|
{
|
|
Helper.TryRemoveCallbackByNotificationId(notificationId);
|
|
|
|
Bindings.EOS_RTCAudio_RemoveNotifyAudioDevicesChanged(InnerHandle, notificationId);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Unregister a previously bound notification handler from receiving notifications on audio input state changed.
|
|
/// </summary>
|
|
/// <param name="notificationId">The Notification ID representing the registered callback</param>
|
|
public void RemoveNotifyAudioInputState(ulong notificationId)
|
|
{
|
|
Helper.TryRemoveCallbackByNotificationId(notificationId);
|
|
|
|
Bindings.EOS_RTCAudio_RemoveNotifyAudioInputState(InnerHandle, notificationId);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Unregister a previously bound notification handler from receiving notifications on audio output state changed.
|
|
/// </summary>
|
|
/// <param name="notificationId">The Notification ID representing the registered callback</param>
|
|
public void RemoveNotifyAudioOutputState(ulong notificationId)
|
|
{
|
|
Helper.TryRemoveCallbackByNotificationId(notificationId);
|
|
|
|
Bindings.EOS_RTCAudio_RemoveNotifyAudioOutputState(InnerHandle, notificationId);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Unregister a previously bound notification handler from receiving participant updated notifications
|
|
/// </summary>
|
|
/// <param name="notificationId">The Notification ID representing the registered callback</param>
|
|
public void RemoveNotifyParticipantUpdated(ulong notificationId)
|
|
{
|
|
Helper.TryRemoveCallbackByNotificationId(notificationId);
|
|
|
|
Bindings.EOS_RTCAudio_RemoveNotifyParticipantUpdated(InnerHandle, notificationId);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 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.
|
|
/// <seealso cref="RTC.JoinRoomOptions" />
|
|
/// <seealso cref="Lobby.LocalRTCOptions" />
|
|
/// </summary>
|
|
/// <param name="options">structure containing the parameters for the operation.</param>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> if the buffer was successfully queued for sending
|
|
/// <see cref="Result.InvalidParameters" /> if any of the parameters are incorrect
|
|
/// <see cref="Result.NotFound" /> if the specified room was not found
|
|
/// <see cref="Result.InvalidState" /> if manual recording was not enabled when joining the room.
|
|
/// </returns>
|
|
public Result SendAudio(SendAudioOptions options)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<SendAudioOptionsInternal, SendAudioOptions>(ref optionsAddress, options);
|
|
|
|
var funcResult = Bindings.EOS_RTCAudio_SendAudio(InnerHandle, optionsAddress);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Use this function to set audio input settings, such as the active input device, volume, or platform AEC.
|
|
/// </summary>
|
|
/// <param name="options">structure containing the parameters for the operation.</param>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> if the setting was successful
|
|
/// <see cref="Result.InvalidParameters" /> if any of the parameters are incorrect
|
|
/// </returns>
|
|
public Result SetAudioInputSettings(SetAudioInputSettingsOptions options)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<SetAudioInputSettingsOptionsInternal, SetAudioInputSettingsOptions>(ref optionsAddress, options);
|
|
|
|
var funcResult = Bindings.EOS_RTCAudio_SetAudioInputSettings(InnerHandle, optionsAddress);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Use this function to set audio output settings, such as the active output device or volume.
|
|
/// </summary>
|
|
/// <param name="options">structure containing the parameters for the operation.</param>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> if the setting was successful
|
|
/// <see cref="Result.InvalidParameters" /> if any of the parameters are incorrect
|
|
/// </returns>
|
|
public Result SetAudioOutputSettings(SetAudioOutputSettingsOptions options)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<SetAudioOutputSettingsOptionsInternal, SetAudioOutputSettingsOptions>(ref optionsAddress, options);
|
|
|
|
var funcResult = Bindings.EOS_RTCAudio_SetAudioOutputSettings(InnerHandle, optionsAddress);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Use this function to remove a user that was added with <see cref="RegisterPlatformAudioUser" />.
|
|
/// </summary>
|
|
/// <param name="options">structure containing the parameters for the operation.</param>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> if the user was successfully unregistered, <see cref="Result.UnexpectedError" /> otherwise.
|
|
/// </returns>
|
|
public Result UnregisterPlatformAudioUser(UnregisterPlatformAudioUserOptions options)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<UnregisterPlatformAudioUserOptionsInternal, UnregisterPlatformAudioUserOptions>(ref optionsAddress, options);
|
|
|
|
var funcResult = Bindings.EOS_RTCAudio_UnregisterPlatformAudioUser(InnerHandle, optionsAddress);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Use this function to tweak incoming audio options per room.
|
|
///
|
|
/// @note Due to internal implementation details, this function requires that you first register to any notification for room
|
|
/// </summary>
|
|
/// <param name="options">structure containing the parameters for the operation.</param>
|
|
/// <param name="clientData">Arbitrary data that is passed back in the CompletionDelegate</param>
|
|
/// <param name="completionDelegate">The callback to be fired when the operation completes, either successfully or in error</param>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> if the operation succeeded
|
|
/// <see cref="Result.InvalidParameters" /> if any of the parameters are incorrect
|
|
/// <see cref="Result.NotFound" /> if either the local user or specified participant are not in the room
|
|
/// </returns>
|
|
public void UpdateReceiving(UpdateReceivingOptions options, object clientData, OnUpdateReceivingCallback completionDelegate)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<UpdateReceivingOptionsInternal, UpdateReceivingOptions>(ref optionsAddress, options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var completionDelegateInternal = new OnUpdateReceivingCallbackInternal(OnUpdateReceivingCallbackInternalImplementation);
|
|
Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
|
|
|
|
Bindings.EOS_RTCAudio_UpdateReceiving(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Use this function to tweak outgoing audio options per room.
|
|
///
|
|
/// @note Due to internal implementation details, this function requires that you first register to any notification for room
|
|
/// </summary>
|
|
/// <param name="options">structure containing the parameters for the operation.</param>
|
|
/// <param name="clientData">Arbitrary data that is passed back in the CompletionDelegate</param>
|
|
/// <param name="completionDelegate">The callback to be fired when the operation completes, either successfully or in error</param>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> if the operation succeeded
|
|
/// <see cref="Result.InvalidParameters" /> if any of the parameters are incorrect
|
|
/// <see cref="Result.NotFound" /> if the local user is not in the room
|
|
/// </returns>
|
|
public void UpdateSending(UpdateSendingOptions options, object clientData, OnUpdateSendingCallback completionDelegate)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<UpdateSendingOptionsInternal, UpdateSendingOptions>(ref optionsAddress, options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var completionDelegateInternal = new OnUpdateSendingCallbackInternal(OnUpdateSendingCallbackInternalImplementation);
|
|
Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
|
|
|
|
Bindings.EOS_RTCAudio_UpdateSending(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnAudioBeforeRenderCallbackInternal))]
|
|
internal static void OnAudioBeforeRenderCallbackInternalImplementation(System.IntPtr data)
|
|
{
|
|
OnAudioBeforeRenderCallback callback;
|
|
AudioBeforeRenderCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback<OnAudioBeforeRenderCallback, AudioBeforeRenderCallbackInfoInternal, AudioBeforeRenderCallbackInfo>(data, out callback, out callbackInfo))
|
|
{
|
|
callback(callbackInfo);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnAudioBeforeSendCallbackInternal))]
|
|
internal static void OnAudioBeforeSendCallbackInternalImplementation(System.IntPtr data)
|
|
{
|
|
OnAudioBeforeSendCallback callback;
|
|
AudioBeforeSendCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback<OnAudioBeforeSendCallback, AudioBeforeSendCallbackInfoInternal, AudioBeforeSendCallbackInfo>(data, out callback, out callbackInfo))
|
|
{
|
|
callback(callbackInfo);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnAudioDevicesChangedCallbackInternal))]
|
|
internal static void OnAudioDevicesChangedCallbackInternalImplementation(System.IntPtr data)
|
|
{
|
|
OnAudioDevicesChangedCallback callback;
|
|
AudioDevicesChangedCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback<OnAudioDevicesChangedCallback, AudioDevicesChangedCallbackInfoInternal, AudioDevicesChangedCallbackInfo>(data, out callback, out callbackInfo))
|
|
{
|
|
callback(callbackInfo);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnAudioInputStateCallbackInternal))]
|
|
internal static void OnAudioInputStateCallbackInternalImplementation(System.IntPtr data)
|
|
{
|
|
OnAudioInputStateCallback callback;
|
|
AudioInputStateCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback<OnAudioInputStateCallback, AudioInputStateCallbackInfoInternal, AudioInputStateCallbackInfo>(data, out callback, out callbackInfo))
|
|
{
|
|
callback(callbackInfo);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnAudioOutputStateCallbackInternal))]
|
|
internal static void OnAudioOutputStateCallbackInternalImplementation(System.IntPtr data)
|
|
{
|
|
OnAudioOutputStateCallback callback;
|
|
AudioOutputStateCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback<OnAudioOutputStateCallback, AudioOutputStateCallbackInfoInternal, AudioOutputStateCallbackInfo>(data, out callback, out callbackInfo))
|
|
{
|
|
callback(callbackInfo);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnParticipantUpdatedCallbackInternal))]
|
|
internal static void OnParticipantUpdatedCallbackInternalImplementation(System.IntPtr data)
|
|
{
|
|
OnParticipantUpdatedCallback callback;
|
|
ParticipantUpdatedCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback<OnParticipantUpdatedCallback, ParticipantUpdatedCallbackInfoInternal, ParticipantUpdatedCallbackInfo>(data, out callback, out callbackInfo))
|
|
{
|
|
callback(callbackInfo);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnUpdateReceivingCallbackInternal))]
|
|
internal static void OnUpdateReceivingCallbackInternalImplementation(System.IntPtr data)
|
|
{
|
|
OnUpdateReceivingCallback callback;
|
|
UpdateReceivingCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback<OnUpdateReceivingCallback, UpdateReceivingCallbackInfoInternal, UpdateReceivingCallbackInfo>(data, out callback, out callbackInfo))
|
|
{
|
|
callback(callbackInfo);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnUpdateSendingCallbackInternal))]
|
|
internal static void OnUpdateSendingCallbackInternalImplementation(System.IntPtr data)
|
|
{
|
|
OnUpdateSendingCallback callback;
|
|
UpdateSendingCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback<OnUpdateSendingCallback, UpdateSendingCallbackInfoInternal, UpdateSendingCallbackInfo>(data, out callback, out callbackInfo))
|
|
{
|
|
callback(callbackInfo);
|
|
}
|
|
}
|
|
}
|
|
}
|