Unigine.Plugins.FMOD.FMODEnums Class
This set of functions is available when the FMOD plugin is loaded.
Enums used in FMOD Plugin API.
FMODEnums Class
Enums
FMOD_MODE#
Name | Description |
---|---|
DEFAULT = 0x00000000 | Default for all modes listed below. LOOP_OFF, _2D, _3D_WORLDRELATIVE, _3D_INVERSEROLLOFF. |
LOOP_OFF = 0x00000001 | For non looping sounds. (DEFAULT). Overrides LOOP_NORMAL / LOOP_BIDI. |
LOOP_NORMAL = 0x00000002 | For forward looping sounds. |
LOOP_BIDI = 0x00000004 | For bidirectional looping sounds. (only works on software mixed static sounds). |
_2D = 0x00000008 | Ignores any 3D processing. (DEFAULT). |
_3D = 0x00000010 | Makes the sound positionable in 3D. Overrides _2D. |
CREATESTREAM = 0x00000080 | Decompress at runtime, streaming from the source provided (i.e. from disk). Overrides CREATESAMPLE and CREATECOMPRESSEDSAMPLE. Note a stream can only be played once at a time due to a stream only having 1 stream buffer and file handle. Open multiple streams to have them play concurrently. |
CREATESAMPLE = 0x00000100 | Decompress at loadtime, decompressing or decoding whole file into memory as the target sample format (i.e. PCM). Fastest for playback and most flexible. |
CREATECOMPRESSEDSAMPLE = 0x00000200 | Load MP2/MP3/FADPCM/IMAADPCM/Vorbis/AT9 or XMA into memory and leave it compressed. Vorbis/AT9/FADPCM encoding only supported in the .FSB container format. During playback the FMOD software mixer will decode it in realtime as a 'compressed sample'. Overrides CREATESAMPLE. If the sound data is not one of the supported formats, it will behave as if it was created with CREATESAMPLE and decode the sound into PCM. |
OPENUSER = 0x00000400 | Opens a user created static sample or stream. |
OPENMEMORY = 0x00000800 | "name_or_data" will be interpreted as a pointer to memory instead of filename for creating sounds. If used with CREATESAMPLE or CREATECOMPRESSEDSAMPLE, FMOD duplicates the memory into its own buffers. If used with CREATESTREAM, FMOD will stream out of the buffer whose pointer you passed in. In this case, your own buffer should not be freed until you have finished with and released the stream. |
OPENMEMORY_POINT = 0x10000000 | "name_or_data" will be interpreted as a pointer to memory instead of filename for creating sounds. This differs to OPENMEMORY in that it uses the memory as is, without duplicating the memory into its own buffers. Will not work if the data is compressed and CREATECOMPRESSEDSAMPLE is not used. |
OPENRAW = 0x00001000 | Will ignore file format and treat as raw pcm. |
OPENONLY = 0x00002000 | Just open the file, dont prebuffer or read. Good for fast opens for info. |
ACCURATETIME = 0x00004000 | For accurate Sound::getLength / Channel::setPosition on VBR MP3, and MOD/S3M/XM/IT/MIDI files. Scans file first, so takes longer to open. OPENONLY does not affect this. |
MPEGSEARCH = 0x00008000 | For corrupted / bad MP3 files. This will search all the way through the file until it hits a valid MPEG header. Normally only searches for 4k. |
NONBLOCKING = 0x00010000 | For opening sounds and getting streamed subsounds (seeking) asynchronously. |
UNIQUE = 0x00020000 | Unique sound, can only be played one at a time. |
_3D_HEADRELATIVE = 0x00040000 | Make the sound's position, velocity and orientation relative to the listener. |
_3D_WORLDRELATIVE = 0x00080000 | Make the sound's position, velocity and orientation absolute (relative to the world). (DEFAULT) |
_3D_INVERSEROLLOFF = 0x00100000 | This sound will follow the inverse rolloff model where mindistance = full volume, maxdistance = where sound stops attenuating, and rolloff is fixed according to the global rolloff factor. (DEFAULT) |
_3D_LINEARROLLOFF = 0x00200000 | This sound will follow a linear rolloff model where mindistance = full volume, maxdistance = silence. |
_3D_LINEARSQUAREROLLOFF = 0x00400000 | This sound will follow a linear-square rolloff model where mindistance = full volume, maxdistance = silence. |
_3D_INVERSETAPEREDROLLOFF = 0x00800000 | This sound will follow the inverse rolloff model at distances close to mindistance and a linear-square rolloff close to maxdistance. |
_3D_CUSTOMROLLOFF = 0x04000000 | This sound will follow a custom rolloff model. |
_3D_IGNOREGEOMETRY = 0x40000000 | Is not affected by geometry occlusion. |
IGNORETAGS = 0x02000000 | Skips id3v2/asf/etc tag checks when opening a sound, to reduce seek/read overhead when opening files. |
LOWMEM = 0x08000000 | Removes some features from samples to give a lower memory overhead. |
INIT_FLAGS#
Name | Description |
---|---|
NORMAL = 0x00000000 | Initialize normally. |
STREAM_FROM_UPDATE = 0x00000001 | No stream thread is created internally. Mainly used with non-realtime outputs. |
MIX_FROM_UPDATE = 0x00000002 | No mixer thread is created internally. |
_3D_RIGHTHANDED = 0x00000004 | 3D calculations will be performed in right-handed coordinates. |
CHANNEL_LOWPASS = 0x00000100 | Enables usage of ChannelControl::setLowPassGain, ChannelControl::set3DOcclusion, or automatic usage by the Geometry API. All voices will add a software lowpass filter effect into the DSP chain which is idle unless one of the previous functions/features are used. |
CHANNEL_DISTANCEFILTER = 0x00000200 | All _3D based voices will add a software lowpass and highpass filter effect into the DSP chain which will act as a distance-automated bandpass filter. |
PROFILE_ENABLE = 0x00010000 | Enable TCP/IP based host which allows FMOD Studio or FMOD Profiler to connect to it, and view memory, CPU and the DSP network graph in real-time. |
VOL0_BECOMES_VIRTUAL = 0x00020000 | Any sounds that are 0 volume will go virtual and not be processed except for having their positions updated virtually. |
GEOMETRY_USECLOSEST = 0x00040000 | With the geometry engine, only process the closest polygon rather than accumulating all polygons the sound to listener line intersects. |
PREFER_DOLBY_DOWNMIX = 0x00080000 | Uses the Dolby Pro Logic II downmix algorithm instead of the default stereo downmix algorithm. |
THREAD_UNSAFE = 0x00100000 | Disables thread safety for API calls. Only use this if FMOD is being called from a single thread, and if Studio API is not being used! |
PROFILE_METER_ALL = 0x00200000 | Slower, but adds level metering for every single DSP unit in the graph. |
MEMORY_TRACKING = 0x00400000 | Enables memory allocation tracking. Currently this is only useful when using the Studio API. Increases memory footprint and reduces performance. |
TIME_UNIT#
Name | Description |
---|---|
MS = 0x00000001 | Milliseconds. |
PCM = 0x00000002 | PCM samples, related to milliseconds * samplerate / 1000. |
PCMBYTES = 0x00000004 | Bytes, related to PCM samples * channels * datawidth (ie 16bit = 2 bytes). |
RAWBYTES = 0x00000008 | Raw file bytes of (compressed) sound data (does not include headers). Only used by Sound::getLength and Channel::getPositionTimeLine. |
PCMFRACTION = 0x00000010 | Fractions of 1 PCM sample. Unsigned int range 0 to 0xFFFFFFFF. Used for sub-sample granularity for DSP purposes. |
MODORDER = 0x00000100 | MOD/S3M/XM/IT. Order in a sequenced module format. |
MODROW = 0x00000200 | MOD/S3M/XM/IT. Current row in a sequenced module format. Cannot use with Channel::setPositionTimeLine. Sound::getLength will return the number of rows in the currently playing or seeked to pattern. |
MODPATTERN = 0x00000400 | MOD/S3M/XM/IT. Current pattern in a sequenced module format. Cannot use with Channel::setPositionTimeLine. Sound::getLength will return the number of patterns in the song and Channel::getPositionTimeLine will return the currently playing pattern. |
ERROR_TYPE#
SOUND_TYPE#
SOUND_FORMAT#
Name | Description |
---|---|
NONE = 0 | Uninitalized / unknown. |
PCM8 = 1 | 8bit integer PCM data. |
PCM16 = 2 | 16bit integer PCM data. |
PCM24 = 3 | 24bit integer PCM data. |
PCM32 = 4 | 32bit integer PCM data. |
PCMFLOAT = 5 | 32bit floating point PCM data. |
BITSTREAM = 6 | Sound data is in its native compressed format. See CREATECOMPRESSEDSAMPLE |
FORMAT_MAX = 7 | Maximum number of sound formats supported. |
DSP_CONNECTION_TYPE#
PARAMETER_DATA_TYPE#
Last update:
2022-12-14
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)