示例#1
0
        void TempUpPlayer_OnStartPlay(StreamPlayer obj)
        {
            lock (LockObject) {
                if (VolumeDownPlayer == null)
                {
                    if (VolumeUpPlayer != null)
                    {
                        VolumeDownPlayer = VolumeUpPlayer;
                        VolumeDownPlayer.VolumeDown();
                    }
                }
                else
                {
                    if (VolumeUpPlayer != null)
                    {
                        VolumeUpPlayer.Stop();
                        //VolumeUpPlayer.Dispose();
                        VolumeUpPlayer = null;
                    }
                }

                VolumeUpPlayer = obj;
                VolumeUpPlayer.VolumeUp();
                TempUpPlayer = null;
            }

            if (OnStart != null)
            {
                OnStart();
            }
        }
示例#2
0
 private void _filePlayer_OnStartPlay(StreamPlayer obj)
 {
     lock ( _lockObject ) {
         StopRadio();
         obj.VolumeUp();
     }
 }
示例#3
0
        private void _temp_OnStartPlay(StreamPlayer obj)
        {
            if (_oldPlayer != null)
            {
                _oldPlayer.VolumeDownAndStop();
                _oldPlayer = null;
            }

            obj.VolumeUp();
        }