コード例 #1
0
        public void changeSettings(bool autoDJ, bool equaliser, bool shuffle, RepeatMode repeat)
        {
            bool       autoDJMusicbee    = mbApiInterface_.Player_GetAutoDjEnabled();
            bool       equaliserMusicbee = mbApiInterface_.Player_GetEqualiserEnabled();
            RepeatMode repeatMusicbee    = mbApiInterface_.Player_GetRepeat();
            bool       shuffleMusicbee   = mbApiInterface_.Player_GetShuffle();

            if (autoDJ && autoDJMusicbee != autoDJ)
            {
                mbApiInterface_.Player_StartAutoDj();
            }
            else if (autoDJMusicbee != autoDJ)
            {
                mbApiInterface_.Player_SetShuffle(true);
                mbApiInterface_.Player_SetShuffle(false);
            }

            if (equaliserMusicbee != equaliser)
            {
                mbApiInterface_.Player_SetEqualiserEnabled(equaliser);
            }

            if (repeat != repeatMusicbee)
            {
                mbApiInterface_.Player_SetRepeat(repeat);
            }

            if (shuffle != shuffleMusicbee)
            {
                mbApiInterface_.Player_SetShuffle(shuffle);
            }
        }
コード例 #2
0
 private void systemMediaControls_ShuffleEnabledChangeRequested(SystemMediaTransportControls smtc, ShuffleEnabledChangeRequestedEventArgs args)
 {
     mbApiInterface.Player_SetShuffle(args.RequestedShuffleEnabled);
 }
コード例 #3
0
 /// <inheritdoc />
 public void ToggleShuffleLegacy()
 {
     _api.Player_SetShuffle(!_api.Player_GetShuffle());
 }