Gorilla.Audio.FMOD.Intf.Sound

Unit Gorilla.Audio.FMOD.Intf.Sound.pas

Interfaces

Records

Constants

  • const GORILLA_AUDIO_FMOD_STREAM_MODE_MEMORY : Integer = $880;

IGorillaFMODSound

Wrapper record structure for sound instances.

Methods

public function GetParent  ( )  : IGorillaFMODSound ;  abstract virtual;
public function GetLength  ( AIndex :  Cardinal )  : Cardinal ;  abstract virtual;
public function GetName  ( )  : string ;  abstract virtual;
public function GetMode  ( )  : Cardinal ;  abstract virtual;
public procedure SetMode  ( const  AValue :  Cardinal ) ;  abstract virtual;
public function GetDefaults  ( )  : TGorillaFMODSoundDefaults ;  abstract virtual;
public procedure SetDefaults  ( const  AValue :  TGorillaFMODSoundDefaults ) ;  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 Get3DCustomRolloff  ( )  : TGorillaFMOD3DCustomRolloff ;  abstract virtual;
public procedure Set3DCustomRolloff  ( const  AValue :  TGorillaFMOD3DCustomRolloff ) ;  abstract virtual;
public function GetFormat  ( )  : TGorillaFMODSoundFormat ;  abstract virtual;
public function GetNumSubSounds  ( )  : Integer ;  abstract virtual;
public function GetNumTags  ( )  : TGorillaFMODSoundNumTags ;  abstract virtual;
public function GetOpenState  ( )  : TGorillaFMODOpenState ;  abstract virtual;
public function GetNumSyncPoints  ( )  : Integer ;  abstract virtual;
public function GetLoopCount  ( )  : Integer ;  abstract virtual;
public procedure SetLoopCount  ( const  AValue :  Integer ) ;  abstract virtual;
public function GetMusicNumChannels  ( )  : Integer ;  abstract virtual;
public procedure SetMusicSpeed  ( const  AValue :  Single ) ;  abstract virtual;
public function GetMusicSpeed  ( )  : Single ;  abstract virtual;
public procedure SetUserData  ( const  AValue :  Pointer ) ;  abstract virtual;
public function GetUserData  ( )  : Pointer ;  abstract virtual;
public function GetSubSound  ( const  AIndex :  Integer )  : IGorillaFMODSound ;  abstract virtual;

Retrieves a handle to a Sound object that is contained within the parent sound.

Parameters

public procedure Play  ( AChannelGroup :  IGorillaFMODChannelGroup  =  nil ; APaused :  LongBool  =  False ) ;  abstract virtual;

Plays a sound object on a particular channel and ChannelGroup if desired.

public function PlayWithChannel  ( AChannelGroup :  IGorillaFMODChannelGroup  =  nil ; APaused :  LongBool  =  False )  : IGorillaFMODChannel ;  abstract virtual;

Plays a sound object on a particular channel and ChannelGroup if desired.

public procedure Lock  ( AOffset :  Cardinal; ALength :  Cardinal; APtr1 :  PPointer; APtr2 :  PPointer; out  ALen1 :  Cardinal; out  ALen2 :  Cardinal ) ;  abstract virtual;

Returns a pointer to the beginning of the sample data for a sound.

