public WasApiLayer(string name, WasApiAudioContext parent) : base(name) { _parent = parent; _alive = true; SetDevice(_parent.DefaultDevice); var thread = new Thread(LayerThread); thread.Start(); while (!thread.IsAlive) { } }
public override void Dispose() { _context.OnDefaultDeviceChangedInternal -= SetDevice; _context = null; base.Dispose(); }
public WasApiLayer(WasApiAudioContext context, string name) : base(name) { _context = context; _context.OnDefaultDeviceChangedInternal += SetDevice; SetDevice(context.DefaultDevice); }
/// <inheritdoc /> public override void Dispose() { _alive = false; _playWait.Set(); _parent = null; }