Gorilla.Audio.FMOD.Intf.Channel

Unit Gorilla.Audio.FMOD.Intf.Channel.pas

Interfaces

IGorillaFMODChannel

Default wrapper record structure for handling channels of FMOD.

Methods

public function GetIndex  ( )  : Integer ;  abstract virtual;
public function GetIsPlaying  ( )  : LongBool ;  abstract virtual;
public function GetIsVirtual  ( )  : LongBool ;  abstract virtual;
public function GetPaused  ( )  : LongBool ;  abstract virtual;
public procedure SetPaused  ( const  AValue :  LongBool ) ;  abstract virtual;
public function GetPosition  ( AIndex :  Cardinal )  : Cardinal ;  abstract virtual;
public procedure SetPosition  ( AIndex :  Cardinal; const  AValue :  Cardinal ) ;  abstract virtual;
public function GetVolume  ( )  : Single ;  abstract virtual;
public procedure SetVolume  ( const  AValue :  Single ) ;  abstract virtual;
public function GetVolumeRamp  ( )  : LongBool ;  abstract virtual;
public procedure SetVolumeRamp  ( const  AValue :  LongBool ) ;  abstract virtual;
public function GetAudibility  ( )  : Single ;  abstract virtual;
public function GetPitch  ( )  : Single ;  abstract virtual;
public procedure SetPitch  ( const  AValue :  Single ) ;  abstract virtual;
public function GetMute  ( )  : LongBool ;  abstract virtual;
public procedure SetMute  ( const  AValue :  LongBool ) ;  abstract virtual;
public function GetLowPassGain  ( )  : Single ;  abstract virtual;
public procedure SetLowPassGain  ( const  AValue :  Single ) ;  abstract virtual;
public function GetMode  ( )  : Cardinal ;  abstract virtual;
public procedure SetMode  ( const  AValue :  Cardinal ) ;  abstract virtual;
public function GetMixMatrix  ( )  : TGorillaFMODMixMatrix ;  abstract virtual;
public procedure SetMixMatrix  ( const  AValue :  TGorillaFMODMixMatrix ) ;  abstract virtual;
public function GetPriority  ( )  : Integer ;  abstract virtual;
public procedure SetPriority  ( const  AValue :  Integer ) ;  abstract virtual;
public function GetFrequency  ( )  : Single ;  abstract virtual;
public procedure SetFrequency  ( const  AValue :  Single ) ;  abstract virtual;
public function GetUserData  ( )  : Pointer ;  abstract virtual;
public procedure SetUserData  ( const  AValue :  Pointer ) ;  abstract virtual;
public function GetDelay  ( )  : TGorillaFMODDelay ;  abstract virtual;
public procedure SetDelay  ( const  AValue :  TGorillaFMODDelay ) ;  abstract virtual;
public function Get3DAttributes  ( )  : TGorillaFMOD3DAttributes ;  abstract virtual;
public procedure Set3DAttributes  ( const  AValue :  TGorillaFMOD3DAttributes ) ;  abstract virtual;
public function Get3DMinMaxDistance  ( )  : TGorillaFMOD3DMinMaxDistance ;  abstract virtual;
public procedure Set3DMinMaxDistance  ( const  AValue :  TGorillaFMOD3DMinMaxDistance ) ;  abstract virtual;
public function Get3DConeSettings  ( )  : TGorillaFMOD3DConeSettings ;  abstract virtual;
public procedure Set3DConeSettings  ( const  AValue :  TGorillaFMOD3DConeSettings ) ;  abstract virtual;
public function Get3DConeOrientation  ( )  : TPoint3D ;  abstract virtual;
public procedure Set3DConeOrientation  ( const  AValue :  TPoint3D ) ;  abstract virtual;
public function Get3DCustomRolloff  ( )  : TGorillaFMOD3DCustomRolloff ;  abstract virtual;
public procedure Set3DCustomRolloff  ( const  AValue :  TGorillaFMOD3DCustomRolloff ) ;  abstract virtual;
public function Get3DOcclusion  ( )  : TGorillaFMOD3DOcclusion ;  abstract virtual;
public procedure Set3DOcclusion  ( const  AValue :  TGorillaFMOD3DOcclusion ) ;  abstract virtual;
public function Get3DSpread  ( )  : Single ;  abstract virtual;
public procedure Set3DSpread  ( const  AValue :  Single ) ;  abstract virtual;
public function Get3DLevel  ( )  : Single ;  abstract virtual;
public procedure Set3DLevel  ( const  AValue :  Single ) ;  abstract virtual;
public function Get3DDopplerLevel  ( )  : Single ;  abstract virtual;
public procedure Set3DDopplerLevel  ( const  AValue :  Single ) ;  abstract virtual;
public function Get3DDistanceFilter  ( )  : TGorillaFMOD3DDistanceFilter ;  abstract virtual;
public procedure Set3DDistanceFilter  ( const  AValue :  TGorillaFMOD3DDistanceFilter ) ;  abstract virtual;
public function GetLoopCount  ( )  : Integer ;  abstract virtual;
public procedure SetLoopCount  ( const  AValue :  Integer ) ;  abstract virtual;
public procedure Stop  ( ) ;  abstract virtual;

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 ) ;  abstract virtual;

