private static void SyncSoundManager(Session Session, ClientMessage Message) { RoomInstance Instance = RoomManager.GetInstanceByRoomId(Session.CurrentRoomId); if (Instance == null) { return; } if (Instance != null && Instance.MusicController.IsPlaying) { Session.SendData(MusicPlayingComposer.Compose(Instance.MusicController.CurrentSong.SongData.Id, Instance.MusicController.SongQueuePosition, Instance.MusicController.SongSyncTimestamp)); } }
public void BroadcastCurrentSongData(RoomInstance Instance) { Instance.BroadcastMessage(MusicPlayingComposer.Compose(mSong == null ? 0 : mSong.SongData.Id, mSongQueuePosition, 0)); }