C# 클래스 GAudio.GATSampleBank

상속: UnityEngine.MonoBehaviour
파일 보기 프로젝트 열기: gregzo/G-Audio 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
extraCapacity int

보호된 프로퍼티들

프로퍼티 타입 설명
_allKeys string[]
_allSamples List
_samplesByName GATData>.Dictionary
_soundBank GATSoundBank
_totalCapacity int

공개 메소드들

메소드 설명
AddLoadedFile ( GATData channelsData, string fileName ) : void

Compatibility with GATAudioLoader.

AddSample ( GATData data, string sampleName ) : void

Adds a sample to the bank, which will retain it, and manage cache for it if GATActiveSamplebank.

ContainsSampleNamed ( string sampleName ) : bool

Is the specified sample loaded?

EditorUpdateSoundBank ( GATSoundBank bank = null ) : void
FillWithResampledData ( GATData data, int indexInBank, int fromIndex, int targetLength, double pitch ) : void
FillWithResampledData ( GATData data, string sampleName, int fromIndex, int targetLength, double pitch ) : void

Convenience method for copying a resampled chunk of a sample to a GATData container. Target length is the requested ouptut length.

FillWithSampleData ( GATData data, int indexInBank, int fromIndex, int length ) : void
FillWithSampleData ( GATData data, string sampleName, int fromIndex, int length ) : void

Convenience method for copying a chunk of a sample to a GATData container.

GetAudioData ( int indexInBank ) : GATData
GetAudioData ( string sampleName ) : GATData

Grabs a reference to the samples data. Note that changes to the data will be persistent until the bank is reloaded.

GetClosestSampleForMidiCode ( float midiCode, float &pitchShift ) : GATData

Returns the sample closest to the provided midicode and a pitch shift value to be applied to the sample

LoadAll ( ) : void

Loads all samples from the referenced SoundBank. Sync operation

LoadSamplesNamed ( List sampleNames ) : void

Loads specific samples from the referenced Sound Bank. Sync operation.

LoadStreamingAssetsAsync ( List sampleNames, OperationCompletedHandler onCompleted ) : void

Loads specific StreamingAssets samples from the referenced Sound Bank. Async operation.

OnEnable ( ) : void
RemoveSample ( string sampleName ) : void

Releases a specific sample and it's associated cache.

RemoveSamples ( List sampleNames ) : void

Releases specific samples and their associated cache.

UnloadAll ( ) : void

Releases all loaded samples.

UpdateSoundBank ( ) : void

보호된 메소드들

메소드 설명
Awake ( ) : void
FillWithResampledData ( GATData sourceData, GATData targetData, int fromIndex, int targetLength, double pitch ) : void
FillWithSampleData ( GATData sourceData, GATData targetData, int fromIndex, int length ) : void
InitCollections ( ) : void
OnDestroy ( ) : void

메소드 상세

AddLoadedFile() 공개 메소드

Compatibility with GATAudioLoader.
public AddLoadedFile ( GATData channelsData, string fileName ) : void
channelsData GATData
fileName string
리턴 void

AddSample() 공개 메소드

Adds a sample to the bank, which will retain it, and manage cache for it if GATActiveSamplebank.
public AddSample ( GATData data, string sampleName ) : void
data GATData
sampleName string
리턴 void

Awake() 보호된 메소드

protected Awake ( ) : void
리턴 void

ContainsSampleNamed() 공개 메소드

Is the specified sample loaded?
public ContainsSampleNamed ( string sampleName ) : bool
sampleName string
리턴 bool

EditorUpdateSoundBank() 공개 메소드

public EditorUpdateSoundBank ( GATSoundBank bank = null ) : void
bank GATSoundBank
리턴 void

FillWithResampledData() 보호된 메소드

protected FillWithResampledData ( GATData sourceData, GATData targetData, int fromIndex, int targetLength, double pitch ) : void
sourceData GATData
targetData GATData
fromIndex int
targetLength int
pitch double
리턴 void

FillWithResampledData() 공개 메소드

