// ------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

namespace Win32.Media.Audio.XAudio2;

/// <include file='../XAudio2.xml' path='doc/member[@name="IXAPOHrtfParameters"]/*' />
/// <unmanaged>IXAPOHrtfParameters</unmanaged>
[Guid("15b3cd66-e9de-4464-b6e6-2bc3cf63d455")]
[NativeTypeName("struct IXAPOHrtfParameters : IUnknown")]
[NativeInheritance("IUnknown")]
public unsafe partial struct IXAPOHrtfParameters : IXAPOHrtfParameters.Interface, INativeGuid
{
	public static ref readonly Guid IID_IXAPOHrtfParameters
	{
		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		get
		{
			ReadOnlySpan<byte> data = new byte[] {
				0x66, 0xCD, 0xB3, 0x15,
				0xDE, 0xE9,
				0x64, 0x44,
				0xB6,
				0xE6,
				0x2B,
				0xC3,
				0xCF,
				0x63,
				0xD4,
				0x55
			};

			Debug.Assert(data.Length == Unsafe.SizeOf<Guid>());
			return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
		}
	}

	static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IXAPOHrtfParameters));

	public void** lpVtbl;

	/// <inheritdoc cref="IUnknown.QueryInterface" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(0)]
	public HResult QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject)
	{
		return ((delegate* unmanaged[MemberFunction]<IXAPOHrtfParameters*, Guid*, void**, int>)(lpVtbl[0]))((IXAPOHrtfParameters*)Unsafe.AsPointer(ref this), riid, ppvObject);
	}

	/// <inheritdoc cref="IUnknown.AddRef" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(1)]
	[return: NativeTypeName("ULONG")]
	public uint AddRef()
	{
		return ((delegate* unmanaged[MemberFunction]<IXAPOHrtfParameters*, uint>)(lpVtbl[1]))((IXAPOHrtfParameters*)Unsafe.AsPointer(ref this));
	}

	/// <inheritdoc cref="IUnknown.Release" />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(2)]
	[return: NativeTypeName("ULONG")]
	public uint Release()
	{
		return ((delegate* unmanaged[MemberFunction]<IXAPOHrtfParameters*, uint>)(lpVtbl[2]))((IXAPOHrtfParameters*)Unsafe.AsPointer(ref this));
	}

	/// <include file='../XAudio2.xml' path='doc/member[@name="IXAPOHrtfParameters::SetSourcePosition"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(3)]
	public HResult SetSourcePosition(HrtfPosition* position)
	{
		return ((delegate* unmanaged[MemberFunction]<IXAPOHrtfParameters*, HrtfPosition*, int>)(lpVtbl[3]))((IXAPOHrtfParameters*)Unsafe.AsPointer(ref this), position);
	}

	/// <include file='../XAudio2.xml' path='doc/member[@name="IXAPOHrtfParameters::SetSourceOrientation"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(4)]
	public HResult SetSourceOrientation(HrtfOrientation* orientation)
	{
		return ((delegate* unmanaged[MemberFunction]<IXAPOHrtfParameters*, HrtfOrientation*, int>)(lpVtbl[4]))((IXAPOHrtfParameters*)Unsafe.AsPointer(ref this), orientation);
	}

	/// <include file='../XAudio2.xml' path='doc/member[@name="IXAPOHrtfParameters::SetSourceGain"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(5)]
	public HResult SetSourceGain(float gain)
	{
		return ((delegate* unmanaged[MemberFunction]<IXAPOHrtfParameters*, float, int>)(lpVtbl[5]))((IXAPOHrtfParameters*)Unsafe.AsPointer(ref this), gain);
	}

	/// <include file='../XAudio2.xml' path='doc/member[@name="IXAPOHrtfParameters::SetEnvironment"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(6)]
	public HResult SetEnvironment(HrtfEnvironment environment)
	{
		return ((delegate* unmanaged[MemberFunction]<IXAPOHrtfParameters*, HrtfEnvironment, int>)(lpVtbl[6]))((IXAPOHrtfParameters*)Unsafe.AsPointer(ref this), environment);
	}

	public interface Interface : IUnknown.Interface
	{
		[VtblIndex(3)]
		HResult SetSourcePosition(HrtfPosition* position);

		[VtblIndex(4)]
		HResult SetSourceOrientation(HrtfOrientation* orientation);

		[VtblIndex(5)]
		HResult SetSourceGain(float gain);

		[VtblIndex(6)]
		HResult SetEnvironment(HrtfEnvironment environment);
	}
}

