/// <summary> /// Initializes a new instance of the <see cref="AudioProcessorParamNative<T>" /> class. /// </summary> /// <param name="device">The device.</param> protected AudioProcessorParamNative(SharpDX.XAudio2.XAudio2 device) : base(IntPtr.Zero) { if (device == null) { throw new ArgumentNullException("device"); } this.device = device; }
protected virtual void Dispose(bool disposing) { if (!_disposed) { Stop(); _masteringVoice.Dispose(); _masteringVoice = null; _xaudio2.Dispose(); _xaudio2 = null; } _disposed = true; }
public XAudio2Out() { _xaudio2 = XAudio2.XAudio2.CreateXAudio2(); _masteringVoice = _xaudio2.CreateMasteringVoice(); }