NScumm.Scumm.Sound.StopTalkSound C# (CSharp) Метод

StopTalkSound() публичный Метод

public StopTalkSound ( ) : void
Результат void
        public void StopTalkSound()
        {
            if ((sfxMode & 2) != 0)
            {
                if (vm.MusicEngine is IMuseDigital)
                {
                    ((IMuseDigital)vm.MusicEngine).StopSound(TalkSoundID);
                }
                //                else if (_vm->_game.heversion >= 60)
                //                {
                //                    stopSound(1);
                //                }
                else
                {
                    _mixer.StopHandle(_talkChannelHandle);
                }

                sfxMode &= ~2;
            }
        }

Usage Example

Пример #1
0
        void PlaySpeech(byte[] ptr)
        {
            if (Game.GameId == GameId.Dig && /*(ConfMan.getBool("speech_mute") ||*/ Variables[VariableVoiceMode.Value] == 2)
            {
                return;
            }

            if ((Game.GameId == GameId.Dig || Game.GameId == GameId.CurseOfMonkeyIsland) && ptr[0] != 0)
            {
                var count = Array.IndexOf(ptr, (byte)0);
                if (count < 0)
                {
                    count = ptr.Length - 1;
                }
                var pointer = ptr.GetText(0, count);

                // Play speech
                if (!Game.Features.HasFlag(GameFeatures.Demo) && Game.GameId == GameId.CurseOfMonkeyIsland) // CMI demo does not have .IMX for voice
                {
                    pointer += ".IMX";
                }

                Sound.StopTalkSound();
                IMuseDigital.StopSound(Sound.TalkSoundID);
                IMuseDigital.StartVoice(Sound.TalkSoundID, pointer);
                Sound.TalkSound(0, 0, 2);
            }
        }
All Usage Examples Of NScumm.Scumm.Sound::StopTalkSound