Пример #1
0
 public void Resume()
 {
     if (curSound != null)
     {
         curSound.Play();
     }
     paused = false;
 }
Пример #2
0
        public void Play()
        {
            //TODO: Probabilities
            curSound = sounds[variationRand.Next(sounds.Length)];

            curSound.Volume = volume;
            curSound.Play();
        }
Пример #3
0
        /// <summary>Requests playback of a prepared or preparing Cue.</summary>
        /// <remarks>Calling Play when the Cue already is playing can result in an InvalidOperationException.</remarks>
        public void Play()
        {
            if (!engine._activeCues.Contains(this))
            {
                engine._activeCues.Add(this);
            }

            //TODO: Probabilities
            var index = XactHelpers.Random.Next(sounds.Length);

            curSound = sounds[index];

            curSound.Volume = volume;
            curSound.Play();
        }
Пример #4
0
        /// <summary>Requests playback of a prepared or preparing Cue.</summary>
        /// <remarks>Calling Play when the Cue already is playing can result in an InvalidOperationException.</remarks>
        public void Play()
        {
            if (!_engine._activeCues.Contains(this))
            {
                _engine._activeCues.Add(this);
            }

            //TODO: Probabilities
            var index = XactHelpers.Random.Next(_sounds.Length);

            _curSound = _sounds[index];

            _curSound.SetCueVolume(_volume);
            _curSound.Play();
        }
Пример #5
0
        /// <summary>Requests playback of a prepared or preparing Cue.</summary>
        /// <remarks>Calling Play when the Cue already is playing can result in an InvalidOperationException.</remarks>
        public void Play()
        {
            if (!_engine.ActiveCues.Contains(this))
            {
                _engine.ActiveCues.Add(this);
            }

            //TODO: Probabilities
            var index = XactHelpers.Random.Next(_sounds.Length);

            _curSound = _sounds[index];

            _curSound.Play(1.0f, _engine);
            _played    = true;
            IsPrepared = false;
        }
Пример #6
0
        public void Play()
        {
            //TODO: Probabilities
            curSound = sounds[variationRand.Next(sounds.Length)];

            // There may not have been a sound when we first set volume.
            curSound.Volume = volume * rpcVolume;

            if (positionalAudio)
            {
                curSound.PlayPositional(listener, emitter);
            }
            else
            {
                curSound.Play();
            }
        }
Пример #7
0
        /// <summary>Requests playback of a prepared or preparing Cue.</summary>
        /// <remarks>Calling Play when the Cue already is playing can result in an InvalidOperationException.</remarks>
        public void Play()
        {
            lock (_engine.UpdateLock) {
                if (!_engine.ActiveCues.Contains(this))
                {
                    _engine.ActiveCues.Add(this);
                }

                //TODO: Probabilities
                var index = XactHelpers.Random.Next(_sounds.Length);
                _curSound = _sounds[index];

                var volume = UpdateRpcCurves();

                _curSound.Play(volume, _engine);
            }

            _played    = true;
            IsPrepared = false;
        }
Пример #8
0
        /// <summary>Requests playback of a prepared or preparing Cue.</summary>
        /// <remarks>Calling Play when the Cue already is playing can result in an InvalidOperationException.</remarks>
		public void Play()
		{
            if (!_engine._activeCues.Contains(this))
                _engine._activeCues.Add(this);
			
			//TODO: Probabilities
            var index = XactHelpers.Random.Next(_sounds.Length);
            _curSound = _sounds[index];
			
			_curSound.SetCueVolume(_volume);
			_curSound.Play();
		}
Пример #9
0
		public void Play()
		{
			//TODO: Probabilities
			curSound = sounds[variationRand.Next (sounds.Length)];
			
			curSound.Volume = volume;
			curSound.Play ();
			paused = false;
		}
Пример #10
0
        /// <summary>Requests playback of a prepared or preparing Cue.</summary>
        /// <remarks>Calling Play when the Cue already is playing can result in an InvalidOperationException.</remarks>
		public void Play()
		{
            if (!engine._activeCues.Contains(this))
                engine._activeCues.Add(this);
			
			//TODO: Probabilities
            var index = XactHelpers.Random.Next(sounds.Length);
            curSound = sounds[index];
			
			curSound.Volume = volume;
			curSound.Play();
		}