Start() public method

Start caching the stream.
public Start ( double targetDspTime = 0d, AtEndHandler handler = null ) : void
targetDspTime double The dsp time at which caching should start. Pass 0 to start as soon as possible.
handler AtEndHandler Optional callback fired when the cache is full.
return void
コード例 #1
0
        /// <summary>
        /// Starts caching the stream at a precise dspTime,
        /// or asap if no dspTime is provided or if the provided
        /// dspTime is too soon. onAtEnd callback is fired when the cache is full,
        /// wether looping or not.
        /// </summary>
        public void StartCaching(double dspTime = 0d, GATAudioThreadStreamToCache.AtEndHandler onAtEnd = null)
        {
            if (_streamToCache == null || Caches == null)
            {
                throw new GATException("No cache is setup.");
            }

            _streamToCache.Start(dspTime, onAtEnd);
        }