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
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 output device.
|
|
/// </summary>
|
|
public struct AudioOutputDeviceInfo
|
|
{
|
|
/// <summary>
|
|
/// True if this is the default audio output 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>
|
|
/// The human readable name of the device
|
|
/// </summary>
|
|
public Utf8String DeviceName { get; set; }
|
|
|
|
internal void Set(ref AudioOutputDeviceInfoInternal other)
|
|
{
|
|
DefaultDevice = other.DefaultDevice;
|
|
DeviceId = other.DeviceId;
|
|
DeviceName = other.DeviceName;
|
|
}
|
|
}
|
|
|
|
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
|
|
internal struct AudioOutputDeviceInfoInternal : IGettable<AudioOutputDeviceInfo>, ISettable<AudioOutputDeviceInfo>, 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 AudioOutputDeviceInfo other)
|
|
{
|
|
m_ApiVersion = RTCAudioInterface.AudiooutputdeviceinfoApiLatest;
|
|
DefaultDevice = other.DefaultDevice;
|
|
DeviceId = other.DeviceId;
|
|
DeviceName = other.DeviceName;
|
|
}
|
|
|
|
public void Set(ref AudioOutputDeviceInfo? other)
|
|
{
|
|
if (other.HasValue)
|
|
{
|
|
m_ApiVersion = RTCAudioInterface.AudiooutputdeviceinfoApiLatest;
|
|
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 AudioOutputDeviceInfo output)
|
|
{
|
|
output = new AudioOutputDeviceInfo();
|
|
output.Set(ref this);
|
|
}
|
|
}
|
|
}
|