Parameters

  • AOffset :  Cardinal  -  Offset in bytes to the position you want to lock in the sample buffer. Number of bytes you want to lock in the sample buffer. Address of a pointer that will point to the first part of the locked data. Address of a pointer that will point to the second part of the locked data. This will be null if the data locked hasn't wrapped at the end of the buffer. Length of data in bytes that was locked for APtr1. Length of data in bytes that was locked for APtr2. This will be 0 if the data locked hasn't wrapped at the end of the buffer.
  • ALength :  Cardinal  -  Offset in bytes to the position you want to lock in the sample buffer. Number of bytes you want to lock in the sample buffer. Address of a pointer that will point to the first part of the locked data. Address of a pointer that will point to the second part of the locked data. This will be null if the data locked hasn't wrapped at the end of the buffer. Length of data in bytes that was locked for APtr1. Length of data in bytes that was locked for APtr2. This will be 0 if the data locked hasn't wrapped at the end of the buffer.
  • APtr1 :  PPointer  -  Offset in bytes to the position you want to lock in the sample buffer. Number of bytes you want to lock in the sample buffer. Address of a pointer that will point to the first part of the locked data. Address of a pointer that will point to the second part of the locked data. This will be null if the data locked hasn't wrapped at the end of the buffer. Length of data in bytes that was locked for APtr1. Length of data in bytes that was locked for APtr2. This will be 0 if the data locked hasn't wrapped at the end of the buffer.
  • APtr2 :  PPointer  -  Offset in bytes to the position you want to lock in the sample buffer. Number of bytes you want to lock in the sample buffer. Address of a pointer that will point to the first part of the locked data. Address of a pointer that will point to the second part of the locked data. This will be null if the data locked hasn't wrapped at the end of the buffer. Length of data in bytes that was locked for APtr1. Length of data in bytes that was locked for APtr2. This will be 0 if the data locked hasn't wrapped at the end of the buffer.
  • out  ALen1 :  Cardinal  -  Offset in bytes to the position you want to lock in the sample buffer. Number of bytes you want to lock in the sample buffer. Address of a pointer that will point to the first part of the locked data. Address of a pointer that will point to the second part of the locked data. This will be null if the data locked hasn't wrapped at the end of the buffer. Length of data in bytes that was locked for APtr1. Length of data in bytes that was locked for APtr2. This will be 0 if the data locked hasn't wrapped at the end of the buffer.
  • out  ALen2 :  Cardinal  -  Offset in bytes to the position you want to lock in the sample buffer. Number of bytes you want to lock in the sample buffer. Address of a pointer that will point to the first part of the locked data. Address of a pointer that will point to the second part of the locked data. This will be null if the data locked hasn't wrapped at the end of the buffer. Length of data in bytes that was locked for APtr1. Length of data in bytes that was locked for APtr2. This will be 0 if the data locked hasn't wrapped at the end of the buffer.
public procedure Unlock  ( APtr1 :  Pointer; APtr2 :  Pointer; ALen1 :  Cardinal; ALen2 :  Cardinal ) ;  abstract virtual;

Releases previous sample data lock from Sound::lock.

Parameters

  • APtr1 :  Pointer  -  Pointer to the 1st locked portion of sample data, from Sound::lock. Pointer to the 2nd locked portion of sample data, from Sound::lock. Length of data in bytes that was locked for ptr1. Length of data in bytes that was locked for ptr2. This will be 0 if the data locked hasn't wrapped at the end of the buffer.
  • APtr2 :  Pointer  -  Pointer to the 1st locked portion of sample data, from Sound::lock. Pointer to the 2nd locked portion of sample data, from Sound::lock. Length of data in bytes that was locked for ptr1. Length of data in bytes that was locked for ptr2. This will be 0 if the data locked hasn't wrapped at the end of the buffer.
  • ALen1 :  Cardinal  -  Pointer to the 1st locked portion of sample data, from Sound::lock. Pointer to the 2nd locked portion of sample data, from Sound::lock. Length of data in bytes that was locked for ptr1. Length of data in bytes that was locked for ptr2. This will be 0 if the data locked hasn't wrapped at the end of the buffer.
  • ALen2 :  Cardinal  -  Pointer to the 1st locked portion of sample data, from Sound::lock. Pointer to the 2nd locked portion of sample data, from Sound::lock. Length of data in bytes that was locked for ptr1. Length of data in bytes that was locked for ptr2. This will be 0 if the data locked hasn't wrapped at the end of the buffer.
public procedure GetTag  ( const  AName :  string; AIndex :  Integer; ATag :  PFMOD_Tag ) ;  abstract virtual;

Retrieves a descriptive tag stored by the sound, to describe things like the song name, author etc.

