#pragma warning disable CS0649 // Field is never assigned to
using System.Runtime.InteropServices;
namespace Whisper.Internal
{
/// Identifiers for an audio capture device
public struct sCaptureDevice
{
readonly IntPtr m_displayName;
/// The display name is suitable for showing to the user, but might not be unique.
public string? displayName => Marshal.PtrToStringUni( m_displayName );
readonly IntPtr m_endpoint;
/// Endpoint ID for an audio capture device.
/// It uniquely identifies the device on the system, but is not a readable string.
public string? endpoint => Marshal.PtrToStringUni( m_endpoint );
}
/// Function pointer to consume a list of audio capture device IDs
[UnmanagedFunctionPointer( CallingConvention.StdCall )]
public delegate int pfnFoundCaptureDevices( int len, [In, MarshalAs( UnmanagedType.LPArray, SizeParamIndex = 0 )] sCaptureDevice[]? arr, IntPtr pv );
}