using System; using System.Runtime.InteropServices; namespace SharpDX.XAPO.Fx { /// /// Functions /// /// static partial class XAPOFx { #if WINDOWS_UWP /// ///

Creates an instance of the requested XAPOFX effect.

///
/// No documentation. /// No documentation. /// No documentation. /// No documentation. ///

If this function succeeds, it returns . Otherwise, it returns an error code.

/// ///

The created XAPO will have a reference count of 1. Client code must call IUnknown::Release after passing the XAPO to XAudio2 to allow XAudio2 to dispose of the XAPO when it is no longer needed. Use or to pass an XAPO to XAudio2.

Note??The DirectX SDK version of this function doesn't have the pInitData or InitDataByteSize parameters as it only takes the first 2 parameters. To set initial parameters for the XAPOFX effect that is created with the DirectX SDK version of this function, you must bind that effect to a voice and use . /// For info about how to do this, see How to: Use XAPOFX in XAudio2.

///
/// /// hh405044 /// HRESULT CreateFX([In] const GUID& clsid,[Out, Fast] IUnknown** pEffect,[In, Buffer, Optional] const void* pInitData,[In] unsigned int InitDataByteSize) /// CreateFX public static void CreateFX29(System.Guid clsid, SharpDX.ComObject effectRef, System.IntPtr initDataRef, int initDataByteSize) { unsafe { IntPtr effectRef_ = IntPtr.Zero; SharpDX.Result __result__; __result__= CreateFX_29(&clsid, &effectRef_, (void*)initDataRef, initDataByteSize); ((SharpDX.ComObject)effectRef).NativePointer = effectRef_; __result__.CheckError(); } } [DllImport("xaudio2_9.dll", EntryPoint = "CreateFX", CallingConvention = CallingConvention.Cdecl)] private unsafe static extern int CreateFX_29(void* arg0,void* arg1,void* arg2,int arg3); #endif public static void CreateFX28(System.Guid clsid, SharpDX.ComObject effectRef, System.IntPtr initDataRef, int initDataByteSize) { unsafe { IntPtr effectRef_ = IntPtr.Zero; SharpDX.Result __result__; __result__ = CreateFX_28(&clsid, &effectRef_, (void*)initDataRef, initDataByteSize); ((SharpDX.ComObject)effectRef).NativePointer = effectRef_; __result__.CheckError(); } } [DllImport("xaudio2_8.dll", EntryPoint = "CreateFX", CallingConvention = CallingConvention.Cdecl)] private unsafe static extern int CreateFX_28(void* arg0, void* arg1, void* arg2, int arg3); } }