Example #1
0
        //private readonly SpeechAudioFormatInfo _audioFormat = new SpeechAudioFormatInfo(
        //    EncodingFormat.Pcm,
        //    48000,
        //    16,
        //    2,
        //    320 * (1024 / 8),
        //    32,
        //    new byte[0]);
        public SongAnnouncer(IJukebox jukebox, IMediaPlayer mediaPlayer)
        {
            this._jukebox = jukebox;
            this._mediaPlayer = mediaPlayer;

            this._jukebox.SongStarting += _jukebox_SongStarting;
        }
Example #2
0
        public void Dispatch(JukeboxCommand cmd)
        {
            var player = GetCurrentPlayer();

            if (player == null)
            {
                return;
            }

            if (cmd == JukeboxCommand.PlayAfterPaused)
            {
                if (_wasPaused)
                {
                    cmd = JukeboxCommand.Play;
                }
                else
                {
                    return;
                }
            }

            _wasPaused = (cmd == JukeboxCommand.Pause && player.IsPlaying);

            player.PerformAction(cmd);
            _lastJukebox = player;
        }
Example #3
0
        public ClientProxy(dynamic clients, IJukebox jukebox)
        {
            this._clients = clients;
            this._jukebox = jukebox;

            this._jukebox.SongStarted += _mediaServer_SongStarted;
        }
Example #4
0
        public void Dispatch(JukeboxCommand cmd)
        {
            var player = GetCurrentPlayer();

            if (player == null)
                return;

            if (cmd == JukeboxCommand.PlayAfterPaused) {
                if (_wasPaused)
                    cmd = JukeboxCommand.Play;
                else
                    return;
            }

            _wasPaused = (cmd == JukeboxCommand.Pause && player.IsPlaying);

            player.PerformAction(cmd);
            _lastJukebox = player;
        }
Example #5
0
        public MusicHubBot(
            IJukebox jukebox,
            ILibraryRepository libraryRepository, 
            IUserRepository userRepository, 
            IMediaPlayer mediaPlayer,
            ISongRepository songRepository,
            IMetadataService metadataService, 
            IKernel kernel,
            SongSpider spider)
        {
            _jukebox = jukebox;
            _userRepository = userRepository;
            _libraryRepository = libraryRepository;
            _mediaPlayer = mediaPlayer;
            _libraryRepository = libraryRepository;
            _kernel = kernel;
            _spider = spider;

            _jukebox.SongStarted += _jukebox_SongStarted;

            InitializeChatCommandProcessors();
        }
Example #6
0
 public Stop(IJukebox jukebox)
 {
     _jukebox = jukebox;
 }
Example #7
0
 public void Add(IJukebox jukebox)
 {
     _jukeboxes.Add(jukebox);
 }
Example #8
0
 public AddLibrary(IUserRepository userRepository, IJukebox jukebox)
 {
     this._userRepository = userRepository;
     this._jukebox = jukebox;
 }
Example #9
0
 public EventDispatcher(IJukebox[] jukeboxes)
 {
     this.Jukeboxes = jukeboxes;
 }
Example #10
0
 public ListLibraries(IUserRepository userRepository, IJukebox jukebox)
 {
     _jukebox = jukebox;
     _userRepository = userRepository;
 }
Example #11
0
 public Love(IJukebox jukebox, IUserRepository userRepository)
 {
     _jukebox = jukebox;
     _userRepository = userRepository;
 }
Example #12
0
 public DeleteLibrary(IUserRepository userRepository, IJukebox jukebox)
 {
     _jukebox = jukebox;
     _userRepository = userRepository;
 }
Example #13
0
 public Hate(IUserRepository userRepository, IJukebox jukebox)
 {
     _userRepository = userRepository;
     _jukebox = jukebox;
 }
Example #14
0
 public Play(IJukebox jukebox)
 {
     this._jukebox = jukebox;
 }