Inheritance: ISoundWAV
Ejemplo n.º 1
0
        public SoundWAVInstance(SoundWAV sound, bool looped)
            : base(sound)
        {
            try
            {
                State  = SoundStates.Stopped;
                Looped = looped;
                volume = 1;

                com = new SoundWAVInstanceCom();
                var error = com.Init(sound.com, looped);

                switch (error)
                {
                case SoundWAVInstanceErrors.SourceVoice: Debug.ThrowError("SoundWAVInstance", "Failed to create SourceVoice"); break;
                }
            }
            catch (Exception e)
            {
                Dispose();
                throw e;
            }
        }
Ejemplo n.º 2
0
        public SoundWAVInstance(SoundWAV sound, bool looped)
            : base(sound)
        {
            try
            {
                State = SoundStates.Stopped;
                Looped = looped;
                volume = 1;

                com = new SoundWAVInstanceCom();
                var error = com.Init(sound.com, looped);

                switch (error)
                {
                    case SoundWAVInstanceErrors.SourceVoice: Debug.ThrowError("SoundWAVInstance", "Failed to create SourceVoice"); break;
                }
            }
            catch (Exception e)
            {
                Dispose();
                throw e;
            }
        }