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

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

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

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

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

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

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

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

	public interface Interface 
	{
		[VtblIndex(0)]
		void OnVoiceProcessingPassStart(uint BytesRequired);

		[VtblIndex(1)]
		void OnVoiceProcessingPassEnd();

		[VtblIndex(2)]
		void OnStreamEnd();

		[VtblIndex(3)]
		void OnBufferStart(void* pBufferContext);

		[VtblIndex(4)]
		void OnBufferEnd(void* pBufferContext);

		[VtblIndex(5)]
		void OnLoopEnd(void* pBufferContext);

		[VtblIndex(6)]
		void OnVoiceError(void* pBufferContext, HResult Error);
	}
}

