Gorilla.Audio.FMOD.Channel
Unit Gorilla.Audio.FMOD.Channel.pasClasses
- TGorillaFMODChannel = class ( TGorillaFMODObject , IGorillaFMODChannel )
TGorillaFMODChannel
Default wrapper record structure for handling channels of FMOD.
Ancestors
Implements Interfaces
- IGorillaFMODChannel
Members
Methods
- protected function GetSystemObject ( ) : Pointer ; override;
- protected function GetIndex ( ) : Integer ;
- protected function GetIsPlaying ( ) : LongBool ;
- protected function GetIsVirtual ( ) : LongBool ;
- protected function GetPaused ( ) : LongBool ;
- protected procedure SetPaused ( const AValue : LongBool ) ;
- protected function GetPosition ( AIndex : Cardinal ) : Cardinal ;
- protected procedure SetPosition ( AIndex : Cardinal; const AValue : Cardinal ) ;
- protected function GetVolume ( ) : Single ;
- protected procedure SetVolume ( const AValue : Single ) ;
- protected function GetVolumeRamp ( ) : LongBool ;
- protected procedure SetVolumeRamp ( const AValue : LongBool ) ;
- protected function GetAudibility ( ) : Single ;
- protected function GetPitch ( ) : Single ;
- protected procedure SetPitch ( const AValue : Single ) ;
- protected function GetMute ( ) : LongBool ;
- protected procedure SetMute ( const AValue : LongBool ) ;
- protected function GetLowPassGain ( ) : Single ;
- protected procedure SetLowPassGain ( const AValue : Single ) ;
- protected function GetMode ( ) : Cardinal ;
- protected procedure SetMode ( const AValue : Cardinal ) ;
- protected function GetMixMatrix ( ) : TGorillaFMODMixMatrix ;
- protected procedure SetMixMatrix ( const AValue : TGorillaFMODMixMatrix ) ;
- protected function GetPriority ( ) : Integer ;
- protected procedure SetPriority ( const AValue : Integer ) ;
- protected function GetFrequency ( ) : Single ;
- protected procedure SetFrequency ( const AValue : Single ) ;
- protected function GetUserData ( ) : Pointer ;
- protected procedure SetUserData ( const AValue : Pointer ) ;
- protected function GetDelay ( ) : TGorillaFMODDelay ;
- protected procedure SetDelay ( const AValue : TGorillaFMODDelay ) ;
- protected function Get3DAttributes ( ) : TGorillaFMOD3DAttributes ;
- protected procedure Set3DAttributes ( const AValue : TGorillaFMOD3DAttributes ) ;
- protected function Get3DMinMaxDistance ( ) : TGorillaFMOD3DMinMaxDistance ;
- protected procedure Set3DMinMaxDistance ( const AValue : TGorillaFMOD3DMinMaxDistance ) ;
- protected function Get3DConeSettings ( ) : TGorillaFMOD3DConeSettings ;
- protected procedure Set3DConeSettings ( const AValue : TGorillaFMOD3DConeSettings ) ;
- protected function Get3DConeOrientation ( ) : TPoint3D ;
- protected procedure Set3DConeOrientation ( const AValue : TPoint3D ) ;
- protected function Get3DCustomRolloff ( ) : TGorillaFMOD3DCustomRolloff ;
- protected procedure Set3DCustomRolloff ( const AValue : TGorillaFMOD3DCustomRolloff ) ;
- protected function Get3DOcclusion ( ) : TGorillaFMOD3DOcclusion ;
- protected procedure Set3DOcclusion ( const AValue : TGorillaFMOD3DOcclusion ) ;
- protected function Get3DSpread ( ) : Single ;
- protected procedure Set3DSpread ( const AValue : Single ) ;
- protected function Get3DLevel ( ) : Single ;
- protected procedure Set3DLevel ( const AValue : Single ) ;
- protected function Get3DDopplerLevel ( ) : Single ;
- protected procedure Set3DDopplerLevel ( const AValue : Single ) ;
- protected function Get3DDistanceFilter ( ) : TGorillaFMOD3DDistanceFilter ;
- protected procedure Set3DDistanceFilter ( const AValue : TGorillaFMOD3DDistanceFilter ) ;
- protected function GetLoopCount ( ) : Integer ;
- protected procedure SetLoopCount ( const AValue : Integer ) ;
- public procedure Stop
(
)
;
Stops the channel (or all channels in the channel group) from playing. Makes it available for re-use by the priority system.
- public procedure SetReverbProperties
(
AInstance :
Integer; AWet :
Single
)
;
Sets the wet level (or send level) of a particular reverb instance.
- public function GetReverbProperties
(
AInstance :
Integer
)
: Single
;
Retrieves the wet level (or send level) for a particular reverb instance.
- public procedure SetCallback
(
ACallback :
FMOD_CHANNELCONTROL_CALLBACK
)
;
Sets a callback to perform action for a specific event.
- public procedure SetPan
(
APan :
Single
)
;
Sets the pan level, this is a helper to avoid calling ChannelControl::setMixMatrix.
Parameters
- APan : Single - Pan level, from -1.0 (left) to 1.0 (right), default = 0 (center).
- public procedure SetMixLevelsOutput
(
AValue :
TGorillaFMODMixLevelsOutput
)
;
Sets the speaker volume levels for each speaker individually, this is a helper to avoid calling ChannelControl::setMixMatrix.
Parameters
- AValue :
TGorillaFMODMixLevelsOutput
-
FrontLeft - Volume level for the front left speaker of a multichannel speaker setup, 0.0 (silent), 1.0 (normal volume).
FrontRight - Volume level for the front right speaker of a multichannel speaker setup, 0.0 (silent), 1.0 (normal volume).
Center - Volume level for the center speaker of a multichannel speaker setup, 0.0 (silent), 1.0 (normal volume).
LFE - Volume level for the subwoofer speaker of a multichannel speaker setup, 0.0 (silent), 1.0 (normal volume).
SurroundLeft - Volume level for the surround left speaker of a multichannel speaker setup, 0.0 (silent), 1.0 (normal volume).
SurroundRight - Volume level for the surround right speaker of a multichannel speaker setup, 0.0 (silent), 1.0 (normal volume).
BackLeft - Volume level for the back left speaker of a multichannel speaker setup, 0.0 (silent), 1.0 (normal volume).
BackRight - Volume level for the back right speaker of a multichannel speaker setup, 0.0 (silent), 1.0 (normal volume).
- AValue :
TGorillaFMODMixLevelsOutput
-
- public procedure SetMixLevelsInput
(
const
ALevels :
TArray<System.Single>; const
ANumlevels :
Integer
)
;
Sets the incoming volume level for each channel of a multi-channel sound. This is a helper to avoid calling ChannelControl::setMixMatrix. A multi-channel sound is a single sound that contains from 1 to 32 channels of sound data, in an interleaved fashion. If in the extreme case, a 32ch wave file was used, an array of 32 floating point numbers denoting their volume levels would be passed in to the levels parameter, and 32 for the numlevels parameter.
Parameters
- const ALevels : TArray<System.Single> - Array of volume levels for each incoming channel. Number of levels in the array, from 0 to 32 inclusive.
- const ANumlevels : Integer - Array of volume levels for each incoming channel. Number of levels in the array, from 0 to 32 inclusive.
- public procedure GetDSPClock
(
var
ADSPClock :
UInt64; var
AParentClock :
UInt64
)
;
Retrieves the DSP clock values which count up by the number of samples per second in the software mixer, i.e. if the default sample rate is 48KHz, the DSP clock increments by 48000 per second.
Parameters
- var ADSPClock : UInt64 - Address of a variable to receive the DSP clock value for the head DSP node. Address of a variable to receive the DSP clock value for the tail DSP node.
- var AParentClock : UInt64 - Address of a variable to receive the DSP clock value for the head DSP node. Address of a variable to receive the DSP clock value for the tail DSP node.
- public procedure AddFadePoint
(
ADSPClock :
UInt64; AVolume :
Single
)
;
Add a volume point to fade from or towards, using a clock offset and 0 to 1 volume level.
Parameters
- ADSPClock : UInt64 - DSP clock of the parent channel group to set the fade point volume. Volume level where 0 is silent and 1.0 is normal volume. Amplification is supported.
- AVolume : Single - DSP clock of the parent channel group to set the fade point volume. Volume level where 0 is silent and 1.0 is normal volume. Amplification is supported.
- public procedure SetFadePointRamp
(
ADSPClock :
UInt64; AVolume :
Single
)
;
Add a short 64 sample volume ramp to the specified time in the future using fade points.
Parameters
- ADSPClock : UInt64 - DSP clock of the parent channel group when the volume will be ramped to. Volume level where 0 is silent and 1.0 is normal volume. Amplification is supported.
- AVolume : Single - DSP clock of the parent channel group when the volume will be ramped to. Volume level where 0 is silent and 1.0 is normal volume. Amplification is supported.
- public procedure RemoveFadePoints
(
ADSPClock_Start :
UInt64; ADSPClock_End :
UInt64
)
;
Remove volume fade points on the timeline. This function will remove multiple fade points with a single call if the points lay between the 2 specified clock values (inclusive).
Parameters
- ADSPClock_Start : UInt64 - DSP clock of the parent channel group to start removing fade points from. DSP clock of the parent channel group to start removing fade points to.
- ADSPClock_End : UInt64 - DSP clock of the parent channel group to start removing fade points from. DSP clock of the parent channel group to start removing fade points to.
- public function GetFadePoints
(
const
AMaxPoints :
Integer
=
$8
)
: TGorillaFMODFadePoints
;
Retrieve information about fade points stored within a Channel or ChannelGroup.
- public function GetDSP
(
AIndex :
Integer
)
: IGorillaFMODInterface
;
Retrieve the DSP unit at the specified index.
Parameters
- AIndex : Integer - Offset into the DSP chain, see FMOD_CHANNELCONTROL_DSP_INDEX for special named offsets.
- public procedure AddDSP
(
AIndex :
Integer; ADSP :
IGorillaFMODInterface
)
;
overload;
Add a pre-created DSP unit to the specified index in the DSP chain.
Parameters
- AIndex : Integer - Offset to add this DSP unit at in the DSP chain, see FMOD_CHANNELCONTROL_DSP_INDEX for special named offsets. Interface to a pre-created DSP unit to be inserted at the specified offset (IGorillaFMODDSP).
- ADSP : IGorillaFMODInterface - Offset to add this DSP unit at in the DSP chain, see FMOD_CHANNELCONTROL_DSP_INDEX for special named offsets. Interface to a pre-created DSP unit to be inserted at the specified offset (IGorillaFMODDSP).
- public procedure RemoveDSP
(
ADSP :
IGorillaFMODInterface
)
;
overload;
Remove a particular DSP unit from the DSP chain.
Parameters
- ADSP : IGorillaFMODInterface - Interface to a DSP unit (that exists in the DSP chain) you wish to remove (IGorillaFMODDSP).
- public function GetNumDSPs
(
)
: Integer
;
Retrieves the number of DSP units in the DSP chain.
- public procedure SetDSPIndex
(
ADSP :
IGorillaFMODInterface; AIndex :
Integer
)
;
overload;
Moves the position in the DSP chain of a specified DSP unit.
Parameters
- ADSP : IGorillaFMODInterface - Interface to a DSP unit that exists in the DSP chain (IGorillaFMODDSP). Offset in the DSP chain to move the DSP to, see FMOD_CHANNELCONTROL_DSP_INDEX for special named offsets.
- AIndex : Integer - Interface to a DSP unit that exists in the DSP chain (IGorillaFMODDSP). Offset in the DSP chain to move the DSP to, see FMOD_CHANNELCONTROL_DSP_INDEX for special named offsets.
- public function GetDSPIndex
(
ADSP :
IGorillaFMODInterface
)
: Integer
;
overload;
Retrieves the index in the DSP chain of the provided DSP.
Parameters
- ADSP : IGorillaFMODInterface - Interface to a DSP unit that exists in the DSP chain (IGorillaFMODDSP).
- public procedure SetChannelGroup
(
AChannelGroup :
IGorillaFMODChannelGroup
)
;
overload;
Sets a channel to belong to a specified channel group. A channel group can contain many channels.
- public function GetChannelGroup
(
)
: IGorillaFMODChannelGroup
;
overload;
Retrieves the currently assigned channel group for the channel.
- public procedure SetLoopPoints
(
ALoopStartType :
Cardinal; ALoopEndType :
Cardinal; AValue :
TGorillaFMODLoopPoints
)
;
Sets the loop points within the channel.
Parameters
- ALoopStartType :
Cardinal
-
The time format used for the loop start point. See FMOD_TIMEUNIT.
The time format used for the loop end point. See FMOD_TIMEUNIT.
LoopStart - The loop start point. This point in time is played, so it is inclusive.
LoopEnd - The loop end point. This point in time is played, so it is inclusive.
- ALoopEndType :
Cardinal
-
The time format used for the loop start point. See FMOD_TIMEUNIT.
The time format used for the loop end point. See FMOD_TIMEUNIT.
LoopStart - The loop start point. This point in time is played, so it is inclusive.
LoopEnd - The loop end point. This point in time is played, so it is inclusive.
- AValue :
TGorillaFMODLoopPoints
-
The time format used for the loop start point. See FMOD_TIMEUNIT.
The time format used for the loop end point. See FMOD_TIMEUNIT.
LoopStart - The loop start point. This point in time is played, so it is inclusive.
LoopEnd - The loop end point. This point in time is played, so it is inclusive.
- ALoopStartType :
Cardinal
-
The time format used for the loop start point. See FMOD_TIMEUNIT.
The time format used for the loop end point. See FMOD_TIMEUNIT.
- public function GetLoopPoints
(
ALoopStartType :
Cardinal; ALoopEndType :
Cardinal
)
: TGorillaFMODLoopPoints
;
Retrieves the loop points for the channel.
Parameters
- ALoopStartType : Cardinal - The time format used for the loop start point. See FMOD_TIMEUNIT. The time format used for the loop end point. See FMOD_TIMEUNIT.
- ALoopEndType : Cardinal - The time format used for the loop start point. See FMOD_TIMEUNIT. The time format used for the loop end point. See FMOD_TIMEUNIT.
- public function GetCurrentSound
(
)
: IGorillaFMODInterface
;
Retrieves the currently playing sound for this channel.
Properties
- public Index : Integer
- public IsPlaying : LongBool
- public IsVirtual : LongBool
Retrieves whether the channel is virtual (emulated) or not due to the virtual channel management system.
TRUE = inaudible and currently being emulated at no CPU cost
FALSE = real voice that should be audible.
read GetIsVirtual - public Paused : LongBool
- public Position[Index] : Cardinal
- public Volume : Single
- public VolumeRamp : LongBool
- public Audibility : Single
Retrieves the combined volume after 3D spatialization and geometry occlusion calculations including any volumes set via the API.
read GetAudibility - public Pitch : Single
- public Mute : LongBool
- public LowPassGain : Single
Retrieves the gain of the dry signal when lowpass filtering is applied.
read GetLowPassGain
write SetLowPassGain - public Mode : Cardinal
- public MixMatrix : TGorillaFMODMixMatrix
A 2D pan matrix that maps input channels (columns) to output speakers (rows).
read GetMixMatrix
write SetMixMatrix - public Priority : Integer
The priority for the channel after it has been played. Priority for the channel, from 0 (most important) to 256 (least important), default = 128.
read GetPriority
write SetPriority - public Frequency : Single
The channel frequency or playback rate, in Hz. Frequency value in Hz. This value can also be negative to play the sound backwards (negative frequencies allowed with non-stream sounds only).
read GetFrequency
write SetFrequency - public UserData : Pointer
A user value that can be retrieved with ChannelControl::getUserData.
read GetUserData
write SetUserData - public Delay : TGorillaFMODDelay
- public _3DAttributes : TGorillaFMOD3DAttributes
Sets the position and velocity used to apply panning, attenuation and doppler.
read Get3DAttributes
write Set3DAttributes - public _3DMinMaxDistance : TGorillaFMOD3DMinMaxDistance
- public _3DConeSettings : TGorillaFMOD3DConeSettings
The angles that define the sound projection cone including the volume when outside the cone.
read Get3DConeSettings
write Set3DConeSettings - public _3DConeOrientation : TPoint3D
The orientation of the sound projection cone. Coordinates of the sound cone orientation vector, the vector information represents the center of the sound cone.
read Get3DConeOrientation
write Set3DConeOrientation - public _3DCustomRolloff : TGorillaFMOD3DCustomRolloff
Retrieves a pointer to the current custom rolloff curve.
read Get3DCustomRolloff
write Set3DCustomRolloff - public _3DOcclusion : TGorillaFMOD3DOcclusion
The occlusion factors manually for when the FMOD geometry engine is not being used.
read Get3DOcclusion
write Set3DOcclusion - public _3DSpread : Single
The spread of a 3D sound in speaker space. Speaker spread angle. 0 = all sound channels are located at the same speaker location and is 'mono'. 360 = all sound channels are located at the opposite speaker location to the speaker location that it should be according to 3D position. Default = 0.
read Get3DSpread
write Set3DSpread - public _3DLevel : Single
How much the 3D engine has an effect on the channel, versus that set by 2D panning functions.
read Get3DLevel
write Set3DLevel - public _3DDopplerLevel : Single
- public _3DDistanceFilter : TGorillaFMOD3DDistanceFilter
Control the behaviour of a 3D distance filter, whether to enable or disable it, and frequency characteristics.
read Get3DDistanceFilter
write Set3DDistanceFilter - public LoopCount : Integer