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.

120 lines
2.7 KiB

// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.RTCAudio
{
/// <summary>
/// This struct is used to get information about a specific input device.
/// </summary>
public struct AudioInputDeviceInfo
{
/// <summary>
/// True if this is the default audio input device in the system.
/// </summary>
public bool DefaultDevice { get; set; }
/// <summary>
/// The persistent unique id of the device.
/// The value can be cached - invalidated only when the audio device pool is changed.
/// <seealso cref="RTCAudioInterface.AddNotifyAudioDevicesChanged" />
/// </summary>
public Utf8String DeviceId { get; set; }
/// <summary>
/// Human-readable name of the device
/// </summary>
public Utf8String DeviceName { get; set; }
internal void Set(ref AudioInputDeviceInfoInternal other)
{
DefaultDevice = other.DefaultDevice;
DeviceId = other.DeviceId;
DeviceName = other.DeviceName;
}
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct AudioInputDeviceInfoInternal : IGettable<AudioInputDeviceInfo>, ISettable<AudioInputDeviceInfo>, System.IDisposable
{
private int m_ApiVersion;
private int m_DefaultDevice;
private System.IntPtr m_DeviceId;
private System.IntPtr m_DeviceName;
public bool DefaultDevice
{
get
{
bool value;
Helper.Get(m_DefaultDevice, out value);
return value;
}
set
{
Helper.Set(value, ref m_DefaultDevice);
}
}
public Utf8String DeviceId
{
get
{
Utf8String value;
Helper.Get(m_DeviceId, out value);
return value;
}
set
{
Helper.Set(value, ref m_DeviceId);
}
}
public Utf8String DeviceName
{
get
{
Utf8String value;
Helper.Get(m_DeviceName, out value);
return value;
}
set
{
Helper.Set(value, ref m_DeviceName);
}
}
public void Set(ref AudioInputDeviceInfo other)
{
m_ApiVersion = RTCAudioInterface.AudioinputdeviceinfoApiLatest;
DefaultDevice = other.DefaultDevice;
DeviceId = other.DeviceId;
DeviceName = other.DeviceName;
}
public void Set(ref AudioInputDeviceInfo? other)
{
if (other.HasValue)
{
m_ApiVersion = RTCAudioInterface.AudioinputdeviceinfoApiLatest;
DefaultDevice = other.Value.DefaultDevice;
DeviceId = other.Value.DeviceId;
DeviceName = other.Value.DeviceName;
}
}
public void Dispose()
{
Helper.Dispose(ref m_DeviceId);
Helper.Dispose(ref m_DeviceName);
}
public void Get(out AudioInputDeviceInfo output)
{
output = new AudioInputDeviceInfo();
output.Set(ref this);
}
}
}