C# Class GAudio.StreamToCacheModule

Component for caching a stream to memory. Multichannel streams will be cached in seperate mono caches. Supports sample accurate start and stop.
Inheritance: AGATStreamObserver
Afficher le fichier Open project: gregzo/G-Audio

Méthodes publiques

Свойство Type Description
allocateCacheInStart bool
cacheDuration double
useManagedData bool

Méthodes publiques

Méthode Description
AllocateCaches ( double duration, bool managedData ) : void

Allocates caches retrievable in the Caches property.

OnDestroy ( ) : void
ReleaseCache ( ) : void

If allocated caches use managed data, calling this method makes sure that caches will be returned to the memory pool when possible.

StartCaching ( double dspTime = 0d, GATAudioThreadStreamToCache onAtEnd = null ) : void

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.

StopCaching ( ) : void

Immediately stops caching the stream.

Méthodes protégées

Méthode Description
Start ( ) : void

Method Details

AllocateCaches() public méthode

Allocates caches retrievable in the Caches property.
public AllocateCaches ( double duration, bool managedData ) : void
duration double
managedData bool
Résultat void

OnDestroy() public méthode

public OnDestroy ( ) : void
Résultat void

ReleaseCache() public méthode

If allocated caches use managed data, calling this method makes sure that caches will be returned to the memory pool when possible.
public ReleaseCache ( ) : void
Résultat void

Start() protected méthode

protected Start ( ) : void
Résultat void

StartCaching() public méthode

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.
public StartCaching ( double dspTime = 0d, GATAudioThreadStreamToCache onAtEnd = null ) : void
dspTime double
onAtEnd GATAudioThreadStreamToCache
Résultat void

StopCaching() public méthode

Immediately stops caching the stream.
public StopCaching ( ) : void
Résultat void

Property Details

allocateCacheInStart public_oe property

If true, caches will be allocated in start.
public bool allocateCacheInStart
Résultat bool

cacheDuration public_oe property

Duration of the cache to allocate in Start
public double cacheDuration
Résultat double

useManagedData public_oe property

Should the cache be allocated using G-Audio's allocator? Make sure GATManager.DefaultAllocator.LargestAllocatableChunk is large enough if you use managed data.
public bool useManagedData
Résultat bool