コード例 #1
0
 public void Update()
 {
     if (!Enabled)
     {
         return;
     }
     system.Update();
 }
コード例 #2
0
        /// <summary>
        /// Update The System
        /// </summary>
        public void Update()
        {
            RESULT result = system.Update();

            if (EngineError != null)
            {
                EngineError(result);
            }
        }
コード例 #3
0
ファイル: SoundSystem.cs プロジェクト: dragontamer8740/Noxico
        public void Update()
        {
            if (!Enabled)
            {
                return;
            }
            if (!string.IsNullOrEmpty(FadeTarget))
            {
                Fade();
            }
            system.Update();
#if DEBUG
            if (!IniFile.GetValue("audio", "debug", false))
            {
                return;
            }
            var musicchans = 0;
            var type       = FMOD.SoundType.Unknown;
            var format     = FMOD.SoundFormat.None;
            var channels   = 0;
            var bits       = 0;
            var volume     = 0f;
            var debug      = string.Empty;
            music.GetFormat(out type, out format, out channels, out bits);
            musicChannel.GetVolume(out volume);
            if (type == FMOD.SoundType.Mp3 | type == FMOD.SoundType.OggVorbis)
            {
                var ms  = 0u;
                var len = 0u;
                musicChannel.GetPosition(out ms, FMOD.TimeUnit.Milliseconds);
                music.GetLength(out len, FMOD.TimeUnit.Milliseconds);
                debug = string.Format("{0}ch {1}, {2} / {3}. Volume: {4:P0}", musicchans, type.ToString(), new TimeSpan(ms * 10000), new TimeSpan(len * 10000), volume);
            }
            else
            {
                var row      = 0u;
                var pattern  = 0u;
                var rows     = 0u;
                var patterns = 0u;
                music.GetMusicNumChannels(out musicchans);
                musicChannel.GetPosition(out row, FMOD.TimeUnit.ModRow);
                musicChannel.GetPosition(out pattern, FMOD.TimeUnit.ModPattern);
                music.GetLength(out rows, FMOD.TimeUnit.ModRow);
                music.GetLength(out patterns, FMOD.TimeUnit.ModPattern);
                debug = string.Format("{0}ch {1}, row {2}/{3}, pattern {4}/{5}. Volume: {6:P0}", musicchans, type.ToString(), row, rows, pattern, patterns, volume);
            }
            NoxicoGame.HostForm.Write(debug.PadRight(Program.Cols), System.Drawing.Color.Gray, System.Drawing.Color.Black, 0, 0);
#endif
        }