Exemple #1
0
        public void Activate(PureDataSource source)
        {
            inactiveSources.Remove(source);
            activeSources.Add(source);

            pureData.clipManager.Activate(source.Clip);
        }
Exemple #2
0
        public void InitializeSources()
        {
            activeSources       = new List <PureDataSource>();      // Must be initialized here or some unknown origin error occurs.
            inactiveSources     = new List <PureDataSource>();
            sourcesToDeactivate = new List <PureDataSource>();

            for (int i = 0; i < pureData.generalSettings.MaxVoices; i++)
            {
                PureDataSource source = new PureDataSource(pureData);
                pureData.idManager.SetUniqueId(source);
                inactiveSources.Add(source);
            }
        }
Exemple #3
0
        public void Update()
        {
            for (int i = sourcesToDeactivate.Count - 1; i >= 0; i--)
            {
                PureDataSource source = sourcesToDeactivate.PopLast();
                activeSources.Remove(source);
                inactiveSources.Add(source);
                pureData.clipManager.Deactivate(source.Clip);
            }

            for (int i = activeSources.Count - 1; i >= 0; i--)
            {
                activeSources[i].Update();
            }
        }
Exemple #4
0
        public PureDataSource GetSource(string soundName, object source)
        {
            PureDataSource audioSource = null;

            if (inactiveSources.Count > 0)
            {
                audioSource = inactiveSources.PopLast();
                audioSource.SetClip(pureData.clipManager.GetClip(soundName));
                audioSource.SetSource(source);
            }
            else
            {
                Logger.LogError("No available source was found.");
            }

            return(audioSource);
        }
	public PureDataSourceItem(PureDataSource audioSource, PureData pureData)
		: base(pureData) {
			
		this.audioSource = audioSource;
	}
Exemple #6
0
 public PureDataSingleItem(PureDataSource audioSource, PureData pureData)
     : base(pureData)
 {
     this.audioSource = audioSource;
 }
 public PureDataSourceSpatializer(PureDataSource audioSource, PureData pureData)
     : base(pureData)
 {
     this.audioSource = audioSource;
     UpdateSendNames();
 }
Exemple #8
0
 public void Deactivate(PureDataSource source)
 {
     sourcesToDeactivate.Add(source);
 }
		public PureDataSourceSpatializer(PureDataSource audioSource, PureData pureData)
			: base(pureData) {
			
			this.audioSource = audioSource;
			UpdateSendNames();
		}