Parameters

  • const  AName :  string  -  Optional. Name of a tag to retrieve. Used to specify a particular tag if the user requires it. To get all types of tags leave this parameter as 0 or NULL. Index into the tag list. If the name parameter is null, then the index is the index into all tags present, from 0 up to but not including the numtags value returned by Sound::getNumTags. If name is not null, then index is the index from 0 up to the number of tags with the same name. For example if there were 2 tags with the name "TITLE" then you could use 0 and 1 to reference them. Specifying an index of -1 returns new or updated tags. This can be used to pull tags out as they are added or updated. Pointer to a tag structure. This will receive all the details regarding the tag specified by name / index.
  • AIndex :  Integer  -  Optional. Name of a tag to retrieve. Used to specify a particular tag if the user requires it. To get all types of tags leave this parameter as 0 or NULL. Index into the tag list. If the name parameter is null, then the index is the index into all tags present, from 0 up to but not including the numtags value returned by Sound::getNumTags. If name is not null, then index is the index from 0 up to the number of tags with the same name. For example if there were 2 tags with the name "TITLE" then you could use 0 and 1 to reference them. Specifying an index of -1 returns new or updated tags. This can be used to pull tags out as they are added or updated. Pointer to a tag structure. This will receive all the details regarding the tag specified by name / index.
  • ATag :  PFMOD_Tag  -  Optional. Name of a tag to retrieve. Used to specify a particular tag if the user requires it. To get all types of tags leave this parameter as 0 or NULL. Index into the tag list. If the name parameter is null, then the index is the index into all tags present, from 0 up to but not including the numtags value returned by Sound::getNumTags. If name is not null, then index is the index from 0 up to the number of tags with the same name. For example if there were 2 tags with the name "TITLE" then you could use 0 and 1 to reference them. Specifying an index of -1 returns new or updated tags. This can be used to pull tags out as they are added or updated. Pointer to a tag structure. This will receive all the details regarding the tag specified by name / index.
public function GetAllTagsAsList  ( )  : TGorillaFMODTagList ;  abstract virtual;

Helper function to get all tags in a list. The method will implicitly call GetTag to retrieve all embedded tags.

public function ReadData  ( ABuffer :  Pointer; ALength :  Cardinal )  : Cardinal ;  abstract virtual;

Reads data from an opened sound to a specified pointer, using the FMOD codec created internally.

Parameters

  • ABuffer :  Pointer  -  A buffer that receives the decoded data from the sound. Number of bytes to read into the buffer.
  • ALength :  Cardinal  -  A buffer that receives the decoded data from the sound. Number of bytes to read into the buffer.
public procedure SeekData  ( APCM :  Cardinal ) ;  abstract virtual;

Seeks a sound for use with data reading. This is not a function to 'seek a sound' for normal use. This is for use in conjunction with Sound::readData.

Parameters

public procedure SetSoundGroup  ( ASoundGroup :  IGorillaFMODSoundGroup ) ;  abstract virtual;

Moves the sound from its existing SoundGroup to the specified sound group.

public function GetSoundGroup  ( )  : IGorillaFMODSoundGroup ;  abstract virtual;

Retrieves the sound's current soundgroup.

public function GetSyncPoint  ( AIndex :  Integer )  : PFMOD_SyncPoint ;  abstract virtual;

Retrieve a handle to a sync point. These points can be user generated or can come from a wav file with embedded markers.

public function GetSyncPointInfo  ( AName :  string; AOffsetType :  Cardinal )  : TGorillaFMODSyncPointInfo ;  abstract virtual;

Retrieves information on an embedded sync point. These points can be user generated or can come from a wav file with embedded markers.

Parameters

  • AName :  string  -  the name of the syncpoint. Optional. Specify 0 or NULL to ignore. A timeunit parameter to determine a desired format for the offset parameter. For example the offset can be specified as pcm samples, or milliseconds.
  • AOffsetType :  Cardinal  -  the name of the syncpoint. Optional. Specify 0 or NULL to ignore. A timeunit parameter to determine a desired format for the offset parameter. For example the offset can be specified as pcm samples, or milliseconds.
public function AddSyncPoint  ( AOffset :  Cardinal; AOffsetType :  Cardinal; const  AName :  string )  : PFMOD_SyncPoint ;  abstract virtual;

Adds a sync point at a specific time within the sound. These points can be user generated or can come from a wav file with embedded markers.

