Firelight Technologies FMOD Studio API
FMOD_ADVANCEDSETTINGS
Settings for advanced features like configuring memory and cpu usage for the FMOD_CREATECOMPRESSEDSAMPLE feature.
C/C++ Syntax
typedef struct {
int cbSize;
int maxMPEGCodecs;
int maxADPCMCodecs;
int maxXMACodecs;
int maxVorbisCodecs;
int maxAT9Codecs;
int maxFADPCMCodecs;
int maxPCMCodecs;
int ASIONumChannels;
char **ASIOChannelList;
FMOD_SPEAKER *ASIOSpeakerList;
float HRTFMinAngle;
float HRTFMaxAngle;
float HRTFFreq;
float vol0virtualvol;
unsigned int defaultDecodeBufferSize;
unsigned short profilePort;
unsigned int geometryMaxFadeTime;
float distanceFilterCenterFreq;
int reverb3Dinstance;
int DSPBufferPoolSize;
unsigned int stackSizeStream;
unsigned int stackSizeNonBlocking;
unsigned int stackSizeMixer;
FMOD_DSP_RESAMPLER resamplerMethod;
unsigned int commandQueueSize;
unsigned int randomSeed;
} FMOD_ADVANCEDSETTINGS;
JavaScript Syntax
struct FMOD_ADVANCEDSETTINGS
{
maxMPEGCodecs,
maxADPCMCodecs,
maxXMACodecs,
maxVorbisCodecs,
maxAT9Codecs,
maxFADPCMCodecs,
maxPCMCodecs,
ASIONumChannels,
HRTFMinAngle,
HRTFMaxAngle,
HRTFFreq,
vol0virtualvol,
defaultDecodeBufferSize,
profilePort,
geometryMaxFadeTime,
distanceFilterCenterFreq,
reverb3Dinstance,
DSPBufferPoolSize,
stackSizeStream,
stackSizeNonBlocking,
stackSizeMixer,
resamplerMethod,
commandQueueSize,
randomSeed,
};
Members
cbSize
[w] Size of this structure. Use sizeof(FMOD_ADVANCEDSETTINGS) NOTE: This must be set before calling System::getAdvancedSettings or System::setAdvancedSettings!
maxMPEGCodecs
[r/w] Optional. Specify 0 to ignore. For use with FMOD_CREATECOMPRESSEDSAMPLE only. MPEG codecs consume 22,216 bytes per instance and this number will determine how many MPEG channels can be played simultaneously. Default = 32.
maxADPCMCodecs
[r/w] Optional. Specify 0 to ignore. For use with FMOD_CREATECOMPRESSEDSAMPLE only. ADPCM codecs consume 2,480 bytes per instance and this number will determine how many ADPCM channels can be played simultaneously. Default = 32.
maxXMACodecs
[r/w] Optional. Specify 0 to ignore. For use with FMOD_CREATECOMPRESSEDSAMPLE only. XMA codecs consume 6,263 bytes per instance and this number will determine how many XMA channels can be played simultaneously. Default = 32.
maxVorbisCodecs
[r/w] Optional. Specify 0 to ignore. For use with FMOD_CREATECOMPRESSEDSAMPLE only. Vorbis codecs consume 16,512 bytes per instance and this number will determine how many Vorbis channels can be played simultaneously. Default = 32.
maxAT9Codecs
[r/w] Optional. Specify 0 to ignore. For use with FMOD_CREATECOMPRESSEDSAMPLE only. AT9 codecs consume 20,664 bytes per instance and this number will determine how many AT9 channels can be played simultaneously. Default = 32.
maxFADPCMCodecs
[r/w] Optional. Specify 0 to ignore. For use with FMOD_CREATECOMPRESSEDSAMPLE only. FADPCM codecs consume 2,232 bytes per instance and this number will determine how many FADPCM channels can be played simultaneously. Default = 32.
maxPCMCodecs
[r/w] Optional. Specify 0 to ignore. For use with PS3 only. PCM codecs consume 2,536 bytes per instance and this number will determine how many streams and PCM voices can be played simultaneously. Default = 32.
ASIONumChannels
[r/w] Optional. Specify 0 to ignore. Number of channels available on the ASIO device.
ASIOChannelList
[r/w] Optional. Specify 0 to ignore. Pointer to an array of strings (number of entries defined by ASIONumChannels) with ASIO channel names.
ASIOSpeakerList
[r/w] Optional. Specify 0 to ignore. Pointer to a list of speakers that the ASIO channels map to. This can be called after System::init to remap ASIO output.
HRTFMinAngle
[r/w] Unsupported. Deprecated API feature.
HRTFMaxAngle
[r/w] Unsupported. Deprecated API feature.
HRTFFreq
[r/w] Unsupported. Deprecated API feature.
vol0virtualvol
[r/w] Optional. Specify 0 to ignore. For use with FMOD_INIT_VOL0_BECOMES_VIRTUAL. If this flag is used, and the volume is below this, then the sound will become virtual. Use this value to raise the threshold to a different point where a sound goes virtual.
defaultDecodeBufferSize
[r/w] Optional. Specify 0 to ignore. For streams. This determines the default size of the double buffer (in milliseconds) that a stream uses. Default = 400ms
profilePort
[r/w] Optional. Specify 0 to ignore. For use with FMOD_INIT_PROFILE_ENABLE. Specify the port to listen on for connections by the profiler application.
geometryMaxFadeTime
[r/w] Optional. Specify 0 to ignore. The maximum time in miliseconds it takes for a channel to fade to the new level when its occlusion changes.
distanceFilterCenterFreq
[r/w] Optional. Specify 0 to ignore. For use with FMOD_INIT_CHANNEL_DISTANCEFILTER. The default center frequency in Hz for the distance filtering effect. Default = 1500.0.
reverb3Dinstance
[r/w] Optional. Specify 0 to ignore. Out of 0 to 3, 3d reverb spheres will create a phyical reverb unit on this instance slot. See FMOD_REVERB_PROPERTIES.
DSPBufferPoolSize
[r/w] Optional. Specify 0 to ignore. Number of buffers in DSP buffer pool. Each buffer will be DSPBlockSize * sizeof(float) * SpeakerModeChannelCount. ie 7.1 @ 1024 DSP block size = 8 * 1024 * 4 = 32kb. Default = 8.
stackSizeStream
[r/w] Optional. Specify 0 to ignore. Specify the stack size for the FMOD Stream thread in bytes. Useful for custom codecs that use excess stack. Default 49,152 (48kb)
stackSizeNonBlocking
[r/w] Optional. Specify 0 to ignore. Specify the stack size for the FMOD_NONBLOCKING loading thread. Useful for custom codecs that use excess stack. Default 65,536 (64kb)
stackSizeMixer
[r/w] Optional. Specify 0 to ignore. Specify the stack size for the FMOD mixer thread. Useful for custom dsps that use excess stack. Default 49,152 (48kb)
resamplerMethod
[r/w] Optional. Specify 0 to ignore. Resampling method used with fmod's software mixer. See FMOD_DSP_RESAMPLER for details on methods.
commandQueueSize
[r/w] Optional. Specify 0 to ignore. Specify the command queue size for thread safe processing. Default 2048 (2kb)
randomSeed
[r/w] Optional. Specify 0 to ignore. Seed value that FMOD will use to initialize its internal random number generators.
Remarks
maxMPEGCodecs / maxADPCMCodecs / maxXMACodecs will determine the maximum cpu usage of playing realtime samples. Use this to lower potential excess cpu usage and also control memory usage.
maxPCMCodecs is for use with PS3 only. It will determine the maximum number of PCM voices that can be played at once. This includes streams of any format and all sounds created
without the FMOD_CREATECOMPRESSEDSAMPLE flag.
Memory will be allocated for codecs 'up front' (during System::init) if these values are specified as non zero. If any are zero, it allocates memory for the codec whenever a file of the type in question is loaded. So if maxMPEGCodecs is 0 for example, it will allocate memory for the mpeg codecs the first time an mp3 is loaded or an mp3 based .FSB file is loaded.
Due to inefficient encoding techniques on certain .wav based ADPCM files, FMOD can can need an extra 29720 bytes per codec. This means for lowest memory consumption. Use FSB as it uses an optimal/small ADPCM block size.
Members marked with [r] mean the variable is modified by FMOD and is for reading purposes only. Do not change this value.
Members marked with [w] mean the variable can be written to. The user can set the value.
Members marked with [r/w] are either read or write depending on if you are using System::setAdvancedSettings (w) or System::getAdvancedSettings (r).
JavaScript only :
Not all fields are currently supported or may not work as expected at this time. To initialize an new instance in javascript use "FMOD.ADVANCEDSETTINGS()", no 'new' keyword is required.
See Also
Version 1.10.03 Built on Feb 1, 2018