Gorilla.Audio.FMOD.Intf.Sound
Unit Gorilla.Audio.FMOD.Intf.Sound.pasInterfaces
- interface IGorillaFMODSound
Records
- record TGorillaFMODSoundDefaults
- record TGorillaFMODSoundFormat
- record TGorillaFMODSoundNumTags
- record TGorillaFMODOpenState
- record TGorillaFMODSyncPointInfo
Constants
- const GORILLA_AUDIO_FMOD_STREAM_MODE_MEMORY : Integer = $880;
IGorillaFMODSound
Wrapper record structure for sound instances.
Methods
Retrieves a handle to a Sound object that is contained within the parent sound.
Parameters
- const AIndex : Integer - Index of the subsound to retrieve within this sound.
Plays a sound object on a particular channel and ChannelGroup if desired.
Plays a sound object on a particular channel and ChannelGroup if desired.
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.
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.
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.
Helper function to get all tags in a list. The method will implicitly call GetTag to retrieve all embedded tags.
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.
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
- APCM : Cardinal - Offset to seek to in PCM samples.
Moves the sound from its existing SoundGroup to the specified sound group.
Retrieves the sound's current soundgroup.
Retrieve a handle to a sync point. These points can be user generated or can come from a wav file with embedded markers.
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.
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.
Deletes a syncpoint within the sound. These points can be user generated or can come from a wav file with embedded markers.
Parameters
- APoint : PFMOD_SyncPoint - Address of an FMOD_SYNCPOINT object.
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.
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.
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.
Retrieves 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.
Properties
Retrieves the mode bits set by the codec and the user when opening the sound.
read GetModewrite SetMode
Retrieves a sound's default attributes for when it is played on a channel with System::playSound.
read GetDefaultswrite SetDefaults
Retrieve the minimum and maximum audible distance for a sound.
read Get3DMinMaxDistancewrite Set3DMinMaxDistance
Retrieves the inside and outside angles of the sound projection cone.
read Get3DConeSettingswrite Set3DConeSettings
Retrieves a pointer to the sound's current custom rolloff curve.
read Get3DCustomRolloffwrite Set3DCustomRolloff
Retrieves the state a sound is in after FMOD_NONBLOCKING has been used to open it, or the state of the streaming buffer.
read GetOpenStateRetrieves 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 GetNumSyncPointsA user value that the Sound object will store internally. Can be retrieved with Sound::getUserData.
read GetUserDatawrite SetUserData