Parameters

  • AOffset :  Cardinal  -  Offset in units specified by offsettype to add the callback syncpoint for a sound. Offset type to describe the offset provided. Could be PCM samples or milliseconds for example. A name character string to be stored with the sync point. This will be provided via the sync point callback.
  • AOffsetType :  Cardinal  -  Offset in units specified by offsettype to add the callback syncpoint for a sound. Offset type to describe the offset provided. Could be PCM samples or milliseconds for example. A name character string to be stored with the sync point. This will be provided via the sync point callback.
  • const  AName :  string  -  Offset in units specified by offsettype to add the callback syncpoint for a sound. Offset type to describe the offset provided. Could be PCM samples or milliseconds for example. A name character string to be stored with the sync point. This will be provided via the sync point callback.
public procedure DeleteSyncPoint  ( APoint :  PFMOD_SyncPoint ) ;  abstract virtual;

Deletes a syncpoint within the sound. These points can be user generated or can come from a wav file with embedded markers.

Parameters

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

Sets the loop points within a sound.

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 a sound.

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 procedure SetMusicChannelVolume  ( AChannel :  Integer; AVolume :  Single ) ;  abstract virtual;

Sets the volume of a MOD/S3M/XM/IT/MIDI music channel volume.

Parameters

  • AChannel :  Integer  -  MOD/S3M/XM/IT/MIDI music subchannel to retrieve the volume for. The volume of the channel from 0.0 to 1.0. Default = 1.0.
  • AVolume :  Single  -  MOD/S3M/XM/IT/MIDI music subchannel to retrieve the volume for. The volume of the channel from 0.0 to 1.0. Default = 1.0.
public function GetMusicChannelVolume  ( AChannel :  Integer )  : Single ;  abstract virtual;

Retrieves the volume of a MOD/S3M/XM/IT/MIDI music channel volume.

Parameters

Properties

public Parent : IGorillaFMODSound

If sound is subsound, the property returns the parent sound instance.

read GetParent
public Length[Index] : Cardinal

Retrieves the length of the sound using the specified time unit.

read GetLength
public Name : string

Retrieves the name of a sound. The name of the sound encoded in a UTF-8 string.

read GetName
public Mode : Cardinal

Retrieves the mode bits set by the codec and the user when opening the sound.

read GetMode
write SetMode
public Defaults : TGorillaFMODSoundDefaults

Retrieves a sound's default attributes for when it is played on a channel with System::playSound.

read GetDefaults
write SetDefaults
public _3DMinMaxDistance : TGorillaFMOD3DMinMaxDistance

Retrieve the minimum and maximum audible distance for a sound.

read Get3DMinMaxDistance
write Set3DMinMaxDistance
public _3DConeSettings : TGorillaFMOD3DConeSettings

Retrieves the inside and outside angles of the sound projection cone.

read Get3DConeSettings
write Set3DConeSettings
public _3DCustomRolloff : TGorillaFMOD3DCustomRolloff

Retrieves a pointer to the sound's current custom rolloff curve.

read Get3DCustomRolloff
write Set3DCustomRolloff
public Format : TGorillaFMODSoundFormat

Returns format information about the sound.

read GetFormat
public NumSubSounds : Integer

Retrieves the number of subsounds stored within a sound.

read GetNumSubSounds
public NumTags : TGorillaFMODSoundNumTags

Retrieves the number of tags belonging to a sound.

read GetNumTags
public OpenState : TGorillaFMODOpenState

Retrieves the state a sound is in after FMOD_NONBLOCKING has been used to open it, or the state of the streaming buffer.

read GetOpenState
public NumSyncPoints : Integer

Retrieves the number of sync points stored within a sound. These points can be user generated or can come from a wav file with embedded markers.

read GetNumSyncPoints
public LoopCount : Integer

The current loop count value for the specified sound.

read GetLoopCount
write SetLoopCount
public MusicNumChannels : Integer

Gets the number of music channels inside a MOD/S3M/XM/IT/MIDI file.

read GetMusicNumChannels
public MusicSpeed : Single

The relative speed of MOD/S3M/XM/IT/MIDI music.

read GetMusicSpeed
write SetMusicSpeed
public UserData : Pointer

A user value that the Sound object will store internally. Can be retrieved with Sound::getUserData.

read GetUserData
write SetUserData