Esempio n. 1
0
 private PlaybackSession(Controller controller, int channels, int sampleRate, bool isPassThrough)
 {
     _controller              = controller;
     _playbackProcessor       = _controller.PlaybackProcessor;
     _playbackBuffer          = new PlaybackBuffer(controller);
     _upDownMixer             = new UpDownMixer(controller);
     _VSTProcessor            = new VSTProcessor(controller);
     _WinAmpDSPProcessor      = new WinAmpDSPProcessor(controller);
     _channels                = channels;
     _sampleRate              = sampleRate;
     _isPassThrough           = isPassThrough;
     _streamWriteProcDelegate = OutputStreamWriteProc;
     _state = SessionState.Reset;
 }
Esempio n. 2
0
 private PlaybackSession(Controller controller, int channels, int sampleRate, bool isPassThrough)
 {
   _controller = controller;
   _playbackProcessor = _controller.PlaybackProcessor;
   _playbackBuffer = new PlaybackBuffer(controller);
   _upDownMixer = new UpDownMixer(controller);
   _VSTProcessor = new VSTProcessor(controller);
   _WinAmpDSPProcessor = new WinAmpDSPProcessor(controller);
   _channels = channels;
   _sampleRate = sampleRate;
   _isPassThrough = isPassThrough;
   _streamWriteProcDelegate = OutputStreamWriteProc;
   _state = SessionState.Reset;
 }
Esempio n. 3
0
    /// <summary>
    /// Initializes a new instance of the BASS player controller.
    /// </summary>
    /// <param name="player">BASS player instance which contains this controller instance.</param>
    /// <param name="playerMainDirectory">Directory where the BASS player is located. Plugins will be searched relative
    /// to this directory.</param>
    public Controller(BassPlayer player, string playerMainDirectory)
    {
      Log.Debug("Initializing BASS controller");
      _player = player;

      _bassLibraryManager = BassLibraryManager.Get(Path.Combine(playerMainDirectory, InternalSettings.PluginsPath));

      _playbackProcessor = new PlaybackProcessor(this);
      _outputDeviceManager = new OutputDeviceManager(this);

      _mainThreadTerminated = false;

      _workItemQueue = new WorkItemQueue();

      _playerThread = new Thread(PlayerThreadMain) {Name = "BassPlay"};
      _playerThread.Start();

      SetVolume_Async(100);
    }