コード例 #1
0
        private void NotifyState()
        {
            var isPlaying = _ipc.GetPlayState().HasFlag(MusicBeeIPC.PlayState.Playing);

            if (isPlaying == _isPlaying)
            {
                return;
            }

            _isPlaying = isPlaying;
            IsPlayingChanged?.Invoke(this, _isPlaying);
        }
コード例 #2
0
        private bool RpChannelIsPlayingInMusicBee(out int matchingChannel)
        {
            if (TryGetPlayedFilePath(out string playedFilePath) &&
                playedFilePath.Contains("radioparadise") &&
                _playerApi.GetPlayState() == MusicBeeIPC.PlayState.Playing)
            {
                matchingChannel = Int32.Parse(
                    _config.State.ChannelList
                    .Where(channel => playedFilePath.Contains(channel.StreamName))
                    .DefaultIfEmpty(_config.State.ChannelList.First())
                    .FirstOrDefault()
                    .Chan
                    );

                return(true);
            }
コード例 #3
0
ファイル: AudioSource.cs プロジェクト: break7533/audio-band
        private void NotifyState()
        {
            var isPlaying = _ipc.GetPlayState().HasFlag(MusicBeeIPC.PlayState.Playing);

            if (isPlaying == _isPlaying)
            {
                return;
            }

            if (isPlaying)
            {
                TrackPlaying?.Invoke(this, EventArgs.Empty);
            }
            else
            {
                TrackPaused?.Invoke(this, EventArgs.Empty);
            }

            _isPlaying = isPlaying;
        }