Example #1
0
        public static void Stop()
        {
            CSound.FadeAndStop(_CurrentMusicStream, 0f, CSettings.BackgroundMusicFadeTime);

            _CurrentMusicFilePath = String.Empty;
            _Playing = false;
        }
Example #2
0
        public static int PlaySound(ESounds Sound)
        {
            string file = Path.Combine(Environment.CurrentDirectory, CSettings.sFolderSounds);

            switch (Sound)
            {
            case ESounds.T440:
                file = Path.Combine(file, CSettings.sSoundT440);
                break;

            default:
                break;
            }

            if (file == String.Empty)
            {
                return(-1);
            }

            int   stream = CSound.Load(file);
            float length = CSound.GetLength(stream);

            CSound.Play(stream);
            CSound.FadeAndStop(stream, 100f, length);
            return(stream);
        }
Example #3
0
        public static void Stop()
        {
            if (!_Playing)
            {
                return;
            }

            if (_VideoEnabled && _Video != -1)
            {
                CVideo.VdClose(_Video);
                CDraw.RemoveTexture(ref _CurrentVideoTexture);
                _Video = -1;
            }
            CSound.FadeAndStop(_CurrentMusicStream, 0f, CSettings.BackgroundMusicFadeTime);

            _CurrentPlaylistElement = new PlaylistElement();
            _Playing = false;
        }