Пример #1
0
        private void InitRecorder([CanBeNull] CommonProfile profile)
        {
            if (_currentChannel == null) return;

            if(profile == _currentProfile && _recorder != null) return;

            if(_recorder == null)
                _recorder = new Recorder();

            _recorder.Encoder = _encoderProvider.CreateEncoder(profile, _currentChannel);
        }
Пример #2
0
        public void StopRecording()
        {
            StopRecordingInternal();

            if(_recorder == null) return;

            if (_recorder.Encoder != null)
                _recorder.Encoder.Dispose();
            _recorder = null;
        }
Пример #3
0
        private void InitRecorder([NotNull] CommonProfile profile)
        {
            if (_currentChannel == null) return;

            if(profile == _currentProfile && _recorder != null) return;

            if(_recorder == null)
                _recorder = new Recorder();

            var encoder = _encoderProvider.CreateEncoder(profile, _internalPlayerStream);

            _recorder.Encoder = encoder as AudioEncoder;
        }
Пример #4
0
        public void Deactivate()
        {
            if(_currentChannel == null) return;

            _currentChannel.Dispose();

            _bassEngine = null;
            if(_playbackEngine != null)
                _playbackEngine.Free();
            if(_recorder != null)
                _recorder.Dispose();

            _nextChannel = null;
            _currentChannel = null;
            _plugins = null;
            _recorder = null;

            BassManager.Free();
        }
Пример #5
0
        public void StopRecording()
        {
            StopRecordingInternal();

            if(_recorder == null) return;

            _recorder.Encoder?.Dispose();
            _recorder = null;

            OnPropertyChangedExplicit(nameof(IsRecording));
        }