private unsafe IXAudio2MasteringVoice CreateMasteringVoice27(int inputChannels, int inputSampleRate, int flags, int deviceIndex, EffectChain?effectChainRef) { var nativePtr = IntPtr.Zero; EffectChain effectChain; if (effectChainRef.HasValue) { effectChain = effectChainRef.Value; } Result result = LocalInterop.CalliCreateMasteringVoice(_nativePointer, (void *)&nativePtr, inputChannels, inputSampleRate, flags, deviceIndex, effectChainRef.HasValue ? ((void *)(&effectChain)) : ((void *)IntPtr.Zero), *(*(void ***)_nativePointer + 10)); result.CheckError(); return(new IXAudio2MasteringVoice(nativePtr)); }
private unsafe void Initialize(int flags, ProcessorSpecifier xAudio2Processor) { var result = (Result)LocalInterop.CalliInitialize(_nativePointer, (int)flags, (int)xAudio2Processor, *(*(void ***)_nativePointer + 5)); result.CheckError(); }