Sets the wet level (or send level) of a particular reverb instance.

public function GetReverbProperties  ( AInstance :  Integer )  : Single ;  abstract virtual;

Retrieves the wet level (or send level) for a particular reverb instance.

public procedure SetCallback  ( ACallback :  FMOD_CHANNELCONTROL_CALLBACK ) ;  abstract virtual;

Sets a callback to perform action for a specific event.

public procedure SetPan  ( APan :  Single ) ;  abstract virtual;

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 ) ;  abstract virtual;

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).

public procedure SetMixLevelsInput  ( const  ALevels :  TArray<System.Single>; const  ANumlevels :  Integer ) ;  abstract virtual;

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

public procedure GetDSPClock  ( var  ADSPClock :  UInt64; var  AParentClock :  UInt64 ) ;  abstract virtual;

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 ) ;  abstract virtual;

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 ) ;  abstract virtual;

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 ) ;  abstract virtual;

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 ;  abstract virtual;

Retrieve information about fade points stored within a Channel or ChannelGroup.

public function GetDSP  ( AIndex :  Integer )  : IGorillaFMODInterface ;  abstract virtual;

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 ) ;  abstract overload virtual;

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 ) ;  abstract overload virtual;

Remove a particular DSP unit from the DSP chain.

Parameters

public function GetNumDSPs  ( )  : Integer ;  abstract virtual;

Retrieves the number of DSP units in the DSP chain.

public procedure SetDSPIndex  ( ADSP :  IGorillaFMODInterface; AIndex :  Integer ) ;  abstract overload virtual;

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 ;  abstract overload virtual;

Retrieves the index in the DSP chain of the provided DSP.

Parameters

public procedure SetChannelGroup  ( AChannelGroup :  IGorillaFMODChannelGroup ) ;  abstract overload virtual;

Sets a channel to belong to a specified channel group. A channel group can contain many channels.

public function GetChannelGroup  ( )  : IGorillaFMODChannelGroup ;  abstract overload virtual;

Retrieves the currently assigned channel group for the channel.

public procedure SetLoopPoints  ( ALoopStartType :  Cardinal; ALoopEndType :  Cardinal; AValue :  TGorillaFMODLoopPoints ) ;  abstract virtual;

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.

public function GetLoopPoints  ( ALoopStartType :  Cardinal; ALoopEndType :  Cardinal )  : TGorillaFMODLoopPoints ;  abstract virtual;

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 ;  abstract virtual;

Retrieves the currently playing sound for this channel.

Properties

public Index : Integer

Retrieves the internal channel index for a channel.

read GetIndex
public IsPlaying : LongBool

Retrieves the playing state.

read GetIsPlaying
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

Retrieves the paused state. Address of a variable that receives the current paused state, true = paused, false = not paused.

read GetPaused
write SetPaused
public Position[Index] : Cardinal

Returns the current playback position for the specified channel.

read GetPosition
write SetPosition
public Volume : Single

The linear volume level.

read GetVolume
write SetVolume
public VolumeRamp : LongBool

The volume ramp state.

read GetVolumeRamp
write SetVolumeRamp
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

The pitch value, 0.5 = half pitch, 2.0 = double pitch, etc.

read GetPitch
write SetPitch
public Mute : LongBool

The current mute state, true = mute (silent), false = normal volume.

read GetMute
write SetMute
public LowPassGain : Single

Retrieves the gain of the dry signal when lowpass filtering is applied.

read GetLowPassGain
write SetLowPassGain
public Mode : Cardinal

The mode bit flags for the channel.

read GetMode
write SetMode
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

Sets a start (and/or stop) time relative to the parent channel group DSP clock, with sample accuracy.

read GetDelay
write SetDelay
public _3DAttributes : TGorillaFMOD3DAttributes

Sets the position and velocity used to apply panning, attenuation and doppler.

read Get3DAttributes
write Set3DAttributes
public _3DMinMaxDistance : TGorillaFMOD3DMinMaxDistance

The minimum and maximum audible distance.

read Get3DMinMaxDistance
write Set3DMinMaxDistance
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

The amount by which doppler is scaled.

read Get3DDopplerLevel
write Set3DDopplerLevel
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

A channel to loop a specified number of times before stopping.

read GetLoopCount
write SetLoopCount