Gorilla.Audio.FMOD.Intf.System
Unit Gorilla.Audio.FMOD.Intf.System.pasInterfaces
- interface IGorillaFMODSystem
Records
- record TGorillaFMODDriverInfo
- record TGorillaFMODSoftwareFormat
- record TGorillaFMODDSPBufferSize
- record TGorillaFMODPluginInfo
- record TGorillaFMODSpeakerPosition
- record TGorillaFMODStreamBufferSize
- record TGorillaFMOD3DSettings
- record TGorillaFMOD3DListenerAttr
- record TGorillaFMODChannelsPlaying
- record TGorillaFMODCPUUsage
- record TGorillaFMODFileUsage
- record TGorillaFMODSoundRAM
- record TGorillaFMODRecordNumDrivers
- record TGorillaFMODRecordDriverInfo
- record TGorillaFMODGeometryOcclusion
TGorillaFMOD3DListenerAttr
Fields
Methods
- public function Create
(
)
: TGorillaFMOD3DListenerAttr
;
static overload;
Creates an empty 3D listener attributes record.
- public function Create
(
const
APos :
TPoint3D; const
AVelocity :
TPoint3D; const
AForward :
TPoint3D; const
AUp :
TPoint3D
)
: TGorillaFMOD3DListenerAttr
;
static overload;
Fills a 3D listener attributes record with the supplied vectors.
- public function Create
(
const
APos :
TPoint3D; const
AVelocity :
TPoint3D
)
: TGorillaFMOD3DListenerAttr
;
static overload;
Fills a 3D listener attributes record with the supplied vectors. Forward and up vector will be automatically be filled with OpenGL compatibility.
- public function Create
(
const
APos :
TPoint3D
)
: TGorillaFMOD3DListenerAttr
;
static overload;
Fills a 3D listener attributes record with the supplied vectors. Forward and up vector will be automatically be filled with OpenGL compatibility. Velocity will be set to zero.
IGorillaFMODSystem
Wrapper record structure for FMOD system functionality.
Remarks
Managing allocations, groups, channels and sounds.Methods
Updates the FMOD system. This should be called once per 'game' tick, or once per frame in your application.
Retrieves identification information about a sound device specified by its index, and specific to the output mode set with System::setOutput.
Specify a base search path for plugins so they can be placed somewhere else than the directory of the main executable.
Loads an FMOD plugin. This could be a DSP, file format or output plugin.
Parameters
- const AFilename : string - Filename of the plugin to be loaded encoded in a UTF-8 string. FMOD_PLUGINTYPE_CODEC only, priority of the codec compared to other codecs. 0 = most important, higher numbers = less importance. Pointer to an unsigned int to receive the plugin handle, for later use.
- APriority : Cardinal - Filename of the plugin to be loaded encoded in a UTF-8 string. FMOD_PLUGINTYPE_CODEC only, priority of the codec compared to other codecs. 0 = most important, higher numbers = less importance. Pointer to an unsigned int to receive the plugin handle, for later use.
- out AHandle : Cardinal - Filename of the plugin to be loaded encoded in a UTF-8 string. FMOD_PLUGINTYPE_CODEC only, priority of the codec compared to other codecs. 0 = most important, higher numbers = less importance. Pointer to an unsigned int to receive the plugin handle, for later use.
Returns the number of plugins nested in the one plugin file.
Parameters
- AHandle : Cardinal - Handle obtained from System::loadPlugin.
Returns nested plugin definition for the given index.
Parameters
- AHandle : Cardinal - Handle obtained from System::loadPlugin. Index of definition.
- AIndex : Integer - Handle obtained from System::loadPlugin. Index of definition.
Retrieves the number of available plugins loaded into FMOD at the current time.
Parameters
- APluginType : FMOD_PLUGINTYPE - Plugin type such as FMOD_PLUGINTYPE_OUTPUT, FMOD_PLUGINTYPE_CODEC or FMOD_PLUGINTYPE_DSP.
Retrieves the handle of a plugin based on its type and relative index. Use System::getNumPlugins to enumerate plugins.
Parameters
- APluginType : FMOD_PLUGINTYPE - The type of plugin type such as FMOD_PLUGINTYPE_OUTPUT, FMOD_PLUGINTYPE_CODEC or FMOD_PLUGINTYPE_DSP. The relative index for the type of plugin.
- AIndex : Integer - The type of plugin type such as FMOD_PLUGINTYPE_OUTPUT, FMOD_PLUGINTYPE_CODEC or FMOD_PLUGINTYPE_DSP. The relative index for the type of plugin.
Retrieves information to display for the selected plugin.
Creates a DSP unit object which is either built in or loaded as a plugin, to be inserted into a DSP network, for the purposes of sound filtering or sound generation. This function creates a DSP unit that can be enumerated by using System::getNumPlugins and System::getPluginInfo.
Parameters
- AHandle : Cardinal - Handle to a pre-existing DSP plugin, loaded by System::loadPlugin. Address of a variable to receive a newly created FMOD::DSP object.
- out ADSP : IGorillaFMODDSP - Handle to a pre-existing DSP plugin, loaded by System::loadPlugin. Address of a variable to receive a newly created FMOD::DSP object.
Retrieve the description structure for a pre-existing DSP plugin.
Parameters
- AHandle : Cardinal - Handle to a pre-existing DSP plugin, loaded by System::loadPlugin. Address of a variable to receive the description structure for the DSP.
- out ADescr : PFMOD_DSPDescription - Handle to a pre-existing DSP plugin, loaded by System::loadPlugin. Address of a variable to receive the description structure for the DSP.
Creates a file format codec to be used by FMOD for opening custom file types.
Parameters
- ADescr : FMOD_CODEC_DESCRIPTION - A FMOD_CODEC_DESCRIPTION structure containing information about the codec. Priority of the codec compared to other codecs. 0 = most important, higher numbers = less importance.
- APriority : Cardinal - A FMOD_CODEC_DESCRIPTION structure containing information about the codec. Priority of the codec compared to other codecs. 0 = most important, higher numbers = less importance.
Register a user-defined DSP effect for use with the System. This function allows you to register statically-linked DSP effects. Once registered, you can create instances of the DSP effect by using System::createDSPByPlugin.
Parameters
- ADescr : FMOD_DSP_DESCRIPTION - A FMOD_DSP_DESCRIPTION structure, containing information about the DSP effect. Some members of FMOD_DSP_DESCRIPTION are referenced directly inside FMOD so the structure should be allocated statically or at least remain in memory for the lifetime of the system.
Register a user-defined output mode for use with the System. This function allows you to register statically-linked output modes. Once registered, you can use the output mode with System::setOutputByPlugin.
Parameters
- ADescr : FMOD_OUTPUT_DESCRIPTION - A FMOD_OUTPUT_DESCRIPTION structure, containing information about the output mode.
Retrieves the current speaker position information for the selected speaker.
Parameters
- ASpeaker : FMOD_SPEAKER - The selected speaker of interest to position.
This function allows the user to specify the position of their actual physical speaker to account for non standard setups.
It also allows the user to disable speakers from 3D consideration in a game.
The funtion is for describing the 'real world' speaker placement to provide a more natural panning solution for 3D sound. Graphical configuration screens in an application could draw icons for speaker placement that the user could position at their will.
Parameters
- ASpeaker :
FMOD_SPEAKER
-
The selected speaker of interest to position.
X - The 2D X position relative to the listener. Optional. Specify 0 or NULL to ignore.
Y - The 2D Y position relative to the listener. Optional. Specify 0 or NULL to ignore.
Active - The active state of a speaker.
- const
AValue :
TGorillaFMODSpeakerPosition
-
The selected speaker of interest to position.
X - The 2D X position relative to the listener. Optional. Specify 0 or NULL to ignore.
Y - The 2D Y position relative to the listener. Optional. Specify 0 or NULL to ignore.
Active - The active state of a speaker.
This retrieves the position, velocity and orientation of the specified 3D sound listener.
This updates the position, velocity and orientation of the specified 3D sound listener.
Parameters
- AListener :
Integer
-
Listener ID in a multi-listener environment.
Specify 0 if there is only 1 listener.
Pos - The position of the listener in world space, measured in distance units. Optional. Specify 0 or NULL to ignore.
Velocity - The velocity of the listener measured in distance units per second. Optional. Specify 0 or NULL to ignore.
_Forward - The forwards orientation of the listener. Optional. Specify 0 or NULL to ignore.
Up - The upwards orientation of the listener. Optional. Specify 0 or NULL to ignore.
- const
AValue :
TGorillaFMOD3DListenerAttr
-
Listener ID in a multi-listener environment.
Specify 0 if there is only 1 listener.
Pos - The position of the listener in world space, measured in distance units. Optional. Specify 0 or NULL to ignore.
Velocity - The velocity of the listener measured in distance units per second. Optional. Specify 0 or NULL to ignore.
_Forward - The forwards orientation of the listener. Optional. Specify 0 or NULL to ignore.
Up - The upwards orientation of the listener. Optional. Specify 0 or NULL to ignore.
When FMOD wants to calculate 3D volume for a channel, this callback can be used to override the internal volume calculation based on distance.
Parameters
- ACallback : FMOD_3D_ROLLOFF_CALLBACK - Pointer to a C function of type FMOD_3D_ROLLOFF_CALLBACK, that is used to override the FMOD volume calculation. Default is 0 or NULL. Setting the callback to null will return 3D calculation back to FMOD.
Suspend mixer thread and relinquish usage of audio hardware while maintaining internal state.
Resume mixer thread and reacquire access to audio hardware.
Gets the default matrix used to convert from one speaker mode to another.
Parameters
- ASourceSpeakerMode : FMOD_SPEAKERMODE - The speaker mode being converted from. The speaker mode being converted to. The number of source channels in the matrix. Optional. If this is 0, the number of source channels will be derived from 'sourcespeakermode'. Maximum of FMOD_MAX_CHANNEL_WIDTH. The output matrix. Its minumum size in floats must be the number of source channels multiplied by the number of target channels. Source and target channels cannot exceed FMOD_MAX_CHANNEL_WIDTH.
- ATargetSpeakerMode : FMOD_SPEAKERMODE - The speaker mode being converted from. The speaker mode being converted to. The number of source channels in the matrix. Optional. If this is 0, the number of source channels will be derived from 'sourcespeakermode'. Maximum of FMOD_MAX_CHANNEL_WIDTH. The output matrix. Its minumum size in floats must be the number of source channels multiplied by the number of target channels. Source and target channels cannot exceed FMOD_MAX_CHANNEL_WIDTH.
- AMatrixHop : Integer - The speaker mode being converted from. The speaker mode being converted to. The number of source channels in the matrix. Optional. If this is 0, the number of source channels will be derived from 'sourcespeakermode'. Maximum of FMOD_MAX_CHANNEL_WIDTH. The output matrix. Its minumum size in floats must be the number of source channels multiplied by the number of target channels. Source and target channels cannot exceed FMOD_MAX_CHANNEL_WIDTH.
- AMatrix : PSingle - The speaker mode being converted from. The speaker mode being converted to. The number of source channels in the matrix. Optional. If this is 0, the number of source channels will be derived from 'sourcespeakermode'. Maximum of FMOD_MAX_CHANNEL_WIDTH. The output matrix. Its minumum size in floats must be the number of source channels multiplied by the number of target channels. Source and target channels cannot exceed FMOD_MAX_CHANNEL_WIDTH.
Gets the a speaker mode's channel count.
Loads a sound into memory, or opens it for streaming.
Opens a sound for streaming. This function is a helper function that is the same as System::createSound but has the FMOD_CREATESTREAM flag added internally.
Creates a user defined DSP unit object to be inserted into a DSP network, for the purposes of sound filtering or sound generation.
A DSP unit can generate or filter incoming data. The data is created or filtered through use of the read callback that is defined by the user. See the definition for the FMOD_DSP_DESCRIPTION structure to find out what each member means. To be active, a unit must be inserted into the FMOD DSP network to be heard. Use functions such as ChannelGroup::addDSP, Channel::addDSP or DSP::addInput to do this. For more information and a detailed description (with diagrams) see the tutorial on the DSP system in the documentation.
Creates an FMOD defined built in DSP unit object to be inserted into a DSP network, for the purposes of sound filtering or sound generation. This function is used to create special effects that come built into FMOD.
Creates a channel group object. These objects can be used to assign channels to for group channel settings, such as volume. Channel groups are also used for sub-mixing. Any channels that are assigned to a channel group get submixed into that channel group's DSP.
Creates a sound group, which can store handles to multiple Sound pointers.
Creates a 'virtual reverb' object. This object reacts to 3D location and morphs the reverb environment based on how close it is to the reverb object's center. Multiple reverb objects can be created to achieve a multi-reverb environment. 1 Physical reverb object is used for all 3D reverb objects (slot 0 by default).
Plays a sound object on a particular channel and ChannelGroup if desired.
Plays a sound object on a particular channel and ChannelGroup if desired.
Plays a DSP unit object and its input network on a particular channel.
Plays a DSP unit object and its input network on a particular channel.
Retrieves a handle to a channel by ID.
Route the signal from a channel group into a seperate audio port on the output driver.
Disconnect a channel group from a and route audio back to the default port of the output driver
Sets parameters for the global reverb environment. To assist in defining reverb properties there are several presets available, see FMOD_REVERB_PRESETS
Retrieves the current reverb environment for the specified reverb instance.
Mutual exclusion function to lock the FMOD DSP engine (which runs asynchronously in another thread), so that it will not execute. If the FMOD DSP engine is already executing, this function will block until it has completed. The function may be used to synchronize DSP network operations carried out by the user. An example of using this function may be for when the user wants to construct a DSP sub-network, without the DSP engine executing in the background while the sub-network is still under construction.
Mutual exclusion function to unlock the FMOD DSP engine (which runs asynchronously in another thread) and let it continue executing.
Retrieves identification information about a sound device specified by its index, and specific to the output mode set with System::setOutput.
Retrieves the current recording position of the record buffer in PCM samples.
Starts the recording engine recording to the specified recording sound.
Stops the recording engine from recording to the specified recording sound.
Retrieves the state of the FMOD recording API, ie if it is currently recording or not.
Geometry creation function. This function will create a base geometry object which can then have polygons added to it.
Creates a geometry object from a block of memory which contains pre-saved geometry data, saved by Geometry::save.
Calculates geometry occlusion between a listener and a sound source.
Properties
Retrieves a pointer to the system level output device module. This means a pointer to a DirectX "LPDIRECTSOUND", or a WINMM handle, or with something like with FMOD_OUTPUTTYPE_NOSOUND output, the handle will be null or 0.
read GetOutputHandleRetrieves a handle to the internal master channel group. This is the default channel group that all channels play on. This channel group can be used to do things like set the master volume for all playing sounds. See the ChannelGroup API for more functionality.
read GetMasterChannelGroupRetrieves the default sound group, where all sounds are placed when they are created.
read GetMasterSoundGroupRetrieves in percent of CPU time - the amount of cpu usage that FMOD is taking for streaming/mixing and System::update combined.
read GetCPUUsageRetrieves the amount of dedicated sound ram available if the platform supports it. Most platforms use main ram to store audio data, so this function usually isn't necessary.
read GetSoundRAMRetrieves the current output system FMOD is using to address the hardware.
read GetOutputTypewrite SetOutputType
Retrieves the number of soundcard devices on the machine, specific to the output mode set with System::setOutput.
read GetNumDriversReturns the currently selected driver number. Drivers are enumerated when selecting a driver with System::setDriver or other driver related functions such as System::getNumDrivers or System::getDriverInfo.
read GetDriverwrite SetDriver
Retrieves the maximum number of software mixed channels possible.
read GetSoftwareChannelswrite SetSoftwareChannels
Retrieves the output format for the software mixer.
samplerate - Address of a variable that receives the sample rate of the mixer. Optional. Specify 0 or NULL to ignore.
speakermode - Address of a variable that receives the speaker setup of the mixer. Optional. Specify 0 or NULL to ignore.
numrawspeakers - Address of a variable that receives the number of speakers for FMOD_SPEAKERMODE_RAW mode. Optional. Specify 0 or NULL to ignore.read GetSoftwareFormat
write SetSoftwareFormat
Retrieves the buffer size settings for the FMOD software mixing engine.
bufferlength - Address of a variable that receives the mixer engine block size in samples. Default = 1024. (milliseconds = 1024 at 48khz = 1024 / 48000 * 1000 = 10.66ms). This means the mixer updates every 21.3ms. Optional. Specify 0 or NULL to ignore.
numbuffers - Address of a variable that receives the mixer engine number of buffers used. Default = 4. To get the total buffersize multiply the bufferlength by the numbuffers value. By default this would be 4*1024. Optional. Specify 0 or NULL to ignore.read GetDSPBufferSize
write SetDSPBufferSize
Retrieves the advanced settings value set for the system object.
read GetAdvancedSettingswrite SetAdvancedSettings
Returns the currently selected output as an id in the list of output plugins.
read GetOutputByPluginwrite SetOutputByPlugin
Returns the current internal buffersize settings for streamable sounds.
read GetStreamBufferSizewrite SetStreamBufferSize
Retrieves the global doppler scale, distance factor and rolloff scale for all 3D sound in FMOD.
read Get3DSettingswrite Set3DSettings
Retrieves the user value that that was set by calling the System::setUserData function.
read GetUserDatawrite SetUserData
Retrieves the number of recording devices available for this output mode. Use this to enumerate all recording devices possible so that the user can select one.
read GetRecordNumDriversRetrieves the maximum world size for the geometry engine.
read GetGeometrySettingswrite SetGeometrySettings
Set a proxy server to use for all subsequent internet connections. The name of a proxy server encoded as a UTF-8 string in host:port format e.g. www.fmod.org:8888 (defaults to port 80 if no port is specified).
read GetNetworkProxywrite SetNetworkProxy