public HRESULT CreateSourceVoice( IXAudio2SourceVoice **ppSourceVoice, WAVEFORMATEX *pSourceFormat, uint Flags = 0, float MaxFrequencyRatio = XAudio2Constants.XAUDIO2_DEFAULT_FREQ_RATIO, IXAudio2VoiceCallback *pCallback = null, XAUDIO2_VOICE_SENDS *pSendList = null, XAUDIO2_EFFECT_CHAIN *pEffectChain = null ) => ((delegate * unmanaged[Stdcall] < void *, IXAudio2SourceVoice **, WAVEFORMATEX *, uint, float, IXAudio2VoiceCallback *, XAUDIO2_VOICE_SENDS *, XAUDIO2_EFFECT_CHAIN *, HRESULT >)_vtbl[5])(Unsafe.AsPointer(ref this), ppSourceVoice, pSourceFormat, Flags, MaxFrequencyRatio, pCallback, pSendList, pEffectChain);
public SourceVoice(ComPtr <IXAudio2> xAudio2, WAVEFORMATEX format) { _callback = IXAudio2VoiceCallback.Create(this); fixed(IXAudio2SourceVoice **ppVoice = &_voice) { Common.CheckAndThrow(xAudio2.Get()->CreateSourceVoice(ppVoice, &format, pCallback: _callback), nameof(IXAudio2.CreateSourceVoice)); } _voice->SetVolume(0.1f); }
public HRESULT CreateSourceVoice(IXAudio2SourceVoice **ppSourceVoice, [NativeTypeName("const WAVEFORMATEX *")] WAVEFORMATEX *pSourceFormat, [NativeTypeName("UINT32")] uint Flags = 0, float MaxFrequencyRatio = 2.0f, IXAudio2VoiceCallback *pCallback = null, [NativeTypeName("const XAUDIO2_VOICE_SENDS *")] XAUDIO2_VOICE_SENDS *pSendList = null, [NativeTypeName("const XAUDIO2_EFFECT_CHAIN *")] XAUDIO2_EFFECT_CHAIN *pEffectChain = null) { return(((delegate * unmanaged <IXAudio2 *, IXAudio2SourceVoice **, WAVEFORMATEX *, uint, float, IXAudio2VoiceCallback *, XAUDIO2_VOICE_SENDS *, XAUDIO2_EFFECT_CHAIN *, int>)(lpVtbl[5]))((IXAudio2 *)Unsafe.AsPointer(ref this), ppSourceVoice, pSourceFormat, Flags, MaxFrequencyRatio, pCallback, pSendList, pEffectChain)); }