Exemplo n.º 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);
        }
Exemplo n.º 2
0
        public void StopRecording()
        {
            StopRecordingInternal();

            if(_recorder == null) return;

            if (_recorder.Encoder != null)
                _recorder.Encoder.Dispose();
            _recorder = null;
        }
Exemplo n.º 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;
        }
Exemplo n.º 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();
        }
Exemplo n.º 5
0
        public void StopRecording()
        {
            StopRecordingInternal();

            if(_recorder == null) return;

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

            OnPropertyChangedExplicit(nameof(IsRecording));
        }