Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AudioProcessorParamNative&lt;T&gt;" /> 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;
 }
Пример #2
0
 protected virtual void Dispose(bool disposing)
 {
     if (!_disposed)
     {
         Stop();
         _masteringVoice.Dispose();
         _masteringVoice = null;
         _xaudio2.Dispose();
         _xaudio2 = null;
     }
     _disposed = true;
 }
Пример #3
0
 public XAudio2Out()
 {
     _xaudio2        = XAudio2.XAudio2.CreateXAudio2();
     _masteringVoice = _xaudio2.CreateMasteringVoice();
 }