Manages a cache of processed samples. Used by GATActiveSampleBank to serve IGATProcessedSample objects.
Inheritance: IDisposable
Example #1
0
        public override void AddSample( GATData data, string sampleName )
        {
            base.AddSample( data, sampleName );

            if( _cache == null )
                _cache = new GATProcessedSamplesCache( _totalCapacity );

            _cache.AddSample( data );
        }
Example #2
0
        /// <summary>
        /// Only call when destroying!
        /// </summary>
        protected virtual void CleanUpCache()
        {
            if (_cache == null)
            {
                return;
            }

            _cache.Dispose();
            _cache = null;
        }
Example #3
0
        public override void AddSample(GATData data, string sampleName)
        {
            base.AddSample(data, sampleName);

            if (_cache == null)
            {
                _cache = new GATProcessedSamplesCache(_totalCapacity);
            }

            _cache.AddSample(data);
        }
            public ProcessedAudioChunk(GATData sourcesample, GATEnvelope ienvelope, GATProcessedSamplesCache parentCache, double pitch = 1d)
            {
                sourceSample = sourcesample;
                envelope     = ienvelope;
                _parentCache = parentCache;

                if (envelope == GATEnvelope.nullEnvelope)                  //_cachedLength will never change
                {
                    _cachedLength = sourcesample.Count;
                }
                else
                {
                    _cachedLength = envelope.Length;
                }

                SetPitch(pitch);
            }
			public ProcessedAudioChunk( GATData sourcesample, GATEnvelope ienvelope, GATProcessedSamplesCache parentCache, double pitch = 1d )
			{
				sourceSample = sourcesample;
				envelope 	= ienvelope;
				_parentCache = parentCache;
				
				if( envelope == GATEnvelope.nullEnvelope ) //_cachedLength will never change
				{
					_cachedLength = sourcesample.Count;
				}
				else
				{
					_cachedLength = envelope.Length;
				}

				SetPitch( pitch );
			}
Example #6
0
        /// <summary>
        /// Only call when destroying!
        /// </summary>
        protected virtual void CleanUpCache()
        {
            if( _cache == null )
                return;

            _cache.Dispose();
            _cache = null;
        }