// ------------------------------------------------------------------------------
// <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="IXAudio2EngineCallback"]/*' />
/// <unmanaged>IXAudio2EngineCallback</unmanaged>
public unsafe partial struct IXAudio2EngineCallback : IXAudio2EngineCallback.Interface
{
	public void** lpVtbl;

	/// <include file='../XAudio2.xml' path='doc/member[@name="IXAudio2EngineCallback::OnProcessingPassStart"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(0)]
	public void OnProcessingPassStart()
	{
		((delegate* unmanaged[MemberFunction]<IXAudio2EngineCallback*, void>)(lpVtbl[0]))((IXAudio2EngineCallback*)Unsafe.AsPointer(ref this));
	}

	/// <include file='../XAudio2.xml' path='doc/member[@name="IXAudio2EngineCallback::OnProcessingPassEnd"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(1)]
	public void OnProcessingPassEnd()
	{
		((delegate* unmanaged[MemberFunction]<IXAudio2EngineCallback*, void>)(lpVtbl[1]))((IXAudio2EngineCallback*)Unsafe.AsPointer(ref this));
	}

	/// <include file='../XAudio2.xml' path='doc/member[@name="IXAudio2EngineCallback::OnCriticalError"]/*' />
	[MethodImpl(MethodImplOptions.AggressiveInlining)]
	[VtblIndex(2)]
	public void OnCriticalError(HResult Error)
	{
		((delegate* unmanaged[MemberFunction]<IXAudio2EngineCallback*, HResult, void>)(lpVtbl[2]))((IXAudio2EngineCallback*)Unsafe.AsPointer(ref this), Error);
	}

	public interface Interface 
	{
		[VtblIndex(0)]
		void OnProcessingPassStart();

		[VtblIndex(1)]
		void OnProcessingPassEnd();

		[VtblIndex(2)]
		void OnCriticalError(HResult Error);
	}
}

