C# Class GAudio.GATTrack

Inheritance: UnityEngine.ScriptableObject, IGATFilterableStream, IGATAudioThreadStreamOwner
ファイルを表示 Open project: gregzo/G-Audio Class Usage Examples

Protected Properties

Property Type Description
_active bool
_audioThreadStreamProxy GATAudioThreadStreamProxy
_contributor IGATTrackContributor
_mute bool
_panInfo GATDynamicPanInfo
_trackBuffer GATData

Private Properties

Property Type Description
OnDestroy void
PlayerWillBeginMixing void

Public Methods

Method Description
FXAndMixTo ( float audioBuffer ) : bool
GetAudioThreadStream ( int index ) : IGATAudioThreadStream
GetGainForChannel ( int channel ) : float

Current gain for the specified channel. Returns -1f if the channel doesn't exist.

InitTrack ( GATPlayer parentPlayer, int trackNb ) : void
MixFrom ( GATData data, int index, int offsetInBuffer, int length, float gain = 1f ) : void

Called by GATPlayer. Needed when overriding default mixing: If a sample is routed through a track, it should be mixed to it.

OnDisable ( ) : void
SetGainForChannel ( float gain, int channel ) : void

Set gain for the specified channel. Does nothing if the channel doesn't exist.

SubscribeContributor ( IGATTrackContributor contributor ) : bool

A track may have one IGATTrackContributor which will get the opportunity to mix directly to the track buffer before filters are applied. This method returns false if another contributor is already set.

TrackNbDidChange ( int newNb ) : void
UnsubscribeContributor ( IGATTrackContributor contributor ) : bool

Unsubscribes the contributor. Returns false if the current contributor is different from the one making the call.

Protected Methods

Method Description
OnEnable ( ) : void

Private Methods

Method Description
OnDestroy ( ) : void

Call before disposing of a track permanently.

PlayerWillBeginMixing ( ) : void

Method Details

FXAndMixTo() public method

public FXAndMixTo ( float audioBuffer ) : bool
audioBuffer float
return bool

GetAudioThreadStream() public method

public GetAudioThreadStream ( int index ) : IGATAudioThreadStream
index int
return IGATAudioThreadStream

GetGainForChannel() public method

Current gain for the specified channel. Returns -1f if the channel doesn't exist.
public GetGainForChannel ( int channel ) : float
channel int
return float

InitTrack() public method

public InitTrack ( GATPlayer parentPlayer, int trackNb ) : void
parentPlayer GATPlayer
trackNb int
return void

MixFrom() public method

Called by GATPlayer. Needed when overriding default mixing: If a sample is routed through a track, it should be mixed to it.
public MixFrom ( GATData data, int index, int offsetInBuffer, int length, float gain = 1f ) : void
data GATData
index int
offsetInBuffer int
length int
gain float
return void

OnDisable() public method

public OnDisable ( ) : void
return void

OnEnable() protected method

protected OnEnable ( ) : void
return void

SetGainForChannel() public method

Set gain for the specified channel. Does nothing if the channel doesn't exist.
public SetGainForChannel ( float gain, int channel ) : void
gain float
channel int
return void

SubscribeContributor() public method

A track may have one IGATTrackContributor which will get the opportunity to mix directly to the track buffer before filters are applied. This method returns false if another contributor is already set.
public SubscribeContributor ( IGATTrackContributor contributor ) : bool
contributor IGATTrackContributor
return bool

TrackNbDidChange() public method

public TrackNbDidChange ( int newNb ) : void
newNb int
return void

UnsubscribeContributor() public method

Unsubscribes the contributor. Returns false if the current contributor is different from the one making the call.
public UnsubscribeContributor ( IGATTrackContributor contributor ) : bool
contributor IGATTrackContributor
return bool

Property Details

_active protected_oe property

protected bool _active
return bool

_audioThreadStreamProxy protected_oe property

protected GATAudioThreadStreamProxy,GAudio _audioThreadStreamProxy
return GATAudioThreadStreamProxy

_contributor protected_oe property

protected IGATTrackContributor _contributor
return IGATTrackContributor

_mute protected_oe property

protected bool _mute
return bool

_panInfo protected_oe property

protected GATDynamicPanInfo _panInfo
return GATDynamicPanInfo

_trackBuffer protected_oe property

protected GATData,GAudio _trackBuffer
return GATData