public FillWithResampledData ( GATData data, int indexInBank, int fromIndex, int targetLength, double pitch ) : void
data GATData
indexInBank int
fromIndex int
targetLength int
pitch double
리턴 void

FillWithResampledData() 공개 메소드

Convenience method for copying a resampled chunk of a sample to a GATData container. Target length is the requested ouptut length.
public FillWithResampledData ( GATData data, string sampleName, int fromIndex, int targetLength, double pitch ) : void
data GATData
sampleName string
fromIndex int
targetLength int
pitch double
리턴 void

FillWithSampleData() 보호된 메소드

protected FillWithSampleData ( GATData sourceData, GATData targetData, int fromIndex, int length ) : void
sourceData GATData
targetData GATData
fromIndex int
length int
리턴 void

FillWithSampleData() 공개 메소드

public FillWithSampleData ( GATData data, int indexInBank, int fromIndex, int length ) : void
data GATData
indexInBank int
fromIndex int
length int
리턴 void

FillWithSampleData() 공개 메소드

Convenience method for copying a chunk of a sample to a GATData container.
public FillWithSampleData ( GATData data, string sampleName, int fromIndex, int length ) : void
data GATData
sampleName string
fromIndex int
length int
리턴 void

GetAudioData() 공개 메소드

public GetAudioData ( int indexInBank ) : GATData
indexInBank int
리턴 GATData

GetAudioData() 공개 메소드

Grabs a reference to the samples data. Note that changes to the data will be persistent until the bank is reloaded.
public GetAudioData ( string sampleName ) : GATData
sampleName string
리턴 GATData

GetClosestSampleForMidiCode() 공개 메소드

Returns the sample closest to the provided midicode and a pitch shift value to be applied to the sample
public GetClosestSampleForMidiCode ( float midiCode, float &pitchShift ) : GATData
midiCode float Midi code.
pitchShift float Pitch shift.
리턴 GATData

InitCollections() 보호된 메소드

protected InitCollections ( ) : void
리턴 void

LoadAll() 공개 메소드

Loads all samples from the referenced SoundBank. Sync operation
public LoadAll ( ) : void
리턴 void

LoadSamplesNamed() 공개 메소드

Loads specific samples from the referenced Sound Bank. Sync operation.
public LoadSamplesNamed ( List sampleNames ) : void
sampleNames List
리턴 void

LoadStreamingAssetsAsync() 공개 메소드

Loads specific StreamingAssets samples from the referenced Sound Bank. Async operation.
public LoadStreamingAssetsAsync ( List sampleNames, OperationCompletedHandler onCompleted ) : void
sampleNames List
onCompleted OperationCompletedHandler
리턴 void

OnDestroy() 보호된 메소드

protected OnDestroy ( ) : void
리턴 void

OnEnable() 공개 메소드

public OnEnable ( ) : void
리턴 void

RemoveSample() 공개 메소드

Releases a specific sample and it's associated cache.
public RemoveSample ( string sampleName ) : void
sampleName string
리턴 void

RemoveSamples() 공개 메소드

Releases specific samples and their associated cache.
public RemoveSamples ( List sampleNames ) : void
sampleNames List
리턴 void

UnloadAll() 공개 메소드

Releases all loaded samples.
public UnloadAll ( ) : void
리턴 void

UpdateSoundBank() 공개 메소드

public UpdateSoundBank ( ) : void
리턴 void

프로퍼티 상세

_allKeys 보호되어 있는 프로퍼티

protected string[] _allKeys
리턴 string[]

_allSamples 보호되어 있는 프로퍼티

protected List _allSamples
리턴 List

_samplesByName 보호되어 있는 프로퍼티

protected Dictionary _samplesByName
리턴 GATData>.Dictionary

_soundBank 보호되어 있는 프로퍼티

protected GATSoundBank _soundBank
리턴 GATSoundBank

_totalCapacity 보호되어 있는 프로퍼티

protected int _totalCapacity
리턴 int

extraCapacity 공개적으로 프로퍼티

The numer of samples which may be dynamically added to the bank. Not required, used for pooling cache objects at initialization.
public int extraCapacity
리턴 int