Пример #1
0
        public static Sound Add(SoundName soundName)
        {
            SoundManager soundMan = SoundManager.GetInstance();
            Sound        pSound   = (Sound)soundMan.BaseAdd();

            pSound.Set(soundName);
            return(pSound);
        }
Пример #2
0
        public static Sound Add(Sound.Name name, string path)
        {
            Debug.Assert(pMan != null);
            Sound pSound = (Sound)pMan.baseAdd();

            Debug.Assert(pSound != null);
            IrrKlang.ISoundSource soundSource = pMan.sndEngine.AddSoundSourceFromFile(path);
            pSound.Set(name, soundSource);
            return(pSound);
        }
Пример #3
0
        public static Sound Add(Sound.Name soundName, float volume = 1)
        {
            SoundManager pMan = SoundManager.PrivGetInstance();

            Debug.Assert(pMan != null);

            Sound pNode = (Sound)pMan.BaseAdd();

            Debug.Assert(pNode != null);

            pNode.Set(soundName, volume);

            return(pNode);
        }
        public static Sound Add(Sound.Name name, string pSoundName)
        {
            SoundManager pMan = SoundManager.GetInstance();

            Debug.Assert(pMan != null);

            Sound pNode = (Sound)pMan.BaseAdd();

            Debug.Assert(pNode != null);

            // Initialize the data
            Debug.Assert(pSoundName != null);
            pNode.Set(name, pSoundName, ref pSoundEngine);

            return(pNode);
        }
Пример #5
0
        public static Sound Add(Sound.Name soundName, string fileName, float repeatTimeInterval = 1.0f)
        {
            SoundManager pImgManager = SoundManager.privGetInstance();

            Debug.Assert(pImgManager != null);

            // grab an blank imgage node
            Sound pNode = (Sound)pImgManager.baseAdd();

            Debug.Assert(pNode != null);


            //configure the image node
            pNode.Set(soundName, fileName, repeatTimeInterval);

            return(pNode);
        }