C# Class GAudio.GATActiveSampleBank

Adds processed samples caching functionnalities to GATSampleBank.
Inheritance: GATSampleBank
Afficher le fichier Open project: gregzo/G-Audio Class Usage Examples

Méthodes publiques

Méthode Description
AddSample ( GATData data, string sampleName ) : void
FlushCacheForEnvelope ( GATEnvelope envelope ) : void

Flushs all cached samples associated with the specified envelope.

GetProcessedSample ( int indexInBank, GATEnvelope envelope, double pitch = 1d ) : IGATProcessedSample
GetProcessedSample ( string sampleName, GATEnvelope envelope, double pitch = 1d ) : IGATProcessedSample

Gets a processed sample container that will automatically update according to the envelope. Play it directly, not via GATPlayer : all envelope updates will be handled, even when overlapping sounds have their envelope changed. Note that the pitch parameter will only be taken into account by GATResamplingSampleBank instances.

RemoveSample ( string name ) : void

Méthodes protégées

Méthode Description
CleanUpCache ( ) : void

Only call when destroying!

OnDestroy ( ) : void

Method Details

AddSample() public méthode

public AddSample ( GATData data, string sampleName ) : void
data GATData
sampleName string
Résultat void

CleanUpCache() protected méthode

Only call when destroying!
protected CleanUpCache ( ) : void
Résultat void

FlushCacheForEnvelope() public méthode

Flushs all cached samples associated with the specified envelope.
public FlushCacheForEnvelope ( GATEnvelope envelope ) : void
envelope GATEnvelope Envelope.
Résultat void

GetProcessedSample() public méthode

public GetProcessedSample ( int indexInBank, GATEnvelope envelope, double pitch = 1d ) : IGATProcessedSample
indexInBank int
envelope GATEnvelope
pitch double
Résultat IGATProcessedSample

GetProcessedSample() public méthode

Gets a processed sample container that will automatically update according to the envelope. Play it directly, not via GATPlayer : all envelope updates will be handled, even when overlapping sounds have their envelope changed. Note that the pitch parameter will only be taken into account by GATResamplingSampleBank instances.
public GetProcessedSample ( string sampleName, GATEnvelope envelope, double pitch = 1d ) : IGATProcessedSample
sampleName string /// The sample's name in the loaded SoundBank ///
envelope GATEnvelope /// The envelope may be null if you need the whole, unprocessed sample. ///
pitch double
Résultat IGATProcessedSample

OnDestroy() protected méthode

protected OnDestroy ( ) : void
Résultat void

RemoveSample() public méthode

public RemoveSample ( string name ) : void
name string
Résultat void