public void Mute(string streamKey)
        {
            var audioStream = GetAudioStream(streamKey);

            var volume = AudioStreamHelper.GetVolume(audioStream);

            if (volume != 0)
            {
                AudioStreamHelper.SetVolumeSlide(audioStream, 1F, 0F, 0.1D);
            }
        }
        private void OnEventSync(int syncId)
        {
            var audioStreamEvents = GetAudioStreamEvents(syncId);

            if (audioStreamEvents == null || audioStreamEvents.Count == 0)
            {
                return;
            }

            var players = audioStreamEvents.Select(x => x.Player).Distinct().ToList();

            //ParallelHelper.ForEach(players, player =>
            Parallel.ForEach(players, player =>
            {
                var playerEvents = audioStreamEvents.Where(x => x.Player == player);
                foreach (var audioEvent in playerEvents)
                {
                    DebugHelper.WriteLine("start event sycn:" + audioEvent.StreamEventType + " " + audioEvent.TargetStreamKey);
                    AudioStream stream;
                    switch (audioEvent.StreamEventType)
                    {
                    case EventType.PlaySolo:
                        player.Pause();
                        player.QueueSection(audioEvent.TargetStreamKey, audioEvent.TargetSectionKey);
                        if (player == this)
                        {
                            player.PlayWithNoSyncs(audioEvent.TargetStreamKey);
                        }
                        else
                        {
                            player.Play(audioEvent.TargetStreamKey);
                        }
                        break;

                    case EventType.Play:
                        player.QueueSection(audioEvent.TargetStreamKey, audioEvent.TargetSectionKey);
                        if (player == this)
                        {
                            player.PlayWithNoSyncs(audioEvent.TargetStreamKey);
                        }
                        else
                        {
                            player.Play(audioEvent.TargetStreamKey);
                        }
                        break;

                    case EventType.PauseAll:
                        player.Pause();
                        break;

                    case EventType.Pause:
                        player.Pause(audioEvent.TargetStreamKey);
                        break;

                    case EventType.FadeIn:
                        stream = player.GetAudioStream(audioEvent.TargetStreamKey);
                        AudioStreamHelper.SetVolumeSlide(stream, 0f, 1f, audioEvent.Length);
                        break;

                    case EventType.FadeOut:
                        stream = player.GetAudioStream(audioEvent.TargetStreamKey);
                        AudioStreamHelper.SetVolumeSlide(stream, 1f, 0f, audioEvent.Length);
                        break;

                    default:
                        throw new Exception("Invalid Event Type");
                    }
                    //DebugHelper.WriteLine("end event sycn:" + audioEvent.StreamEventType + " " + syncId);
                }
            });
        }