public void Dispose() { lock (_inputs) { foreach (var input in _inputs) { if (input != null) { input.Dispose(); } } } if (_defaultInput != null) { _defaultInput.Dispose(); } }
public void ReleaseDevice(string devId) { SharedAudioInput input = getInput(devId); if (input != null) { input.ReleaseDevice(); } lock (_inputs) { if (input != _defaultInput) { input.Dispose(); _inputs.Remove(input); } } }