/// <inheritdoc /> public Repeat GetRepeatMode() { var repeat = _api.Player_GetRepeat(); Repeat repeatMode; switch (repeat) { case RepeatMode.None: repeatMode = Repeat.None; break; case RepeatMode.All: repeatMode = Repeat.All; break; case RepeatMode.One: repeatMode = Repeat.One; break; default: repeatMode = Repeat.None; break; } return(repeatMode); }
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); } }
public Repeat GetRepeatMode() { var repeat = _api.Player_GetRepeat(); Repeat repeatMode; switch (repeat) { case RepeatMode.None: repeatMode = Repeat.None; break; case RepeatMode.All: repeatMode = Repeat.All; break; case RepeatMode.One: repeatMode = Repeat.One; break; default: throw new ArgumentOutOfRangeException(); } return(repeatMode); }